qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

docs/specs: Add ACPI GED documentation

Documents basic concepts of ACPI Generic Event device(GED)
and interface between QEMU and the ACPI BIOS.

Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20190918130633.4872-10-shameerali.kolothum.thodi@huawei.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

authored by

Shameer Kolothum and committed by
Michael S. Tsirkin
e86fba50 1962f31b

+71
+70
docs/specs/acpi_hw_reduced_hotplug.rst
··· 1 + ================================================== 2 + QEMU and ACPI BIOS Generic Event Device interface 3 + ================================================== 4 + 5 + The ACPI *Generic Event Device* (GED) is a HW reduced platform 6 + specific device introduced in ACPI v6.1 that handles all platform 7 + events, including the hotplug ones. GED is modelled as a device 8 + in the namespace with a _HID defined to be ACPI0013. This document 9 + describes the interface between QEMU and the ACPI BIOS. 10 + 11 + GED allows HW reduced platforms to handle interrupts in ACPI ASL 12 + statements. It follows a very similar approach to the _EVT method 13 + from GPIO events. All interrupts are listed in _CRS and the handler 14 + is written in _EVT method. However, the QEMU implementation uses a 15 + single interrupt for the GED device, relying on an IO memory region 16 + to communicate the type of device affected by the interrupt. This way, 17 + we can support up to 32 events with a unique interrupt. 18 + 19 + **Here is an example,** 20 + 21 + :: 22 + 23 + Device (\_SB.GED) 24 + { 25 + Name (_HID, "ACPI0013") 26 + Name (_UID, Zero) 27 + Name (_CRS, ResourceTemplate () 28 + { 29 + Interrupt (ResourceConsumer, Edge, ActiveHigh, Exclusive, ,, ) 30 + { 31 + 0x00000029, 32 + } 33 + }) 34 + OperationRegion (EREG, SystemMemory, 0x09080000, 0x04) 35 + Field (EREG, DWordAcc, NoLock, WriteAsZeros) 36 + { 37 + ESEL, 32 38 + } 39 + Method (_EVT, 1, Serialized) 40 + { 41 + Local0 = ESEL // ESEL = IO memory region which specifies the 42 + // device type. 43 + If (((Local0 & One) == One)) 44 + { 45 + MethodEvent1() 46 + } 47 + If ((Local0 & 0x2) == 0x2) 48 + { 49 + MethodEvent2() 50 + } 51 + ... 52 + } 53 + } 54 + 55 + GED IO interface (4 byte access) 56 + -------------------------------- 57 + **read access:** 58 + 59 + :: 60 + 61 + [0x0-0x3] Event selector bit field (32 bit) set by QEMU. 62 + 63 + bits: 64 + 0: Memory hotplug event 65 + 1: System power down event 66 + 2-31: Reserved 67 + 68 + **write_access:** 69 + 70 + Nothing is expected to be written into GED IO memory
+1
docs/specs/index.rst
··· 12 12 13 13 ppc-xive 14 14 ppc-spapr-xive 15 + acpi_hw_reduced_hotplug