From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2 03/22] KVM: x86: fix broken read emulation spans a page boundary Date: Wed, 29 Jun 2011 14:19:28 +0300 Message-ID: <4E0B0A40.3020302@redhat.com> References: <4E01FBC9.3020009@cn.fujitsu.com> <4E01FC39.2080709@cn.fujitsu.com> <4E0AE088.2070703@redhat.com> <4E0B0447.9030003@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , LKML , KVM To: Xiao Guangrong Return-path: In-Reply-To: <4E0B0447.9030003@cn.fujitsu.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 06/29/2011 01:53 PM, Xiao Guangrong wrote: > On 06/29/2011 04:21 PM, Avi Kivity wrote: > > >> > >> - if (kvm_read_guest_virt(ctxt, addr, val, bytes, exception) > >> - == X86EMUL_CONTINUE) > >> + if (!kvm_read_guest(vcpu->kvm, gpa, val, bytes)) > >> return X86EMUL_CONTINUE; > > > > This doesn't perform the cpl check. > > > > Firstly, it calls kvm_mmu_gva_to_gpa_read to translate gva to gpa, and cpl > is checked in this function, it is not enough? You are right, it is enough. I don't know how I missed it. -- error compiling committee.c: too many arguments to function