From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eduard - Gabriel Munteanu Subject: [RFC PATCH 0/7] Beginning implementing the AMD IOMMU emulation Date: Tue, 30 Mar 2010 11:20:01 +0300 Message-ID: Cc: aliguori@us.ibm.com, avi@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org, Eduard - Gabriel Munteanu To: joro@8bytes.org Return-path: Received: from mail-bw0-f209.google.com ([209.85.218.209]:64981 "EHLO mail-bw0-f209.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754880Ab0C3IUY (ORCPT ); Tue, 30 Mar 2010 04:20:24 -0400 Received: by bwz1 with SMTP id 1so4153659bwz.21 for ; Tue, 30 Mar 2010 01:20:23 -0700 (PDT) Sender: kvm-owner@vger.kernel.org List-ID: Hi everybody, This patchset is intended to provide a start for implementing the emulation of the AMD IOMMU. For those who aren't aware yet, I intend to participate as a student in GSoC 2010. The patches are meant to be applied on top of qemu-kvm. In short, this demonstrates a mechanism of inserting ACPI tables without modifying SeaBIOS or other BIOS implementations. I also have a SeaBIOS equivalent, but I think this approach is better, at least at the moment. To test, simply boot a Linux kernel inside KVM and look in dmesg for the IVRS table. I wouldn't merge this patchset yet, at least stuff after the first patch, until it accumulates more work. I also didn't test loading ACPI tables from the command line after these modifications. I'd appreciate comments on these patches. Cheers, Eduard Eduard - Gabriel Munteanu (7): acpi: qemu_realloc() might return a different pointer acpi: split and rename acpi_table_add() acpi: move table header definition into pc.h sparc: rename hw/iommu.c x86-64: AMD IOMMU stub acpi: cleanup acpi_checksum() acpi: fix bug in acpi_checksum() caused by garbage in checksum field Makefile.target | 3 +- hw/acpi.c | 83 +++++++++++++++++++------------- hw/amd_iommu.c | 103 +++++++++++++++++++++++++++++++++++++++++ hw/pc.c | 2 + hw/pc.h | 20 ++++++++- hw/{iommu.c => sparc_iommu.c} | 0 hw/sun4m.h | 2 +- vl.c | 2 +- 8 files changed, 177 insertions(+), 38 deletions(-) create mode 100644 hw/amd_iommu.c rename hw/{iommu.c => sparc_iommu.c} (100%) From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwWgb-0003La-Lg for qemu-devel@nongnu.org; Tue, 30 Mar 2010 04:20:34 -0400 Received: from [140.186.70.92] (port=40321 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwWgX-0003Ko-L2 for qemu-devel@nongnu.org; Tue, 30 Mar 2010 04:20:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwWgT-00048L-O6 for qemu-devel@nongnu.org; Tue, 30 Mar 2010 04:20:29 -0400 Received: from mail-bw0-f218.google.com ([209.85.218.218]:43464) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwWgS-000487-Vv for qemu-devel@nongnu.org; Tue, 30 Mar 2010 04:20:25 -0400 Received: by bwz10 with SMTP id 10so14273949bwz.2 for ; Tue, 30 Mar 2010 01:20:23 -0700 (PDT) Sender: Eduard - Gabriel Munteanu From: Eduard - Gabriel Munteanu Date: Tue, 30 Mar 2010 11:20:01 +0300 Message-Id: Subject: [Qemu-devel] [RFC PATCH 0/7] Beginning implementing the AMD IOMMU emulation List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: joro@8bytes.org Cc: aliguori@us.ibm.com, Eduard - Gabriel Munteanu , avi@redhat.com, kvm@vger.kernel.org, qemu-devel@nongnu.org Hi everybody, This patchset is intended to provide a start for implementing the emulation of the AMD IOMMU. For those who aren't aware yet, I intend to participate as a student in GSoC 2010. The patches are meant to be applied on top of qemu-kvm. In short, this demonstrates a mechanism of inserting ACPI tables without modifying SeaBIOS or other BIOS implementations. I also have a SeaBIOS equivalent, but I think this approach is better, at least at the moment. To test, simply boot a Linux kernel inside KVM and look in dmesg for the IVRS table. I wouldn't merge this patchset yet, at least stuff after the first patch, until it accumulates more work. I also didn't test loading ACPI tables from the command line after these modifications. I'd appreciate comments on these patches. Cheers, Eduard Eduard - Gabriel Munteanu (7): acpi: qemu_realloc() might return a different pointer acpi: split and rename acpi_table_add() acpi: move table header definition into pc.h sparc: rename hw/iommu.c x86-64: AMD IOMMU stub acpi: cleanup acpi_checksum() acpi: fix bug in acpi_checksum() caused by garbage in checksum field Makefile.target | 3 +- hw/acpi.c | 83 +++++++++++++++++++------------- hw/amd_iommu.c | 103 +++++++++++++++++++++++++++++++++++++++++ hw/pc.c | 2 + hw/pc.h | 20 ++++++++- hw/{iommu.c => sparc_iommu.c} | 0 hw/sun4m.h | 2 +- vl.c | 2 +- 8 files changed, 177 insertions(+), 38 deletions(-) create mode 100644 hw/amd_iommu.c rename hw/{iommu.c => sparc_iommu.c} (100%)