public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Yu Zhang <yu.c.zhang@linux.intel.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 15:40:04 +0200	[thread overview]
Message-ID: <0bce2df3-79ac-599b-19fa-8ebeaff23623@redhat.com> (raw)
In-Reply-To: <1503577676-12345-3-git-send-email-yu.c.zhang@linux.intel.com>

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?

Paolo

  reply	other threads:[~2017-08-24 13:40 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 [this message]
2017-08-24 15:23     ` Yu Zhang
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=0bce2df3-79ac-599b-19fa-8ebeaff23623@redhat.com \
    --to=pbonzini@redhat.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=rkrcmar@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=xiaoguangrong@tencent.com \
    --cc=yu.c.zhang@linux.intel.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