Message ID | 20200224202744.221487-1-oupton@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | KVM: nVMX: Consolidate nested MTF checks to helper function | expand |
On 02/24/2020 12:27 PM, Oliver Upton wrote: > commit 5ef8acbdd687 ("KVM: nVMX: Emulate MTF when performing > instruction emulation") introduced a helper to check the MTF > VM-execution control in vmcs12. Change pre-existing check in > nested_vmx_exit_reflected() to instead use the helper. > > Signed-off-by: Oliver Upton <oupton@google.com> > --- > arch/x86/kvm/vmx/nested.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c > index e920d7834d73..b9caad70ac7c 100644 > --- a/arch/x86/kvm/vmx/nested.c > +++ b/arch/x86/kvm/vmx/nested.c > @@ -5627,7 +5627,7 @@ bool nested_vmx_exit_reflected(struct kvm_vcpu *vcpu, u32 exit_reason) > case EXIT_REASON_MWAIT_INSTRUCTION: > return nested_cpu_has(vmcs12, CPU_BASED_MWAIT_EXITING); > case EXIT_REASON_MONITOR_TRAP_FLAG: > - return nested_cpu_has(vmcs12, CPU_BASED_MONITOR_TRAP_FLAG); > + return nested_cpu_has_mtf(vmcs12); > case EXIT_REASON_MONITOR_INSTRUCTION: > return nested_cpu_has(vmcs12, CPU_BASED_MONITOR_EXITING); > case EXIT_REASON_PAUSE_INSTRUCTION: Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
On 24/02/20 21:27, Oliver Upton wrote: > commit 5ef8acbdd687 ("KVM: nVMX: Emulate MTF when performing > instruction emulation") introduced a helper to check the MTF > VM-execution control in vmcs12. Change pre-existing check in > nested_vmx_exit_reflected() to instead use the helper. > > Signed-off-by: Oliver Upton <oupton@google.com> > --- > arch/x86/kvm/vmx/nested.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c > index e920d7834d73..b9caad70ac7c 100644 > --- a/arch/x86/kvm/vmx/nested.c > +++ b/arch/x86/kvm/vmx/nested.c > @@ -5627,7 +5627,7 @@ bool nested_vmx_exit_reflected(struct kvm_vcpu *vcpu, u32 exit_reason) > case EXIT_REASON_MWAIT_INSTRUCTION: > return nested_cpu_has(vmcs12, CPU_BASED_MWAIT_EXITING); > case EXIT_REASON_MONITOR_TRAP_FLAG: > - return nested_cpu_has(vmcs12, CPU_BASED_MONITOR_TRAP_FLAG); > + return nested_cpu_has_mtf(vmcs12); > case EXIT_REASON_MONITOR_INSTRUCTION: > return nested_cpu_has(vmcs12, CPU_BASED_MONITOR_EXITING); > case EXIT_REASON_PAUSE_INSTRUCTION: > Queued, thanks. Paolo
diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c index e920d7834d73..b9caad70ac7c 100644 --- a/arch/x86/kvm/vmx/nested.c +++ b/arch/x86/kvm/vmx/nested.c @@ -5627,7 +5627,7 @@ bool nested_vmx_exit_reflected(struct kvm_vcpu *vcpu, u32 exit_reason) case EXIT_REASON_MWAIT_INSTRUCTION: return nested_cpu_has(vmcs12, CPU_BASED_MWAIT_EXITING); case EXIT_REASON_MONITOR_TRAP_FLAG: - return nested_cpu_has(vmcs12, CPU_BASED_MONITOR_TRAP_FLAG); + return nested_cpu_has_mtf(vmcs12); case EXIT_REASON_MONITOR_INSTRUCTION: return nested_cpu_has(vmcs12, CPU_BASED_MONITOR_EXITING); case EXIT_REASON_PAUSE_INSTRUCTION:
commit 5ef8acbdd687 ("KVM: nVMX: Emulate MTF when performing instruction emulation") introduced a helper to check the MTF VM-execution control in vmcs12. Change pre-existing check in nested_vmx_exit_reflected() to instead use the helper. Signed-off-by: Oliver Upton <oupton@google.com> --- arch/x86/kvm/vmx/nested.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)