Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
176c4cc
hw/vfio/iommufd: Control dirty tracking for nesting parent HWPT
Apr 1, 2026
38c9a82
hw/arm/smmuv3: Have smmuv3_accel_init() take an Error* parameter
philmd Apr 9, 2026
f427410
NVIDIA: SAUCE: hw/arm/smmuv3-accel: Add helper for resolving auto par…
NathanChenNVIDIA May 12, 2026
55a44eb
NVIDIA: SAUCE: hw/arm/smmuv3-accel: Implement "auto" value for "ats"
NathanChenNVIDIA May 12, 2026
89411ab
NVIDIA: SAUCE: hw/arm/smmuv3-accel: Implement "auto" value for "ril"
NathanChenNVIDIA May 12, 2026
dc4fe37
NVIDIA: SAUCE: hw/arm/smmuv3-accel: Implement "auto" value for "ssids…
NathanChenNVIDIA May 12, 2026
9c7e771
NVIDIA: SAUCE: hw/arm/smmuv3-accel: Implement "auto" value for "oas"
NathanChenNVIDIA May 12, 2026
04ddceb
NVIDIA: SAUCE: hw/arm/smmuv3: Set default ats, ril, ssidsize, oas to …
NathanChenNVIDIA May 12, 2026
adc0d1f
NVIDIA: SAUCE: qemu-options.hx: Support "auto" for accel SMMUv3 prope…
NathanChenNVIDIA May 12, 2026
e6919c7
NVIDIA: SAUCE: backends/iommufd: Update iommufd_backend_get_device_info
nicolinc Apr 15, 2026
5f53339
NVIDIA: SAUCE: backends/iommufd: Update iommufd_backend_alloc_viommu …
nicolinc Apr 15, 2026
64651a7
NVIDIA: SAUCE: backends/iommufd: Introduce iommufd_backend_alloc_hw_q…
nicolinc Apr 15, 2026
ee0d909
NVIDIA: SAUCE: backends/iommufd: Introduce iommufd_backend_viommu_mmap
nicolinc Apr 15, 2026
0954d45
NVIDIA: SAUCE: system/iommufd: Remove unused viommu pointer from IOMM…
Apr 15, 2026
7bc18ba
NVIDIA: SAUCE: hw/arm/smmuv3-accel: Introduce CMDQV ops interface
Apr 15, 2026
bf366ea
NVIDIA: SAUCE: hw/arm/tegra241-cmdqv: Add Tegra241 CMDQV ops backend …
Apr 15, 2026
12d9909
NVIDIA: SAUCE: hw/arm/smmuv3-accel: Wire CMDQV ops into accel lifecycle
Apr 15, 2026
e594a72
NVIDIA: SAUCE: hw/arm/virt: Use stored SMMUv3 device list for IORT build
Apr 15, 2026
831c0cc
NVIDIA: SAUCE: hw/arm/tegra241-cmdqv: Probe host Tegra241 CMDQV support
Apr 15, 2026
c59a465
NVIDIA: SAUCE: hw/arm/tegra241-cmdqv: Implement CMDQV init
nicolinc Apr 15, 2026
1924ea2
NVIDIA: SAUCE: hw/arm/virt: Link SMMUv3 CMDQV resources to platform bus
Apr 15, 2026
1a1d2b2
NVIDIA: SAUCE: hw/arm/tegra241-cmdqv: Implement CMDQV vIOMMU alloc/free
nicolinc Apr 15, 2026
fa9b84d
NVIDIA: SAUCE: hw/arm/tegra241-cmdqv: Emulate CMDQ-V Config region
nicolinc Apr 15, 2026
085d77c
NVIDIA: SAUCE: hw/arm/tegra241-cmdqv: Emulate VCMDQ register reads
nicolinc Apr 15, 2026
3696673
NVIDIA: SAUCE: hw/arm/tegra241-cmdqv: Emulate VCMDQ register writes
nicolinc Apr 15, 2026
2990141
NVIDIA: SAUCE: hw/arm/tegra241-cmdqv: mmap VINTF Page0 for CMDQV
nicolinc Apr 15, 2026
bf9b86b
NVIDIA: SAUCE: system/physmem: Add address_space_is_ram() helper
Apr 15, 2026
bdec10d
NVIDIA: SAUCE: hw/arm/tegra241-cmdqv: Allocate HW VCMDQs on base regi…
nicolinc Apr 15, 2026
6f04b0a
NVIDIA: SAUCE: hw/arm/tegra241-cmdqv: Use mmap'd VINTF page0 as VCMDQ…
Apr 15, 2026
567208f
NVIDIA: SAUCE: memory: Allow RAM device regions to skip IOMMU mapping
Apr 15, 2026
63da034
NVIDIA: SAUCE: hw/arm/tegra241-cmdqv: Map VINTF page0 into guest MMIO…
nicolinc Apr 15, 2026
18ac76b
NVIDIA: SAUCE: hw/arm/smmuv3-accel: Introduce common helper for veven…
Apr 15, 2026
b416b5e
NVIDIA: SAUCE: hw/arm/tegra241-cmdqv: Read and propagate Tegra241 CMD…
Apr 15, 2026
4e137a8
NVIDIA: SAUCE: hw/arm/tegra241-cmdqv: Add reset handler
nicolinc Apr 15, 2026
40e0954
NVIDIA: SAUCE: hw/arm/tegra241-cmdqv: Limit queue size based on backe…
nicolinc Apr 15, 2026
814d07b
NVIDIA: SAUCE: hw/arm/smmuv3: Add per-device identifier property
Apr 15, 2026
241283c
NVIDIA: SAUCE: hw/arm/smmuv3-accel: Introduce helper to query CMDQV type
Apr 15, 2026
29fbc99
NVIDIA: SAUCE: hw/arm/virt-acpi: Advertise Tegra241 CMDQV nodes in DSDT
nicolinc Apr 15, 2026
d69caae
NVIDIA: SAUCE: hw/arm/smmuv3-accel: Enforce viommu association when C…
Apr 15, 2026
7ab7372
NVIDIA: SAUCE: hw/arm/smmuv3: Add cmdqv property for SMMUv3 device
Apr 15, 2026
7533a60
NVIDIA: SAUCE: hw/acpi/pci.c: preserve generic initiator insertion order
ankita-nv Dec 12, 2025
6ec7619
NVIDIA: SAUCE: qom: New object to associate device to EGM node
ankita-nv Aug 27, 2024
7c49a88
NVIDIA: SAUCE: hw/acpi: Populate DSDT with EGM properties
ankita-nv Aug 27, 2024
44f7300
NVIDIA: SAUCE: hw/arm/boot: Create DTB memory regions skipping ECC er…
ankita-nv Aug 27, 2024
4ad2365
NVIDIA: SAUCE: hw/acpi: Add pxb bridge above GPU in DSDT
ankita-nv Apr 9, 2025
29abc09
NVIDIA: SAUCE: cover-letter: EGM support on virtualization
ankita-nv Aug 27, 2024
902dd17
NVIDIA: SAUCE: Reset gpu_id each time building DSDT
nvmochs Dec 15, 2025
ec90de2
NVIDIA: [Packaging] Add QEMU Ubuntu Noble debian packaging base
JiandiAnNVIDIA May 14, 2026
600b299
NVIDIA: [Packaging] Apply packaging changes for NVIDIA QEMU
nvmochs Oct 6, 2025
493d552
NVIDIA: [Packaging] Allow to include binaries in the source package
arighi Oct 11, 2025
2439813
NVIDIA: [Packaging] Fix DTB file installation for QEMU 11.0 builds
nvmochs Oct 10, 2025
117bb2b
NVIDIA: [Packaging] Introduce deb helper script
arighi Oct 11, 2025
cc72a1d
NVIDIA: [Packaging] Remove --enable-avx2 configure option for xen build
nvmochs Oct 15, 2025
06cb7ae
NVIDIA: [Packaging] Fix microvm binary installation path
nvmochs Oct 15, 2025
2613aae
NVIDIA: [Packaging] Exclude qemu-vmsr-helper from packaging
nvmochs Oct 15, 2025
18f36a8
CANONICAL: [Infrastructure] Add Canonical Build CI
MitchellAugustin Oct 14, 2025
712d28f
CANONICAL: [Infrastructure] Make orig name more dynamic
MitchellAugustin Dec 18, 2025
a85eb88
1:11.0.0+nvidia1-1
JiandiAnNVIDIA May 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions .github/workflows/build-source-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Builds a Debian source package for QEMU

