Re: [PATCH v2 2/8] KVM: x86: add pcommit support

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

 




On 09/09/2015 08:05, Xiao Guangrong wrote:
> +	if (!guest_cpuid_has_pcommit(vcpu) && nested)
> +		vmx->nested.nested_vmx_secondary_ctls_high &=
> +			~SECONDARY_EXEC_PCOMMIT;

It is legal to set CPUID multiple times, so I think we need

        if (static_cpu_has(X86_FEATURE_PCOMMIT) && nested) {
                if (guest_cpuid_has_pcommit(vcpu))
                        vmx->nested.nested_vmx_secondary_ctls_high |=
                                SECONDARY_EXEC_PCOMMIT;
                else
                        vmx->nested.nested_vmx_secondary_ctls_high &=
                                ~SECONDARY_EXEC_PCOMMIT;
        }

The INVPCID exit probably should be handled the same way as PCOMMIT;
moving both to a new nested_vmx_update_ctls_msrs probably makes sense.

This can be done on top of this series.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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