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

Re: [Xen-devel] [RFC v1 05/15] vmx: Initialize VT-d Posted-Interrupts Descriptor



On 04/05/2015 06:32, Wu, Feng wrote:
>
>>> +    v->arch.hvm_vmx.pi_desc.ndm = 0;
>>> +    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 = (dest << 8) & 0xFF00;
>> Surely there are some macros for that?
> I find some macros defined in xen/include/asm-x86/apicdef.h, but since
> it is not a common format here, I cannot find one which can be used for it.
>
> In the above case (the 'else' branch), 'dest' will occupy bit 8:15 of 'ndst' 
> field.
>
> Either we add a macro in the file (it is a little strange, since the format 
> is not common),
> or we remain the current solution. Any ideas?

MASK_INSR() is what you are looking for, but you will need to provide a
sensible name for 0xFF00.

~Andrew

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