From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH] qemu-kvm: Eliminate _kvm_arch_init_vcpu Date: Fri, 27 Apr 2012 12:00:07 -0300 Message-ID: <20120427150007.GA2263@amt.cnet> References: <4F5A779F.7020201@web.de> <4F5A815D.9060905@web.de> <4F9515F1.2040703@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , kvm To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:63570 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759978Ab2D0Pvd (ORCPT ); Fri, 27 Apr 2012 11:51:33 -0400 Content-Disposition: inline In-Reply-To: <4F9515F1.2040703@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Apr 23, 2012 at 10:42:25AM +0200, Jan Kiszka wrote: > 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 Still no understanding of previous failures, but results are consistently OK now. Maybe the gods are happy with us now :) Applied, thanks.