summaryrefslogtreecommitdiff
path: root/accel/xen
diff options
context:
space:
mode:
authorAnthony PERARD <anthony.perard@citrix.com>2020-06-03 17:04:42 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2020-06-12 11:20:12 -0400
commitacd0c9416d4846afc541605ee0e75ca163773e6c (patch)
tree946401b4d89b06ed4953a9c6e8bfc73b1dcb63da /accel/xen
parente77cb0bb204c18c04a8290e03181510bbbfc683a (diff)
xen: fix build without pci passthrough
Xen PCI passthrough support may not be available and thus the global variable "has_igd_gfx_passthru" might be compiled out. Common code should not access it in that case. Unfortunately, we can't use CONFIG_XEN_PCI_PASSTHROUGH directly in xen-common.c so this patch instead move access to the has_igd_gfx_passthru variable via function and those functions are also implemented as stubs. The stubs will be used when QEMU is built without passthrough support. Now, when one will want to enable igd-passthru via the -machine property, they will get an error message if QEMU is built without passthrough support. Fixes: 46472d82322d0 ('xen: convert "-machine igd-passthru" to an accelerator property') Reported-by: Roger Pau Monné <roger.pau@citrix.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Message-Id: <20200603160442.3151170-1-anthony.perard@citrix.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'accel/xen')
-rw-r--r--accel/xen/xen-all.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/accel/xen/xen-all.c b/accel/xen/xen-all.c
index f3edc65ec9..0c24d4b191 100644
--- a/accel/xen/xen-all.c
+++ b/accel/xen/xen-all.c
@@ -137,12 +137,12 @@ static void xen_change_state_handler(void *opaque, int running,
static bool xen_get_igd_gfx_passthru(Object *obj, Error **errp)
{
- return has_igd_gfx_passthru;
+ return xen_igd_gfx_pt_enabled();
}
static void xen_set_igd_gfx_passthru(Object *obj, bool value, Error **errp)
{
- has_igd_gfx_passthru = value;
+ xen_igd_gfx_pt_set(value, errp);
}
static void xen_setup_post(MachineState *ms, AccelState *accel)