From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 3 of 5] rombios/ata: Reading this status register has no relevant side effects Date: Mon, 26 Nov 2012 16:56:01 +0000 Message-ID: <50B39F21.5040009@citrix.com> References: <1353948671.5830.118.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1353948671.5830.118.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "Keir (Xen.org)" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 26/11/12 16:51, Ian Campbell wrote: > No relevant side effects according to some spec or according to the > current qemu implementation? > > Does it have any "irrelevant" side effects? I am not sure whether the spec gurarentees no side effects, but this is according to the qemu implementation. The codepath has no side effects we could determine. ~Andrew > > On Mon, 2012-11-26 at 16:41 +0000, Andrew Cooper wrote: >> So taking two traps when one will do is pointless. This codepath is on the int >> 0x13 hot path, and removing it has about a 30% reduction in the number of traps >> to Qemu during Win7 boot. >> >> Signed-off-by: Andrew Cooper >> >> diff -r c223c044afbf -r a8645d836a0e tools/firmware/rombios/rombios.c >> --- a/tools/firmware/rombios/rombios.c >> +++ b/tools/firmware/rombios/rombios.c >> @@ -2540,7 +2540,6 @@ static int await_ide(when_done,base,time >> Bit32u time=0,last=0; >> Bit16u status; >> Bit8u result; >> - status = inb(base + ATA_CB_STAT); // for the times you're supposed to throw one away >> for(;;) { >> status = inb(base+ATA_CB_STAT); >> time++; >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xen.org >> http://lists.xen.org/xen-devel > -- Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer T: +44 (0)1223 225 900, http://www.citrix.com