From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: Biweekly KVM Test report, kernel 7a7ada1b... qemu df85c051... Date: Tue, 12 Apr 2011 23:02:14 +0200 Message-ID: <4DA4BDD6.2040205@web.de> References: <4DA4072B.4060409@redhat.com> <1302632571.3589.115.camel@x201> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig5C7F78897FFC7CEA36CC1B37" Cc: Avi Kivity , "Ren, Yongjie" , "kvm@vger.kernel.org" To: Alex Williamson Return-path: Received: from fmmailgate02.web.de ([217.72.192.227]:50673 "EHLO fmmailgate02.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932412Ab1DLVCR (ORCPT ); Tue, 12 Apr 2011 17:02:17 -0400 In-Reply-To: <1302632571.3589.115.camel@x201> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5C7F78897FFC7CEA36CC1B37 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2011-04-12 20:22, Alex Williamson wrote: > On Tue, 2011-04-12 at 11:02 +0300, Avi Kivity wrote: >> On 04/12/2011 10:48 AM, Ren, Yongjie wrote: >>> Hi All, >>> This is KVM test result against kvm.git 7a7ada1bfb958d2ad722d0df9299f= 1b0136ec1d4 based on kernel 2.6.39-rc2+, and qemu-kvm.git df85c051d780bca= 0ee2462cfeb8ef6d9552a19b0. >>> >>> We found 1 bug about "NIC cannot work when it had been used before ".= =20 >>> The VT-d bug 730441 (qemu bugzilla) concerning "nomsi NIC" is fixed. >>> >>> New issue: >>> 1.[VT-d] NIC cannot work when it had been used before >>> https://bugs.launchpad.net/qemu/+bug/754591 >>> >> >> +=3D Alex. >> >=20 > This is caused by the patch below. When we do a reset via PCI sysfs, > the device state is saved and restored around the reset. When the stat= e > is restored, the saved state is invalidated. Now when we go to free th= e > device, we call the "I know what I'm doing" __pci_reset_function(), > which doesn't save/restore state, then try to do a restore, but there's= > nothing saved, so the device only has reset values... oops. >=20 > Jan, do you actually have a test case where you can see a difference > restoring the original saved state? I'm tempted to suggest we just > revert this patch. Otherwise it seems like we an interface to extract > and reload the original saved state for the device. Thanks, I've no test case, but the issue is clear: we used to leak guest manipulations of the config space to the host or the new owner. However, I'm first of all wondering why the heck libvirt should issue a sysfs PCI reset while the device is in KVM/guest hands? Is it clear that this is actually the case? Then it should be fixed independently as it would be a bug (proper pattern would be: deassign, reset, reassign). That said, our way of relying on the consistency of the saved state between assignment and release is in fact a bit fragile. We should probably make it more robust as you suggested. Jan --------------enig5C7F78897FFC7CEA36CC1B37 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/ iEYEARECAAYFAk2kvdYACgkQitSsb3rl5xRDSwCfa3khlyTEuMZbq2Uhyf9GMEi6 zHEAoNIB4r9sZEE3Fa2rxuEaRZeobXhQ =4XWw -----END PGP SIGNATURE----- --------------enig5C7F78897FFC7CEA36CC1B37--