All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Krempa <pkrempa@redhat.com>
Cc: "Thomas Huth" <thuth@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	qemu-devel@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Igor Mammedov" <imammedo@redhat.com>
Subject: Re: [PULL 15/28] hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field
Date: Thu, 18 Jun 2026 10:19:21 +0100	[thread overview]
Message-ID: <ajO4GQuKX6-lfAlb@redhat.com> (raw)
In-Reply-To: <ajOkhPtZvUakzpoi@angien.pipo.sk>

On Thu, Jun 18, 2026 at 09:55:48AM +0200, Peter Krempa wrote:
> On Thu, Mar 05, 2026 at 11:52:02 +0100, Thomas Huth wrote:
> > From: Philippe Mathieu-Daudé <philmd@linaro.org>
> > 
> > The X86IOMMUState::pt_supported boolean was only set in
> > the hw_compat_2_9[] array, via the 'pt=off' property. We
> > removed all machines using that array, lets remove that
> > property and all the code around it, always setting the
> > VTD_ECAP_PT capability.
> > 
> > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> > Message-ID: <20250501210456.89071-19-philmd@linaro.org>
> > [thuth: Dropped the hunks that were already merged via commit 31753d5a336f]
> > Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> > Signed-off-by: Thomas Huth <thuth@redhat.com>
> > Message-ID: <20260225092024.794595-16-thuth@redhat.com>
> > ---
> >  include/hw/i386/x86-iommu.h |  1 -
> >  hw/i386/intel_iommu.c       | 13 ++-----------
> >  hw/i386/x86-iommu.c         |  1 -
> >  3 files changed, 2 insertions(+), 13 deletions(-)
> 
> [...]
> 
> > diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c
> > index 33ac0bfc97e..a57445404ef 100644
> > --- a/hw/i386/x86-iommu.c
> > +++ b/hw/i386/x86-iommu.c
> > @@ -129,7 +129,6 @@ static const Property x86_iommu_properties[] = {
> >      DEFINE_PROP_ON_OFF_AUTO("intremap", X86IOMMUState,
> >                              intr_supported, ON_OFF_AUTO_AUTO),
> >      DEFINE_PROP_BOOL("device-iotlb", X86IOMMUState, dt_supported, false),
> > -    DEFINE_PROP_BOOL("pt", X86IOMMUState, pt_supported, true),
> >      DEFINE_PROP_BOOL("dma-translation", X86IOMMUState, dma_translation, true),
> 
> Sorry for necromancing this 3 months later.
> 
> This removes the 'pt' option from the 'amd-iommu' device too since
> it inherits from  X86IOMMUState. Libvirt does expose the setting for
> that option although I no longer remember why that was added.

IIUC, the 'pt' option was already dead code for the amd-iommu
device before this patch, per Thomas' mention of commit 31753d5a336f
which removed 'pt' logic from amd-iommu.

The AMD IOMMU device was unsupportable prior to f864a3235
because it could not have its PCI adderssing controlled.

IOW, 10.1.0 was the first QEMU release where libvirt could
use amd-iommu, and 'pt' logic was already removed from the
amd-iommu code at that point.

So, while libvirt offered a "pt" setting for amd-iommu, it
never had any effect.

Meanwhile libvirt did NOT offer a "pt" setting for intel-iommu,
despite it existing in QEMU until 11.0.0

> I'm not sure based on the commit message though whether that was an
> intended outcome.
> 
> When updating the libvirt dumps of capability probing I unfortunately
> mis-read the diff and thought that 'pt' was added instead of removed so
> I didn't pay any closer attention:
> 
>  https://gitlab.com/libvirt/libvirt/-/commit/75edc7ae98938ae0548e4c368d9c291d3763289a
> 
> IMO since device properties are visible from outside changes like this
> should be mentioned in the 'deprecated.rst' document.
> 
> Since this is just an optional setting it doesn't cause any problems for
> users who didn't set it though so it's not really too big of a problem.
> Libvirt will likely add a capability to reject it.

We don't need a capability - we can reject it for amd-iommu
unconditionally since it never had any effect AFAICT.

We could wire up "pt" for the intel-iommu though so we the XML
schema for it is not entirely useless :-)

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



  parent reply	other threads:[~2026-06-18  9:20 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-05 10:51 [PULL 00/28] Remove deprecated pc machine types -2.8 up to -2.12 Thomas Huth
2026-03-05 10:51 ` [PULL 01/28] hw/i386/pc: Remove deprecated pc-q35-2.8 and pc-i440fx-2.8 machines Thomas Huth
2026-03-05 10:51 ` [PULL 02/28] hw/i386/pc: Remove pc_compat_2_8[] array Thomas Huth
2026-03-05 10:51 ` [PULL 03/28] hw/i386/kvm: Remove KVMClockState::mach_use_reliable_get_clock field Thomas Huth
2026-03-05 10:51 ` [PULL 04/28] hw/core/machine: Remove hw_compat_2_8[] array Thomas Huth
2026-03-05 10:51 ` [PULL 05/28] hw/block/pflash: Remove PFlashCFI01::old_multiple_chip_handling field Thomas Huth
2026-03-05 10:51 ` [PULL 06/28] hw/pci/pcie: Remove QEMU_PCIE_EXTCAP_INIT definition Thomas Huth
2026-03-05 10:51 ` [PULL 07/28] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_DEVERR definition Thomas Huth
2026-03-05 10:51 ` [PULL 08/28] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_LNKCTL definition Thomas Huth
2026-03-05 10:51 ` [PULL 09/28] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_PM definition Thomas Huth
2026-03-05 10:51 ` [PULL 10/28] hw/i386/pc: Remove deprecated pc-q35-2.9 and pc-i440fx-2.9 machines Thomas Huth
2026-03-05 10:51 ` [PULL 11/28] hw/i386/pc: Remove pc_compat_2_9[] array Thomas Huth
2026-03-05 10:51 ` [PULL 12/28] hw/core/machine: Remove hw_compat_2_9[] array Thomas Huth
2026-03-05 10:52 ` [PULL 13/28] hw/net/virtio-net: Remove VirtIONet::mtu_bypass_backend field Thomas Huth
2026-03-05 10:52 ` [PULL 14/28] hw/pci-bridge/gen_pcie_rp: Remove GenPCIERootPort::migrate_msix field Thomas Huth
2026-03-05 10:52 ` [PULL 15/28] hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field Thomas Huth
2026-06-18  7:55   ` Peter Krempa
2026-06-18  8:51     ` Thomas Huth
2026-06-18  9:19     ` Daniel P. Berrangé [this message]
2026-03-05 10:52 ` [PULL 16/28] tests/qtest/test-x86-cpuid-compat: Remove the test with the i440fx-2.9 machine Thomas Huth
2026-03-05 10:52 ` [PULL 17/28] hw/i386/pc: Remove deprecated pc-q35-2.10 and pc-i440fx-2.10 machines Thomas Huth
2026-03-05 10:52 ` [PULL 18/28] hw/i386/pc: Remove pc_compat_2_10[] array Thomas Huth
2026-03-05 10:52 ` [PULL 19/28] hw/i386/pc: Remove deprecated pc-q35-2.11 and pc-i440fx-2.11 machines Thomas Huth
2026-03-05 10:52 ` [PULL 20/28] hw/i386/pc: Remove pc_compat_2_11[] array Thomas Huth
2026-03-05 10:52 ` [PULL 21/28] hw/i386/pc: Remove deprecated pc-q35-2.12 and pc-i440fx-2.12 machines Thomas Huth
2026-03-05 10:52 ` [PULL 22/28] hw/i386/pc: Remove pc_compat_2_12[] array Thomas Huth
2026-03-10 10:10   ` Zhao Liu
2026-03-10 10:51     ` Philippe Mathieu-Daudé
2026-03-05 10:52 ` [PULL 23/28] hw/core/machine: Remove hw_compat_2_10[] array Thomas Huth
2026-03-05 10:52 ` [PULL 24/28] hw/input/virtio-input: Remove VirtIOInputHID::wheel_axis field Thomas Huth
2026-03-05 10:52 ` [PULL 25/28] hw/core/machine: Remove hw_compat_2_11[] array Thomas Huth
2026-03-05 10:52 ` [PULL 26/28] hw/core/machine: Remove hw_compat_2_12[] array Thomas Huth
2026-03-05 10:52 ` [PULL 27/28] hw/audio/hda-codec: Remove HDAAudioState::use_timer field Thomas Huth
2026-03-05 10:52 ` [PULL 28/28] hw/display/vga-pci: Do not expose the 'global-vmstate' property Thomas Huth
2026-03-05 17:47 ` [PULL 00/28] Remove deprecated pc machine types -2.8 up to -2.12 Peter Maydell

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=ajO4GQuKX6-lfAlb@redhat.com \
    --to=berrange@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=pkrempa@redhat.com \
    --cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.