Received: from eggs.gnu.org ([2001:4830:134:3::10]:37983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9UdH-0007Xl-Rc for qemu-devel@nongnu.org; Wed, 14 Aug 2013 02:32:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V9UdC-0006Ni-BJ for qemu-devel@nongnu.org; Wed, 14 Aug 2013 02:32:35 -0400 Received: from cantor2.suse.de ([195.135.220.15]:52300 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9UdC-0006N7-2P for qemu-devel@nongnu.org; Wed, 14 Aug 2013 02:32:30 -0400 Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <1376416983-30838-1-git-send-email-peter.maydell@linaro.org> Date: Wed, 14 Aug 2013 08:32:24 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1376416983-30838-1-git-send-email-peter.maydell@linaro.org> Subject: Re: [Qemu-devel] [RFC 0/2] target-arm: Provide '-cpu host' when running KVM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: patches@linaro.org, qemu-devel@nongnu.org, =?iso-8859-1?Q?Andreas_F=E4rber?= , kvmarm@lists.cs.columbia.edu On 13.08.2013, at 20:03, Peter Maydell wrote: > These patches add support to target-arm for '-cpu host'. > The general semantics are the same as for ppc and x86 (ie "whatever > the host kernel can support that looks basically like the host > CPU"), but the mechanism is a little different. >=20 > The kernel API (currently still proposed rather than implemented, > hence the RFC nature of this patchset) is that the existing > KVM_ARM_VCPU_INIT supports a new 'target' value KVM_ARM_TARGET_HOST, > which it treats as "whatever you are". On the userspace side, > we use this if the kernel supports it. If it doesn't then we > know the kernel must be an A15-on-A15 only one, and so can > safely implement '-cpu host' with KVM_ARM_TARGET_CORTEX_A15. How do you know what core specific registers QEMU can expect from this = particular CPU? Imagine ARM changes the MMU implementation in the next = ARMv8 CPU. With -cpu host you wouldn't be able to support gdbstub = anymore, because you wouldn't know whether the MMU format is the old or = the new one. I really prefer the "probe the host, match it fuzzily with our own list, = pick a specific own core" way of doing -cpu host. Then it's really only = ever an alias and you don't have to worry about all these odd special = cases. Alex >=20 > In order to find out details of the vCPU so we can correctly > set up our ARMCPU objects, we create a scratch VM and a single > cpu within it; we can then use the existing "read registers" > API to access the ID registers. We do this once at startup > when we register the new QOM type. >=20 > ('-cpu host' is also going to be useful for AArch64 because > it gives us a path to providing KVM support without having > to implement a model of a specific v8 CPU and all its system > registers...) >=20 > Peter Maydell (2): > target-arm: Don't hardcode KVM target CPU to be A15 > target-arm: Provide '-cpu host' when running KVM >=20 > target-arm/helper.c | 6 ++ > target-arm/kvm.c | 227 = ++++++++++++++++++++++++++++++++++++++++++++++++++- > 2 files changed, 231 insertions(+), 2 deletions(-) >=20 > --=20 > 1.7.9.5 >=20 > _______________________________________________ > kvmarm mailing list > kvmarm@lists.cs.columbia.edu > https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm