summaryrefslogtreecommitdiffstats
path: root/hw/i386/pc_piix.c
diff options
context:
space:
mode:
authorAnthony PERARD2020-06-03 18:04:42 +0200
committerPaolo Bonzini2020-06-12 17:20:12 +0200
commitacd0c9416d4846afc541605ee0e75ca163773e6c (patch)
tree946401b4d89b06ed4953a9c6e8bfc73b1dcb63da /hw/i386/pc_piix.c
parenti386: hvf: Drop HVFX86EmulatorState (diff)
downloadqemu-acd0c9416d4846afc541605ee0e75ca163773e6c.tar.gz
qemu-acd0c9416d4846afc541605ee0e75ca163773e6c.tar.xz
qemu-acd0c9416d4846afc541605ee0e75ca163773e6c.zip
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 'hw/i386/pc_piix.c')
-rw-r--r--hw/i386/pc_piix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index eea964e72b..054d3aa9f7 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -377,7 +377,7 @@ static void pc_init_isa(MachineState *machine)
#ifdef CONFIG_XEN
static void pc_xen_hvm_init_pci(MachineState *machine)
{
- const char *pci_type = has_igd_gfx_passthru ?
+ const char *pci_type = xen_igd_gfx_pt_enabled() ?
TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE : TYPE_I440FX_PCI_DEVICE;
pc_init1(machine,