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

Re: [Xen-devel] [PATCH] x86: Correctly report max number of hypervisor leaves



>>> On 02.06.14 at 11:29, <roger.pau@xxxxxxxxxx> wrote:
> On 30/05/14 22:11, Boris Ostrovsky wrote:
>> Commit def0bbd31 provided support for changing max number of
>> hypervisor cpuid leaves (in leaf 0x4000xx00). It also made the
>> hypervisor incorrectly report this number for guests that
>> use default value (i.e. don't specify leaf 0x4000xx00 in config
>> file)
>> 
>> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
>> Reported-by: Roger Pau Monne <roger.pau@xxxxxxxxxx>
> 
> Tested-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx>
> 
> However I think we should prevent PVH guests from seeing the newly
> introduced XEN_HVM_CPUID_APIC_ACCESS_VIRT and
> XEN_HVM_CPUID_X2APIC_VIRT flags. I have the following patch, but it
> still adds one more is_pvh_vcpu into VMX code. I've tried checking for
> vlapic_enabled, but it also returns true for PVH guests.

And vlapic_enabled() wouldn't be the right qualifier anyway, as
feature availability doesn't depend on what other features are
enabled. I think is_pvh is fine for now here, until the folding of
PVH and HVM got far enough.

Jan

> --- a/xen/arch/x86/hvm/vmx/vmx.c
> +++ b/xen/arch/x86/hvm/vmx/vmx.c
> @@ -1660,7 +1660,7 @@ void vmx_hypervisor_cpuid_leaf(uint32_t sub_idx,
>                                 uint32_t *eax, uint32_t *ebx,
>                                 uint32_t *ecx, uint32_t *edx)
>  {
> -    if ( sub_idx != 0 )
> +    if ( sub_idx != 0 || is_pvh_vcpu(current) )
>          return;
>      if ( cpu_has_vmx_apic_reg_virt )
>          *eax |= XEN_HVM_CPUID_APIC_ACCESS_VIRT;



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.