On 09/18/2012 09:45 AM, Xiao Guangrong wrote: > On 09/16/2012 08:07 PM, Avi Kivity wrote: > >> @@ -3672,20 +3672,17 @@ static int vcpu_mmio_gva_to_gpa(struct kvm_vcpu *vcpu, unsigned long gva, >> gpa_t *gpa, struct x86_exception *exception, >> bool write) >> { >> - u32 access = (kvm_x86_ops->get_cpl(vcpu) == 3) ? PFERR_USER_MASK : 0; >> + u32 access = ((kvm_x86_ops->get_cpl(vcpu) == 3) ? PFERR_USER_MASK : 0) >> + | (write ? PFERR_WRITE_MASK : 0); >> >> - if (vcpu_match_mmio_gva(vcpu, gva) && >> - check_write_user_access(vcpu, write, access, >> - vcpu->arch.access)) { >> + if (vcpu_match_mmio_gva(vcpu, gva) >> + && permission_fault(vcpu->arch.walk_mmu, vcpu->arch.access, access)) { > > I think '!' was missed? Is it !permission_fault()? > > Otherwise looks good to me! Whoops, fixed. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html