name: Build Debian Source Package

on:
push:
branches:
- 'nvidia/latest'
- 'nvidia_stable-10.1'

# Allow manual triggering of the workflow from the GitHub UI
workflow_dispatch:

jobs:
build-source-package:
# arm64 is the primary platform of interest for this project
runs-on: ubuntu-24.04

steps:
# Step 1: Check out the repository's code
- name: Checkout repository
uses: actions/checkout@v4
with:
# Fetch all history for all tags and branches, which can be necessary
# for tools like git-buildpackage to determine version numbers.
fetch-depth: 0

# Step 2: Install Debian packaging tools and build dependencies
- name: Install Build Dependencies
run: |
sudo apt-get update

sudo DEBIAN_FRONTEND=noninteractive apt-get install -y devscripts equivs fakeroot git-buildpackage

# Use mk-build-deps to parse debian/control, create a dummy package
# with all build dependencies, and install it. This ensures all
# required build dependencies are present.
# The --no-install-recommends flag keeps the environment minimal.
sudo mk-build-deps -i --tool="apt-get -y --no-install-recommends"
# Remove debs that this generates from the working directory after install
rm -f qemu-build-deps*

# Step 3: Generate Upstream Tarball
- name: Generate Upstream Tarball
run: |
# Extract source name and upstream version from debian/changelog.
# The first sed command strips any epoch (e.g., "1:") from the start of the version.
# The second sed command strips the Debian revision from the end of the version string.
# dpkg-parsechangelog is in the dpkg-dev package, a dependency of devscripts.
export SOURCE_NAME=$(dpkg-parsechangelog -S Source)
export UPSTREAM_VERSION=$(dpkg-parsechangelog -S Version | sed 's/^[0-9]\+://' | sed 's/-[^-]*$//')

