qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: "Alex Williamson" <alex.williamson@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	qemu-ppc@nongnu.org, "Thomas Huth" <thuth@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Tony Krowiak" <akrowiak@linux.ibm.com>,
	"Ilya Leoshkevich" <iii@linux.ibm.com>,
	kvm@vger.kernel.org, "Yi Liu" <yi.l.liu@intel.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Zhenzhong Duan" <zhenzhong.duan@intel.com>,
	"Matthew Rosato" <mjrosato@linux.ibm.com>,
	"Eric Farman" <farman@linux.ibm.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Daniel Henrique Barboza" <danielhb413@gmail.com>,
	"Eric Auger" <eric.auger@redhat.com>,
	qemu-s390x@nongnu.org, "Jason Herne" <jjherne@linux.ibm.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Halil Pasic" <pasic@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>
Subject: Re: [PATCH 00/14] hw/vfio: Build various objects once
Date: Sat, 8 Mar 2025 18:48:51 +0100	[thread overview]
Message-ID: <180f941a-74ce-41c0-999d-e0d4cef85c3d@redhat.com> (raw)
In-Reply-To: <20250307180337.14811-1-philmd@linaro.org>

Hello,

On 3/7/25 19:03, Philippe Mathieu-Daudé wrote:
> By doing the following changes:
> - Clean some headers up
> - Replace compile-time CONFIG_KVM check by kvm_enabled()
> - Replace compile-time CONFIG_IOMMUFD check by iommufd_builtin()
> we can build less vfio objects.
> 
> Philippe Mathieu-Daudé (14):
>    hw/vfio/common: Include missing 'system/tcg.h' header
>    hw/vfio/spapr: Do not include <linux/kvm.h>
>    hw/vfio: Compile some common objects once
>    hw/vfio: Compile more objects once
>    hw/vfio: Compile iommufd.c once
>    system: Declare qemu_[min/max]rampagesize() in 'system/hostmem.h'
>    hw/vfio: Compile display.c once
>    system/kvm: Expose kvm_irqchip_[add,remove]_change_notifier()
>    hw/vfio/pci: Convert CONFIG_KVM check to runtime one
>    system/iommufd: Introduce iommufd_builtin() helper
>    hw/vfio/pci: Check CONFIG_IOMMUFD at runtime using iommufd_builtin()
>    hw/vfio/ap: Check CONFIG_IOMMUFD at runtime using iommufd_builtin()
>    hw/vfio/ccw: Check CONFIG_IOMMUFD at runtime using iommufd_builtin()
>    hw/vfio/platform: Check CONFIG_IOMMUFD at runtime using
>      iommufd_builtin
> 
>   docs/devel/vfio-iommufd.rst  |  2 +-
>   include/exec/ram_addr.h      |  3 --
>   include/system/hostmem.h     |  3 ++
>   include/system/iommufd.h     |  8 +++++
>   include/system/kvm.h         |  8 ++---
>   target/s390x/kvm/kvm_s390x.h |  2 +-
>   accel/stubs/kvm-stub.c       | 12 ++++++++
>   hw/ppc/spapr_caps.c          |  1 +
>   hw/s390x/s390-virtio-ccw.c   |  1 +
>   hw/vfio/ap.c                 | 27 ++++++++---------
>   hw/vfio/ccw.c                | 27 ++++++++---------
>   hw/vfio/common.c             |  1 +
>   hw/vfio/iommufd.c            |  1 -
>   hw/vfio/migration.c          |  1 -
>   hw/vfio/pci.c                | 57 +++++++++++++++++-------------------
>   hw/vfio/platform.c           | 25 ++++++++--------
>   hw/vfio/spapr.c              |  4 +--
>   hw/vfio/meson.build          | 33 ++++++++++++---------
>   18 files changed, 117 insertions(+), 99 deletions(-)
> 

Patches 1-9 look ok and should be considered for the next PR if
maintainers ack patch 6 and 8.


Some comments,

vfio-amd-xgbe and vfio-calxeda-xgmac should be treated like
vfio-platform, and since vfio-platform was designed for aarch64,
these devices should not be available on arm, ppc, ppc64, riscv*,
loongarch. That said, vfio-platform and devices being deprecated in
the QEMU 10.0 cycle, we could just wait for the removal in QEMU 10.2.

How could we (simply) remove CONFIG_VFIO_IGD in hw/vfio/pci-quirks.c ?
and compile this file only once.

The vfio-pci devices are available in nearly all targets when it
only makes sense to have them in i386, x86_64, aarch64, ppc64,
where they are supported, and also possibly in ppc (tcg) and arm
(tcg) for historical reasons and just because they happen to work.
ppc (tcg) doesn't support MSIs with vfio-pci devices so I don't
think we care much.

Patches 10-14 are wrong because they remove the "iommufd" property of
the "vfio-*" devices. We can't take these.

Thanks,

