From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: KVM: x86: use proper port value when checking io instruction permission (v2) Date: Thu, 26 May 2011 12:02:30 +0300 Message-ID: <20110526090230.GH29458@redhat.com> References: <20110524172706.GC22042@redhat.com> <20110525181820.GA14921@amt.cnet> <4DDDF3D6.3000505@redhat.com> <20110526065511.GA29458@redhat.com> <4DDDFB07.2050909@redhat.com> <4DDDFB78.9070307@redhat.com> <20110526070737.GB29458@redhat.com> <4DDE0601.8060008@redhat.com> <20110526082639.GE29458@redhat.com> <4DDE16A8.40108@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Marcelo Tosatti , kvm , Joerg Roedel To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:53751 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753520Ab1EZJ4L (ORCPT ); Thu, 26 May 2011 05:56:11 -0400 Content-Disposition: inline In-Reply-To: <4DDE16A8.40108@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, May 26, 2011 at 11:00:24AM +0200, Paolo Bonzini wrote: > On 05/26/2011 10:26 AM, Gleb Natapov wrote: > >Why would c->dst.bytes != c->src.bytes for cwd/cdq/cqo if we'll set > >c->dst.bytes to op_bytes during decode? > > Duh, you're right, cwd/cdq/cqo uses SrcAcc which has > > c->src.bytes = (c->d & ByteOp) ? 1 : c->op_bytes; > > so in practice c->src.bytes = c->op_bytes. > > I still find it confusing that DstDX would use c->op_bytes without > honoring ByteOp unlike pretty much everything else; but yes, there > is a possible use of DstDX outside in/out. > We can make it honor ByteOp. There will be no instruction that will specify DstDX | ByteOp though. -- Gleb.