<span class="since">Since 3.5.0</span> (QEMU/KVM only)
</p>
</dd>
+ <dt><code>aw_bits</code></dt>
+ <dd>
+ <p>
+ The <code>aw_bits</code> attribute can be used to set
+ the address width to allow mapping larger iova addresses
+ in the guest.
+ <span class="since">Since 6.5.0</span> (QEMU/KVM only)
+ </p>
+ </dd>
</dl>
</dd>
</dl>
<ref name="virOnOff"/>
</attribute>
</optional>
+ <optional>
+ <attribute name="aw_bits">
+ <ref name="uint8"/>
+ </attribute>
+ </optional>
</element>
</optional>
</element>
}
iommu->eim = val;
}
+
+ VIR_FREE(tmp);
+ if ((tmp = virXMLPropString(driver, "aw_bits"))) {
+ if (virStrToLong_ui(tmp, NULL, 10, &iommu->aw_bits) < 0) {
+ virReportError(VIR_ERR_XML_ERROR, _("unknown aw_bits value: %s"), tmp);
+ return NULL;
+ }
+ }
+
}
return g_steal_pointer(&iommu);
virTristateSwitchTypeToString(src->iotlb));
return false;
}
+ if (src->aw_bits != dst->aw_bits) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Target domain IOMMU device aw_bits value '%d' "
+ "does not match source '%d'"),
+ dst->aw_bits, src->aw_bits);
+ return false;
+ }
+
return true;
}
virBufferAsprintf(&driverAttrBuf, " iotlb='%s'",
virTristateSwitchTypeToString(iommu->iotlb));
}
+ if (iommu->aw_bits > 0) {
+ virBufferAsprintf(&driverAttrBuf, " aw_bits='%d'",
+ iommu->aw_bits);
+ }
virXMLFormatElement(&childBuf, "driver", &driverAttrBuf, NULL);
virTristateSwitch caching_mode;
virTristateSwitch eim;
virTristateSwitch iotlb;
+ unsigned int aw_bits;
};
typedef enum {
--- /dev/null
+<domain type='kvm'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219100</memory>
+ <currentMemory unit='KiB'>219100</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64' machine='q35'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <features>
+ <ioapic driver='qemu'/>
+ </features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <controller type='pci' index='0' model='pcie-root'/>
+ <controller type='usb' index='0' model='none'/>
+ <controller type='sata' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
+ </controller>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <memballoon model='none'/>
+ <iommu model='intel'>
+ <driver intremap='on' aw_bits='48'/>
+ </iommu>
+ </devices>
+</domain>
--- /dev/null
+../qemuxml2argvdata/intel-iommu-aw-bits.xml
\ No newline at end of file
DO_TEST_CAPS_LATEST("intel-iommu-caching-mode");
DO_TEST_CAPS_LATEST("intel-iommu-eim");
DO_TEST_CAPS_LATEST("intel-iommu-device-iotlb");
+ DO_TEST_CAPS_LATEST("intel-iommu-aw-bits");
DO_TEST_CAPS_ARCH_LATEST("iommu-smmuv3", "aarch64");
DO_TEST("cpu-check-none", NONE);