|
[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 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.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |