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

Re: [Xen-devel] [PATCH v5 4/7] VMX: Make sure PI is in proper state before install the hooks



>>> On 24.10.16 at 09:45, <feng.wu@xxxxxxxxx> wrote:

> 
>> -----Original Message-----
>> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
>> Sent: Monday, October 24, 2016 3:23 PM
>> To: Wu, Feng <feng.wu@xxxxxxxxx>
>> Cc: andrew.cooper3@xxxxxxxxxx; dario.faggioli@xxxxxxxxxx;
>> george.dunlap@xxxxxxxxxxxxx; Tian, Kevin <kevin.tian@xxxxxxxxx>; xen-
>> devel@xxxxxxxxxxxxx 
>> Subject: RE: [PATCH v5 4/7] VMX: Make sure PI is in proper state before 
> install
>> the hooks
>> 
>> >>> On 17.10.16 at 08:26, <feng.wu@xxxxxxxxx> wrote:
>> >> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
>> >> Sent: Wednesday, October 12, 2016 9:45 PM
>> >> >>> On 11.10.16 at 02:57, <feng.wu@xxxxxxxxx> wrote:
>> >> >  static void pi_desc_init(struct vcpu *v)
>> >> >  {
>> >> > -    uint32_t dest;
>> >> > -
>> >> >      v->arch.hvm_vmx.pi_desc.nv = posted_intr_vector;
>> >> >
>> >> > -    dest = cpu_physical_id(v->processor);
>> >> > -
>> >> > -    if ( x2apic_enabled )
>> >> > -        v->arch.hvm_vmx.pi_desc.ndst = dest;
>> >> > -    else
>> >> > -        v->arch.hvm_vmx.pi_desc.ndst = MASK_INSR(dest,
>> >> PI_xAPIC_NDST_MASK);
>> >> > +    /*
>> >> > +     * Mark NDST as invalid, then we can use this invalid value as a
>> >> > +     * marker to whether update NDST or not in vmx_pi_hooks_assign().
>> >> > +     */
>> >> > +    v->arch.hvm_vmx.pi_desc.ndst = 0xffffffff;
>> >>
>> >> I think I had at the same time asked to make this a #define, so the
>> >> two (currently) instance can be connected together.
>> >
>> > Sorry, Maybe I didn't get that. Do you mean I need to define a Macro
>> > for 0xffffffff, so we can use it here and in vmx.c?
>> 
>> Yes.
> 
> Thanks for confirm. Which one do you like? Put the macro in vmx.h
> or asm/apic.h?

This being (for now at least) VMX-specific, I think the former is to be
preferred.

Jan

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

 


Rackspace

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