Subject: [PATCH 3/6] arm/arm64: KVM: add 'writable' parameter to kvm_phys_addr_ioremap

From: [email-masked] (Mario Smarduch)
Date: Mon, 29 Sep 2014 11:02:16 -0700

On 09/29/2014 05:23 AM, Christoffer Dall wrote:
> On Wed, Sep 24, 2014 at 05:03:18PM -0700, Mario Smarduch wrote:
>> Is DEVICE type the correct default, for device
>> regions that are prefetchable? The guest might
>> want something less restrictive to optimize device
>> access.
>>
> We don't have a use case for this yet, and we aren't supporting generic
> platform device passthrough yet.
> 
> So far this patch is solving a real problem, but if we need something
> more flexible, then patches are welcome :)
> 
> -Christoffer
> 

I understand the fix addresses a real issue, but once it's in,
it may go unnoticed for quite a while.

I would recommend some warning or comment that guest has no
control over device memory attributes. In my opinion
setting 2nd stage attributes to cacheble (with exception of
GIC range) should work letting the guest driver manage
attributes.

- Mario