kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Wanpeng Li <kernellwp@gmail.com>
Cc: "Charls D. Chap" <chapcharls@gmail.com>, kvm <kvm@vger.kernel.org>
Subject: Re: tlb flush after each vm_exit, also virtual interrupts injection
Date: Mon, 29 Aug 2016 11:55:43 +0200	[thread overview]
Message-ID: <be4afab0-2dba-02fc-b96a-335a5a5819ed@redhat.com> (raw)
In-Reply-To: <CANRm+CyLaK1+6J3VN9RNtG7AD6OGr_sb1unUVT0O=XGNtJQTTQ@mail.gmail.com>



On 25/08/2016 11:12, Wanpeng Li wrote:
>> >
>> > ioctl                   when?                interrupt kind
>> > ------------------------------------------------------------------------
>> > KVM_INTERRUPT           i8259 in userspace   EXTINT
>> > KVM_SET_GSI_ROUTING     (always)             IOAPIC
>> > KVM_SIGNAL_MSI          (always)             MSI
>> > KVM_SET_GSI_ROUTING     (always)             MSI
>> > KVM_IRQFD                                    any that can use KVM_SET_GSI_ROUTING
>> >
>> > After KVM_SET_GSI_ROUTING, the host invokes another ioctl on the VM
> MSI routing is also set by KVM_SET_GSI_ROUTING,though MSI/MSI-X
> doesn't associated with GSI, this is intended to save a KVM API,
> right? In addition, kvm_send_userspace_msi() which is called in
> KVM_SIGNAL_MSI path set MSI routing entry again,

No, kvm_send_userspace_msi simply converts the struct used by userspace
(struct kvm_msi) into the one used by the kernel (struct
kvm_kernel_irq_routing_entry).

 I saw there are
> patches which will update gsi routing after changed MSI-X
> configuration(https://patchwork.kernel.org/patch/6827431/)
> , so why set MSI routing entry again during send MSI?

KVM_SIGNAL_MSI does not need a previous KVM_SET_GSI_ROUTING, but if
userspace wants it can use both.  Note that you've linked a patch for
lkvm, not Linux or QEMU.

Paolo

  reply	other threads:[~2016-08-29  9:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-27 10:19 tlb flush after each vm_exit, also virtual interrupts injection charls chap
2016-07-28  8:20 ` Fwd: " Charls D. Chap
2016-08-02 17:33   ` Paolo Bonzini
2016-08-03 14:43     ` Charls D. Chap
2016-08-03 15:56       ` Paolo Bonzini
2016-08-05 11:29         ` Charls D. Chap
2016-08-05 11:59           ` Paolo Bonzini
2016-08-25  9:12     ` Wanpeng Li
2016-08-29  9:55       ` Paolo Bonzini [this message]
2016-08-29 10:22         ` Wanpeng Li
2016-08-29 16:39           ` Paolo Bonzini
2016-08-30  0:39             ` Wanpeng Li
2016-07-28 13:25 ` Radim Krčmář

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=be4afab0-2dba-02fc-b96a-335a5a5819ed@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=chapcharls@gmail.com \
    --cc=kernellwp@gmail.com \
    --cc=kvm@vger.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;
as well as URLs for NNTP newsgroup(s).