C.



  parent reply	other threads:[~2025-03-08 17:49 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-07 18:03 [PATCH 00/14] hw/vfio: Build various objects once Philippe Mathieu-Daudé
2025-03-07 18:03 ` [PATCH 01/14] hw/vfio/common: Include missing 'system/tcg.h' header Philippe Mathieu-Daudé
2025-03-07 19:14   ` Pierrick Bouvier
2025-03-07 19:35   ` Richard Henderson
2025-03-08 17:39   ` Cédric Le Goater
2025-03-07 18:03 ` [PATCH 02/14] hw/vfio/spapr: Do not include <linux/kvm.h> Philippe Mathieu-Daudé
2025-03-07 19:14   ` Pierrick Bouvier
2025-03-07 19:39   ` Richard Henderson
2025-03-08 17:39   ` Cédric Le Goater
2025-03-07 18:03 ` [PATCH 03/14] hw/vfio: Compile some common objects once Philippe Mathieu-Daudé
2025-03-07 19:15   ` Pierrick Bouvier
2025-03-07 19:40   ` Richard Henderson
2025-03-08 17:39   ` Cédric Le Goater
2025-03-07 18:03 ` [PATCH 04/14] hw/vfio: Compile more " Philippe Mathieu-Daudé
2025-03-07 19:15   ` Pierrick Bouvier
2025-03-07 19:40   ` Richard Henderson
2025-03-08 17:45   ` Cédric Le Goater
2025-03-07 18:03 ` [PATCH 05/14] hw/vfio: Compile iommufd.c once Philippe Mathieu-Daudé
2025-03-07 19:16   ` Pierrick Bouvier
2025-03-07 19:41   ` Richard Henderson
2025-03-08 17:45   ` Cédric Le Goater
2025-03-07 18:03 ` [PATCH 06/14] system: Declare qemu_[min/max]rampagesize() in 'system/hostmem.h' Philippe Mathieu-Daudé
2025-03-07 19:16   ` Pierrick Bouvier
2025-03-07 21:12   ` Philippe Mathieu-Daudé
2025-03-07 18:03 ` [PATCH 07/14] hw/vfio: Compile display.c once Philippe Mathieu-Daudé
2025-03-07 19:17   ` Pierrick Bouvier
2025-03-07 19:42   ` Richard Henderson
2025-03-08 17:46   ` Cédric Le Goater
2025-03-07 18:03 ` [PATCH 08/14] system/kvm: Expose kvm_irqchip_[add, remove]_change_notifier() Philippe Mathieu-Daudé
2025-03-07 19:17   ` [PATCH 08/14] system/kvm: Expose kvm_irqchip_[add,remove]_change_notifier() Pierrick Bouvier
2025-03-07 20:09   ` Richard Henderson
2025-03-08 22:18     ` Philippe Mathieu-Daudé
2025-03-07 18:03 ` [PATCH 09/14] hw/vfio/pci: Convert CONFIG_KVM check to runtime one Philippe Mathieu-Daudé
2025-03-07 19:18   ` Pierrick Bouvier
2025-03-07 20:11   ` Richard Henderson
2025-03-08 17:46   ` Cédric Le Goater
2025-03-07 18:03 ` [PATCH 10/14] system/iommufd: Introduce iommufd_builtin() helper Philippe Mathieu-Daudé
2025-03-07 19:18   ` Pierrick Bouvier
2025-03-07 20:33   ` Richard Henderson
2025-03-08  7:48     ` Philippe Mathieu-Daudé
2025-03-07 18:03 ` [PATCH 11/14] hw/vfio/pci: Check CONFIG_IOMMUFD at runtime using iommufd_builtin() Philippe Mathieu-Daudé
2025-03-07 19:19   ` Pierrick Bouvier
2025-03-07 20:35   ` Richard Henderson
2025-03-07 18:03 ` [PATCH 12/14] hw/vfio/ap: " Philippe Mathieu-Daudé
2025-03-07 19:19   ` Pierrick Bouvier
2025-03-07 20:42   ` Richard Henderson
2025-03-07 21:08     ` Philippe Mathieu-Daudé
2025-03-07 18:03 ` [PATCH 13/14] hw/vfio/ccw: " Philippe Mathieu-Daudé
2025-03-07 19:19   ` Pierrick Bouvier
2025-03-07 20:45   ` Richard Henderson
2025-03-07 21:09     ` Philippe Mathieu-Daudé
2025-03-07 18:03 ` [PATCH 14/14] hw/vfio/platform: Check CONFIG_IOMMUFD at runtime using iommufd_builtin Philippe Mathieu-Daudé
2025-03-07 19:20   ` Pierrick Bouvier
2025-03-07 20:48   ` Richard Henderson
2025-03-08 17:48 ` Cédric Le Goater [this message]
2025-03-08 20:37   ` [PATCH 00/14] hw/vfio: Build various objects once BALATON Zoltan
2025-03-08 22:31   ` 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=180f941a-74ce-41c0-999d-e0d4cef85c3d@redhat.com \
    --to=clg@redhat.com \
    --cc=akrowiak@linux.ibm.com \
    --cc=alex.bennee@linaro.org \
    --cc=alex.williamson@redhat.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=danielhb413@gmail.com \
    --cc=david@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=harshpb@linux.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=imammedo@redhat.com \
    --cc=jjherne@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=mjrosato@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    --cc=yi.l.liu@intel.com \
    --cc=zhenzhong.duan@intel.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).