x86/vmx: account for SHADOW_PAGING when use hvm_shadow_handle_cd()

The shadow_handle_cd() can be used only with SHADOW_PAGING=y, so guard
shadow_handle_cd() call with paging_mode_shadow() which accounts for
SHADOW_PAGING state.

bloat-o-meter
 add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-290 (-290)

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Grygorii Strashko authored and Jan Beulich committed 2025-11-20 11:22:42 +01:00
1 parent cb04b0fa5a
commit 0545f53aa9
1 file changed
+1 -1
+1 -1
View File
@@ -1508,7 +1508,7 @@ static void shadow_handle_cd(struct vcpu *v, unsigned long value)
static void cf_check vmx_handle_cd(struct vcpu *v, unsigned long value)
{
if ( !paging_mode_hap(v->domain) )
if ( paging_mode_shadow(v->domain) )
{
/*
* For shadow, 'load IA32_PAT' VM-entry control is 0, so it cannot
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.