All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [QEMU-KVM] [DISCUSS] io Completion
@ 2016-08-30 10:45 Charls D. Chap
  2016-08-30 12:54 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Charls D. Chap @ 2016-08-30 10:45 UTC (permalink / raw
  To: kvm

Hello,

It's not clear to me, how is the virtual interrupt injection occurs.
For block I/O cases, virtio and full virtualization

I know the call graph for both cases MSI, pci legacy.

My question is: How QEMU notifies the guest?
How the worker thread(iothread or mainloop thread) is going to inject
the interrupt to vcpu.
vcpu at this time is executing, so it's is in running state.


It needs to change context and jump to interrupt handler.
How is this change from non-root process context to non-root interrupt
context happens?
1) In full-virtualization block io
2) in virtio-blk io

For example the issue path in the second case, is clearer, it's a write to
a register in pci configuration space (kick).

Maybe it's implemented in the following calls(?)
msix_notify or pci_set_irq or in the implementation of the ioctls that
these two calls invokes in the end.


Thanks in advance!

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [QEMU-KVM] [DISCUSS] io Completion
  2016-08-30 10:45 [QEMU-KVM] [DISCUSS] io Completion Charls D. Chap
@ 2016-08-30 12:54 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2016-08-30 12:54 UTC (permalink / raw
  To: Charls D. Chap, kvm



On 30/08/2016 12:45, Charls D. Chap wrote:
> It needs to change context and jump to interrupt handler.
> How is this change from non-root process context to non-root interrupt
> context happens?
> 1) In full-virtualization block io
> 2) in virtio-blk io
> 
> For example the issue path in the second case, is clearer, it's a write to
> a register in pci configuration space (kick).
> 
> Maybe it's implemented in the following calls(?)
> msix_notify or pci_set_irq or in the implementation of the ioctls that
> these two calls invokes in the end.

Yes, it's in the ioctls.

I already wrote the call paths leading to the ioctls to you:
http://marc.info/?l=kvm&m=147024149120990

and I have also already explained that interrupt injections happens
through ioctls on the KVM file descriptors:
http://marc.info/?i=346384966.13112634.1470159219285.JavaMail.zimbra@redhat.com

Thanks,

Paolo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-30 12:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-30 10:45 [QEMU-KVM] [DISCUSS] io Completion Charls D. Chap
2016-08-30 12:54 ` Paolo Bonzini

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.