qemu-devel
[Top][All Lists]
Advanced

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

Re: Fwd: Enable IOMMU Inside QEMU


From: Alok Prasad
Subject: Re: Fwd: Enable IOMMU Inside QEMU
Date: Wed, 7 Oct 2020 16:50:35 +0530

Thanks, Peter!
That worked for me, Not sure if Virsh XML has some issue.
for sake of other, this is the complete command I use.

/usr/bin/qemu-system-x86_64  -machine q35,kernel-irqchip=split,accel=kvm -smp 4 -m 2G   -device intel-iommu,intremap=on,caching-mode=on -nographic  os_image.qcow2

dmesg inside VM now shows

[root@centos-8 ~]# dmesg | grep -e DMAR
[    0.013047] ACPI: DMAR 0x000000007FFE221F 000048 (v01 BOCHS  BXPCDMAR 00000001 BXPC 00000001)
[    0.100861] DMAR: IOMMU enabled
[    0.258287] DMAR: Host address width 39
[    0.259213] DMAR: DRHD base: 0x000000fed90000 flags: 0x1
[    0.260470] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap d2008c22260286 ecap f00f5a
[    0.262321] DMAR-IR: IOAPIC id 0 under DRHD base  0xfed90000 IOMMU 0
[    0.263755] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
[    0.267498] DMAR-IR: Enabled IRQ remapping in x2apic mode
[    2.205498] DMAR: No RMRR found
[    2.207406] DMAR: No ATSR found
[    2.209495] DMAR: dmar0: Using Queued invalidation
[    2.212938] DMAR: Hardware identity mapping for device 0000:00:00.0
[    2.216531] DMAR: Hardware identity mapping for device 0000:00:01.0
[    2.219430] DMAR: Hardware identity mapping for device 0000:00:02.0
[    2.222314] DMAR: Hardware identity mapping for device 0000:00:03.0
[    2.224804] DMAR: Hardware identity mapping for device 0000:00:1f.0
[    2.227289] DMAR: Hardware identity mapping for device 0000:00:1f.2
[    2.229850] DMAR: Hardware identity mapping for device 0000:00:1f.3
[    2.232185] DMAR: Setting RMRR:
[    2.233469] DMAR: Prepare 0-16MiB unity mapping for LPC
[    2.235443] DMAR: Ignoring identity map for HW passthrough device 0000:00:1f.0 [0x0 - 0xffffff]
[    2.238732] DMAR: Intel(R) Virtualization Technology for Directed I/O


Thanks,
Alok

On Wed, Oct 7, 2020 at 1:53 AM Peter Xu <peterx@redhat.com> wrote:
On Tue, Oct 06, 2020 at 11:26:08PM +0530, Alok Prasad wrote:
> root@beta-hp-p70:/home/fastlinq/alok/KVM-VM# /usr/bin/qemu-system-x86_64
> --version
> QEMU emulator version 4.2.1
> Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers
>
> I am missing here something,? Is there seperate Branch for the same in qemu.

No, it should always be in mainline.

I didn't see anything obviously wrong in your setup.  A simplest QEMU cmdline
to boot a guest with vIOMMU should be:

$QEMU -machine q35,kernel-irqchip=split,accel=kvm -smp 4 -m 2G \
      -device intel-iommu ~/images/default.qcow2

May worth try this directly.  Also feel free to compile the latest QEMU.  The
default configuration should work.

--
Peter Xu


reply via email to

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