From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtiW8-0001DG-RC for qemu-devel@nongnu.org; Mon, 01 Jul 2013 14:08:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UtiW6-0006EW-36 for qemu-devel@nongnu.org; Mon, 01 Jul 2013 14:08:00 -0400 Received: from mail-ve0-f179.google.com ([209.85.128.179]:38512) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtiIv-0005qz-F3 for qemu-devel@nongnu.org; Mon, 01 Jul 2013 13:54:21 -0400 Received: by mail-ve0-f179.google.com with SMTP id d10so4058021vea.10 for ; Mon, 01 Jul 2013 10:54:20 -0700 (PDT) Received: from mail-ve0-x229.google.com (mail-ve0-x229.google.com [2607:f8b0:400c:c01::229]) by mx.google.com with ESMTPSA id gb10sm14423231vdc.6.2013.07.01.10.54.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Jul 2013 10:54:20 -0700 (PDT) Received: by mail-ve0-f169.google.com with SMTP id m1so4085308ves.28 for ; Mon, 01 Jul 2013 10:54:19 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1372421519-5146-1-git-send-email-m.hamayun@virtualopensystems.com> <1372421519-5146-3-git-send-email-m.hamayun@virtualopensystems.com> Date: Mon, 1 Jul 2013 19:54:19 +0200 Message-ID: From: Alexander Spyridakis Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 3/6] Added Aarch64 CPU Initialization, Get and Put Registers Support. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: tech@virtualopensystems.com, qemu-devel@nongnu.org, "Mian M. Hamayun" , kvmarm@lists.cs.columbia.edu On 29 June 2013 21:17, Peter Maydell wrote: > > > +#ifdef TARGET_AARCH64 > > +int kvm_arch_init_vcpu(CPUState *cs) > > +{ > > + struct kvm_vcpu_init init; > > + int ret; > > + > > + /* Try initializing with Foundation Models */ > > + init.target = KVM_ARM_TARGET_FOUNDATION_V8; > > + memset(init.features, 0, sizeof(init.features)); > > + ret = kvm_vcpu_ioctl(cs, KVM_ARM_VCPU_INIT, &init); > > + if (ret) { > > + /* Retry initializing with Fast Models */ > > + init.target = KVM_ARM_TARGET_AEM_V8; > > If we're emulating an A57 we should be asking KVM for an A57 > guest. If we're asking KVM for "a CPU like the one in > the Foundation model" we need to support that via -cpu $something. Wouldn't that be an overkill at this early stage? There is no target to test KVM_ARM_TARGET_CORTEX_A57 so we opted for the other two tested cases. > But I'm a bit dubious about that anyway -- you need to provide > a good justification for why KVM/QEMU should be emulating > emulators and not hardware. Mainly because there is no real hardware yet. This patch series was meant to enable basic working support of KVM in AArch64 on what is available and open discussion on how to proceed from there. Also, given that fact that kvmtool uses the same approach it was the most obvious way at the time to handle it.