Received: from eggs.gnu.org ([140.186.70.92]:37807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9YKW-0006Ja-MQ for qemu-devel@nongnu.org; Fri, 30 Sep 2011 04:20:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9YKV-0004vq-A3 for qemu-devel@nongnu.org; Fri, 30 Sep 2011 04:20:24 -0400 Received: from cantor2.suse.de ([195.135.220.15]:56166 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9YKV-0004vQ-3A for qemu-devel@nongnu.org; Fri, 30 Sep 2011 04:20:23 -0400 References: <1317369040-30437-1-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1317369040-30437-1-git-send-email-david@gibson.dropbear.id.au> Mime-Version: 1.0 (iPhone Mail 8G4) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <79DDF028-E5CE-4FBE-8EFF-FD7784A6E182@suse.de> From: Alexander Graf Date: Fri, 30 Sep 2011 10:20:14 +0200 Subject: Re: [Qemu-devel] [0/3] pseries: RFC: Advertise host CPU capabilties to guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: "qemu-devel@nongnu.org" Am 30.09.2011 um 09:50 schrieb David Gibson : > This series contains some patches which, when using KVM, gather > information about the capabilities of the host CPU and advertise them > to the guest system when using the pseries machine. Specifically it > does this for whether the CPU supports VMX, VSX and/or DFP > instructions, and for the CPUs supported page sizes. >=20 > The VSX and DFP portions of this were posted earlier, and I've fixed > the minor comments which people made. This leaves one objection from > Alex Graf, that whether the features are advertised should also depend > on the target CPU selected in qemu. A similar objection may apply to > the pagesizes patch. I guess the idea is to "clamp" the advertised > capabilities to those permitted by the selected target CPU, but I'm > not entirely sure what the logic here should be. >=20 > Frankly, particularly in the case of KVM Book3S-HV, I'm not terribly > convinced that attempting to make the guest CPU appear different from > the host CPU is terribly meaningful. These patches as they stand have > the advantage that future, roughly compatible CPUs should Just Work > with these capabilities advertised in the correct cases. Alex, can > you advise what sort of logic you'd like here. Yes, very simple. I want you to create a CPU type 'host', similar to how x86= does it. That should be the default CPU type for KVM with the pseries machi= ne. You can also add a check in-kernel that verifies if guest PVR =3D=3D host PV= R for HV mode. That way you ensure that -cpu host is always used there. If y= ou later add compat modes, you can check them there, but still have -cpu xxx= available to tell all pieces of the kvm/qemu chain what to use. Alex