From: "Jan Beulich" Subject: Re: [PATCH v3 1/2] x86/hvm: Always do SMAP check when updating runstate_guest(v) Date: Tue, 29 Jul 2014 09:25:14 +0100 Message-ID: <53D7768A02000078000272B4@mail.emea.novell.com> References: <978994327-6622-1-git-send-email-feng.wu@intel.com> <978994327-6622-2-git-send-email-feng.wu@intel.com> <53D7670B02000078000271C0@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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: Feng Wu Cc: "linux@eikelenboom.it" , "tim@xen.org" , "keir@xen.org" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org >>> On 29.07.14 at 10:13, wrote: >> From: Jan Beulich [mailto:JBeulich@suse.com] >> >>> On 08.01.01 at 23:52, wrote: >> > @@ -446,13 +452,22 @@ struct arch_vcpu >> > >> > /* A secondary copy of the vcpu time info. */ >> > XEN_GUEST_HANDLE(vcpu_time_info_t) time_info_guest; >> > + >> > + /* >> > + * The SMAP check policy when updating runstate_guest(v) and the >> > + * secondary system time. >> > + */ >> > + smap_check_policy_t smap_check_policy; >> > } __cacheline_aligned; >> >> ... and try to find a better place (current padding) in this structure? > > Seems I cannot find a padding place in struct arch_vcpu, neither in struct > hvm_vcpu. Here's the tail of struct arch_vcpu: uint64_t xcr0_accum; /* This variable determines whether nonlazy extended state has been used, * and thus should be saved/restored. */ bool_t nonlazy_xstate_used; struct vmce vmce; struct paging_vcpu paging; uint32_t gdbsx_vcpu_event; /* A secondary copy of the vcpu time info. */ XEN_GUEST_HANDLE(vcpu_time_info_t) time_info_guest; } __cacheline_aligned; Obviously there are gaps after both nonlazy_xstate_used and gdbsx_vcpu_event. Jan