Bug 1854218

Summary: [VBS] Poor performance of Windows 10 OS when VBS with HVCI is enabled
Product: Red Hat Enterprise Linux 8 Reporter: Marek Kedzierski <mkedzier>
Component: virtio-winAssignee: Marek Kedzierski <mkedzier>
virtio-win sub component: virtio-win-prewhql QA Contact: lijin <lijin>
Status: CLOSED WONTFIX Docs Contact:
Severity: unspecified    
Priority: unspecified CC: jinzhao, juzhang
Version: ---Keywords: FutureFeature
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Windows   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-06 15:51:52 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marek Kedzierski 2020-07-06 19:16:00 UTC
Description of problem:

After enabling HVCI on Windows 10 OS (2004), the performance degradation can be observed.




Steps to Reproduce:

Enable HVCI according to requirements - https://docs.microsoft.com/en-us/windows/security/threat-protection/device-guard/enable-virtualization-based-protection-of-code-integrity

Actual results:

The system is running slowly

Expected results:

There should not be huge performance degradation.

Additional info:

Information from HVCI documentation:

"Because it makes use of Mode Based Execution Control, HVCI works better with Intel Kaby Lake or AMD Zen 2 CPUs and newer. Processors without MBEC will rely on an emulation of this feature, called Restricted User Mode, which has a bigger impact on performance."

Comment 3 lijin 2020-07-31 03:13:22 UTC
Hi Merek,

How slow is the win10 vm?
I did not feel the poor performance after I enable HVCI on win10-64(2004).

btw, the poor performance is caused by virtio drivers? which driver cause it?(I load vioscsi and netkvm drivers)

Comment 4 Marek Kedzierski 2020-07-31 11:44:38 UTC
(In reply to lijin from comment #3)
> Hi Merek,
> 
> How slow is the win10 vm?
> I did not feel the poor performance after I enable HVCI on win10-64(2004).

If you don't see that it's poor it is very good. I got another notfication
that's is not so bad. I need to check my setup then -- on my system serious 
lags can be observed.

> 
> btw, the poor performance is caused by virtio drivers? which driver cause
> it?(I load vioscsi and netkvm drivers)

This is not caused by virtio drivers. It is caused by nesting and by lack of
hardware suppport for MBEC. Microsoft mentions that:

'Because it (HVCI) makes use of Mode Based Execution Control, HVCI works better with 
Intel Kaby Lake or AMD Zen 2 CPUs and newer. Processors without MBEC will rely on an 
emulation of this feature, called Restricted User Mode, which has a bigger impact on 
performance.'

However the scale of the impact not shown in the figures.

Comment 5 lijin 2020-08-03 01:32:55 UTC
(In reply to Marek Kedzierski from comment #4)
> (In reply to lijin from comment #3)
> > Hi Merek,
> > 
> > How slow is the win10 vm?
> > I did not feel the poor performance after I enable HVCI on win10-64(2004).
> 
> If you don't see that it's poor it is very good. I got another notfication
> that's is not so bad. I need to check my setup then -- on my system serious 
> lags can be observed.
> 
> > 
> > btw, the poor performance is caused by virtio drivers? which driver cause
> > it?(I load vioscsi and netkvm drivers)
> 
> This is not caused by virtio drivers. It is caused by nesting and by lack of
> hardware suppport for MBEC. Microsoft mentions that:


Could you help to move this bug to correct component if it's not caused by virtio drivers?

Thanks

Comment 6 Marek Kedzierski 2020-08-06 15:51:52 UTC
The mentioned 'huge performance degradation' happens only on my system. 
On two other tested systems the performance was OK.

Microsoft oficially mentions that enabling HVCI may have an impact on performance of
the systems that don't have hardware support for MBEC. So the only thing we can do 
is to add note to our customers (with link to MS documentation) that enabling HVCI may have an impact on performance.