[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.15 at 07:32, <feng.wu@xxxxxxxxx> wrote: >> From: Konrad Rzeszutek Wilk [mailto:konrad.wilk@xxxxxxxxxx] >> Sent: Friday, March 27, 2015 3:29 AM >> On Wed, Mar 25, 2015 at 08:31:47PM +0800, Feng Wu 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? Adding a macro if really no suitable one exists is the minimum - recently I went through and replaced quite a few of such hard- coded numbers with something more understandable, and hence you shouldn't introduce new instances of such. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |