On 04/02/2020 13:16, Durrant, Paul wrote:
-----Original Message-----
From: Xen-devel <xen-devel-boun...@lists.xenproject.org> On Behalf Of
Julien Grall
Sent: 04 February 2020 13:06
To: xen-devel@lists.xenproject.org
Cc: jul...@xen.org; Wei Liu <w...@xen.org>; George Dunlap
<george.dun...@eu.citrix.com>; Andrew Cooper <andrew.coop...@citrix.com>;
Grall, Julien <jgr...@amazon.com>; Jan Beulich <jbeul...@suse.com>; Roger
Pau Monné <roger....@citrix.com>
Subject: [Xen-devel] [PATCH v2 2/2] xen/x86: hap: Clean-up and harden
hap_enable()

From: Julien Grall <jgr...@amazon.com>

Unlike shadow_enable(), hap_enable() can only be called once during
domain creation and with the mode equal to mode equal to
PG_external | PG_translate | PG_refcounts.

If it were called twice, then we might have something interesting
problem as the p2m tables would be re-allocated (and therefore all the
mappings would be lost).

There are two tests in p2m_alloc_tabl2: whether the domain has memory 
allocated, and whether the domain already has a p2m. Can these now be dropped?

I don't think so. They are still necessary for the shadow page-tables. AFAICT, they are enabled via a DOMCTL.

Cheers,

--
Julien Grall

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

Reply via email to