[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH-for-9.0 v2 05/19] hw/display: Restrict xen_register_framebuffer() call to Xen
Only call xen_register_framebuffer() when Xen is enabled. Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx> --- hw/display/vga.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/display/vga.c b/hw/display/vga.c index 37557c3442..f9cf3d6f77 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -25,6 +25,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "sysemu/reset.h" +#include "sysemu/xen.h" #include "qapi/error.h" #include "hw/core/cpu.h" #include "hw/display/vga.h" @@ -2223,7 +2224,9 @@ bool vga_common_init(VGACommonState *s, Object *obj, Error **errp) return false; } vmstate_register_ram(&s->vram, s->global_vmstate ? NULL : DEVICE(obj)); - xen_register_framebuffer(&s->vram); + if (xen_enabled()) { + xen_register_framebuffer(&s->vram); + } s->vram_ptr = memory_region_get_ram_ptr(&s->vram); s->get_bpp = vga_get_bpp; s->get_offsets = vga_get_offsets; -- 2.41.0
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |