From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [RFC 2/2] KVM, MCE, unpoison memory address across reboot Date: Fri, 31 Dec 2010 10:10:39 +0100 Message-ID: <4D1D9E0F.6040701@web.de> References: <1293772955.22308.251.camel@yhuang-dev> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigBC103038DC67310FD8F0D6E6" Cc: Avi Kivity , Marcelo Tosatti , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" , Andi Kleen , Dean Nelson To: Huang Ying Return-path: Received: from fmmailgate01.web.de ([217.72.192.221]:34683 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751719Ab0LaJKo (ORCPT ); Fri, 31 Dec 2010 04:10:44 -0500 In-Reply-To: <1293772955.22308.251.camel@yhuang-dev> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigBC103038DC67310FD8F0D6E6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am 31.12.2010 06:22, Huang Ying wrote: > In Linux kernel HWPoison processing implementation, the virtual > address in processes mapping the error physical memory page is marked > as HWPoison. So that, the further accessing to the virtual > address will kill corresponding processes with SIGBUS. >=20 > If the error physical memory page is used by a KVM guest, the SIGBUS > will be sent to QEMU, and QEMU will simulate a MCE to report that > memory error to the guest OS. If the guest OS can not recover from > the error (for example, the page is accessed by kernel code), guest OS > will reboot the system. But because the underlying host virtual > address backing the guest physical memory is still poisoned, if the > guest system accesses the corresponding guest physical memory even > after rebooting, the SIGBUS will still be sent to QEMU and MCE will be > simulated. That is, guest system can not recover via rebooting. >=20 > In fact, across rebooting, the contents of guest physical memory page > need not to be kept. We can allocate a new host physical page to > back the corresponding guest physical address. >=20 > This patch fixes this issue in QEMU-KVM via calling qemu_ram_remap() > to clear the corresponding page table entry, so that make it possible > to allocate a new page to recover the issue. >=20 > Signed-off-by: Huang Ying > --- > kvm.h | 2 ++ > qemu-kvm.c | 37 +++++++++++++++++++++++++++++++++++++ What's missing in upstream to make this a uq/master patch? We are still piling up features and fixes in qemu-kvm* that should better target upstream directly. That's work needlessly done twice. Is this infrastructure really arch-independent? Will there be other users besides x86? If not, better keep it in target-i386/kvm.c. Jan --------------enigBC103038DC67310FD8F0D6E6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk0dnhIACgkQitSsb3rl5xRJCgCgxqrkXu5lUCgjzq7RdwnM/Pzc fmkAoMiY2NhpJ6dMhCURkb2u89XWa/FA =roVx -----END PGP SIGNATURE----- --------------enigBC103038DC67310FD8F0D6E6--