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

Re: [Xen-devel] [PATCH v10 1/9] xen/x86: set the vPMU interface based on the presence of a lapic



El 11/12/15 a les 8.51, Tian, Kevin ha escrit:
>> From: Roger Pau Monne
>> Sent: Tuesday, December 08, 2015 12:48 AM
>>
>> Instead of choosing the interface to expose to guests based on the guest
>> type, do it based on whether the guest has an emulated local apic or not.
>>
>> Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx>
>> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
>> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
>> Cc: Jan Beulich <jbeulich@xxxxxxxx>
>> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>> ---
> 
> [...]
> 
>> @@ -637,7 +638,7 @@ long do_xenpmu_op(unsigned int op,
>> XEN_GUEST_HANDLE_PARAM(xen_pmu_params_t) arg)
>>      struct xen_pmu_data *xenpmu_data;
>>      struct vpmu_struct *vpmu;
>>
>> -    if ( !opt_vpmu_enabled )
>> +    if ( !opt_vpmu_enabled || has_vlapic(current->domain) )
>>          return -EOPNOTSUPP;
> 
> !has_vlapic(current->domain)?

No, the vpmu hypercall interface is only available to guests that don't
have a local apic.

> [...]
> 
>> diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
>> index 2581e97..06c12e1 100644
>> --- a/xen/arch/x86/hvm/vmx/vmx.c
>> +++ b/xen/arch/x86/hvm/vmx/vmx.c
>> @@ -148,7 +148,7 @@ static int vmx_vcpu_initialise(struct vcpu *v)
>>      }
>>
>>      /* PVH's VPMU is initialized via hypercall */
>> -    if ( is_hvm_vcpu(v) )
>> +    if ( is_hvm_vcpu(v) && has_vlapic(v->domain) )
>>          vpmu_initialise(v);
> 
> Is is_hvm_vcpu still required here?

No, I will remove it.

Thanks, Roger.


_______________________________________________
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®.