Re: [Qemu-devel] [RFC/RFT PATCH v2 3/3] arm/arm64: KVM: implement 'uncached' mem coherency

2015-05-21 Thread Andrew Jones
On Wed, May 20, 2015 at 07:29:28PM -0700, Mario Smarduch wrote: On 05/15/2015 10:04 AM, Andrew Jones wrote: On Fri, May 15, 2015 at 08:02:59AM -0700, Christoffer Dall wrote: On Thu, May 14, 2015 at 03:32:13PM +0200, Andrew Jones wrote: On Thu, May 14, 2015 at 12:55:49PM +0200, Christoffer

Re: [Qemu-devel] [RFC/RFT PATCH v2 3/3] arm/arm64: KVM: implement 'uncached' mem coherency

2015-05-20 Thread Mario Smarduch
On 05/15/2015 10:04 AM, Andrew Jones wrote: On Fri, May 15, 2015 at 08:02:59AM -0700, Christoffer Dall wrote: On Thu, May 14, 2015 at 03:32:13PM +0200, Andrew Jones wrote: On Thu, May 14, 2015 at 12:55:49PM +0200, Christoffer Dall wrote: On Wed, May 13, 2015 at 01:31:54PM +0200, Andrew Jones

Re: [Qemu-devel] [RFC/RFT PATCH v2 3/3] arm/arm64: KVM: implement 'uncached' mem coherency

2015-05-15 Thread Christoffer Dall
On Thu, May 14, 2015 at 03:32:13PM +0200, Andrew Jones wrote: On Thu, May 14, 2015 at 12:55:49PM +0200, Christoffer Dall wrote: On Wed, May 13, 2015 at 01:31:54PM +0200, Andrew Jones wrote: When S1 and S2 memory attributes combine wrt to caching policy, non-cacheable types take

Re: [Qemu-devel] [RFC/RFT PATCH v2 3/3] arm/arm64: KVM: implement 'uncached' mem coherency

2015-05-15 Thread Jérémy Fanguède
On Fri, May 15, 2015 at 7:04 PM, Andrew Jones drjo...@redhat.com wrote: On Fri, May 15, 2015 at 08:02:59AM -0700, Christoffer Dall wrote: On Thu, May 14, 2015 at 03:32:13PM +0200, Andrew Jones wrote: On Thu, May 14, 2015 at 12:55:49PM +0200, Christoffer Dall wrote: On Wed, May 13, 2015 at

Re: [Qemu-devel] [RFC/RFT PATCH v2 3/3] arm/arm64: KVM: implement 'uncached' mem coherency

2015-05-15 Thread Andrew Jones
On Fri, May 15, 2015 at 08:02:59AM -0700, Christoffer Dall wrote: On Thu, May 14, 2015 at 03:32:13PM +0200, Andrew Jones wrote: On Thu, May 14, 2015 at 12:55:49PM +0200, Christoffer Dall wrote: On Wed, May 13, 2015 at 01:31:54PM +0200, Andrew Jones wrote: When S1 and S2 memory attributes

Re: [Qemu-devel] [RFC/RFT PATCH v2 3/3] arm/arm64: KVM: implement 'uncached' mem coherency

2015-05-14 Thread Andrew Jones
On Thu, May 14, 2015 at 12:55:49PM +0200, Christoffer Dall wrote: On Wed, May 13, 2015 at 01:31:54PM +0200, Andrew Jones wrote: When S1 and S2 memory attributes combine wrt to caching policy, non-cacheable types take precedence. If a guest maps a region as device memory, which KVM userspace

Re: [Qemu-devel] [RFC/RFT PATCH v2 3/3] arm/arm64: KVM: implement 'uncached' mem coherency

2015-05-14 Thread Christoffer Dall
On Wed, May 13, 2015 at 01:31:54PM +0200, Andrew Jones wrote: When S1 and S2 memory attributes combine wrt to caching policy, non-cacheable types take precedence. If a guest maps a region as device memory, which KVM userspace is using to emulate the device using normal, cacheable memory, then

[Qemu-devel] [RFC/RFT PATCH v2 3/3] arm/arm64: KVM: implement 'uncached' mem coherency

2015-05-13 Thread Andrew Jones
When S1 and S2 memory attributes combine wrt to caching policy, non-cacheable types take precedence. If a guest maps a region as device memory, which KVM userspace is using to emulate the device using normal, cacheable memory, then we lose coherency. With KVM_MEM_UNCACHED, KVM userspace can now