All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-5.0] xen: fixup RAM memory region initialization
@ 2020-03-27 10:48 Igor Mammedov
  2020-03-27 10:55 ` no-reply
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Igor Mammedov @ 2020-03-27 10:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: anthony.perard, pbonzini, mst, ehabkost, rth

Since bd457782b3b0 ("x86/pc: use memdev for RAM") Xen
machine fails to start with:
   qemu-system-i386: xen: failed to populate ram at 0

The reason is that xen_ram_alloc() which is called by
memory_region_init_ram(), compares memory region with
statically allocated 'global' ram_memory memory region
that it uses for RAM, and does nothing in case it matches.

While it's possible feed machine->ram to xen_ram_alloc()
in the same manner to keep that hack working, I'd prefer
not to keep that circular dependency and try to untangle that.

However it doesn't look trivial to fix, so as temporary
fixup opt out Xen machine from memdev based RAM allocation,
and let xen_ram_alloc() do its trick for now.

Reported-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
PS:
   - compile tested only

 hw/i386/pc_piix.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index e6756216f9..6cb352363d 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -953,6 +953,10 @@ static void xenfv_machine_options(MachineClass *m)
     m->desc = "Xen Fully-virtualized PC";
     m->max_cpus = HVM_MAX_VCPUS;
     m->default_machine_opts = "accel=xen";
+    /*
+     * opt out of system RAM being allocated by generic code
+     */
+    m->default_ram_id = NULL;
 }
 
 DEFINE_PC_MACHINE(xenfv, "xenfv", pc_xen_hvm_init,
-- 
2.18.1



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

end of thread, other threads:[~2020-04-08  9:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-27 10:48 [PATCH for-5.0] xen: fixup RAM memory region initialization Igor Mammedov
2020-03-27 10:55 ` no-reply
2020-03-27 16:36 ` Igor Mammedov
2020-03-27 16:42   ` Paolo Bonzini
2020-03-30 16:52 ` Anthony PERARD
2020-04-02 12:29   ` Igor Mammedov
2020-04-02 13:25     ` Anthony PERARD
2020-04-02 14:30       ` Igor Mammedov
2020-04-07 11:36         ` Anthony PERARD
2020-04-08  8:45           ` 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.