From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhFps-0004DF-1b for qemu-devel@nongnu.org; Mon, 05 May 2014 06:09:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WhFpm-0006yR-3Y for qemu-devel@nongnu.org; Mon, 05 May 2014 06:09:23 -0400 Received: from cantor2.suse.de ([195.135.220.15]:34414 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhFpl-0006yG-TC for qemu-devel@nongnu.org; Mon, 05 May 2014 06:09:18 -0400 Message-ID: <5367634B.6020606@suse.de> Date: Mon, 05 May 2014 12:09:15 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1399280445-25345-1-git-send-email-pranavkumar@linaro.org> In-Reply-To: <1399280445-25345-1-git-send-email-pranavkumar@linaro.org> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH V4 5/6] target-arm: Common kvm_arm_vcpu_init() for KVM ARM and KVM ARM64 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pranavkumar Sawargaonkar , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Anup Patel , patches@apm.com, robherring2@gmail.com, kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org Am 05.05.2014 11:00, schrieb Pranavkumar Sawargaonkar: > Introduce a common kvm_arm_vcpu_init() for doing KVM_ARM_VCPU_INIT > ioctl in KVM ARM and KVM ARM64. This also helps us factor-out few > common code lines from kvm_arch_init_vcpu() for KVM ARM/ARM64. >=20 > Signed-off-by: Pranavkumar Sawargaonkar > Signed-off-by: Anup Patel > --- > target-arm/kvm.c | 23 +++++++++++++++++++++++ > target-arm/kvm32.c | 18 +++--------------- > target-arm/kvm64.c | 22 ++++++++-------------- > target-arm/kvm_arm.h | 14 ++++++++++++++ > 4 files changed, 48 insertions(+), 29 deletions(-) >=20 > diff --git a/target-arm/kvm.c b/target-arm/kvm.c > index 39202d7..55bc3a3 100644 > --- a/target-arm/kvm.c > +++ b/target-arm/kvm.c > @@ -27,6 +27,29 @@ const KVMCapabilityInfo kvm_arch_required_capabiliti= es[] =3D { > KVM_CAP_LAST_INFO > }; > =20 > +int kvm_arm_vcpu_init(CPUState *cs, uint32_t feature0_extra) Since this is ARM-specific code and both kvm_arch_* implementations cast it, you could use an ARMCPU *cpu argument - but as you need cs for the ioctl, it's no net win, so your/PMM's choice. Apart from that, refactoring looks fine to me. Cleaning up the fprintf() moved will hopefully be done independently. Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg