Skip to contentSkip to conversation

ix86: fix linear page table construction in alloc_l2_table()

PATCH In review Jan Beulich 3 participants 3 messages Jan 10, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ix86: fix linear page table construction in alloc_l2_table()

Slot 0 got updated when slot 3 was meant. The mistake was hidden by create_pae_xen_mappings() correcting things immediately afterwards (i.e. before the new entries could get used the first time).

xen/arch/x86/mm.c +1 -1
@@ -1488,7 +1488,7 @@ static int alloc_l2_table(struct page_in
             l2e_write(&pl2e[l2_table_offset(PERDOMAIN_VIRT_START) + i],
                       l2e_from_page(perdomain_pt_page(d, i),
                                     __PAGE_HYPERVISOR));
-        pl2e[l2_table_offset(LINEAR_PT_VIRT_START)] =
+        pl2e[l2_table_offset(LINEAR_PT_VIRT_START) + 3] =
             l2e_from_pfn(pfn, __PAGE_HYPERVISOR);
 #else
         memcpy(&pl2e[COMPAT_L2_PAGETABLE_FIRST_XEN_SLOT(d)],

ix86: fix linear page table construction in alloc_l2_table()

Slot 0 got updated when slot 3 was meant. The mistake was hidden by create_pae_xen_mappings() correcting things immediately afterwards (i.e. before the new entries could get used the first time).

xen/arch/x86/mm.c +1 -1
@@ -1488,7 +1488,7 @@ static int alloc_l2_table(struct page_in
             l2e_write(&pl2e[l2_table_offset(PERDOMAIN_VIRT_START) + i],
                       l2e_from_page(perdomain_pt_page(d, i),
                                     __PAGE_HYPERVISOR));
-        pl2e[l2_table_offset(LINEAR_PT_VIRT_START)] =
+        pl2e[l2_table_offset(LINEAR_PT_VIRT_START) + 3] =
             l2e_from_pfn(pfn, __PAGE_HYPERVISOR);
 #else
         memcpy(&pl2e[COMPAT_L2_PAGETABLE_FIRST_XEN_SLOT(d)],

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Jan Beulich

Slot 0 got updated when slot 3 was meant. The mistake was hidden by create_pae_xen_mappings() correcting things immediately afterwards (i.e. before the new entries could get used the first time).

Quoted 14 lines
xen/arch/x86/mm.c +1 -1
@@ -1488,7 +1488,7 @@ static int alloc_l2_table(struct page_in
             l2e_write(&pl2e[l2_table_offset(PERDOMAIN_VIRT_START) + i],
                       l2e_from_page(perdomain_pt_page(d, i),
                                     __PAGE_HYPERVISOR));
-        pl2e[l2_table_offset(LINEAR_PT_VIRT_START)] =
+        pl2e[l2_table_offset(LINEAR_PT_VIRT_START) + 3] =
             l2e_from_pfn(pfn, __PAGE_HYPERVISOR);
 #else
         memcpy(&pl2e[COMPAT_L2_PAGETABLE_FIRST_XEN_SLOT(d)],
Acked-by on v1 1/1
#2 lore raw
In reply to Jan Beulich
Quoted 6 lines · Jan Beulich

Slot 0 got updated when slot 3 was meant. The mistake was hidden by create_pae_xen_mappings() correcting things immediately afterwards (i.e. before the new entries could get used the first time).

Quoted 35 lines
xen/arch/x86/mm.c +1 -1
@@ -1488,7 +1488,7 @@ static int alloc_l2_table(struct page_in
             l2e_write(&pl2e[l2_table_offset(PERDOMAIN_VIRT_START) + i],
                       l2e_from_page(perdomain_pt_page(d, i),
                                     __PAGE_HYPERVISOR));
-        pl2e[l2_table_offset(LINEAR_PT_VIRT_START)] =
+        pl2e[l2_table_offset(LINEAR_PT_VIRT_START) + 3] =
             l2e_from_pfn(pfn, __PAGE_HYPERVISOR);
 #else
         memcpy(&pl2e[COMPAT_L2_PAGETABLE_FIRST_XEN_SLOT(d)],

ix86: fix linear page table construction in alloc_l2_table()

Slot 0 got updated when slot 3 was meant. The mistake was hidden by create_pae_xen_mappings() correcting things immediately afterwards (i.e. before the new entries could get used the first time).

xen/arch/x86/mm.c +1 -1
@@ -1488,7 +1488,7 @@ static int alloc_l2_table(struct page_in
             l2e_write(&pl2e[l2_table_offset(PERDOMAIN_VIRT_START) + i],
                       l2e_from_page(perdomain_pt_page(d, i),
                                     __PAGE_HYPERVISOR));
-        pl2e[l2_table_offset(LINEAR_PT_VIRT_START)] =
+        pl2e[l2_table_offset(LINEAR_PT_VIRT_START) + 3] =
             l2e_from_pfn(pfn, __PAGE_HYPERVISOR);
 #else
         memcpy(&pl2e[COMPAT_L2_PAGETABLE_FIRST_XEN_SLOT(d)],