From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yu Zhang Subject: Re: [PATCH v3 2/5] KVM: MMU: check guest CR3 reserved bits based on its physical address width. Date: Fri, 25 Aug 2017 00:21:07 +0800 Message-ID: <7f3a513f-e55e-c431-c2ef-b0b5816844eb@linux.intel.com> References: <1503577676-12345-1-git-send-email-yu.c.zhang@linux.intel.com> <1503577676-12345-3-git-send-email-yu.c.zhang@linux.intel.com> <0bce2df3-79ac-599b-19fa-8ebeaff23623@redhat.com> <35e285e7-168a-25e6-1053-c005da18c103@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: linux-kernel@vger.kernel.org, rkrcmar@redhat.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, xiaoguangrong@tencent.com, joro@8bytes.org To: Paolo Bonzini , kvm@vger.kernel.org Return-path: In-Reply-To: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 8/25/2017 12:27 AM, Paolo Bonzini wrote: > On 24/08/2017 17:38, Yu Zhang wrote: >>> >>> In practice, MAXPHYADDR will never be 59 even because the PKRU bits are >>> at bits 59..62. >> Thanks, Paolo. >> I see. I had made an assumption that MAXPHYADDR shall not exceed the >> physical one, >> which is 52 I believe. But I'm not sure there's any place to check this. >> Maybe we should make sure the vcpu->arch.maxphyaddr will not be greater >> than the value of the host? > That's a separate change anyway. In any case, since currently the > MAXPHYADDR is not validated, your change to rsvd_bits makes sense. Thanks, Paolo. As to this patch series, any change I need do? BTW,  I have written a patch for kvm-unit-test access test, but the test failed. Not sure if my patch is erroneous or due to a simulator error. I'll send out the test patch after it works.:-) Yu > Paolo >