Re: [PATCH 4/5] kvmtool: Save datamatch as little endian in {add,del}_event

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

 



On Wed, Jun 17, 2015 at 08:17:49AM +0100, Andreas Herrmann wrote:
> On Tue, Jun 16, 2015 at 06:17:14PM +0100, Will Deacon wrote:
> > On Mon, Jun 15, 2015 at 12:49:45PM +0100, Andreas Herrmann wrote:
> > > W/o dedicated endianess it's impossible to find reliably a match
> > > e.g. in kernel/virt/kvm/eventfd.c ioeventfd_in_range.
> > 
> > Hmm, but shouldn't this be the endianness of the guest, rather than just
> > forcing things to little-endian?
> 
> With my patch and following adaption to
> ioeventfd_in_range (in virt/kvm/eventfd.c):

[...]

> But now I see, w/o a correponding kernel change the patch shouldn't
> be merged.

Digging a bit deeper, I think it's up to the architecture KVM backend
(in the kernel) to present the mmio buffer to core kvm in the host
endianness.

For example, on ARM, we honour the endianness of the vcpu in
vcpu_data_guest_to_host when we populate the buffer for kvm_io_bus_write
(which is what ends up in the ioeventfd code).

I couldn't find equivalent code for MIPs, but I may have been looking in
the wrong place.

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