If the hypervisor memory is located right below 4G, we wrap around the
calculation of hyp_phys_end to 0 and map nothing. Fix this by expanding
both hyp_phys_end and - while at it - also hyp_phys_start to u64.

Fixes 4a3317bb02.

Signed-off-by: Jan Kiszka <[email protected]>
---
 hypervisor/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hypervisor/setup.c b/hypervisor/setup.c
index 4fb61a7..4b79189 100644
--- a/hypervisor/setup.c
+++ b/hypervisor/setup.c
@@ -33,7 +33,7 @@ static void init_early(unsigned int cpu_id)
 {
        unsigned long core_and_percpu_size = hypervisor_header.core_size +
                sizeof(struct per_cpu) * hypervisor_header.max_cpus;
-       unsigned long hyp_phys_start, hyp_phys_end;
+       u64 hyp_phys_start, hyp_phys_end;
        struct jailhouse_memory hv_page;
 
        master_cpu_id = cpu_id;
-- 
2.1.4

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to