* [Qemu-devel] using MSIX for virtio-blk @ 2015-07-07 17:20 Naredula Janardhana Reddy 2015-07-09 11:01 ` Stefan Hajnoczi 0 siblings, 1 reply; 3+ messages in thread From: Naredula Janardhana Reddy @ 2015-07-07 17:20 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 178 bytes --] Hi, How to enable MSIX for virtio-blk, this is to avoid extra use of VIRTIO_PCI_ISR port reads. This is for qemu 2.3.0 with virtio-blk-pci with x-data-plane is on. Thanks Jana [-- Attachment #2: Type: text/html, Size: 220 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] using MSIX for virtio-blk 2015-07-07 17:20 [Qemu-devel] using MSIX for virtio-blk Naredula Janardhana Reddy @ 2015-07-09 11:01 ` Stefan Hajnoczi 2015-07-10 17:47 ` Naredula Janardhana Reddy 0 siblings, 1 reply; 3+ messages in thread From: Stefan Hajnoczi @ 2015-07-09 11:01 UTC (permalink / raw) To: Naredula Janardhana Reddy; +Cc: qemu-devel [-- Attachment #1: Type: text/plain, Size: 1235 bytes --] On Tue, Jul 07, 2015 at 10:50:59PM +0530, Naredula Janardhana Reddy wrote: > How to enable MSIX for virtio-blk, this is to avoid extra use of > VIRTIO_PCI_ISR port reads. > This is for qemu 2.3.0 with virtio-blk-pci with x-data-plane is on. I tried the following with QEMU 2.3.0: qemu-system-x86_64 -enable-kvm -m 1024 \ -drive if=none,id=drive0,file=test.img,format=raw,aio=native,cache=none \ -object iothread,id=iothread0 \ -device virtio-blk-pci,drive=drive0,iothread=iothread0 Inside the guest I checked /proc/interrupts and found that the virtio-pci/virtio-blk driver is using MSI. I also checked /proc/ioports and found the virtio-pci registers at 0xc040. Then I used "perf record -a -e kvm:kvm_pio" on the host to record all PIO accesses. Inside the guest I ran "dd if=/dev/vda of=/dev/null iflag=direct bs=4k" for about 30 seconds. Afterwards I ran "perf script" on the host and subtracted the 0xc040 base address from the PIO accesses to identify the virtio-pci registers. I didn't see any accesses to the ISR register, only writes to the QUEUE_NOTIFY register. Either your guest operating system is not enabling MSI or you are using QEMU command-line options that prevent MSI. [-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] using MSIX for virtio-blk 2015-07-09 11:01 ` Stefan Hajnoczi @ 2015-07-10 17:47 ` Naredula Janardhana Reddy 0 siblings, 0 replies; 3+ messages in thread From: Naredula Janardhana Reddy @ 2015-07-10 17:47 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: qemu-devel [-- Attachment #1: Type: text/plain, Size: 1512 bytes --] Thanks Stefan, It's a small bug in the virtio-blk driver in my kernel. After fixing , It works as expected. Jana On 9 July 2015 at 16:31, Stefan Hajnoczi <stefanha@gmail.com> wrote: > On Tue, Jul 07, 2015 at 10:50:59PM +0530, Naredula Janardhana Reddy wrote: > > How to enable MSIX for virtio-blk, this is to avoid extra use of > > VIRTIO_PCI_ISR port reads. > > This is for qemu 2.3.0 with virtio-blk-pci with x-data-plane is on. > > I tried the following with QEMU 2.3.0: > > qemu-system-x86_64 -enable-kvm -m 1024 \ > -drive > if=none,id=drive0,file=test.img,format=raw,aio=native,cache=none \ > -object iothread,id=iothread0 \ > -device virtio-blk-pci,drive=drive0,iothread=iothread0 > > Inside the guest I checked /proc/interrupts and found that the > virtio-pci/virtio-blk driver is using MSI. > > I also checked /proc/ioports and found the virtio-pci registers at > 0xc040. > > Then I used "perf record -a -e kvm:kvm_pio" on the host to record all > PIO accesses. > > Inside the guest I ran "dd if=/dev/vda of=/dev/null iflag=direct bs=4k" > for about 30 seconds. Afterwards I ran "perf script" on the host and > subtracted the 0xc040 base address from the PIO accesses to identify the > virtio-pci registers. > > I didn't see any accesses to the ISR register, only writes to the > QUEUE_NOTIFY register. > > Either your guest operating system is not enabling MSI or you are using > QEMU command-line options that prevent MSI. > [-- Attachment #2: Type: text/html, Size: 2073 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-10 17:48 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-07-07 17:20 [Qemu-devel] using MSIX for virtio-blk Naredula Janardhana Reddy 2015-07-09 11:01 ` Stefan Hajnoczi 2015-07-10 17:47 ` Naredula Janardhana Reddy
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).