From: Paolo Bonzini <pbonzini@redhat.com>
To: Nadav Amit <namit@cs.technion.ac.il>
Cc: kvm@vger.kernel.org, nadav.amit@gmail.com
Subject: Re: [PATCH] KVM: x86: Replace X86_FEATURE_NX offset with the definition
Date: Wed, 20 Aug 2014 15:54:40 +0200 [thread overview]
Message-ID: <53F4A8A0.3080404@redhat.com> (raw)
In-Reply-To: <1408541899-9482-1-git-send-email-namit@cs.technion.ac.il>
Il 20/08/2014 15:38, Nadav Amit ha scritto:
> Replace reference to X86_FEATURE_NX using bit shift with the defined
> X86_FEATURE_NX.
>
> Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
> ---
> arch/x86/kvm/cpuid.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> index 38a0afe..f4bad87 100644
> --- a/arch/x86/kvm/cpuid.c
> +++ b/arch/x86/kvm/cpuid.c
> @@ -112,8 +112,8 @@ static void cpuid_fix_nx_cap(struct kvm_vcpu *vcpu)
> break;
> }
> }
> - if (entry && (entry->edx & (1 << 20)) && !is_efer_nx()) {
> - entry->edx &= ~(1 << 20);
> + if (entry && (entry->edx & bit(X86_FEATURE_NX)) && !is_efer_nx()) {
> + entry->edx &= ~bit(X86_FEATURE_NX);
> printk(KERN_INFO "kvm: guest NX capability removed\n");
> }
> }
>
Applying, thanks.
Paolo
prev parent reply other threads:[~2014-08-20 13:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-20 13:38 [PATCH] KVM: x86: Replace X86_FEATURE_NX offset with the definition Nadav Amit
2014-08-20 13:54 ` Paolo Bonzini [this message]
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=53F4A8A0.3080404@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=nadav.amit@gmail.com \
--cc=namit@cs.technion.ac.il \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.