git config --global user.email "robot@builder.local"
git config --global user.name "Builder Robot"
# Create the .orig.tar.gz in the parent directory.
./debian/build-source-package-from-git.sh

# Step 4: Upload Workspace for Debugging
- name: Upload Workspace for Debugging
uses: actions/upload-artifact@v4
with:
name: pre-build-workspace
path: .

# Step 5: Build the Debian source package
- name: Build Source Package
run: |
# Use debuild to create the source package.
# -S: Build a source package only (no binaries).
# -us: Do not sign the source package.
# -uc: Do not sign the .changes file.
# This command will find and use the .orig.tar.gz we just created.
current_dir=$(pwd)
cd deb
# There should only be one thing in here, which is the tarball we'll extract
# so wildcard should be OK in this instance.
ls
tar -xvf $(ls -d * | head -n 1)
ls
cd $(ls -d */ | head -n 1)
debuild -S -us -uc
cd "$current_dir"

# Step 6: Log MD5 Checksums
- name: Log MD5 Checksums as Annotations
run: |
# Change to the parent directory where artifacts were created.
current_dir=$(pwd)
cd deb
mkdir source_package_artifacts

# Iterate over all the generated build artifacts.
for file in *.dsc *.orig.tar.* *.debian.tar.* *.changes *source.build *source.buildinfo; do
# Check if files matching the pattern exist before processing.
if [ -f "$file" ]; then
# Calculate the MD5 sum and format it for the annotation.
# The output of md5sum is "CHECKSUM FILENAME".
checksum=$(md5sum "$file")

# Echo the checksum as a workflow notice annotation.
# This will make it easily visible in the GitHub Actions UI.
echo "::notice title=MD5 Checksum::$checksum"
mv "$file" source_package_artifacts
fi
done
mv source_package_artifacts "$current_dir"

# Step 7: Upload the generated source package files as artifacts
- name: Upload Debian Source Package Artifacts
uses: actions/upload-artifact@v4
with:
# Name of the artifact bundle to be displayed in the GitHub UI
name: debian-source-package

path: source_package_artifacts
64 changes: 64 additions & 0 deletions backends/iommufd.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,16 +390,23 @@ bool iommufd_backend_get_dirty_bitmap(IOMMUFDBackend *be,
return true;
}

/*
* @type can carry a desired HW info type defined in the uapi headers. If caller
* doesn't have one, indicating it wants the default type, then @type should be
* zeroed (i.e. IOMMU_HW_INFO_TYPE_DEFAULT).
*/
bool iommufd_backend_get_device_info(IOMMUFDBackend *be, uint32_t devid,
uint32_t *type, void *data, uint32_t len,
uint64_t *caps, uint8_t *max_pasid_log2,
Error **errp)
{
struct iommu_hw_info info = {
.flags = (*type) ? IOMMU_HW_INFO_FLAG_INPUT_TYPE : 0,
.size = sizeof(info),
.dev_id = devid,
.data_len = len,
.data_uptr = (uintptr_t)data,
.in_data_type = *type,
};

if (ioctl(be->fd, IOMMU_GET_HW_INFO, &info)) {
Expand Down Expand Up @@ -456,6 +463,7 @@ bool iommufd_backend_invalidate_cache(IOMMUFDBackend *be, uint32_t id,

bool iommufd_backend_alloc_viommu(IOMMUFDBackend *be, uint32_t dev_id,
uint32_t viommu_type, uint32_t hwpt_id,
void *data_ptr, uint32_t data_len,
uint32_t *out_viommu_id, Error **errp)
{
int ret;
Expand All @@ -464,11 +472,14 @@ bool iommufd_backend_alloc_viommu(IOMMUFDBackend *be, uint32_t dev_id,
.type = viommu_type,
.dev_id = dev_id,
.hwpt_id = hwpt_id,
.data_len = data_len,
.data_uptr = (uintptr_t)data_ptr,
};

ret = ioctl(be->fd, IOMMU_VIOMMU_ALLOC, &alloc_viommu);

trace_iommufd_backend_alloc_viommu(be->fd, dev_id, viommu_type, hwpt_id,
(uintptr_t)data_ptr, data_len,
alloc_viommu.out_viommu_id, ret);
if (ret) {
error_setg_errno(errp, errno, "IOMMU_VIOMMU_ALLOC failed");
Expand Down Expand Up @@ -538,6 +549,59 @@ bool iommufd_backend_alloc_veventq(IOMMUFDBackend *be, uint32_t viommu_id,
return true;
}

bool iommufd_backend_alloc_hw_queue(IOMMUFDBackend *be, uint32_t viommu_id,
uint32_t queue_type, uint32_t index,
uint64_t addr, uint64_t length,
uint32_t *out_hw_queue_id, Error **errp)
{
int ret;
struct iommu_hw_queue_alloc alloc_hw_queue = {
.size = sizeof(alloc_hw_queue),
.flags = 0,
.viommu_id = viommu_id,
.type = queue_type,
.index = index,
.nesting_parent_iova = addr,
.length = length,
};

ret = ioctl(be->fd, IOMMU_HW_QUEUE_ALLOC, &alloc_hw_queue);

trace_iommufd_backend_alloc_hw_queue(be->fd, viommu_id, queue_type,
index, addr, length,
alloc_hw_queue.out_hw_queue_id, ret);
if (ret) {
error_setg_errno(errp, errno, "IOMMU_HW_QUEUE_ALLOC failed");
return false;
}

g_assert(out_hw_queue_id);
*out_hw_queue_id = alloc_hw_queue.out_hw_queue_id;
return true;
}

/*
* Helper to mmap HW MMIO regions exposed via iommufd for a vIOMMU instance.
* The caller is responsible for unmapping the mapped region.
*/
bool iommufd_backend_viommu_mmap(IOMMUFDBackend *be, uint32_t viommu_id,
uint64_t size, off_t offset, void **out_ptr,
Error **errp)
{
g_assert(viommu_id);
g_assert(out_ptr);

*out_ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, be->fd,
offset);
trace_iommufd_backend_viommu_mmap(be->fd, viommu_id, size, offset);
if (*out_ptr == MAP_FAILED) {
error_setg_errno(errp, errno, "IOMMUFD vIOMMU mmap failed");
return false;
}

return true;
}

bool host_iommu_device_iommufd_attach_hwpt(HostIOMMUDeviceIOMMUFD *idev,
uint32_t hwpt_id, Error **errp)
{
Expand Down
4 changes: 3 additions & 1 deletion backends/trace-events
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ iommufd_backend_free_id(int iommufd, uint32_t id, int ret) " iommufd=%d id=%d (%
iommufd_backend_set_dirty(int iommufd, uint32_t hwpt_id, bool start, int ret) " iommufd=%d hwpt=%u enable=%d (%d)"
iommufd_backend_get_dirty_bitmap(int iommufd, uint32_t hwpt_id, uint64_t iova, uint64_t size, uint64_t flags, uint64_t page_size, int ret) " iommufd=%d hwpt=%u iova=0x%"PRIx64" size=0x%"PRIx64" flags=0x%"PRIx64" page_size=0x%"PRIx64" (%d)"
iommufd_backend_invalidate_cache(int iommufd, uint32_t id, uint32_t data_type, uint32_t entry_len, uint32_t entry_num, uint32_t done_num, uint64_t data_ptr, int ret) " iommufd=%d id=%u data_type=%u entry_len=%u entry_num=%u done_num=%u data_ptr=0x%"PRIx64" (%d)"
iommufd_backend_alloc_viommu(int iommufd, uint32_t dev_id, uint32_t type, uint32_t hwpt_id, uint32_t viommu_id, int ret) " iommufd=%d type=%u dev_id=%u hwpt_id=%u viommu_id=%u (%d)"
iommufd_backend_alloc_viommu(int iommufd, uint32_t dev_id, uint32_t type, uint32_t hwpt_id, uint64_t data_ptr, uint32_t data_len, uint32_t viommu_id, int ret) " iommufd=%d type=%u dev_id=%u hwpt_id=%u data_ptr=0x%"PRIx64" data_len=0x%x viommu_id=%u (%d)"
iommufd_backend_alloc_vdev(int iommufd, uint32_t dev_id, uint32_t viommu_id, uint64_t virt_id, uint32_t vdev_id, int ret) " iommufd=%d dev_id=%u viommu_id=%u virt_id=0x%"PRIx64" vdev_id=%u (%d)"
iommufd_viommu_alloc_eventq(int iommufd, uint32_t viommu_id, uint32_t type, uint32_t veventq_id, uint32_t veventq_fd, int ret) " iommufd=%d viommu_id=%u type=%u veventq_id=%u veventq_fd=%u (%d)"
iommufd_backend_alloc_hw_queue(int iommufd, uint32_t viommu_id, uint32_t queue_type, uint32_t index, uint64_t addr, uint64_t size, uint32_t queue_id, int ret) " iommufd=%d viommu_id=%u queue_type=%u index=%u addr=0x%"PRIx64" size=0x%"PRIx64" queue_id=%u (%d)"
iommufd_backend_viommu_mmap(int iommufd, uint32_t viommu_id, uint64_t size, uint64_t offset) " iommufd=%d viommu_id=%u size=0x%"PRIx64" offset=0x%"PRIx64

# igvm-cfg.c
igvm_reset_enter(int type) "type=%u"
Expand Down
74 changes: 74 additions & 0 deletions debian/README-components-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
Evolution of qemu-related packages in debian

kvm: was a binary package providing /usr/bin/kvm before squeeze.

In squeeze it has been renamed to qemu-kvm,
so kvm becomes a transitional package.

Probably can be get rid of now.

No need to conflict with this package, but we can force-remove it
by conflicting with it.

Some packages may still Require/Depend/Suggest: kvm.


qemu-kvm: was a binary package providing /usr/bin/kvm in wheezy (v. 1.1)

This binary become a (deprecated) shell wrapper and was a part of
qemu-system-x86 package between versions 1.3.0+dfsg-5 (when qemu-system
were split) up to 1.7.0+dfsg-1, with qemu-kvm package being transitional.

At version 1.7.0+dfsg-2, qemu-kvm packcage is not transitional anymore,
and the wrapper is provided by qemu-kvm, not qemu-system-x86.

Some packages may Require/Depend/Suggest: qemu-kvm.

qemu: initially it was a mix of all of qemu (unrelated, not conflicting
with qemu-kvm or kvm)

at 0.11.0-1 it were split to qemu-user, qemu-user-static and qemu-system.

Also qemu-keymaps is made a separate package at version 0.12.4+dfsg-4
(for use together with qemu-kvm and xen and, on ubuntu, qemu-linaro).

And qemu-utils become a separate package (look when? since the beginning?)

Now it is a metapackage and a placeholder for some docs

qemu-system: was a package with all qemu-system-* binaries.

Were split into individual qemu-system-foo and qemu-system-common at version
1.3.0+dfsg-5, so qemu-system becomes a metapackage without its own files.

The split introduced a bunch of qemu-system-* conflicting+replacing
qemu-system<<1.3.0+dfsg-5.

At version 1.3.0+dfsg-4exp (before split, in experimental), /usr/bin/kvm was
a part of qemu-system (and later qemu-system-x86)/

At the same version, virtfs-proxy-helper binary has been moved from qemu-utils
to qemu-system (and later to qemu-system-common).

qemu-system-common: appeared at 1.3.0+dfsg-5, files common for all qemu-system*

briefly (>=1.3.0+dfsg-4exp, <<1.3.0+dfsg-5), qemu-utils had
virtfs-proxy-helper binary which is in qemu-system-common

qemu-keymaps: keymap definition for qemu, qemu-kvm and xen.

Can be merged into qemu-system-common now, or after qemu-linaro.

Were split out of qemu at version 0.12.4+dfsg-4

qemu-utils: common utilities (part of qemu-common in ubuntu?)

In versions between 1.3.0+dfsg-1~exp1 and 1.3.0+dfsg-4exp, wrongly shipped
virtfs-proxy-helper binary

qemu-user, qemu-user-static: user-mode qemu emulation

Were split out of qemu at verson 0.11.0-1 (pre-squeeze),
do not conflict/replace anything anymore.

qemu-common: ubuntu package
16 changes: 16 additions & 0 deletions debian/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
* fix other binaries (s390-zipl, ppc_rom)

* permissions/ownership for /dev/vhost_net???

* startup script for qemu-guest-agent: check dependencies & runlevels.

* maybe provide activation for udev & systemd:

SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", \
TAG+="systemd" ENV{SYSTEMD_WANTS}="qemu-guest-agent.service"

and dev-virtio/ports-org.qemu.guest_agent.0.device activation
for systemd.

* decide what to do with qemu-bridge-helper (#691138)

Loading