Skip to contentSkip to conversation

x86/dom0: fix copy of low 1MB data for PVH

PATCH In review Roger Pau Monne 2 participants 2 messages Mar 31, 2020 – Apr 1, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/dom0: fix copy of low 1MB data for PVH

The orders of start and end are inverted in order to calculate the size of the copy operation.

---
 xen/arch/x86/hvm/dom0_build.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/hvm/dom0_build.c +1 -1
index 2afd44c8a4..12a82c9d7c 100644
@@ -463,7 +463,7 @@ static int __init pvh_populate_p2m(struct domain *d)
             enum hvm_translation_result res =
                  hvm_copy_to_guest_phys(mfn_to_maddr(_mfn(addr)),
                                         mfn_to_virt(addr),
-                                        d->arch.e820[i].addr - end,
+                                        end - d->arch.e820[i].addr,
                                         v);
 
             if ( res != HVMTRANS_okay )
Signature · 1 line
2.26.0