Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

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

 



On 01/17/2011 02:18 PM, Sheng Yang wrote:
>  >  +
>  >  +	if (copy_to_user((void __user *)(entry_base + offset), val, len))
>  >  +		goto out;
>
>  Instead of copying to/from userspace (which is subject to swapin,
>  unexpected values), you could include the guest written value in a
>  kvm_run structure, along with address. Qemu-kvm would use that to
>  synchronize its copy of the table, on KVM_EXIT_MSIX_ROUTING_UPDATE exit.

We want to acelerate MSI-X mask bit accessing, which won't exit to userspace in
the most condition. That's the cost we want to optimize. Also it's possible to
userspace to read the correct value of MMIO(but mostly userspace can't write to it
in order to prevent synchronize issue).

It's also good to have the values in just one place; using userspace makes it easy for both the kernel and userspace to see the values (and set them after migration, if/when we extend this to virtio).

--
error compiling committee.c: too many arguments to function

--
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