qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: qemu-s390x@nongnu.org, Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH] hw/vfio: Move the IGD quirk code to a separate file
Date: Tue, 14 Jan 2020 11:47:41 -0700	[thread overview]
Message-ID: <20200114114741.1eb6bfd8@w520.home> (raw)
In-Reply-To: <c82afcab-8f0b-d6ed-af40-0611b178f910@redhat.com>

On Tue, 14 Jan 2020 18:10:26 +0100
Philippe Mathieu-Daudé <philmd@redhat.com> wrote:

> On 1/14/20 5:17 PM, Thomas Huth wrote:
> > The IGD quirk code defines a separate device, the so-called
> > "vfio-pci-igd-lpc-bridge" which shows up as a user-creatable
> > device in all QEMU binaries that include the vfio code. This
> > is a little bit unfortunate for two reasons: First, this device
> > is completely useless in binaries like qemu-system-s390x.
> > Second we also would like to disable it in downstream RHEL
> > which currently requires some extra patches there since the
> > device does not have a proper Kconfig-style switch yet.
> > 
> > So it would be good if the device could be disabled more easily,
> > thus let's move the code to a separate file instead and introduce
> > a proper Kconfig switch for it which gets only enabled by default
> > if we also have CONFIG_PC_PCI enabled.
> > 
> > Signed-off-by: Thomas Huth <thuth@redhat.com>
> > ---
> >   hw/vfio/Kconfig       |   5 +
> >   hw/vfio/Makefile.objs |   1 +
> >   hw/vfio/igd.c         | 616 ++++++++++++++++++++++++++++++++++++++++++
> >   hw/vfio/pci-quirks.c  | 614 +----------------------------------------
> >   hw/vfio/pci.h         |  17 ++
> >   5 files changed, 642 insertions(+), 611 deletions(-)
> >   create mode 100644 hw/vfio/igd.c
> > 
> > diff --git a/hw/vfio/Kconfig b/hw/vfio/Kconfig
> > index f0eaa75ce7..7cdba0560a 100644
> > --- a/hw/vfio/Kconfig
> > +++ b/hw/vfio/Kconfig
> > @@ -36,3 +36,8 @@ config VFIO_AP
> >       default y
> >       select VFIO
> >       depends on LINUX && S390_CCW_VIRTIO
> > +
> > +config VFIO_IGD
> > +    bool
> > +    default y if PC_PCI  
> 
> With the details from Alex here:
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg663667.html
> 
> I'm tempted to use:
> 
>      default y if XEN
>      depends on PC_PCI

I think you might be confused, there are two separate LPC bridges in
QEMU for IGD support, one specifically for Xen and this one
specifically for VFIO.  This one is never used in a Xen environment.
Thanks,

Alex

> Watch out the Xen Kconfig seems fragile, yesterday using --enable-xen 
> --disable-tcg I hit this build error:
> 
>    LINK    i386-softmmu/qemu-system-i386
> /usr/bin/ld: hw/xen/xen_pt.o: in function 
> `xen_igd_passthrough_isa_bridge_create':
> /home/phil/source/qemu/hw/xen/xen_pt.c:701: undefined reference to 
> `igd_passthrough_isa_bridge_create'
> 
> > +    depends on VFIO_PCI
> > diff --git a/hw/vfio/Makefile.objs b/hw/vfio/Makefile.objs
> > index abad8b818c..9bb1c09e84 100644
> > --- a/hw/vfio/Makefile.objs
> > +++ b/hw/vfio/Makefile.objs
> > @@ -5,3 +5,4 @@ obj-$(CONFIG_VFIO_PLATFORM) += platform.o
> >   obj-$(CONFIG_VFIO_XGMAC) += calxeda-xgmac.o
> >   obj-$(CONFIG_VFIO_AMD_XGBE) += amd-xgbe.o
> >   obj-$(CONFIG_VFIO_AP) += ap.o
> > +obj-$(CONFIG_VFIO_IGD) += igd.o  
> 



  reply	other threads:[~2020-01-14 18:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14 16:17 [PATCH] hw/vfio: Move the IGD quirk code to a separate file Thomas Huth
2020-01-14 17:10 ` Philippe Mathieu-Daudé
2020-01-14 18:47   ` Alex Williamson [this message]
2020-01-14 18:50     ` Philippe Mathieu-Daudé

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=20200114114741.1eb6bfd8@w520.home \
    --to=alex.williamson@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=thuth@redhat.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).