[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
> -----Original Message----- > From: Andrew Cooper [mailto:amc96@xxxxxxxxxxxxxxxx] On Behalf Of > Andrew Cooper > Sent: Monday, May 04, 2015 4:36 PM > To: Wu, Feng; Konrad Rzeszutek Wilk > Cc: Tian, Kevin; xen-devel@xxxxxxxxxxxxx; JBeulich@xxxxxxxx; Zhang, Yang Z; > keir@xxxxxxx > Subject: 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 Yes, that is the right one for me. Thanks a lot, Andrew! Thanks, Feng _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |