qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1 0/8] SMMUv3 Emulation support
@ 2016-06-23  6:22 Prem Mallappa
  2016-06-23  6:22 ` [Qemu-devel] [PATCH v1 1/8] hw: arm: SMMUv3 emulation model Prem Mallappa
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Prem Mallappa @ 2016-06-23  6:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Edgar E . Iglesias, Prem Mallappa

RFC -> v1:
	- As per SMMUv3 spec 16.0 (only is_ste_consistant() is noticeable)
	- Reworked register access/update logic
	- Factored out translation code for
		- single point bug fix
		- sharing/removal in future
	- (optional) Unit tests added, with PCI test device
		- S1 with 4k/64k, S1+S2 with 4k/64k
		- (S1 or S2) only can be verified by Linux 4.7 driver
	- (optional) Priliminary ACPI support

RFC:
	- Implements SMMUv3 spec 11.0
	- Supported for PCIe devices, 
	- Command Queue and Event Queue supported
	- LPAE only, S1 is supported and Tested, S2 not tested
	- BE mode Translation not supported
	- IRQ support (legacy, no MSI)
	- Tested with DPDK and e1000 

Patch 1: Adds SMMUv3 model to QEMU
	Multiple files, big ones, translate functionality is split across to
	accomodate SMMUv2 model, and to remove when common translation feature
	(if) becomes available.

Patch 2: Adds SMMU build support

Patch 3: Some devicetree function to add support for SMMU's multiple interrupt
	 assignment with names

Patch 4: Adds support in virt.c to create both SMMUv3 device and dts entries

<< optional patches >>
Optional patches are posted for completeness or for those who wants to test.

Patch 5: A simple PCI device which does DMA from 'src' to 'dst' given
	 src_addr, dst_addr and size, and is used by unit test, uses
	 pci_dma_read and pci_dma_write in a crude way but serves the purpose.

Patch 6: Current libqos PCI helpers are x86 only, this addes a generic interface

Patch 7: Unit tests for SMMU, 
		- initializes SMMU device 
		- initializes Test device
		- allocates page tables 1:1 mapping va == pa
		- allocates STE/CD accordingly for S1, S2, S1+S2
		- initiates DMA via PCI test device
		- verifies transfered data

Patch 8: Added ACPI IORT tables, was needed for internal project purpose, but 
	 posting here for anyone looking for testing ACPI on ARM platforms.
	 (P.S: Linux side IORT patches are WIP)

Repo:
https://github.com/pmallappa/qemu/tree/develop

To Test:
$ make tests/smmuv3-test
$ QTEST_QEMU_BINARY=aarch64-softmmu/qemu-system-aarch64 tests/smmuv3-test
<< expect lot of prints >>

Any comments welcome..

Cheers
/Prem

Prem Mallappa (8):
  hw: arm: SMMUv3 emulation model
  hw: arm: Added SMMUv3 files for build
  devicetree: Added new APIs to make use of more fdt functions
  hw: arm: Add SMMUv3 to virt platform, create DTS accordingly
  [optional] hw: misc: added testdev for smmu
  [optional] tests: libqos: generic pci probing helpers
  [optional] tests: SMMUv3 unit tests
  [optional] arm: smmu-v3: ACPI IORT initial support

 default-configs/aarch64-softmmu.mak |    1 +
 device_tree.c                       |   35 +
 hw/arm/Makefile.objs                |    1 +
 hw/arm/smmu-common.c                |  142 ++++
 hw/arm/smmu-common.h                |  135 ++++
 hw/arm/smmu-v3.c                    | 1461 +++++++++++++++++++++++++++++++++++
 hw/arm/smmuv3-internal.h            |  417 ++++++++++
 hw/arm/virt-acpi-build.c            |   43 ++
 hw/arm/virt.c                       |   62 ++
 hw/misc/Makefile.objs               |    2 +-
 hw/misc/pci-testdev-smmu.c          |  239 ++++++
 hw/misc/pci-testdev-smmu.h          |   22 +
 include/hw/acpi/acpi-defs.h         |   84 ++
 include/hw/arm/smmu.h               |   33 +
 include/hw/arm/virt.h               |    2 +
 include/sysemu/device_tree.h        |   18 +
 tests/Makefile.include              |    4 +
 tests/libqos/pci-generic.c          |  197 +++++
 tests/libqos/pci-generic.h          |   58 ++
 tests/smmuv3-test.c                 |  905 ++++++++++++++++++++++
 20 files changed, 3860 insertions(+), 1 deletion(-)
 create mode 100644 hw/arm/smmu-common.c
 create mode 100644 hw/arm/smmu-common.h
 create mode 100644 hw/arm/smmu-v3.c
 create mode 100644 hw/arm/smmuv3-internal.h
 create mode 100644 hw/misc/pci-testdev-smmu.c
 create mode 100644 hw/misc/pci-testdev-smmu.h
 create mode 100644 include/hw/arm/smmu.h
 create mode 100644 tests/libqos/pci-generic.c
 create mode 100644 tests/libqos/pci-generic.h
 create mode 100644 tests/smmuv3-test.c

-- 
2.9.0

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-07-27  6:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-23  6:22 [Qemu-devel] [PATCH v1 0/8] SMMUv3 Emulation support Prem Mallappa
2016-06-23  6:22 ` [Qemu-devel] [PATCH v1 1/8] hw: arm: SMMUv3 emulation model Prem Mallappa
2016-07-26  6:07   ` Edgar E. Iglesias
2016-07-27  6:33     ` Prem Mallappa
2016-07-26  6:29   ` Edgar E. Iglesias
2016-06-23  6:22 ` [Qemu-devel] [PATCH v1 2/8] hw: arm: Added SMMUv3 files for build Prem Mallappa
2016-06-23  6:22 ` [Qemu-devel] [PATCH v1 3/8] devicetree: Added new APIs to make use of more fdt functions Prem Mallappa
2016-06-23  6:22 ` [Qemu-devel] [PATCH v1 4/8] hw: arm: Add SMMUv3 to virt platform, create DTS accordingly Prem Mallappa
2016-06-23  6:22 ` [Qemu-devel] [PATCH v1 5/8] [optional] hw: misc: added testdev for smmu Prem Mallappa
2016-06-23  6:22 ` [Qemu-devel] [PATCH v1 6/8] [optional] tests: libqos: generic pci probing helpers Prem Mallappa
2016-06-23  6:22 ` [Qemu-devel] [PATCH v1 7/8] [optional] tests: SMMUv3 unit tests Prem Mallappa
2016-06-23  6:22 ` [Qemu-devel] [PATCH v1 8/8] [optional] arm: smmu-v3: ACPI IORT initial support Prem Mallappa

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).