From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: Errors on MMIO read access on VM suspend / resume operations Date: Mon, 24 Jan 2011 23:34:02 +0100 Message-ID: <4D3DFE5A.802@web.de> References: <4D2C8305.2090609@linux.vnet.ibm.com> <4D2ED260.4010801@redhat.com> <4D30A38F.3030002@linux.vnet.ibm.com> <4D3303FD.8020509@redhat.com> <4D35030E.4080406@linux.vnet.ibm.com> <4D3554F4.6080405@siemens.com> <4D3DC49E.2000100@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig28619E2C1BDF504D1F6641FF" Cc: Avi Kivity , kvm@vger.kernel.org, qemu-devel@nongnu.org To: Stefan Berger Return-path: Received: from fmmailgate02.web.de ([217.72.192.227]:57514 "EHLO fmmailgate02.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751344Ab1AXWeE (ORCPT ); Mon, 24 Jan 2011 17:34:04 -0500 In-Reply-To: <4D3DC49E.2000100@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig28619E2C1BDF504D1F6641FF Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2011-01-24 19:27, Stefan Berger wrote: > On 01/18/2011 03:53 AM, Jan Kiszka wrote: >> On 2011-01-18 04:03, Stefan Berger wrote: >>> On 01/16/2011 09:43 AM, Avi Kivity wrote: >>>> On 01/14/2011 09:27 PM, Stefan Berger wrote: >>>>>> Can you sprinkle some printfs() arount kvm_run (in qemu-kvm.c) to >>>>>> verify this? >>>>>> >>>>> Here's what I did: >>>>> >>>>> >>>>> interrupt exit requested >>>> It appears from this you're using qemu.git. Please try qemu-kvm.git= , >>>> where the code appears to be correct. >>>> >>> Cc'ing qemu-devel now. For reference, here the initial problem >>> description: >>> >>> http://www.spinics.net/lists/kvm/msg48274.html >>> >>> I didn't know there was another tree... >>> >>> I have seen now a couple of suspends-while-reading with patches appli= ed >>> to the qemu-kvm.git tree and indeed, when run with the same host kern= el >>> and VM I do not see the debugging dumps due to double-reads that I wo= uld >>> have anticipated seeing by now. Now what? Can this be easily fixed in= >>> the other Qemu tree as well? >> Please give this a try: >> >> git://git.kiszka.org/qemu-kvm.git queues/kvm-upstream >> >> I bet (& hope) "kvm: Unconditionally reenter kernel after IO exits" >> fixes the issue for you. If other problems pop up with that tree, also= >> try resetting to that particular commit. >> >> I'm currently trying to shake all those hidden or forgotten bug fixes >> out of qemu-kvm and port them upstream. Most of those subtle differenc= es >> should hopefully soon be history. >> > I did the same test as I did with Avi's tree and haven't seen the > consequences of possible double-reads. So, I would say that you should > upstream those patches... >=20 > I searched for the text you mention above using 'gitk' but couldn't fin= d > a patch with that headline in your tree. There were others that seem to= > be related: >=20 > Gleb Natapov: "do not enter vcpu again if it was stopped during IO" Err, I don't think you checked out queues/kvm-upstream. I bet you just ran my master branch which is a version of qemu-kvm's master. Am I right?= :) >>> One thing I'd like to mention is that I have seen what I think are >>> interrupt stalls when running my tests inside the qemu-kvm.git tree >>> version and not suspending at all. A some point the interrupt counter= in >>> the guest kernel does not increase anymore even though I see the devi= ce >>> model raising the IRQ and lowering it. The same tests run literally >>> forever in the qemu.git tree version of Qemu. >> What about qemu-kmv and -no-kvm-irqchip? > That seems to be necessary for both trees, yours and the one Avi pointe= d > me to. If applied, then I did not see the interrupt problem. And the fact that you were able to call qemu from my tree with -no-kvm-irqchip just underlines my assumption: that switch is refused by upstream. Please retry with the latest kvm-upstream queue. Besides that, this other bug you may see in the in-kernel IRQ path - how can we reproduce it? Jan --------------enig28619E2C1BDF504D1F6641FF 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/ iEYEARECAAYFAk09/loACgkQitSsb3rl5xSh7ACeI71nFhSGaLe97rc8ue2PRfxe UwcAn0GieP2VKFy7JZqQT7B3QDd2+f8G =/Ih7 -----END PGP SIGNATURE----- --------------enig28619E2C1BDF504D1F6641FF-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44819 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhUzt-00080P-Il for qemu-devel@nongnu.org; Mon, 24 Jan 2011 17:34:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhUz6-00063K-UQ for qemu-devel@nongnu.org; Mon, 24 Jan 2011 17:34:07 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]:57512) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhUz6-000638-HC for qemu-devel@nongnu.org; Mon, 24 Jan 2011 17:34:04 -0500 Message-ID: <4D3DFE5A.802@web.de> Date: Mon, 24 Jan 2011 23:34:02 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <4D2C8305.2090609@linux.vnet.ibm.com> <4D2ED260.4010801@redhat.com> <4D30A38F.3030002@linux.vnet.ibm.com> <4D3303FD.8020509@redhat.com> <4D35030E.4080406@linux.vnet.ibm.com> <4D3554F4.6080405@siemens.com> <4D3DC49E.2000100@linux.vnet.ibm.com> In-Reply-To: <4D3DC49E.2000100@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig28619E2C1BDF504D1F6641FF" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: Errors on MMIO read access on VM suspend / resume operations List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Berger Cc: Avi Kivity , kvm@vger.kernel.org, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig28619E2C1BDF504D1F6641FF Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2011-01-24 19:27, Stefan Berger wrote: > On 01/18/2011 03:53 AM, Jan Kiszka wrote: >> On 2011-01-18 04:03, Stefan Berger wrote: >>> On 01/16/2011 09:43 AM, Avi Kivity wrote: >>>> On 01/14/2011 09:27 PM, Stefan Berger wrote: >>>>>> Can you sprinkle some printfs() arount kvm_run (in qemu-kvm.c) to >>>>>> verify this? >>>>>> >>>>> Here's what I did: >>>>> >>>>> >>>>> interrupt exit requested >>>> It appears from this you're using qemu.git. Please try qemu-kvm.git= , >>>> where the code appears to be correct. >>>> >>> Cc'ing qemu-devel now. For reference, here the initial problem >>> description: >>> >>> http://www.spinics.net/lists/kvm/msg48274.html >>> >>> I didn't know there was another tree... >>> >>> I have seen now a couple of suspends-while-reading with patches appli= ed >>> to the qemu-kvm.git tree and indeed, when run with the same host kern= el >>> and VM I do not see the debugging dumps due to double-reads that I wo= uld >>> have anticipated seeing by now. Now what? Can this be easily fixed in= >>> the other Qemu tree as well? >> Please give this a try: >> >> git://git.kiszka.org/qemu-kvm.git queues/kvm-upstream >> >> I bet (& hope) "kvm: Unconditionally reenter kernel after IO exits" >> fixes the issue for you. If other problems pop up with that tree, also= >> try resetting to that particular commit. >> >> I'm currently trying to shake all those hidden or forgotten bug fixes >> out of qemu-kvm and port them upstream. Most of those subtle differenc= es >> should hopefully soon be history. >> > I did the same test as I did with Avi's tree and haven't seen the > consequences of possible double-reads. So, I would say that you should > upstream those patches... >=20 > I searched for the text you mention above using 'gitk' but couldn't fin= d > a patch with that headline in your tree. There were others that seem to= > be related: >=20 > Gleb Natapov: "do not enter vcpu again if it was stopped during IO" Err, I don't think you checked out queues/kvm-upstream. I bet you just ran my master branch which is a version of qemu-kvm's master. Am I right?= :) >>> One thing I'd like to mention is that I have seen what I think are >>> interrupt stalls when running my tests inside the qemu-kvm.git tree >>> version and not suspending at all. A some point the interrupt counter= in >>> the guest kernel does not increase anymore even though I see the devi= ce >>> model raising the IRQ and lowering it. The same tests run literally >>> forever in the qemu.git tree version of Qemu. >> What about qemu-kmv and -no-kvm-irqchip? > That seems to be necessary for both trees, yours and the one Avi pointe= d > me to. If applied, then I did not see the interrupt problem. And the fact that you were able to call qemu from my tree with -no-kvm-irqchip just underlines my assumption: that switch is refused by upstream. Please retry with the latest kvm-upstream queue. Besides that, this other bug you may see in the in-kernel IRQ path - how can we reproduce it? Jan --------------enig28619E2C1BDF504D1F6641FF 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/ iEYEARECAAYFAk09/loACgkQitSsb3rl5xSh7ACeI71nFhSGaLe97rc8ue2PRfxe UwcAn0GieP2VKFy7JZqQT7B3QDd2+f8G =/Ih7 -----END PGP SIGNATURE----- --------------enig28619E2C1BDF504D1F6641FF--