From: David Kiarie <davidkiarie4@gmail.com>
To: qemu-devel@nongnu.org
Cc: valentine.sinitsyn@gmail.com, jan.kiszka@web.de,
David Kiarie <davidkiarie4@gmail.com>,
mst@redhat.com
Subject: [Qemu-devel] [RFC 0/4] AMD IOMMU
Date: Tue, 25 Aug 2015 02:19:25 +0300 [thread overview]
Message-ID: <1440458369-7384-1-git-send-email-davidkiarie4@gmail.com> (raw)
This series implements basic AMD IOMMU emulation to Qemu
AMD IOMMU emulation.
-This series emulates AMD IOMMU on qemu. It implements the following features
-Translation - 4K pages
-Event logging - particulary fault logging.
-AMD IOMMU, being a convectional PCI device doesn't rely on any other technology from AMD and hence you can test this patch on l2 guest emulated on an Intel PC.
-These patches have been tested using the 'ac97' sound device with QEMU_AUDIO_DRV=alsa and proven to work.
Testing - pretty basic stuff...
On host
#kvm_amd is loaded with nested support by default by anyways :)
-$modprobe -r kvm_amd
$modprobe kvm_amd nested=1
$command to start guest with 'iommu=1' kernel arguments
On the guest
$dmesg | AMD-Vi
AMD-Vi: Enabling IOMMU at 0000:00:00.2 cap 0x40
AMD-Vi: Lazy IO/TLB flushing enabled
$modprobe kvm_amd
$modprobe pci_stub
$lspci -n
01:00.0 0200: 8086:10b9 (rev 06)
$echo "8086 10b9" > /sys/bus/pci/drivers/pci-stub/new_id
$echo 0000:01:00.0 > /sys/bus/pci/devices/0000:01:00.0/driver/unbind
$echo 0000:01:00.0 > /sys/bus/pci/drivers/pci-stub/bind
Assign the device
$/usr/local/bin/qemu-system-x86_64 -m 512 -boot c -net none -hda /root/ia32e_rhel5u1.img -device pci-assign,host=01:00.0
I guess that's all there is to say. Please test!
asla.
David (4):
hw/core: Prepare for introducing AMD IOMMU
hw/i386: Introduce AMD IOMMU
hw/i386: Introduce IVRS for AMD IOMMU
hw/pci-host: Add AMD IOMMU emulation to q35 and PIIX
hw/core/machine.c | 25 ++
hw/i386/Makefile.objs | 1 +
hw/i386/acpi-build.c | 85 ++++
hw/i386/amd_iommu.c | 993 ++++++++++++++++++++++++++++++++++++++++++++
hw/i386/amd_iommu.h | 298 +++++++++++++
hw/pci-host/piix.c | 11 +
hw/pci-host/q35.c | 11 +
include/hw/acpi/acpi-defs.h | 55 +++
include/hw/boards.h | 2 +
9 files changed, 1481 insertions(+)
create mode 100644 hw/i386/amd_iommu.c
create mode 100644 hw/i386/amd_iommu.h
--
2.1.4
next reply other threads:[~2015-08-24 23:19 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-24 23:19 David Kiarie [this message]
2015-08-24 23:19 ` [Qemu-devel] [RFC 1/4] hw/core: Prepare for introducing AMD IOMMU David Kiarie
2015-08-24 23:19 ` [Qemu-devel] [RFC 2/4] hw/i386: Introduce " David Kiarie
2015-08-25 6:39 ` Valentine Sinitsyn
2015-08-25 7:25 ` David kiarie
2015-08-25 7:31 ` Valentine Sinitsyn
2015-08-25 7:41 ` David kiarie
2015-08-25 7:43 ` Valentine Sinitsyn
2015-08-25 7:44 ` David kiarie
2015-09-07 12:46 ` Valentine Sinitsyn
2015-09-09 7:30 ` David kiarie
2015-09-09 7:45 ` Valentine Sinitsyn
2015-09-09 7:59 ` David kiarie
2015-09-09 8:07 ` Valentine Sinitsyn
2015-09-09 8:12 ` David kiarie
2015-09-09 8:14 ` Valentine Sinitsyn
2015-09-09 8:31 ` David kiarie
2015-09-09 7:59 ` Michael S. Tsirkin
2015-09-09 8:04 ` Valentine Sinitsyn
2015-09-12 10:55 ` Valentine Sinitsyn
2015-08-24 23:19 ` [Qemu-devel] [RFC 3/4] hw/i386: Introduce IVRS for " David Kiarie
2015-08-24 23:19 ` [Qemu-devel] [RFC 4/4] hw/pci-host: Add AMD IOMMU emulation to q35 and PIIX David Kiarie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1440458369-7384-1-git-send-email-davidkiarie4@gmail.com \
--to=davidkiarie4@gmail.com \
--cc=jan.kiszka@web.de \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=valentine.sinitsyn@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).