xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Tamas K Lengyel <tamas.lengyel@intel.com>
To: xen-devel@lists.xenproject.org
Cc: "Tamas K Lengyel" <tamas.lengyel@intel.com>,
	"Wei Liu" <wl@xen.org>,
	"George Dunlap" <george.dunlap@eu.citrix.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [Xen-devel] [PATCH v8 2/5] xen/x86: Make hap_get_allocation accessible
Date: Mon, 10 Feb 2020 11:21:26 -0800	[thread overview]
Message-ID: <2bbfcca0a830da7648a1d0133ea3a4c2f73e17ea.1581362050.git.tamas.lengyel@intel.com> (raw)
In-Reply-To: <cover.1581362050.git.tamas.lengyel@intel.com>

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(-)

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 */
 
-- 
2.20.1


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

  parent reply	other threads:[~2020-02-10 19:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 19:21 [Xen-devel] [PATCH v8 0/5] VM forking Tamas K Lengyel
2020-02-10 19:21 ` [Xen-devel] [PATCH v8 1/5] x86/p2m: Allow p2m_get_page_from_gfn to return shared entries Tamas K Lengyel
2020-02-11  9:16   ` Jan Beulich
2020-02-11 10:29     ` Tamas K Lengyel
2020-02-11 11:04       ` Jan Beulich
2020-02-11 13:34         ` Tamas K Lengyel
2020-02-21 13:48   ` Andrew Cooper
2020-02-21 14:21     ` Tamas K Lengyel
2020-02-10 19:21 ` Tamas K Lengyel [this message]
2020-02-10 19:21 ` [Xen-devel] [PATCH v8 3/5] xen/mem_sharing: VM forking Tamas K Lengyel
2020-02-21 13:43   ` Andrew Cooper
2020-02-21 14:02     ` Andrew Cooper
2020-02-21 14:22       ` Tamas K Lengyel
2020-02-21 14:42   ` Andrew Cooper
2020-02-21 17:07     ` Tamas K Lengyel
2020-02-21 17:47       ` Andrew Cooper
2020-02-21 17:56         ` Tamas K Lengyel
2020-02-21 18:08         ` Tamas K Lengyel
2020-02-10 19:21 ` [Xen-devel] [PATCH v8 4/5] x86/mem_sharing: reset a fork Tamas K Lengyel
2020-02-10 19:21 ` [Xen-devel] [PATCH v8 5/5] xen/tools: VM forking toolstack side Tamas K Lengyel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2bbfcca0a830da7648a1d0133ea3a4c2f73e17ea.1581362050.git.tamas.lengyel@intel.com \
    --to=tamas.lengyel@intel.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).