> -----Original Message-----
> From: Roger Pau Monne <[email protected]>
> Sent: 09 September 2020 15:51
> To: [email protected]
> Cc: Roger Pau Monne <[email protected]>; Jan Beulich <[email protected]>; 
> Andrew Cooper
> <[email protected]>; Wei Liu <[email protected]>; Paul Durrant 
> <[email protected]>
> Subject: [PATCH] x86/hvm: don't treat MMIO pages as special ones regarding 
> cache attributes
> 
> MMIO regions below the maximum address on the memory map can have a
> backing page struct that's shared with dom_io (see x86
> arch_init_memory and it's usage of share_xen_page_with_guest), and
> thus also fulfill the is_special_page check because the page has the
> Xen heap bit set.
> 
> This is incorrect for MMIO regions when is_special_page is used by
> epte_get_entry_emt, as it will force direct MMIO regions mapped into
> the guest p2m to have the cache attributes set to write-back.
> 
> Add an extra check in epte_get_entry_emt in order to detect pages
> shared with dom_io (ie: MMIO regions) and don't force them to
> write-back cache type on that case.
> 
> Fixes: 81fd0d3ca4b2cd ('x86/hvm: simplify 'mmio_direct' check in 
> epte_get_entry_emt()')
> Signed-off-by: Roger Pau Monné <[email protected]>
> ---
> Cc: Paul Durrant <[email protected]>

This looks like the right thing to do...

Reviewed-by: Paul Durrant <[email protected]>


Reply via email to