From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932693AbdELFN2 (ORCPT ); Fri, 12 May 2017 01:13:28 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34327 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750720AbdELFN0 (ORCPT ); Fri, 12 May 2017 01:13:26 -0400 Subject: Re: [PATCH 1/2] KVM: nVMX: fix EPT permissions as reported in exit qualification From: Xiao Guangrong To: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: Peter Feiner , David Matlack , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Xiao Guangrong , Wanpeng Li References: <1494501810-11822-1-git-send-email-pbonzini@redhat.com> <1494501810-11822-2-git-send-email-pbonzini@redhat.com> <482f1c96-ce6a-8b77-ce18-ec5f19cde800@gmail.com> Message-ID: <2c89d7f5-b806-4bd8-e4cb-60e946ee7822@gmail.com> Date: Fri, 12 May 2017 13:13:07 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <482f1c96-ce6a-8b77-ce18-ec5f19cde800@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/12/2017 11:59 AM, Xiao Guangrong wrote: error: >> @@ -452,7 +459,7 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker, >> */ >> if (!(errcode & PFERR_RSVD_MASK)) { >> vcpu->arch.exit_qualification &= 0x187; >> - vcpu->arch.exit_qualification |= ((pt_access & pte) & 0x7) << 3; > ^ here, the original code > is buggy as pt_access and pte have different bit order, fortunately, this patch fixes it > too. :) > It's exactly what this patch aims at, do not know what i was thinking when wrote these down. :(