From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCHv2] KVM: x86 emulator: check io permissions only once for string pio Date: Mon, 02 Aug 2010 12:52:51 +0300 Message-ID: <4C569573.2000104@redhat.com> References: <20100802094751.GP24773@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:23025 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751452Ab0HBJwx (ORCPT ); Mon, 2 Aug 2010 05:52:53 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o729qqKi015009 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 2 Aug 2010 05:52:52 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o729qpxa026227 for ; Mon, 2 Aug 2010 05:52:52 -0400 In-Reply-To: <20100802094751.GP24773@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/02/2010 12:47 PM, Gleb Natapov wrote: > > Do not recheck io permission on every iteration. > Applied, thanks. > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index c5878d8..e7e3b50 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -3997,6 +3997,7 @@ int emulate_instruction(struct kvm_vcpu *vcpu, > memcpy(c->regs, vcpu->arch.regs, sizeof c->regs); > vcpu->arch.emulate_ctxt.interruptibility = 0; > vcpu->arch.emulate_ctxt.exception = -1; > + vcpu->arch.emulate_ctxt.perm_ok = false; > This should be in x86_decode_init(), not outside the emulator. I'll convert it in my next series. -- error compiling committee.c: too many arguments to function