qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] IOMMU and custom PCIe Device in non-nested VMs


From: Paul Lancaster
Subject: [Qemu-discuss] IOMMU and custom PCIe Device in non-nested VMs
Date: Wed, 21 Aug 2019 13:37:53 -0700

I’m writing a custom NVMe device model and I need to test ATS functionality. 
For that, I need to enable the IOMMU.

I start QEMU with the following command line, using a stock Ubuntu 16.04 image:

% emu-system-x86_64 -M q35,accel=kvm,kernel_irqchip=off -m 8K -device 
intel-iommu,intremap=on,device-iotlb=on -device myNVMe,addr=10.0

It boots just fine and I see the /dev/nvme* device files, but the addresses 
provided for DMA transfers are the same as without a IOMMU.

I see there are no iommu groups defined, and thus my device is obviously not 
assigned to any one of them.

DMAR-related syslog messages:

ACPI: DMAR 0x000000007FFE20C5 000050 (v01 BOCHS. BXPCDMAR 00000001 BXPC 
00000001)
DMAR: Host address width 39
DMAR: DRHD base: 0x000000fed90000 flags: 0x1
DMAR: dmar0: reg_base_addr fed90000 ver 1.0 cap 12008c22260206 cap f00f4e
DMAR: ATSR flash: 0x1
DMAR-IR: IOAPIC id 0 under DRHD base. 0xfed90000 IOMMU 0
DMAR-IR: Enabled IRQ remapping in Salic mode

How can I get the DMA buffers use virtual addresses?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]