mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wang Guangju <wangguangju@baidu.com>
To: <seanjc@google.com>, <pbonzini@redhat.com>, <vkuznets@redhat.com>,
	<jmattson@google.com>, <wanpengli@tencent.com>, <bp@alien8.de>,
	<joro@8bytes.org>, <suravee.suthikulpanit@amd.com>,
	<hpa@zytor.com>, <tglx@linutronix.de>, <mingo@redhat.com>,
	<kvm@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <wangguangju@baidu.com>
Subject: [PATCH] KVM: x86: Add EOI exit bitmap handlers for Hyper-V SynIC vectors
Date: Tue, 5 Jul 2022 16:37:32 +0800	[thread overview]
Message-ID: <20220705083732.168-1-wangguangju@baidu.com> (raw)

From: wangguangju <wangguangju@baidu.com>

Hyper-V SynIC vectors were added into EOI exit bitmap in func
synic_set_sint().But when the Windows VM VMEXIT due to
EXIT_REASON_EOI_INDUCED, there are no EOI exit bitmap handlers
for Hyper-V SynIC vectors.

This patch fix it.

Change-Id: I2404ebf7bda60326be3f6786e0e34e63aa81bbd4
Signed-off-by: wangguangju <wangguangju@baidu.com>
---
 arch/x86/kvm/lapic.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 0e68b4c..59096f8 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -1303,6 +1303,10 @@ void kvm_apic_set_eoi_accelerated(struct kvm_vcpu *vcpu, int vector)
 
 	trace_kvm_eoi(apic, vector);
 
+	if (to_hv_vcpu(apic->vcpu) &&
+	    test_bit(vector, to_hv_synic(apic->vcpu)->vec_bitmap))
+		kvm_hv_synic_send_eoi(apic->vcpu, vector);
+
 	kvm_ioapic_send_eoi(apic, vector);
 	kvm_make_request(KVM_REQ_EVENT, apic->vcpu);
 }
-- 
2.9.4


             reply	other threads:[~2022-07-05  8:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-05  8:37 Wang Guangju [this message]
2022-07-07  8:26 ` Vitaly Kuznetsov
2022-07-07  9:27   ` 答复: " Wang,Guangju

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=20220705083732.168-1-wangguangju@baidu.com \
    --to=wangguangju@baidu.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jmattson@google.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=seanjc@google.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@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

all inboxes | Powered by JetHome®