KVM: nVMX: Advertise IA32_PAT in VM exit control
PATCH 1/1 KVM: nVMX: Advertise IA32_PAT in VM exit control
Advertise VM_EXIT_SAVE_IA32_PAT and VM_EXIT_LOAD_IA32_PAT.
--- arch/x86/kvm/vmx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kvm/vmx.c +2 -1
@@ -2198,7 +2198,8 @@ static __init void nested_vmx_setup_ctls_msrs(void)#else nested_vmx_exit_ctls_high =0 ;#endif - nested_vmx_exit_ctls_high |=VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR ; + nested_vmx_exit_ctls_high |=VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR | +VM_EXIT_LOAD_IA32_PAT |VM_EXIT_SAVE_IA32_PAT ;/* entry controls */ rdmsr(MSR_IA32_VMX_ENTRY_CTLS,
Signature · 1 line
1.7.9.5
Quoted 12 lines · Arthur Chunqi Li
Advertise
VM_EXIT_SAVE_IA32_PATandVM_EXIT_LOAD_IA32_PAT.Signed-off-by Arthur Chunqi Li <[email protected]>--- arch/x86/kvm/vmx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)arch/x86/kvm/vmx.c +0
-0
arch/x86/kvm/vmx.c static __init void nested_vmx_setup_ctls_msrs(void) · line 2203
Quoted 7 lines
arch/x86/kvm/vmx.c +2
-1@@ -2198,7 +2198,8 @@ static __init void nested_vmx_setup_ctls_msrs(void)#else nested_vmx_exit_ctls_high =0 ;#endif - nested_vmx_exit_ctls_high |=VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR ; + nested_vmx_exit_ctls_high |=VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR | +VM_EXIT_LOAD_IA32_PAT |VM_EXIT_SAVE_IA32_PAT ;
You should not set those if host does not support them, otherwise GUEST_IA32_PAT may not be available.
--
Gleb.
Quoted 10 lines · Arthur Chunqi Li
Quoted 7 lines
Advertise
VM_EXIT_SAVE_IA32_PATandVM_EXIT_LOAD_IA32_PAT.Signed-off-by Arthur Chunqi Li <[email protected]>---
arch/x86/kvm/vmx.c| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 14 lines
arch/x86/kvm/vmx.c static __init void nested_vmx_setup_ctls_msrs(void) · line 2203
Quoted 12 lines
arch/x86/kvm/vmx.c +2
-1@@ -2198,7 +2198,8 @@ static __init void nested_vmx_setup_ctls_msrs(void)#else nested_vmx_exit_ctls_high =0 ;#endif - nested_vmx_exit_ctls_high |=VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR ; + nested_vmx_exit_ctls_high |=VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR | +VM_EXIT_LOAD_IA32_PAT |VM_EXIT_SAVE_IA32_PAT ;You should not set those if host does not support them, otherwise
GUEST_IA32_PATmay not be available
To Jan,
Is this different from IA32_EFER?
Arthur
Quoted 3 lines
--
Gleb.
Quoted 24 lines · Gmail
Quoted 10 lines · Arthur Chunqi Li
Quoted 7 lines
Advertise
VM_EXIT_SAVE_IA32_PATandVM_EXIT_LOAD_IA32_PAT.Signed-off-by Arthur Chunqi Li <[email protected]>---
arch/x86/kvm/vmx.c| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)Quoted 14 lines
arch/x86/kvm/vmx.c static __init void nested_vmx_setup_ctls_msrs(void) · line 2203
Quoted 12 lines
arch/x86/kvm/vmx.c +2
-1@@ -2198,7 +2198,8 @@ static __init void nested_vmx_setup_ctls_msrs(void)#else nested_vmx_exit_ctls_high =0 ;#endif - nested_vmx_exit_ctls_high |=VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR ; + nested_vmx_exit_ctls_high |=VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR | +VM_EXIT_LOAD_IA32_PAT |VM_EXIT_SAVE_IA32_PAT ;You should not set those if host does not support them, otherwise
GUEST_IA32_PATmay not be available
Quoted 2 lines
To Jan,
Is this different fromIA32_EFER?
As we use a real VMCS to keep GUEST/HOST_IA32_EFER, we actually do depend on the existence of the host feature. So my patch requires an update as you noted.
Jan
Quoted 25 lines · Jan Kiszka
Quoted 24 lines · Gmail
Quoted 24 lines · Arthur Chunqi Li
Quoted 12 lines
Advertise
VM_EXIT_SAVE_IA32_PATandVM_EXIT_LOAD_IA32_PAT.Signed-off-by Arthur Chunqi Li <[email protected]>---
arch/x86/kvm/vmx.c| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)arch/x86/kvm/vmx.c +0
-0arch/x86/kvm/vmx.c static __init void nested_vmx_setup_ctls_msrs(void) · line 2203
Quoted 7 lines
arch/x86/kvm/vmx.c +2
-1@@ -2198,7 +2198,8 @@ static __init void nested_vmx_setup_ctls_msrs(void)#else nested_vmx_exit_ctls_high =0 ;#endif - nested_vmx_exit_ctls_high |=VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR ; + nested_vmx_exit_ctls_high |=VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR | +VM_EXIT_LOAD_IA32_PAT |VM_EXIT_SAVE_IA32_PAT ;You should not set those if host does not support them, otherwise
GUEST_IA32_PATmay not be available
Quoted 7 lines
Quoted 2 lines
To Jan,
Is this different fromIA32_EFER?As we use a real VMCS to keep GUEST/HOST_IA32_EFER, we actually do depend on the existence of the host feature. So my patch requires an update as you noted.
Your patch didn't add new users of GUEST_IA32_PAT and VM_ENTRY_LOAD_IA32_PAT is enabled by nested only if host has it, so I am not sure why you are saying that patch should be updated.
--
Gleb.
Quoted 29 lines · Gleb Natapov
Quoted 28 lines · Jan Kiszka
Quoted 26 lines · Gmail
Quoted 10 lines · Arthur Chunqi Li
Quoted 7 lines
Advertise
VM_EXIT_SAVE_IA32_PATandVM_EXIT_LOAD_IA32_PAT.Signed-off-by Arthur Chunqi Li <[email protected]>---
arch/x86/kvm/vmx.c| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)Quoted 14 lines
arch/x86/kvm/vmx.c static __init void nested_vmx_setup_ctls_msrs(void) · line 2203
Quoted 12 lines
arch/x86/kvm/vmx.c +2
-1@@ -2198,7 +2198,8 @@ static __init void nested_vmx_setup_ctls_msrs(void)#else nested_vmx_exit_ctls_high =0 ;#endif - nested_vmx_exit_ctls_high |=VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR ; + nested_vmx_exit_ctls_high |=VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR | +VM_EXIT_LOAD_IA32_PAT |VM_EXIT_SAVE_IA32_PAT ;You should not set those if host does not support them, otherwise
GUEST_IA32_PATmay not be availableTo Jan,
Is this different fromIA32_EFER?
Quoted 7 lines
Quoted 4 lines
As we use a real VMCS to keep GUEST/HOST_IA32_EFER, we actually do depend on the existence of the host feature. So my patch requires an update as you noted.
Your patch didn't add new users of
GUEST_IA32_PATandVM_ENTRY_LOAD_IA32_PATis enabled by nested only if host has it, so I am not sure why you are saying that patch should be updated.
I think Jan points [1] and you refer to another.
[1] http://www.mail-archive.com/[email protected]/msg94188.html
Arthur
Quoted 4 lines
--
Gleb.
Quoted 34 lines · Arthur Chunqi Li
Quoted 33 lines · Gleb Natapov
Quoted 32 lines · Jan Kiszka
Quoted 24 lines · Gmail
Quoted 10 lines · Arthur Chunqi Li
Quoted 7 lines
Advertise
VM_EXIT_SAVE_IA32_PATandVM_EXIT_LOAD_IA32_PAT.Signed-off-by Arthur Chunqi Li <[email protected]>---
arch/x86/kvm/vmx.c| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)Quoted 14 lines
arch/x86/kvm/vmx.c static __init void nested_vmx_setup_ctls_msrs(void) · line 2203
Quoted 12 lines
arch/x86/kvm/vmx.c +2
-1@@ -2198,7 +2198,8 @@ static __init void nested_vmx_setup_ctls_msrs(void)#else nested_vmx_exit_ctls_high =0 ;#endif - nested_vmx_exit_ctls_high |=VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR ; + nested_vmx_exit_ctls_high |=VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR | +VM_EXIT_LOAD_IA32_PAT |VM_EXIT_SAVE_IA32_PAT ;You should not set those if host does not support them, otherwise
GUEST_IA32_PATmay not be availableQuoted 2 lines
To Jan,
Is this different fromIA32_EFER?As we use a real VMCS to keep GUEST/HOST_IA32_EFER, we actually do depend on the existence of the host feature. So my patch requires an update as you noted.
Quoted 6 lines
Quoted 3 lines
Your patch didn't add new users of
GUEST_IA32_PATandVM_ENTRY_LOAD_IA32_PATis enabled by nested only if host has it, so I am not sure why you are saying that patch should be updated.I think Jan points [1] and you refer to another.
[1] http://www.mail-archive.com/[email protected]/msg94188.html
Yep, that's what I was referring to.
Jan
Quoted 35 lines · Jan Kiszka
Quoted 34 lines · Arthur Chunqi Li
Quoted 33 lines · Gleb Natapov
Quoted 32 lines · Jan Kiszka
Quoted 24 lines · Gmail
Quoted 10 lines · Arthur Chunqi Li
Quoted 7 lines
Advertise
VM_EXIT_SAVE_IA32_PATandVM_EXIT_LOAD_IA32_PAT.Signed-off-by Arthur Chunqi Li <[email protected]>---
arch/x86/kvm/vmx.c| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)Quoted 14 lines
arch/x86/kvm/vmx.c static __init void nested_vmx_setup_ctls_msrs(void) · line 2203
Quoted 12 lines
arch/x86/kvm/vmx.c +2
-1@@ -2198,7 +2198,8 @@ static __init void nested_vmx_setup_ctls_msrs(void)#else nested_vmx_exit_ctls_high =0 ;#endif - nested_vmx_exit_ctls_high |=VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR ; + nested_vmx_exit_ctls_high |=VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR | +VM_EXIT_LOAD_IA32_PAT |VM_EXIT_SAVE_IA32_PAT ;You should not set those if host does not support them, otherwise
GUEST_IA32_PATmay not be availableQuoted 2 lines
To Jan,
Is this different fromIA32_EFER?As we use a real VMCS to keep GUEST/HOST_IA32_EFER, we actually do depend on the existence of the host feature. So my patch requires an update as you noted.
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
Your patch didn't add new users of
GUEST_IA32_PATandVM_ENTRY_LOAD_IA32_PATis enabled by nested only if host has it, so I am not sure why you are saying that patch should be updated.I think Jan points [1] and you refer to another.
[1] http://www.mail-archive.com/[email protected]/msg94188.html
Yep, that's what I was referring to.
Ah, too many patches :)
--
Gleb.