From: Wanpeng Li <kernellwp@gmail.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kvm <kvm@vger.kernel.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Radim Krcmar <rkrcmar@redhat.com>
Subject: Re: [PATCH 1/2] KVM: X86: Implement PV IPI in linux guest
Date: Sat, 30 Jun 2018 18:04:12 +0800 [thread overview]
Message-ID: <CANRm+CwhWegEmDzkYJ3kNo2P5ybDAGdH-sS2b3fDsbJO+PyEKA@mail.gmail.com> (raw)
In-Reply-To: <877emhewdx.fsf@vitty.brq.redhat.com>
On Fri, 29 Jun 2018 at 18:10, Vitaly Kuznetsov <vkuznets@redhat.com> wrote:
>
> Wanpeng Li <kernellwp@gmail.com> writes:
>
> > From: Wanpeng Li <wanpengli@tencent.com>
> >
> > Implement PV IPIs in guest kernel.
> >
> > Cc: Paolo Bonzini <pbonzini@redhat.com>
> > Cc: Radim Krčmář <rkrcmar@redhat.com>
> > Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
> > Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
> > ---
> > arch/x86/include/uapi/asm/kvm_para.h | 1 +
> > arch/x86/kernel/kvm.c | 63 ++++++++++++++++++++++++++++++++++++
> > 2 files changed, 64 insertions(+)
> >
> > diff --git a/arch/x86/include/uapi/asm/kvm_para.h b/arch/x86/include/uapi/asm/kvm_para.h
> > index 0ede697..19980ec 100644
> > --- a/arch/x86/include/uapi/asm/kvm_para.h
> > +++ b/arch/x86/include/uapi/asm/kvm_para.h
> > @@ -28,6 +28,7 @@
> > #define KVM_FEATURE_PV_UNHALT 7
> > #define KVM_FEATURE_PV_TLB_FLUSH 9
> > #define KVM_FEATURE_ASYNC_PF_VMEXIT 10
> > +#define KVM_FEATURE_PV_SEND_IPI 11
> >
> > #define KVM_HINTS_REALTIME 0
> >
> > diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
> > index 5b2300b..b4f8dc3 100644
> > --- a/arch/x86/kernel/kvm.c
> > +++ b/arch/x86/kernel/kvm.c
> > @@ -454,6 +454,57 @@ static void __init sev_map_percpu_data(void)
> > }
> >
> > #ifdef CONFIG_SMP
> > +
> > +static void __send_ipi_mask(const struct cpumask *mask, int vector)
> > +{
> > + unsigned long flags, ipi_bitmap = 0;
> > + int cpu;
> > +
> > + local_irq_save(flags);
> > +
> > + for_each_cpu(cpu, mask)
> > + __set_bit(per_cpu(x86_cpu_to_apicid, cpu), &ipi_bitmap);
>
> We need a protection against per_cpu(x86_cpu_to_apicid, cpu) > here.
Will do in v2.
Regards,
Wanpeng Li
next prev parent reply other threads:[~2018-06-30 10:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-29 9:51 [PATCH 0/2] KVM: x86: Add PV IPIs support Wanpeng Li
2018-06-29 9:51 ` [PATCH 1/2] KVM: X86: Implement PV IPI in linux guest Wanpeng Li
2018-06-29 10:10 ` Vitaly Kuznetsov
2018-06-30 10:04 ` Wanpeng Li [this message]
2018-06-29 11:22 ` kbuild test robot
2018-06-29 13:01 ` kbuild test robot
2018-06-29 9:51 ` [PATCH 2/2] KVM: X86: Implement PV send IPI support Wanpeng Li
2018-06-29 10:09 ` Vitaly Kuznetsov
2018-06-29 10:48 ` Paolo Bonzini
2018-06-30 10:05 ` Wanpeng Li
2018-06-29 10:45 ` Paolo Bonzini
2018-06-30 10:04 ` Wanpeng Li
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=CANRm+CwhWegEmDzkYJ3kNo2P5ybDAGdH-sS2b3fDsbJO+PyEKA@mail.gmail.com \
--to=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).