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

Re: [PATCH] x86/hvm: don't treat MMIO pages as special ones regarding cache attributes


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 10 Sep 2020 15:17:12 +0200
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <paul@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, 'Andrew Cooper' <andrew.cooper3@xxxxxxxxxx>, 'Wei Liu' <wl@xxxxxxx>
  • Delivery-date: Thu, 10 Sep 2020 13:17:54 +0000
  • Ironport-sdr: RSv+wuVZZA54tFwI5KPfFObc2CFW+Hau+wSZrSq7v/r5MvECG+OS8ezM5VXO6G0xqChVwh6INB PHxi79/gN2Jcbk+nWE7IhgggsfBKvY3zjTXoWagNfTyx+dQGKaZfXDlwVPuCGACVsysMSrSXVF WxcHTaBChtqq/MIjUD7yRct9zrxe5VnjzOJ5TsurzgRzA4OlYLeLtS30tfUgvLX5mAFxaibPdi +w6X7/qhmMUYECOmo/ekhJScjkLjyY9UEfcpa8jdSj9zou7vxTiiFQb4VLUlKE/d0eA48Aup07 4ck=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Sep 10, 2020 at 01:28:44PM +0200, Jan Beulich wrote:
> On 10.09.2020 13:05, Roger Pau Monné wrote:
> > It's still not clear to me what option would be better: modify
> > share_xen_page_with_guest to not mark pages as Xen heap, or implement
> > something different to assign MMIO pages to dom_io without setting
> > the Xen heap flag.
> 
> static void __init share_io_page(struct page_info *page)
> {
>     set_gpfn_from_mfn(mfn_x(page_to_mfn(page)), INVALID_M2P_ENTRY);
> 
>     /* The incremented type count pins as writable. */
>     page->u.inuse.type_info = PGT_writable_page | PGT_validated | 1;
> 
>     page_set_owner(page, dom_io);
> 
>     page->count_info |= PGC_allocated | 1;
> }
> 
> is of course much shorter than share_xen_page_with_guest(), but
> I'm nevertheless uncertain whether simply making conditional
> the setting of PGC_xen_heap there isn't the easier route. Of
> course, not pointlessly acquiring and releasing a lock has its
> own appeal.

I've went over the existing is_special_page users and I think it's
fine for MMIO regions to not be marked as special pages.

Will send a new patch.

Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.