From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwDUp-0001bE-SE for qemu-devel@nongnu.org; Sat, 11 Feb 2012 09:00:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwDUo-0004x7-24 for qemu-devel@nongnu.org; Sat, 11 Feb 2012 09:00:11 -0500 Received: from fmmailgate04.web.de ([217.72.192.242]:44065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwDUn-0004vQ-9Y for qemu-devel@nongnu.org; Sat, 11 Feb 2012 09:00:09 -0500 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate04.web.de (Postfix) with ESMTP id E6BBE7150819 for ; Sat, 11 Feb 2012 15:00:04 +0100 (CET) Message-ID: <4F367462.10306@web.de> Date: Sat, 11 Feb 2012 15:00:02 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <4F363DB2.3080908@web.de> <4F3655E7.3090905@suse.de> <4F36626D.7020109@web.de> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig8EF691AFD1CA8C19588DE6AE" Subject: Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Anthony Liguori , Gleb Natapov , kvm@vger.kernel.org, Marcelo Tosatti , qemu-devel , Avi Kivity , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig8EF691AFD1CA8C19588DE6AE Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2012-02-11 14:54, Blue Swirl wrote: > On Sat, Feb 11, 2012 at 12:43, Jan Kiszka wrote: >> On 2012-02-11 12:49, Andreas F=C3=A4rber wrote: >>> Am 11.02.2012 12:25, schrieb Blue Swirl: >>>> I think using cpu_single_env is an indication of a problem, like poo= r >>>> code, layering violation or poor API (vmport). What is your use case= ? >>> >>> I couldn't spot any in this series. Jan, note that any new use of env= or >>> cpu_single_env will need to be redone when we convert to QOM CPU. >> >> cpu_single_env should have nothing to do with QOM. >> >> The ABIs of vmport and the KVM VAPI require a reference to the calling= >> VCPU, and that's why you find tons of them in patch 5. >=20 > Yes, this seems to be another case of a badly designed ABI. I guess > there is no way to change that anymore, just like vmport? Believe me, I grumbled over it more than once while porting it from qemu-kvm. The point is that some (Windows) VMs out there are running already with this option ROM loaded and working this unfortunate ABI. >=20 > Some of the cpu_single_env accesses in patch 5 could be avoided when > APIC is moved closer to CPU. VAPIC should be also close to APIC so it > should be able to access the CPU directly. In some other cases the > current state could be passed around instead once it is known. Some callbacks are I/O-port originated, ie. not associated with the per-CPU MMIO area or some MSR. So we would have to pass down the causing CPU to every I/O handler - not sure if that is desired... Jan --------------enig8EF691AFD1CA8C19588DE6AE 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.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk82dGIACgkQitSsb3rl5xRMlACguxhh3+4FU24NE1LATrwkHZV0 ccoAmwb0j20fZqBPl6xUGkc732iV1nOc =p/xk -----END PGP SIGNATURE----- --------------enig8EF691AFD1CA8C19588DE6AE--