From: Keir Fraser Subject: Re: [PATCH] i386: remove NMI deferral Date: Wed, 20 Jun 2007 17:39:03 +0100 Message-ID: References: <4677C5AA.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4677C5AA.76E4.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 19/6/07 11:01, "Jan Beulich" wrote: > + cmpw %cx,%di; \ > + mov %ecx,%ds; \ > mov %fs,UREGS_fs(%esp); \ > + cmovel UREGS_ds(%esp),%edi; \ > + cmpw %cx,%si; \ > + mov %edi,UREGS_ds(%esp); \ > + cmovel UREGS_es(%esp),%esi; \ > + mov %ecx,%es; \ > mov %gs,UREGS_gs(%esp); \ It looks like this section of SAVE_ALL gets executed only if we interrupted the guest in protected mode (i.e., not vm86 mode, and not an outer Xen context). So I'm not sure how the cmove's will ever be a no-op -- how could we have UREGS_cs&3!=0, yet have HYPERVISOR_DS in %ds or %es? I guess I must be missing something fundamental about how this patch works... The cmove's themselves raise another question -- can we really rely on all 32-bit CPUs that Xen is likely to run on to actually have CMOV support? It seems possible, but I'm not certain. -- Keir