|
From: | Chen, Tiejun |
Subject: | Re: [Qemu-devel] [v8][RESEND][PATCH 09/10] xen, gfx passthrough: register host bridge specific to passthrough |
Date: | Fri, 03 Jul 2015 11:11:13 +0800 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
>> #ifdef CONFIG_XEN
+static void igd_passthrough_pc_init_pci(MachineState *machine) +{ + pc_init1(machine, + TYPE_I440FX_PCI_HOST_BRIDGE, + TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE); +} + +static void pc_init_pci(MachineState *machine) +{ + pc_init1(machine, + TYPE_I440FX_PCI_HOST_BRIDGE, + TYPE_I440FX_PCI_DEVICE); +} + +static void pc_xen_hvm_init_pci(MachineState *machine) +{ + if (has_igd_gfx_passthru) + igd_passthrough_pc_init_pci(machine); + else + pc_init_pci(machine); +}I don't see any value in introducing pc_init_pci and igd_passthrough_pc_init_pci. I would expand both of them here.
Agree, and what about this? static void pc_xen_hvm_init_pci(MachineState *machine) { const char *pci_type = has_igd_gfx_passthru ?TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE : TYPE_I440FX_PCI_DEVICE;
pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, pci_type); } Thanks Tiejun
[Prev in Thread] | Current Thread | [Next in Thread] |