All of lore.kernel.org
 help / color / mirror / Atom feed
* Xen guest broken following "use memdev for RAM" patch
@ 2020-03-23 17:10 Anthony PERARD
  2020-03-24 12:14 ` Igor Mammedov
  0 siblings, 1 reply; 2+ messages in thread
From: Anthony PERARD @ 2020-03-23 17:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Igor Mammedov, Richard Henderson, Michael S. Tsirkin

Hi,

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
  memory_region_init_ram()?
(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?

Thanks,

-- 
Anthony PERARD


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-24 12:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-23 17:10 Xen guest broken following "use memdev for RAM" patch Anthony PERARD
2020-03-24 12:14 ` Igor Mammedov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.