From: "Jan Beulich" Subject: Re: [PATCH] x86: optimize this_cpu() Date: Tue, 13 Jul 2010 15:57:30 +0100 Message-ID: <4C3C9AFA020000780000B030@vpn.id2.novell.com> References: <4C3C97C5020000780000B013@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org >>> On 13.07.10 at 16:45, Keir Fraser wrote: > On 13/07/2010 15:43, "Jan Beulich" wrote: >=20 >> I found it quite odd that, without any special comment to that >> effect, I couldn't just add a single field to struct cpu_info without >> causing breakage. The apparently odd extra padding field at >> least provides a slight hint towards issues here. A similar issue >> is that there is a silent requirement of "current_vcpu" being the >> last field... >=20 > Where does that come from? >From various assembly files, defining GET_CURRENT() or alike on their own. grep-ing for STACK_SIZE had helped me noticing the issue. Likewise GET_GUEST_REGS() implies that "guest_cpu_user_regs" is the first field of struct cpu_info (but this I would consider expected). Jan