From patchwork Fri Dec 18 07:46:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 7880271 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F01EB9F54E for ; Fri, 18 Dec 2015 07:49:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 361CF203ED for ; Fri, 18 Dec 2015 07:49:47 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 519902035E for ; Fri, 18 Dec 2015 07:49:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a9pkC-00023J-EE; Fri, 18 Dec 2015 07:46:28 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a9pkB-00023E-0o for xen-devel@lists.xensource.com; Fri, 18 Dec 2015 07:46:27 +0000 Received: from [85.158.143.35] by server-3.bemta-4.messagelabs.com id F7/70-31122-2D9B3765; Fri, 18 Dec 2015 07:46:26 +0000 X-Env-Sender: kraxel@redhat.com X-Msg-Ref: server-9.tower-21.messagelabs.com!1450424784!6022156!1 X-Originating-IP: [209.132.183.28] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMjA5LjEzMi4xODMuMjggPT4gNTQwNjQ=\n X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 15685 invoked from network); 18 Dec 2015 07:46:25 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by server-9.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 18 Dec 2015 07:46:25 -0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 728D229A6DA; Fri, 18 Dec 2015 07:46:23 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-41.ams2.redhat.com [10.36.116.41]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBI7kLQV027705; Fri, 18 Dec 2015 02:46:22 -0500 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 09D8980E93; Fri, 18 Dec 2015 08:46:21 +0100 (CET) Message-ID: <1450424780.15674.4.camel@redhat.com> From: Gerd Hoffmann To: Eduardo Habkost Date: Fri, 18 Dec 2015 08:46:20 +0100 In-Reply-To: <20151217174507.GS3774@thinpad.lan.raisama.net> References: <1450093182-3500-1-git-send-email-kraxel@redhat.com> <1450093182-3500-4-git-send-email-kraxel@redhat.com> <20151217174507.GS3774@thinpad.lan.raisama.net> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Cc: igvt-g@ml01.01.org, xen-devel@lists.xensource.com, Stefano Stabellini , qemu-devel@nongnu.org, vfio-users@redhat.com, Paolo Bonzini Subject: Re: [Xen-devel] [PATCH v2 02/10] pc: remove has_igd_gfx_passthru global X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP > > + return (qdev_get_machine->igd_gfx_passthru > > && ((dev->class_code >> 0x8) == PCI_CLASS_DISPLAY_VGA)); > > } > > Doesn't compile: > > qemu/hw/xen/xen_pt.h: In function ‘is_igd_vga_passthrough’: > qemu/hw/xen/xen_pt.h:325:29: error: request for member ‘igd_gfx_passthru’ in something not a structure or union > return (qdev_get_machine->igd_gfx_passthru Incremental fix attached (will squash into v2). cheers, Gerd From b30226140f80202c4d2dda23acae9533aba6136b Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 18 Dec 2015 08:44:48 +0100 Subject: [PATCH] [fixup] build on xen --- hw/xen/xen_pt.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/xen/xen_pt.h b/hw/xen/xen_pt.h index 6d8702b..680fe6e 100644 --- a/hw/xen/xen_pt.h +++ b/hw/xen/xen_pt.h @@ -4,6 +4,7 @@ #include "qemu-common.h" #include "hw/xen/xen_common.h" #include "hw/pci/pci.h" +#include "hw/boards.h" #include "xen-host-pci-device.h" void xen_pt_log(const PCIDevice *d, const char *f, ...) GCC_FMT_ATTR(2, 3); @@ -322,7 +323,8 @@ extern void *pci_assign_dev_load_option_rom(PCIDevice *dev, unsigned int function); static inline bool is_igd_vga_passthrough(XenHostPCIDevice *dev) { - return (qdev_get_machine->igd_gfx_passthru + MachineState *machine = MACHINE(qdev_get_machine()); + return (machine->igd_gfx_passthru && ((dev->class_code >> 0x8) == PCI_CLASS_DISPLAY_VGA)); } int xen_pt_register_vga_regions(XenHostPCIDevice *dev); -- 1.8.3.1