From: Aurelien Jarno <aurelien-rXXEIb44qovR7s880joybQ@public.gmane.org>
To: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: Data corruption in guest using KVM
Date: Mon, 23 Jul 2007 01:34:29 +0200 [thread overview]
Message-ID: <20070722233429.GA10146@hall.aurel32.net> (raw)
In-Reply-To: <46A3952D.2020009-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
On Sun, Jul 22, 2007 at 08:34:37PM +0300, Avi Kivity wrote:
> Aurelien Jarno wrote:
> > On Sun, Jul 22, 2007 at 04:46:19PM +0300, Avi Kivity wrote:
> >
> >> If you do happen to get a same-size corruption, that may tell us more.
> >>
> >>
> >
> > I have just got one same-size corruption building glibc 2.6 on
> > GNU/kFreeBSD i386 (32-bit nonpae).
> >
> > One byte at address 0x9000 has been replaced by 0x00. Please find the
> > good and the bad file attached.
> >
> >
>
> Good. We have one or two cross-page-boundary bugs. The
> corruption-chase branch already fixes one (which is much more likely to
> be triggered by FreeBSD than Linux, if I understand the FreeBSD VM
> correctly).
>
I have tried this branch, and the data get corrupted another way. This
is due to the fact that the source address is not incremented for the
second write. The patch below fixes that.
With this patch, I haven't be able to make any corruption. I have added
a printk in the code to see that I have been able to trigger 21
cross-boundary writes without any problem in the various guests.
So I think this bug is now fixed. Thanks for your help.
Aurelien
Signed-off-by: Aurelien Jarno <aurelien-rXXEIb44qovR7s880joybQ@public.gmane.org>
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 5b317c1..e7c9ca7 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -1141,6 +1141,7 @@ static int emulator_write_emulated(unsigned long addr,
if (rc != X86EMUL_CONTINUE)
return rc;
addr += now;
+ val += now;
bytes -= now;
}
return emulator_write_emulated_onepage(addr, val, bytes, ctxt);
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org | aurelien-rXXEIb44qovR7s880joybQ@public.gmane.org
`- people.debian.org/~aurel32 | www.aurel32.net
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
next prev parent reply other threads:[~2007-07-22 23:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-21 17:22 Data corruption in guest using KVM Aurelien Jarno
[not found] ` <20070721172248.GA1555-OqXK5JiLQY5aJl8KAwiEcA@public.gmane.org>
2007-07-21 17:46 ` Anthony Liguori
[not found] ` <46A24675.1010506-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-07-21 17:54 ` Aurelien Jarno
[not found] ` <20070721175404.GA3665-OqXK5JiLQY5aJl8KAwiEcA@public.gmane.org>
2007-07-21 18:03 ` Anthony Liguori
[not found] ` <46A24A7E.6040104-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-07-21 18:39 ` Aurelien Jarno
[not found] ` <20070721183924.GA5108-OqXK5JiLQY5aJl8KAwiEcA@public.gmane.org>
2007-07-21 21:00 ` Missing my posts to this lists Simon Gao
[not found] ` <46A273F4.2040001-g4dUTk+gKbW4mfPA/iJWtA@public.gmane.org>
2007-07-22 7:53 ` Avi Kivity
2007-07-22 7:52 ` Data corruption in guest using KVM Avi Kivity
[not found] ` <46A30CA3.3090100-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-22 13:38 ` Aurelien Jarno
[not found] ` <20070722133818.GG16993-OqXK5JiLQY5aJl8KAwiEcA@public.gmane.org>
2007-07-22 13:46 ` Avi Kivity
[not found] ` <46A35FAB.701-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-22 16:44 ` Aurelien Jarno
[not found] ` <20070722164454.GA26166-OqXK5JiLQY5aJl8KAwiEcA@public.gmane.org>
2007-07-22 17:34 ` Avi Kivity
[not found] ` <46A3952D.2020009-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-22 18:14 ` Aurelien Jarno
2007-07-22 23:34 ` Aurelien Jarno [this message]
[not found] ` <20070722233429.GA10146-OqXK5JiLQY5aJl8KAwiEcA@public.gmane.org>
2007-07-23 6:08 ` Aurelien Jarno
2007-07-23 8:04 ` Avi Kivity
2007-07-22 15:14 ` Avi Kivity
[not found] ` <46A37448.1010008-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-22 15:19 ` Aurelien Jarno
[not found] ` <20070722151913.GA22621-OqXK5JiLQY5aJl8KAwiEcA@public.gmane.org>
2007-07-22 15:24 ` Avi Kivity
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=20070722233429.GA10146@hall.aurel32.net \
--to=aurelien-rxxeib44qovr7s880joybq@public.gmane.org \
--cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox