From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] qemu-kvm: Eliminate _kvm_arch_init_vcpu Date: Mon, 23 Apr 2012 10:42:25 +0200 Message-ID: <4F9515F1.2040703@siemens.com> References: <4F5A779F.7020201@web.de> <4F5A815D.9060905@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , kvm To: Marcelo Tosatti Return-path: Received: from thoth.sbs.de ([192.35.17.2]:31890 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754226Ab2DWIma (ORCPT ); Mon, 23 Apr 2012 04:42:30 -0400 In-Reply-To: <4F5A815D.9060905@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On 2012-03-09 23:17, Jan Kiszka wrote: > From: Jan Kiszka > > There is no need for an explicit kvm_arch_reset_vcpu on arch cpu init > anymore, kvm_init_vcpu does it already. Call the remaining > kvm_update_ioport_access directly from kvm_arch_init_vcpu. > > Signed-off-by: Jan Kiszka > --- > > This depends on the TPR switch-over patch. > > qemu-kvm-x86.c | 7 ------- > target-i386/kvm.c | 4 +--- > 2 files changed, 1 insertions(+), 10 deletions(-) > > diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c > index 159779c..7de51dc 100644 > --- a/qemu-kvm-x86.c > +++ b/qemu-kvm-x86.c > @@ -77,13 +77,6 @@ int kvm_set_pit2(KVMState *s, struct kvm_pit_state2 *ps2) > return kvm_vm_ioctl(s, KVM_SET_PIT2, ps2); > } > > -static int _kvm_arch_init_vcpu(CPUState *env) > -{ > - kvm_arch_reset_vcpu(env); > - > - return kvm_update_ioport_access(env); > -} > - > #ifdef CONFIG_KVM_DEVICE_ASSIGNMENT > int kvm_arch_set_ioport_access(unsigned long start, unsigned long size, > bool enable) > diff --git a/target-i386/kvm.c b/target-i386/kvm.c > index 461734d..91110c1 100644 > --- a/target-i386/kvm.c > +++ b/target-i386/kvm.c > @@ -345,8 +345,6 @@ static void cpu_update_state(void *opaque, int running, RunState state) > } > } > > -static int _kvm_arch_init_vcpu(CPUState *env); > - > int kvm_arch_init_vcpu(CPUState *env) > { > struct { > @@ -360,7 +358,7 @@ int kvm_arch_init_vcpu(CPUState *env) > uint32_t signature[3]; > int r; > > - r = _kvm_arch_init_vcpu(env); > + r = kvm_update_ioport_access(env); > if (r < 0) { > return r; > } Marcelo, what is the state of understanding why this change can cause troubles in autotest? As I wrote offlist, I can neither reproduce nor understand how it can cause any regression (I suspect it rather triggers a so far hidden issue). Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux