bnc#828623 - bnc#839596 - VUL-0: CVE-2013-1442: XSA-62: xen: Information leak on AVX and/or LWP capable CPUs 5242a1b5-x86-xsave-initialize-extended-register-state-when-guests-enable-it.patch - bnc#840592 - VUL-0: CVE-2013-4355: XSA-63: xen: Information leaks through I/O instruction emulation CVE-2013-4355-xsa63.patch - bnc#840593 - VUL-0: CVE-2013-4356: XSA-64: xen: Memory accessible by 64-bit PV guests under live migration CVE-2013-4356-xsa64.patch - bnc#841766 - VUL-1: CVE-2013-4361: XSA-66: xen: Information leak through fbld instruction emulation CVE-2013-4361-xsa66.patch - bnc#833796 - L3: Xen: migration broken from xsave-capable to xsave-incapable host 52205e27-x86-xsave-initialization-improvements.patch 522dc0e6-x86-xsave-fix-migration-from-xsave-capable-to-xsave-incapable-host.patch - bnc#839600 - [HP BCS SLES11 Bug]: In HP’s UEFI x86_64 platform and sles11sp3 with xen environment, xen hypervisor will panic on multiple blades nPar. 523172d5-x86-fix-memory-cut-off-when-using-PFN-compression.patch - bnc#833251 - [HP BCS SLES11 Bug]: In HP’s UEFI x86_64 platform and with xen environment, in booting stage ,xen hypervisor will panic. 522d896b-x86-EFI-properly-handle-run-time-memory-regions-outside-the-1-1-map.patch - bnc#834751 - [HP BCS SLES11 Bug]: In xen, “shutdown –y 0 –h” cannot power off system 522d896b-x86-EFI-properly-handle-run-time-memory-regions-outside-the-1-1-map.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=274
95 lines
3.3 KiB
Diff
95 lines
3.3 KiB
Diff
# Commit 06d086832155fc7f5344e9d108b979de34674d11
|
|
# Date 2013-09-12 17:41:04 +0200
|
|
# Author Jan Beulich <jbeulich@suse.com>
|
|
# Committer Jan Beulich <jbeulich@suse.com>
|
|
libxc/x86: fix page table creation for huge guests
|
|
|
|
The switch-over logic from one page directory to the next was wrong;
|
|
it needs to be deferred until we actually reach the last page within
|
|
a given region, instead of being done when the last entry of a page
|
|
directory gets started with.
|
|
|
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
|
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
|
|
|
|
--- a/tools/libxc/xc_dom_x86.c
|
|
+++ b/tools/libxc/xc_dom_x86.c
|
|
@@ -251,7 +251,7 @@ static int setup_pgtables_x86_32_pae(str
|
|
l3_pgentry_64_t *l3tab;
|
|
l2_pgentry_64_t *l2tab = NULL;
|
|
l1_pgentry_64_t *l1tab = NULL;
|
|
- unsigned long l3off, l2off, l1off;
|
|
+ unsigned long l3off, l2off = 0, l1off;
|
|
xen_vaddr_t addr;
|
|
xen_pfn_t pgpfn;
|
|
xen_pfn_t l3mfn = xc_dom_p2m_guest(dom, l3pfn);
|
|
@@ -299,8 +299,6 @@ static int setup_pgtables_x86_32_pae(str
|
|
l2off = l2_table_offset_pae(addr);
|
|
l2tab[l2off] =
|
|
pfn_to_paddr(xc_dom_p2m_guest(dom, l1pfn)) | L2_PROT;
|
|
- if ( l2off == (L2_PAGETABLE_ENTRIES_PAE - 1) )
|
|
- l2tab = NULL;
|
|
l1pfn++;
|
|
}
|
|
|
|
@@ -312,8 +310,13 @@ static int setup_pgtables_x86_32_pae(str
|
|
if ( (addr >= dom->pgtables_seg.vstart) &&
|
|
(addr < dom->pgtables_seg.vend) )
|
|
l1tab[l1off] &= ~_PAGE_RW; /* page tables are r/o */
|
|
+
|
|
if ( l1off == (L1_PAGETABLE_ENTRIES_PAE - 1) )
|
|
+ {
|
|
l1tab = NULL;
|
|
+ if ( l2off == (L2_PAGETABLE_ENTRIES_PAE - 1) )
|
|
+ l2tab = NULL;
|
|
+ }
|
|
}
|
|
|
|
if ( dom->virt_pgtab_end <= 0xc0000000 )
|
|
@@ -360,7 +363,7 @@ static int setup_pgtables_x86_64(struct
|
|
l3_pgentry_64_t *l3tab = NULL;
|
|
l2_pgentry_64_t *l2tab = NULL;
|
|
l1_pgentry_64_t *l1tab = NULL;
|
|
- uint64_t l4off, l3off, l2off, l1off;
|
|
+ uint64_t l4off, l3off = 0, l2off = 0, l1off;
|
|
uint64_t addr;
|
|
xen_pfn_t pgpfn;
|
|
|
|
@@ -391,8 +394,6 @@ static int setup_pgtables_x86_64(struct
|
|
l3off = l3_table_offset_x86_64(addr);
|
|
l3tab[l3off] =
|
|
pfn_to_paddr(xc_dom_p2m_guest(dom, l2pfn)) | L3_PROT;
|
|
- if ( l3off == (L3_PAGETABLE_ENTRIES_X86_64 - 1) )
|
|
- l3tab = NULL;
|
|
l2pfn++;
|
|
}
|
|
|
|
@@ -405,8 +406,6 @@ static int setup_pgtables_x86_64(struct
|
|
l2off = l2_table_offset_x86_64(addr);
|
|
l2tab[l2off] =
|
|
pfn_to_paddr(xc_dom_p2m_guest(dom, l1pfn)) | L2_PROT;
|
|
- if ( l2off == (L2_PAGETABLE_ENTRIES_X86_64 - 1) )
|
|
- l2tab = NULL;
|
|
l1pfn++;
|
|
}
|
|
|
|
@@ -418,8 +417,17 @@ static int setup_pgtables_x86_64(struct
|
|
if ( (addr >= dom->pgtables_seg.vstart) &&
|
|
(addr < dom->pgtables_seg.vend) )
|
|
l1tab[l1off] &= ~_PAGE_RW; /* page tables are r/o */
|
|
+
|
|
if ( l1off == (L1_PAGETABLE_ENTRIES_X86_64 - 1) )
|
|
+ {
|
|
l1tab = NULL;
|
|
+ if ( l2off == (L2_PAGETABLE_ENTRIES_X86_64 - 1) )
|
|
+ {
|
|
+ l2tab = NULL;
|
|
+ if ( l3off == (L3_PAGETABLE_ENTRIES_X86_64 - 1) )
|
|
+ l3tab = NULL;
|
|
+ }
|
|
+ }
|
|
}
|
|
return 0;
|
|
|