[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Xen guest broken following "use memdev for RAM" patch

From: Anthony PERARD
Subject: Xen guest broken following "use memdev for RAM" patch
Date: Mon, 23 Mar 2020 17:10:39 +0000


Since bd457782b3b0 ("x86/pc: use memdev for RAM") it isn't possible to
start Xen guest anymore.

The error from qemu:
    qemu-system-i386: xen: failed to populate ram at 0
that comes from xen_ram_alloc() in hw/i386/xen/xen-hvm.c

xen_ram_alloc() is used to populate ram for PCI rom devices for example,
but it is also called for the guest RAM. We try to detect when the call
is for the ram by comparing the memory region with the one we created
during initialisation.

During initialisation of QEMU  for a Xen guest, we create a memory
region for the RAM by calling memory_region_init_ram() in
xen_ram_init(). But that memory region isn't used by QEMU anymore (since
mc->default_ram_id is set).

For Xen, we don't want QEMU to allocate the RAM, so using the memdev
won't work.

Do you have a suggestion on
- how we can bypass the generic code that allocate ram?
- keep using something similar to what we have now with
(with accel=xen)

Maybe we need a new hostmem backend which don't allocate any memory but
creates a memory region, to be used by Xen?


Anthony PERARD

reply via email to

[Prev in Thread] Current Thread [Next in Thread]