Re: [PATCH 03/22] KVM: nVMX: Fail VMPTRLD when vmcs12 is shadow VMCS and nested CPU do not support VMCS shadowing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 27/06/18 18:35, Radim Krčmář wrote:
2018-06-23 02:35+0300, Liran Alon:
Signed-off-by: Liran Alon <liran.alon@xxxxxxxxxx>
Signed-off-by: Jim Mattson <jmattson@xxxxxxxxxx>
---
  arch/x86/kvm/vmx.c | 10 +++++++++-
  1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 651ce405995c..4861fea7a397 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1710,6 +1710,12 @@ static inline bool nested_cpu_has_vmwrite_any_field(struct kvm_vcpu *vcpu)
  		MSR_IA32_VMX_MISC_VMWRITE_SHADOW_RO_FIELDS;
  }
+static inline bool nested_cpu_has_vmx_shadow_vmcs(struct kvm_vcpu *vcpu)
+{
+	return to_vmx(vcpu)->nested.msrs.secondary_ctls_high &
+		SECONDARY_EXEC_SHADOW_VMCS;
Please change the name to nested_cpu_supports_vmx_shadow_vmcs().

"nested_cpu_has" prefix is reserved for features that are enabled in VM
controls,

thanks.
Make sense. That's a better name for this.
Will do in v2 of this series after the review for all patches in series is done.

Thanks,
-Liran





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux