From: Gerd Hoffmann <kraxel@suse.de>
To: "Petersson, Mats" <Mats.Petersson@amd.com>
Cc: xen-devel@lists.xensource.com, xen-changelog@lists.xensource.com
Subject: Re: RE: [Xen-changelog] Fix MOVS instruction emulation for HVM MMIO.
Date: Wed, 17 May 2006 08:42:39 +0200 [thread overview]
Message-ID: <446AC5DF.6020409@suse.de> (raw)
In-Reply-To: <907625E08839C4409CE5768403633E0BA7FC80@sefsexmb1.amd.com>
Petersson, Mats wrote:
>> Subject: [Xen-changelog] Fix MOVS instruction emulation for HVM MMIO.
>>
>> diff -r aab3cd33d2ba -r 7fdc4a8b782b xen/arch/x86/hvm/platform.c
>> --- a/xen/arch/x86/hvm/platform.c Tue May 16 16:34:27 2006 +0100
>> +++ b/xen/arch/x86/hvm/platform.c Tue May 16 19:50:23 2006 +0100
>> @@ -865,7 +865,7 @@ void handle_mmio(unsigned long va, unsig
>> * copy ourself. After this copy succeeds, "rep
>> movs" is executed
>> * again.
>> */
>> - if ((addr & PAGE_MASK) != ((addr + size - 1) & PAGE_MASK)) {
>> + if ((addr & PAGE_MASK) != ((addr + sign * (size - 1)) &
>> + PAGE_MASK)) {
>
> With the risk of being wrong (again), I'd say this is incorrect: The
> MOVS instruction will start reading at ESI, and write at the address
> indicated by EDI and write with size bytes, even when it's copying
> backwards. So there should be no multiplication of sign on this line.
I still think this is correct. If I understand things correctly the
point of the test is to figure whenever the _next_ repz movs interation
will access another page (and if so copy just one data word and let the
emulator kick in again for the remaining data on the page above/below).
cheers,
Gerd
--
Gerd Hoffmann <kraxel@suse.de>
Erst mal heiraten, ein, zwei Kinder, und wenn alles läuft
geh' ich nach drei Jahren mit der Familie an die Börse.
http://www.suse.de/~kraxel/julika-dora.jpeg
next prev parent reply other threads:[~2006-05-17 6:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-16 21:41 [Xen-changelog] Fix MOVS instruction emulation for HVM MMIO Petersson, Mats
2006-05-17 6:42 ` Gerd Hoffmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-05-17 12:26 Petersson, Mats
2006-05-18 13:21 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=446AC5DF.6020409@suse.de \
--to=kraxel@suse.de \
--cc=Mats.Petersson@amd.com \
--cc=xen-changelog@lists.xensource.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.