From: "Jan Beulich" Subject: Re: [PATCH 2/5] VMX: dump full host state Date: Wed, 21 Jan 2015 10:39:46 +0000 Message-ID: <54BF90020200007800057641@mail.emea.novell.com> References: <54BE42EA0200007800056EDC@mail.emea.novell.com> <54BE44B70200007800056F0A@mail.emea.novell.com> <54BE8E0F.4010905@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YDshQ-00055v-M7 for xen-devel@lists.xenproject.org; Wed, 21 Jan 2015 10:39:48 +0000 In-Reply-To: <54BE8E0F.4010905@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: xen-devel , Kevin Tian , Eddie Dong , JunNakajima List-Id: xen-devel@lists.xenproject.org >>> On 20.01.15 at 18:19, 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