From: "Li,Rongqing" <lirongqing@baidu.com>
To: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"seanjc@google.com" <seanjc@google.com>,
"vkuznets@redhat.com" <vkuznets@redhat.com>,
"stable@kernel.org" <stable@kernel.org>
Subject: 答复: [v4][PATCH 1/2] KVM: x86: don't print when fail to read/write pv eoi memory
Date: Thu, 18 Nov 2021 14:35:55 +0000 [thread overview]
Message-ID: <e9948d6b4619420bacee3dd855313c4b@baidu.com> (raw)
In-Reply-To: <1636026974-50555-1-git-send-email-lirongqing@baidu.com>
Ping
Thanks
-Li
> -----邮件原件-----
> 发件人: Li,Rongqing <lirongqing@baidu.com>
> 发送时间: 2021年11月4日 19:56
> 收件人: kvm@vger.kernel.org; pbonzini@redhat.com; seanjc@google.com;
> vkuznets@redhat.com; Li,Rongqing <lirongqing@baidu.com>;
> stable@kernel.org
> 主题: [v4][PATCH 1/2] KVM: x86: don't print when fail to read/write pv eoi
> memory
>
> If guest gives MSR_KVM_PV_EOI_EN a wrong value, this printk() will be trigged,
> and kernel log is spammed with the useless message
>
> Fixes: 0d88800d5472 ("kvm: x86: ioapic and apic debug macros cleanup")
> Reported-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> Signed-off-by: Li RongQing <lirongqing@baidu.com>
> Cc: stable@kernel.org
> ---
> arch/x86/kvm/lapic.c | 18 ++++++------------
> 1 files changed, 6 insertions(+), 12 deletions(-)
>
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index d6ac32f..752c48e
> 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -676,31 +676,25 @@ static inline bool pv_eoi_enabled(struct kvm_vcpu
> *vcpu) static bool pv_eoi_get_pending(struct kvm_vcpu *vcpu) {
> u8 val;
> - if (pv_eoi_get_user(vcpu, &val) < 0) {
> - printk(KERN_WARNING "Can't read EOI MSR value: 0x%llx\n",
> - (unsigned long long)vcpu->arch.pv_eoi.msr_val);
> + if (pv_eoi_get_user(vcpu, &val) < 0)
> return false;
> - }
> +
> return val & KVM_PV_EOI_ENABLED;
> }
>
> static void pv_eoi_set_pending(struct kvm_vcpu *vcpu) {
> - if (pv_eoi_put_user(vcpu, KVM_PV_EOI_ENABLED) < 0) {
> - printk(KERN_WARNING "Can't set EOI MSR value: 0x%llx\n",
> - (unsigned long long)vcpu->arch.pv_eoi.msr_val);
> + if (pv_eoi_put_user(vcpu, KVM_PV_EOI_ENABLED) < 0)
> return;
> - }
> +
> __set_bit(KVM_APIC_PV_EOI_PENDING, &vcpu->arch.apic_attention); }
>
> static void pv_eoi_clr_pending(struct kvm_vcpu *vcpu) {
> - if (pv_eoi_put_user(vcpu, KVM_PV_EOI_DISABLED) < 0) {
> - printk(KERN_WARNING "Can't clear EOI MSR value: 0x%llx\n",
> - (unsigned long long)vcpu->arch.pv_eoi.msr_val);
> + if (pv_eoi_put_user(vcpu, KVM_PV_EOI_DISABLED) < 0)
> return;
> - }
> +
> __clear_bit(KVM_APIC_PV_EOI_PENDING,
> &vcpu->arch.apic_attention); }
>
> --
> 1.7.1
prev parent reply other threads:[~2021-11-18 14:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-04 11:56 [v4][PATCH 1/2] KVM: x86: don't print when fail to read/write pv eoi memory Li RongQing
2021-11-04 11:56 ` [v4][PATCH 2/2] KVM: Clear pv eoi pending bit only when it is set Li RongQing
2021-11-19 16:19 ` Vitaly Kuznetsov
2021-11-26 16:54 ` Paolo Bonzini
2021-11-18 14:35 ` Li,Rongqing [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=e9948d6b4619420bacee3dd855313c4b@baidu.com \
--to=lirongqing@baidu.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=stable@kernel.org \
--cc=vkuznets@redhat.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 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.