From 6269fe2bdf5cb4efc67c5fc61aea8212869320c8 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sun, 2 Nov 2014 15:43:20 +0200 Subject: [PATCH] xen: fix virt_to_mfn() Need to shift by 12 to get to a frame number. With this the host accepts the guest interface. --- core/xen/gntalloc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/xen/gntalloc.cc b/core/xen/gntalloc.cc index 56301c56ee..dca205407c 100644 --- a/core/xen/gntalloc.cc +++ b/core/xen/gntalloc.cc @@ -116,7 +116,7 @@ public: // and in that case we'll need to have an extra step here inline uint64_t virt_to_mfn(void *virt) { - return virt_to_phys(virt); + return virt_to_phys(virt) >> 12; } gntref& kernel_grant_head::new_ref() {