Message ID | 8ccfd49088b2c811415f0c09886133a936e460d2.1582310142.git.tamas.lengyel@intel.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | VM forking | expand |
On Fri, Feb 21, 2020 at 10:49:19AM -0800, Tamas K Lengyel wrote: > During VM forking we'll copy the parent domain's parameters to the client, > including the HAP shadow memory setting that is used for storing the domain's > EPT. We'll copy this in the hypervisor instead doing it during toolstack launch > to allow the domain to start executing and unsharing memory before (or > even completely without) the toolstack. > > Signed-off-by: Tamas K Lengyel <tamas.lengyel@intel.com> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com> I would also be fine with this merged into the respective patch where hap_get_allocation gets called. Thanks, Roger.
On 24.02.2020 16:20, Roger Pau Monné wrote: > On Fri, Feb 21, 2020 at 10:49:19AM -0800, Tamas K Lengyel wrote: >> During VM forking we'll copy the parent domain's parameters to the client, >> including the HAP shadow memory setting that is used for storing the domain's >> EPT. We'll copy this in the hypervisor instead doing it during toolstack launch >> to allow the domain to start executing and unsharing memory before (or >> even completely without) the toolstack. >> >> Signed-off-by: Tamas K Lengyel <tamas.lengyel@intel.com> > > Reviewed-by: Roger Pau Monné <roger.pau@citrix.com> And with maintainership now having changed Acked-by: Jan Beulich <jbeulich@suse.com> > I would also be fine with this merged into the respective patch where > hap_get_allocation gets called. Indeed that's the reason why this hasn't gone in yet, I think. There's no use from putting it in without also putting in the patch where this is actually needed. In fact it introduces a "stray lack of static" instance until then, which typically we try to clean up. Jan
On Tue, Feb 25, 2020 at 6:17 AM Jan Beulich <jbeulich@suse.com> wrote: > > On 24.02.2020 16:20, Roger Pau Monné wrote: > > On Fri, Feb 21, 2020 at 10:49:19AM -0800, Tamas K Lengyel wrote: > >> During VM forking we'll copy the parent domain's parameters to the client, > >> including the HAP shadow memory setting that is used for storing the domain's > >> EPT. We'll copy this in the hypervisor instead doing it during toolstack launch > >> to allow the domain to start executing and unsharing memory before (or > >> even completely without) the toolstack. > >> > >> Signed-off-by: Tamas K Lengyel <tamas.lengyel@intel.com> > > > > Reviewed-by: Roger Pau Monné <roger.pau@citrix.com> > > And with maintainership now having changed > > Acked-by: Jan Beulich <jbeulich@suse.com> > > > I would also be fine with this merged into the respective patch where > > hap_get_allocation gets called. > > Indeed that's the reason why this hasn't gone in yet, I think. > There's no use from putting it in without also putting in the > patch where this is actually needed. In fact it introduces a > "stray lack of static" instance until then, which typically we > try to clean up. I can certainly fold it in to the larger patch if that's preferred. Tamas
diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c index 3d93f3451c..c7c7ff6e99 100644 --- a/xen/arch/x86/mm/hap/hap.c +++ b/xen/arch/x86/mm/hap/hap.c @@ -321,8 +321,7 @@ static void hap_free_p2m_page(struct domain *d, struct page_info *pg) } /* Return the size of the pool, rounded up to the nearest MB */ -static unsigned int -hap_get_allocation(struct domain *d) +unsigned int hap_get_allocation(struct domain *d) { unsigned int pg = d->arch.paging.hap.total_pages + d->arch.paging.hap.p2m_pages; diff --git a/xen/include/asm-x86/hap.h b/xen/include/asm-x86/hap.h index b94bfb4ed0..1bf07e49fe 100644 --- a/xen/include/asm-x86/hap.h +++ b/xen/include/asm-x86/hap.h @@ -45,6 +45,7 @@ int hap_track_dirty_vram(struct domain *d, extern const struct paging_mode *hap_paging_get_mode(struct vcpu *); int hap_set_allocation(struct domain *d, unsigned int pages, bool *preempted); +unsigned int hap_get_allocation(struct domain *d); #endif /* XEN_HAP_H */
During VM forking we'll copy the parent domain's parameters to the client, including the HAP shadow memory setting that is used for storing the domain's EPT. We'll copy this in the hypervisor instead doing it during toolstack launch to allow the domain to start executing and unsharing memory before (or even completely without) the toolstack. Signed-off-by: Tamas K Lengyel <tamas.lengyel@intel.com> --- xen/arch/x86/mm/hap/hap.c | 3 +-- xen/include/asm-x86/hap.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-)