Am 02.09.25 um 1:23 PM schrieb Daniel Kral: > Since QEMU 9.2 [0], the default I/O address space bit width was raised > from 39 bits to 48 bits for the Intel vIOMMU driver, which makes the > aw-bits check introduced in [1] to trip for host CPUs with less than 48
s/to trip/fail/ > bits physical address width from QEMU 9.2 onwards: > > vfio 0000:XX:YY.Z: Failed to set vIOMMU: aw-bits 48 > host aw-bits 39 > > For VFIO devices where a vIOMMU is in-use, QEMU fetches the IOVA ranges > with the iommufd ioctl IOMMU_IOAS_IOVA_RANGES or the vfio_iommu_type1's > VFIO_IOMMU_TYPE1_INFO_CAP_IOVA_RANGE info, so 'phys-bits' doesn't change > the behavior of the check. > > Therefore, expose the 'aw-bits' option of the intel-iommu and > virtio-iommu QEMU drivers to allow users to set the value. > > [0] > https://lore.kernel.org/qemu-devel/[email protected]/ > [1] > https://lore.kernel.org/qemu-devel/[email protected]/ > Nit: I'd prefer references to qemu commits rather than mails > @@ -112,9 +122,14 @@ sub default_machine_for_arch { > > sub assert_valid_machine_property { > my ($machine_conf) = @_; > - my $q35 = $machine_conf->{type} && ($machine_conf->{type} =~ m/q35/) ? 1 > : 0; > - if ($machine_conf->{viommu} && $machine_conf->{viommu} eq "intel" && > !$q35) { > - die "to use Intel vIOMMU please set the machine type to q35\n"; > + if ($machine_conf->{viommu} && $machine_conf->{viommu} eq "intel") { > + my $q35 = $machine_conf->{type} && ($machine_conf->{type} =~ m/q35/) > ? 1 : 0; > + die "to use Intel vIOMMU please set the machine type to q35\n" if > !$q35; > + > + die "Intel vIOMMU supports only 39 or 48 bits as address width\n" > + if $machine_conf->{'aw-bits'} > + && $machine_conf->{'aw-bits'} != 39 > + && $machine_conf->{'aw-bits'} != 48; > } There should be an error (or at least warning) when aw-bits is set without setting a viommu. _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
