From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8RU1-0003R4-26 for qemu-devel@nongnu.org; Mon, 14 Dec 2015 06:40:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8RTz-0001El-Kf for qemu-devel@nongnu.org; Mon, 14 Dec 2015 06:40:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8RTz-0001EF-FF for qemu-devel@nongnu.org; Mon, 14 Dec 2015 06:39:59 -0500 From: Gerd Hoffmann Date: Mon, 14 Dec 2015 12:39:34 +0100 Message-Id: <1450093182-3500-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1450093182-3500-1-git-send-email-kraxel@redhat.com> References: <1450093182-3500-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH v2 02/10] pc: remove has_igd_gfx_passthru global List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: igvt-g@ml01.01.org, xen-devel@lists.xensource.com, Eduardo Habkost , Stefano Stabellini , Gerd Hoffmann , Paolo Bonzini , vfio-users@redhat.com Signed-off-by: Gerd Hoffmann --- hw/xen/xen_pt.h | 3 +-- vl.c | 10 ---------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/hw/xen/xen_pt.h b/hw/xen/xen_pt.h index c545280..6d8702b 100644 --- a/hw/xen/xen_pt.h +++ b/hw/xen/xen_pt.h @@ -320,10 +320,9 @@ extern void *pci_assign_dev_load_option_rom(PCIDevice *dev, unsigned int domain, unsigned int bus, unsigned int slot, unsigned int function); -extern bool has_igd_gfx_passthru; static inline bool is_igd_vga_passthrough(XenHostPCIDevice *dev) { - return (has_igd_gfx_passthru + return (qdev_get_machine->igd_gfx_passthru && ((dev->class_code >> 0x8) == PCI_CLASS_DISPLAY_VGA)); } int xen_pt_register_vga_regions(XenHostPCIDevice *dev); diff --git a/vl.c b/vl.c index 4211ff1..e45a1da 100644 --- a/vl.c +++ b/vl.c @@ -1365,13 +1365,6 @@ static inline void semihosting_arg_fallback(const char *file, const char *cmd) } } -/* Now we still need this for compatibility with XEN. */ -bool has_igd_gfx_passthru; -static void igd_gfx_passthru(void) -{ - has_igd_gfx_passthru = current_machine->igd_gfx_passthru; -} - /***********************************************************/ /* USB devices */ @@ -4550,9 +4543,6 @@ int main(int argc, char **argv, char **envp) exit(1); } - /* Check if IGD GFX passthrough. */ - igd_gfx_passthru(); - /* init generic devices */ if (qemu_opts_foreach(qemu_find_opts("device"), device_init_func, NULL, NULL)) { -- 1.8.3.1