On 18.03.2020 11:41, Paul Durrant wrote:
-----Original Message-----
From: Jan Beulich <jbeul...@suse.com>
Sent: 18 March 2020 10:10
To: p...@xen.org
Cc: 'David Woodhouse' <dw...@infradead.org>; sstabell...@kernel.org; 
jul...@xen.org; w...@xen.org;
konrad.w...@oracle.com; george.dun...@eu.citrix.com; andrew.coop...@citrix.com;
ian.jack...@eu.citrix.com; george.dun...@citrix.com; 
jeff.kubas...@dornerworks.com; 'Xia, Hongyan'
<hongy...@amazon.com>; stewart.hildebr...@dornerworks.com; 
xen-devel@lists.xenproject.org
Subject: Re: [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

On 18.03.2020 09:53, Paul Durrant wrote:
-----Original Message-----
From: Xen-devel <xen-devel-boun...@lists.xenproject.org> On Behalf Of David 
Woodhouse
Sent: 17 March 2020 22:15

On Thu, 2020-02-20 at 12:59 +0100, Jan Beulich wrote:
On 07.02.2020 19:04, David Woodhouse wrote:
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -488,7 +488,8 @@ void share_xen_page_with_guest(struct page_info *page, 
struct domain *d,

       page_set_owner(page, d);
       smp_wmb(); /* install valid domain ptr before updating refcnt. */
-    ASSERT((page->count_info & ~PGC_xen_heap) == 0);
+    ASSERT((page->count_info & ~PGC_xen_heap) == PGC_state_inuse ||
+           (page->count_info & ~PGC_xen_heap) == PGC_state_uninitialised);

Can uninitialized pages really make it here?

Yep, we share the low 1MiB with dom_io.


OOI anyone know why we do this? Is it actually necessary?

Yes, for Dom0 to be able to access things like EBDA, IBFT, or data
found in BIOS space.


Ok. I am still wondering why dom0's low 1MiB of pfn space is not
simply mapped 1:1 though. Just historical?

Well, in a way perhaps. Using the DomIO approach is less of a special
case than mapping some arbitrary range 1:1. Furthermore Dom0 being PV
wouldn't necessarily expect any BIOS in its PFN range there, but
rather views it as normal RAM.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to