[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2] x86/pvh: print dom0 memory map
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Tue, 25 Jan 2022 11:46:36 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CMoeKsbIiAatSd4jZPfgoanXYSXwyFFC+JM1TJuz2yc=; b=iDIgh4re61E4V1ajVssWfC3CACYbOYUIdJsbgi39ny4BPz0MdA3g+sop03r3tZIdFwM4ksRpcAMKNMFcS2WBIVBtPM4B+K6uPCwwAVzk5XkCzfHFssW3+IlVIb4BUXCD6VPzXpideNaS+QUc0J1dOIC44+CgOTuJK0jM8/VgsPFht7leAxyYJsh0QBtGQEtfYT1LR+3PpLW2e50UukeKGuCevkyxmoMMzvK/IP9sj6wjRpwpJ8WouPpH9+gvPvMTdzizhT7PypZN9T4lZaDNYHP8GQ/YpEHdELF/lHywuR0egxez4Q8xrozYBpwYRsk3gJbWxZ5XU389KT1BMKGGfw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YFlV03vXvfbiiQBZYQGoBd/9B99r+oZ8/fzYAOmjHcfkg9q5D0fELIy3SpyMMDs/ecg8P9IQgDIyLDHccjTLSjEu6fLQS3IypL3+gaL0qflPqRNdvcqadqA41/sKJ2sI/JmnOCghMQCRXhV+sEVRQ5PU6RwFLRXT9SHPG7HQeHhitCzxRkSx9ArS2dwrfaNdd8MgO+uY3RYiPADUnalCzITiXhFp0DlPzTBSspL77ACj1qx3170W92daJe09HVTTTOHLVBXn+o03IAuvJgOk2wpOoQ1wnebpgL8V0ePXtCJwV9JNAluaeXhWwtn3TSYOP1DVYmKm+1mq/wy04KGbTg==
- Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Tue, 25 Jan 2022 10:46:56 +0000
- Ironport-data: A9a23:ENwwSao4rPeryo1hGtIpbomcNB1eBmL+YhIvgKrLsJaIsI4StFCzt garIBnSMvmNZjGneIgkaozk8U8PsJCEzIM1GQBk+S41EHgap5uZCYyVIHmrMnLJJKUvbq7GA +byyDXkBJppJpMJjk71atANlZT4vE2xbuKU5NTsY0idfic5Dndx4f5fs7Rh2NQw2ILkW1rlV e7a+KUzBnf0g1aYDUpMg06zgEsHUCPa4W5wUvQWPJinjXeG/5UnJMt3yZKZdhMUdrJ8DO+iL 9sv+Znilo/vE7XBPfv++lrzWhVirrc/pmFigFIOM0SpqkAqSiDfTs/XnRfTAKtao2zhojx/9 DlCnaS9Ewoiefecou8idjhCODhnFoRhqaCSdBBTseTLp6HHW37lwvEoB0AqJ4wIvO1wBAmi9 9RBdmpLNErawbvrnvTrEYGAhex6RCXvFJkYtXx6iynQEN4tQIzZQrWM7thdtNs1rp4UQ6+OP 5NIAdZpRD/LRRceZwozM807ve2z10GuSAEGsl3A8MLb5ECMlVcsgdABKuH9ZdiiVchT2EGCq Qru/W70HxUbP9y30iee/zSngeqntTP2XsceGaO18tZugUaP3SoDBRsOT1y5rPKlzEmkVLpix 1c8o3R06/JorQryE4e7D0bQTGO4UgA0Y9cKHuZ9slG3wZXxwhyyH3EvZxkQd4lz3CMpfgAC2 liMltLvIDVgtryJVH6QnoupQSOO1Ts9djFbO3JdJecRy5y6+dxo0EqTJjp2OPPt1rXI9SfML ydmRcTUr5Ealo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DwMurFDmt0Li1JfKVzyjmjsOWTJGxrkvtU DDjgzC/62m99W20AXV2WP/54lf3PHh1txALsqRjdV9EESlti+YIKBaH5GStjE8p++irH4sjd n3uh8le/9+7nvAF1vF1SfF6k3F6nID+nXiwViXjT/IusriXg83DMJHmMZwbgbZw1BIhqAx7I t7m0ai87ZHBxLJmyrwo/LSUQtxq0ayqX0+1cYOkn1kV5cEYrM5l/1TwKpsKuZPIMvG0vFnLA E3Z/uspMq+MGnqJUwxh1Mfj+BFBR8Ib1S7qktrgL3h79EZpgE686Ii/r1vop43zuNOd3B13Z W7Dk1WrsA/ciZvV9MEOA4ge7rBNoWfe2O7DIqtSW6XZ53vfUi97qLK3A==
- Ironport-sdr: rHB7a/G6CJlHny8pYs7iaWTl2qMhXu6yflWXejm/SkIPam9XVRQwfbEXgD/KcxZ4qsYHWxW4Tv R2zo45xUfWSe40REWtMTrrwaXSudt8lUxt9K/HG2NZw4URJEmGPX0MPEU0j10wosWYGSov69Vw OVKhlJ6mkPdn2zjNjy85JR6sukUCV/MV0owSfjNzZjvTscZTuko/vJ9fnJrjL79Y5JL2JaO008 fZeycYfdN/R1UfC24pZ/Eu17OgW4oHxir+HJ0Ky4TLUKHJRT7zvX/ymu7VL/PRjVTpCS3Y3nOV xEOJqVgnZyjxsQE6bOZ80drZ
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
I find it useful for debugging certain issues to have the memory map
dom0 is using, so print it when using `dom0=verbose` on the command
line.
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
Changes since v1:
- Make parameter const.
---
xen/arch/x86/e820.c | 3 ++-
xen/arch/x86/hvm/dom0_build.c | 6 ++++++
xen/arch/x86/include/asm/e820.h | 2 ++
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/xen/arch/x86/e820.c b/xen/arch/x86/e820.c
index aa602773bb..b653a19c93 100644
--- a/xen/arch/x86/e820.c
+++ b/xen/arch/x86/e820.c
@@ -88,7 +88,8 @@ static void __init add_memory_region(unsigned long long start,
e820.nr_map++;
}
-static void __init print_e820_memory_map(struct e820entry *map, unsigned int
entries)
+void __init print_e820_memory_map(const struct e820entry *map,
+ unsigned int entries)
{
unsigned int i;
diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c
index 63dceb2116..549ff8ec7c 100644
--- a/xen/arch/x86/hvm/dom0_build.c
+++ b/xen/arch/x86/hvm/dom0_build.c
@@ -1270,6 +1270,12 @@ int __init dom0_construct_pvh(struct domain *d, const
module_t *image,
return rc;
}
+ if ( opt_dom0_verbose )
+ {
+ printk("Dom%u memory map:\n", d->domain_id);
+ print_e820_memory_map(d->arch.e820, d->arch.nr_e820);
+ }
+
printk("WARNING: PVH is an experimental mode with limited
functionality\n");
return 0;
}
diff --git a/xen/arch/x86/include/asm/e820.h b/xen/arch/x86/include/asm/e820.h
index 9d8f1ba960..92f5efa4f5 100644
--- a/xen/arch/x86/include/asm/e820.h
+++ b/xen/arch/x86/include/asm/e820.h
@@ -32,6 +32,8 @@ extern int e820_change_range_type(
extern int e820_add_range(
struct e820map *, uint64_t s, uint64_t e, uint32_t type);
extern unsigned long init_e820(const char *, struct e820map *);
+extern void print_e820_memory_map(const struct e820entry *map,
+ unsigned int entries);
extern struct e820map e820;
extern struct e820map e820_raw;
--
2.34.1
|