[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [V10 PATCH 12/23] PVH xen: Support privileged op emulation for PVH
On Thu, Aug 8, 2013 at 8:35 AM, Jan Beulich <JBeulich@xxxxxxxx> wrote: >>>> On 08.08.13 at 03:59, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote: >> On Wed, 7 Aug 2013 14:49:50 +0100 >> George Dunlap <dunlapg@xxxxxxxxx> wrote: >>> On Wed, Jul 24, 2013 at 2:59 AM, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> >>> wrote: >>> > + * We need vcpu because during context switch, going from PV to >>> > PVH, >>> > + * in save_segments() current has been updated to next, and no >>> > longer pointing >>> > + * to the PV, but the intention is to get selector for the PV. >>> > Checking >>> > + * is_pvh_vcpu(current) will yield incorrect results in such a >>> > case. >>> > + */ >>> > +#define read_segment_register(vcpu, regs, name) \ >>> > +({ u16 __sel; \ >>> > + struct cpu_user_regs *_regs = (regs); \ >>> > + \ >>> > + if ( is_pvh_vcpu(vcpu) && guest_mode(_regs) ) \ >>> > + __sel = pvh_get_selector(vcpu, x86_seg_##name); \ >>> > + else \ >>> > + asm volatile ( "movw %%" #name ",%0" : "=r" (__sel) ); \ >>> >>> Is there a reason you discarded the STR() macro here? >> >> Suggested by Jan to change it, not sure the reason. Jan do you recall? > > I think this is the result of multiple iterations of the patch, where > intermediately the stringification had disappeared altogether. > When I requested it to be restored, I used the simpler # operator > in the outline. > > In any event I think STR() should go away altogether (where > necessary replaced by __stringify()), and was needlessly used > in the original code here: The intended use is when you need > the argument macro expanded before stringification, which is > not the case here. OK -- I don't have strong opinions on STR, I just wanted to make sure it wasn't an oversight. (Might be worth mentioning this in the change log.) -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |