public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Yu Zhang <yu.c.zhang@linux.intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>, kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, rkrcmar@redhat.com,
	tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	xiaoguangrong@tencent.com, joro@8bytes.org
Subject: Re: [PATCH v3 2/5] KVM: MMU: check guest CR3 reserved bits based on its physical address width.
Date: Thu, 24 Aug 2017 23:23:05 +0800	[thread overview]
Message-ID: <b4af9303-57bb-76cd-297f-ccb9128daf29@linux.intel.com> (raw)
In-Reply-To: <0bce2df3-79ac-599b-19fa-8ebeaff23623@redhat.com>



On 8/24/2017 9:40 PM, Paolo Bonzini wrote:
> On 24/08/2017 14:27, Yu Zhang wrote:
>> diff --git a/arch/x86/kvm/mmu.h b/arch/x86/kvm/mmu.h
>> index 3ed6192..67e7ec2 100644
>> --- a/arch/x86/kvm/mmu.h
>> +++ b/arch/x86/kvm/mmu.h
>> @@ -48,6 +48,9 @@
>>   
>>   static inline u64 rsvd_bits(int s, int e)
>>   {
>> +	if (e < s)
>> +		return 0;
>> +
>>   	return ((1ULL << (e - s + 1)) - 1) << s;
>>   }
> e = s - 1 is already supported; why do you need e <= s - 2?

Sorry? I do not quite understand. When will e = s - 1?

Thanks
Yu
> Paolo
>

  reply	other threads:[~2017-08-24 15:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24 12:27 [PATCH v3 0/5] KVM: MMU: 5 level EPT/shadow support Yu Zhang
2017-08-24 12:27 ` [PATCH v3 1/5] KVM: x86: Add return value to kvm_cpuid() Yu Zhang
2017-08-24 12:27 ` [PATCH v3 2/5] KVM: MMU: check guest CR3 reserved bits based on its physical address width Yu Zhang
2017-08-24 13:40   ` Paolo Bonzini
2017-08-24 15:23     ` Yu Zhang [this message]
2017-08-24 15:50       ` Paolo Bonzini
2017-08-24 15:38         ` Yu Zhang
2017-08-24 16:27           ` Paolo Bonzini
2017-08-24 16:21             ` Yu Zhang
2017-08-24 16:51               ` Paolo Bonzini
2017-09-15 23:19   ` Jim Mattson
2017-09-18  8:15     ` Yu Zhang
2017-09-18  8:41       ` Paolo Bonzini
2017-09-18  9:35         ` Yu Zhang
2017-08-24 12:27 ` [PATCH v3 3/5] KVM: MMU: Rename PT64_ROOT_LEVEL to PT64_ROOT_4LEVEL Yu Zhang
2017-08-24 12:27 ` [PATCH v3 4/5] KVM: MMU: Add 5 level EPT & Shadow page table support Yu Zhang
2017-08-24 13:42   ` Paolo Bonzini
2017-08-24 12:27 ` [PATCH v3 5/5] KVM: MMU: Expose the LA57 feature to VM Yu Zhang
2017-08-24 13:47 ` [PATCH v3 0/5] KVM: MMU: 5 level EPT/shadow support Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4af9303-57bb-76cd-297f-ccb9128daf29@linux.intel.com \
    --to=yu.c.zhang@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=xiaoguangrong@tencent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox