Re: [Qemu-devel] [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl

2015-05-15 Thread Paolo Bonzini
On 15/05/2015 17:12, Christoffer Dall wrote: >>> > > Can you find out what memory attributes the guest is using for the >>> > > memory---and if it's uncached, why? >> > >> > For USB, see "drivers/usb/core/hcd-pci.c", function usb_hcd_pci_probe(): >> > it uses ioremap_nocache(). >> > >> > On the

Re: [Qemu-devel] [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl

2015-05-15 Thread Christoffer Dall
On Fri, May 15, 2015 at 01:43:57PM +0200, Laszlo Ersek wrote: > On 05/07/15 19:01, Paolo Bonzini wrote: > > > > > > On 07/05/2015 18:56, Jérémy Fanguède wrote: > >> USB devices fail with a timeout error, as if the communication between > >> the kernel and the devices fail at a certain point: > >>

Re: [Qemu-devel] [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl

2015-05-15 Thread Laszlo Ersek
On 05/07/15 19:01, Paolo Bonzini wrote: > > > On 07/05/2015 18:56, Jérémy Fanguède wrote: >> USB devices fail with a timeout error, as if the communication between >> the kernel and the devices fail at a certain point: >> usb 1-1: device not accepting address 5, error -110 >> usb usb1-port1: unab

Re: [Qemu-devel] [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl

2015-05-07 Thread Paolo Bonzini
On 07/05/2015 18:56, Jérémy Fanguède wrote: > USB devices fail with a timeout error, as if the communication between > the kernel and the devices fail at a certain point: > usb 1-1: device not accepting address 5, error -110 > usb usb1-port1: unable to enumerate USB device > > e1000 fails when t

Re: [Qemu-devel] [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl

2015-05-07 Thread Jérémy Fanguède
On Thu, May 7, 2015 at 5:34 PM, Christoffer Dall wrote: > On Thu, May 7, 2015 at 4:50 PM, Jérémy Fanguède > wrote: >> On Thu, May 7, 2015 at 1:20 PM, Christoffer Dall >> wrote: >>> On Thu, May 07, 2015 at 12:50:50PM +0200, Jérémy Fanguède wrote: On Wed, May 6, 2015 at 4:12 PM, Christoffer D

Re: [Qemu-devel] [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl

2015-05-07 Thread Christoffer Dall
On Thu, May 7, 2015 at 4:50 PM, Jérémy Fanguède wrote: > On Thu, May 7, 2015 at 1:20 PM, Christoffer Dall > wrote: >> On Thu, May 07, 2015 at 12:50:50PM +0200, Jérémy Fanguède wrote: >>> On Wed, May 6, 2015 at 4:12 PM, Christoffer Dall >>> wrote: >>> > Hi Jérémy, >>> > >>> > On Tue, May 05, 2015

Re: [Qemu-devel] [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl

2015-05-07 Thread Jérémy Fanguède
On Thu, May 7, 2015 at 1:20 PM, Christoffer Dall wrote: > On Thu, May 07, 2015 at 12:50:50PM +0200, Jérémy Fanguède wrote: >> On Wed, May 6, 2015 at 4:12 PM, Christoffer Dall >> wrote: >> > Hi Jérémy, >> > >> > On Tue, May 05, 2015 at 11:13:11AM +0200, Jérémy Fanguède wrote: >> >> To maintain cac

Re: [Qemu-devel] [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl

2015-05-07 Thread Christoffer Dall
On Thu, May 07, 2015 at 12:50:50PM +0200, Jérémy Fanguède wrote: > On Wed, May 6, 2015 at 4:12 PM, Christoffer Dall > wrote: > > Hi Jérémy, > > > > On Tue, May 05, 2015 at 11:13:11AM +0200, Jérémy Fanguède wrote: > >> To maintain cache coherency on ARM, we may need a mechanism to flush > >> the da

Re: [Qemu-devel] [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl

2015-05-07 Thread Jérémy Fanguède
On Wed, May 6, 2015 at 4:12 PM, Christoffer Dall wrote: > Hi Jérémy, > > On Tue, May 05, 2015 at 11:13:11AM +0200, Jérémy Fanguède wrote: >> To maintain cache coherency on ARM, we may need a mechanism to flush >> the data cache. > > In addition to generally just making this functionality available

Re: [Qemu-devel] [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl

2015-05-06 Thread Christoffer Dall
Hi Jérémy, On Tue, May 05, 2015 at 11:13:11AM +0200, Jérémy Fanguède wrote: > To maintain cache coherency on ARM, we may need a mechanism to flush > the data cache. In addition to generally just making this functionality available (see below), do you have an actual use case in mind for this? To

[Qemu-devel] [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl

2015-05-05 Thread Jérémy Fanguède
To maintain cache coherency on ARM, we may need a mechanism to flush the data cache. This patch implements KVM_FLUSH_DCACHE_GPA vm ioctl which flushes the data cache at a specified address range. The input argument is a struct kvm_mem_addr containing the guest physical address and the length. Sig