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

Re: [Xen-devel] [PATCH 2/5] VMX: dump full host state



>>> On 20.01.15 at 18:19, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 20/01/15 11:06, Jan Beulich wrote:
>> +    printk("RIP = 0x%016lx (%ps)  RSP = 0x%016lx\n",
>> +           vmr(HOST_RIP), (void *)vmr(HOST_RIP), vmr(HOST_RSP));
> 
> Given the asm volatile, the compiler is unlikely to elide the second
> read of HOST_RIP.  I suppose that this is debug code and it really
> doesn't matter too much, but if it is used anywhere else it might be
> worth pulling out into a local variable.

Indeed I didn't latch this into a local variable simply because this is
debugging code.

>> +    printk("Sysenter RSP=%016lx CS:RIP=%04x:%016lx\n",
>> +           vmr(HOST_SYSENTER_ESP),
>> +           vmr32(HOST_SYSENTER_CS), vmr(HOST_SYSENTER_EIP));
> 
> vmr16() ?

The BUILD_BUG_ON() in vmr32() not triggering already proves that
this is the right accessor - {HOST,GUEST}_SYSENTER_CS both are
32-bit fields.

Jan


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