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.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 3925402f5d
master date: 2020-04-01 12:36:57 +0200
This commit is contained in:
Roger Pau Monné authored and Jan Beulich committed 2020-04-09 09:18:56 +02:00
1 parent d5be08064a
commit 71b7eadb0b
1 file changed
+1 -1
+1 -1
View File
@@ -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 )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.