Re: ioeventfd usage in KVM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/12/2010 07:08 AM, Cam Macdonell wrote:

+    s->ivshmem_mmio_io_addr = cpu_register_io_memory(ivshmem_mmio_read,
+                                    ivshmem_mmio_write, s);
+    /* region for registers*/
+    pci_register_bar(&d->dev, 0, 0x100,
+                           PCI_BASE_ADDRESS_SPACE_MEMORY, ivshmem_mmio_map);

You've selected the memory address space here.

my basic attempt looks like this:

     struct kvm_ioeventfd ked;

     ked.addr = s->otheraddr + Doorbell;
     ked.len = 4;
     ked.flags = KVM_IOEVENTFD_FLAG_PIO;
     ked.fd = an_eventfd;
     ret = kvm_vm_ioctl(kvm_state, KVM_IOEVENTFD,&ked);

But the PIO address space here.

but when the guest writes to the offset of Doorbell, I cannot see any
action (via a select on the fd).  Is there something obviously wrong
that I'm doing?

Yes - they must match.  Not PIO is faster on x86 but nonexistant elsewhere.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux