From: Paolo Bonzini <pbonzini@redhat.com>
To: Haiwei Li <lihaiwei.kernel@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"x86@kernel.org" <x86@kernel.org>
Cc: Sean Christopherson <sean.j.christopherson@intel.com>,
"wanpengli@tencent.com" <wanpengli@tencent.com>,
"vkuznets@redhat.com" <vkuznets@redhat.com>,
"jmattson@google.com" <jmattson@google.com>,
"joro@8bytes.org" <joro@8bytes.org>,
"tglx@linutronix.de" <tglx@linutronix.de>,
mingo@redhat.com, "bp@alien8.de" <bp@alien8.de>,
"hpa@zytor.com" <hpa@zytor.com>
Subject: Re: [PATCH] KVM: Using macros instead of magic values
Date: Mon, 27 Jul 2020 16:40:03 +0200 [thread overview]
Message-ID: <92cd8fd2-d838-a1e3-dc39-7e6e5c4e68ca@redhat.com> (raw)
In-Reply-To: <4c072161-80dd-b7ed-7adb-02acccaa0701@gmail.com>
On 21/07/20 10:23, Haiwei Li wrote:
> From: Haiwei Li <lihaiwei@tencent.com>
>
> Instead of using magic values, use macros.
>
> Signed-off-by: Haiwei Li <lihaiwei@tencent.com>
> ---
> arch/x86/kvm/lapic.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> index 47801a4..d5fb2ea 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -2083,7 +2083,8 @@ int kvm_lapic_reg_write(struct kvm_lapic *apic,
> u32 reg, u32 val)
>
> case APIC_SELF_IPI:
> if (apic_x2apic_mode(apic)) {
> - kvm_lapic_reg_write(apic, APIC_ICR, 0x40000 | (val & 0xff));
> + kvm_lapic_reg_write(apic, APIC_ICR,
> + APIC_DEST_SELF | (val & APIC_VECTOR_MASK));
> } else
> ret = 1;
> break;
> --
> 1.8.3.1
>
Queued, thanks.
Paolo
prev parent reply other threads:[~2020-07-27 14:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 8:23 Haiwei Li
2020-07-21 8:46 ` Vitaly Kuznetsov
2020-07-27 14:40 ` 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=92cd8fd2-d838-a1e3-dc39-7e6e5c4e68ca@redhat.com \
--to=pbonzini@redhat.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=lihaiwei.kernel@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®