[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/x86: p2m: Don't initialize slot 0 of the P2M
commit c9727280da893b57a4eb33de26fbc6669410eabb Author: Julien Grall <jgrall@xxxxxxxxxx> AuthorDate: Mon Feb 3 16:26:16 2020 +0000 Commit: Julien Grall <julien@xxxxxxx> CommitDate: Mon Feb 17 22:03:52 2020 +0000 xen/x86: p2m: Don't initialize slot 0 of the P2M It is not entirely clear why the slot 0 of each p2m should be populated with empty page-tables. The commit introducing it 759af8e3800 "[HVM] Fix 64-bit HVM domain creation." does not contain meaningful explanation except that it was necessary for shadow. As we don't seem to have a good explanation why this is there, drop the code completely. This was tested by successfully booting a HVM with shadow enabled. Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx> Acked-by: George Dunlap <george.dunlap@xxxxxxxxxx> --- xen/arch/x86/mm/p2m.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index fd9f09536d..9f1c29d7ef 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -688,7 +688,6 @@ int p2m_alloc_table(struct p2m_domain *p2m) { mfn_t top_mfn; struct domain *d = p2m->domain; - int rc = 0; p2m_lock(p2m); @@ -721,19 +720,8 @@ int p2m_alloc_table(struct p2m_domain *p2m) if ( hap_enabled(d) ) iommu_share_p2m_table(d); - P2M_PRINTK("populating p2m table\n"); - - /* Initialise physmap tables for slot zero. Other code assumes this. */ - p2m->defer_nested_flush = 1; - rc = p2m_set_entry(p2m, _gfn(0), INVALID_MFN, PAGE_ORDER_4K, - p2m_invalid, p2m->default_access); - p2m->defer_nested_flush = 0; p2m_unlock(p2m); - if ( !rc ) - P2M_PRINTK("p2m table initialised for slot zero\n"); - else - P2M_PRINTK("failed to initialise p2m table for slot zero (%d)\n", rc); - return rc; + return 0; } /* -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |