From 5165cb7eece4e014fa4f3146591c20e8e4cc9c92 Mon Sep 17 00:00:00 2001 From: Sonny Rao Date: Mon, 7 May 2018 18:30:10 -0700 Subject: [PATCH] crosvm: aarch64: fix lack of shifting for base_dev_pfn This is a pfn (page-frame number) not a raw address, so we need to shift it right by 12. BUG=chromium:840048 TEST=manual test on kevin with virtio wayland and --disable-sandbox, should not get "failed to recv from vfd: VmBadResponse" message Change-Id: I788712ec7b9b3e9b4ada481d62a5f2ae1624e929 Reviewed-on: https://chromium-review.googlesource.com/1049060 Commit-Ready: Sonny Rao Tested-by: Sonny Rao Reviewed-by: Stephen Barber Reviewed-by: Dylan Reid --- aarch64/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aarch64/src/lib.rs b/aarch64/src/lib.rs index b218a4d343..179ebc9d6b 100644 --- a/aarch64/src/lib.rs +++ b/aarch64/src/lib.rs @@ -191,7 +191,7 @@ impl arch::LinuxArch for AArch64 { } fn get_base_dev_pfn(mem_size: u64) -> u64 { - AARCH64_PHYS_MEM_START + mem_size + (AARCH64_PHYS_MEM_START + mem_size) >> 12 } /// This returns a base part of the kernel command for this architecture