On 04/02/2020 13:16, Durrant, Paul wrote:
-----Original Message-----
From: Xen-devel <[email protected]> On Behalf Of
Julien Grall
Sent: 04 February 2020 13:06
To: [email protected]
Cc: [email protected]; Wei Liu <[email protected]>; George Dunlap
<[email protected]>; Andrew Cooper <[email protected]>;
Grall, Julien <[email protected]>; Jan Beulich <[email protected]>; Roger
Pau MonnĂ© <[email protected]>
Subject: [Xen-devel] [PATCH v2 2/2] xen/x86: hap: Clean-up and harden
hap_enable()

From: Julien Grall <[email protected]>

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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to