qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: igvt-g@ml01.01.org, xen-devel@lists.xensource.com,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	qemu-devel@nongnu.org, vfio-users@redhat.com,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 02/10] pc: remove has_igd_gfx_passthru global
Date: Fri, 18 Dec 2015 08:46:20 +0100	[thread overview]
Message-ID: <1450424780.15674.4.camel@redhat.com> (raw)
In-Reply-To: <20151217174507.GS3774@thinpad.lan.raisama.net>

[-- Attachment #1: Type: text/plain, Size: 473 bytes --]

> > +    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


[-- Attachment #2: 0001-fixup-build-on-xen.patch --]
[-- Type: text/x-patch, Size: 1130 bytes --]

From b30226140f80202c4d2dda23acae9533aba6136b Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
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


  reply	other threads:[~2015-12-18  7:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14 11:39 [Qemu-devel] [PATCH v2 00/10] igd passthrough chipset tweaks Gerd Hoffmann
2015-12-14 11:39 ` [Qemu-devel] [PATCH] ehci: make idt processing more robust Gerd Hoffmann
2015-12-14 11:39 ` [Qemu-devel] [PATCH v2 01/10] pc: wire up TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE for !xen Gerd Hoffmann
2015-12-14 11:39 ` [Qemu-devel] [PATCH v2 02/10] pc: remove has_igd_gfx_passthru global Gerd Hoffmann
2015-12-17 17:45   ` Eduardo Habkost
2015-12-18  7:46     ` Gerd Hoffmann [this message]
2015-12-14 11:39 ` [Qemu-devel] [PATCH v2 03/10] pc: move igd support code to igd.c Gerd Hoffmann
2015-12-14 11:39 ` [Qemu-devel] [PATCH v2 04/10] igd: switch TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE to realize Gerd Hoffmann
2015-12-14 11:39 ` [Qemu-devel] [PATCH v2 05/10] igd: TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE: call parent realize Gerd Hoffmann
2015-12-14 11:39 ` [Qemu-devel] [PATCH v2 06/10] igd: use defines for standard pci config space offsets Gerd Hoffmann
2015-12-14 11:39 ` [Qemu-devel] [PATCH v2 07/10] igd: revamp host config read Gerd Hoffmann
2015-12-14 11:39 ` [Qemu-devel] [PATCH v2 08/10] igd: add q35 support Gerd Hoffmann
2015-12-14 11:39 ` [Qemu-devel] [PATCH v2 09/10] igd: move igd-passthrough-isa-bridge to igd.c too Gerd Hoffmann
2015-12-14 11:39 ` [Qemu-devel] [PATCH v2 10/10] igd: handle igd-passthrough-isa-bridge setup in realize() Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1450424780.15674.4.camel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=igvt-g@ml01.01.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=vfio-users@redhat.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).