Support QLIST migration using the same principle as QTAILQ:
94869d5c52 ("migration: migrate QTAILQ").
The VMSTATE_QLIST_V macro has the same proto as VMSTATE_QTAILQ_V.
The change mainly resides in QLIST_RAW_INSERT_TAIL implementation.
Tests also are provided.
Signed-off-by: Eric Auger
Signed-off-by: Eric Auger
---
v3 -> v4:
- replace QLIST_RAW_INSERT_TAIL by QLIST_RAW_INSERT_HEAD and
QLIST_RAW_REVERSE as suggested by Juan
---
include/migration/vmstate.h | 21 ++
include/qemu/queue.h| 40 +++
migration/trace-events | 5 ++
migration/vmstate-ty
Signed-off-by: Eric Auger
Reviewed-by: Juan Quintela
---
v4 -> v5:
- fix indent issue and previous assignment (Peter)
- add Juan's R-b
v3 -> v4:
- replace QLIST_RAW_INSERT_TAIL by QLIST_RAW_INSERT_HEAD and
QLIST_RAW_REVERSE as suggested by Juan
v2 -> v3:
- remove 2 spurious ch
ve
g_tree_destroy(domain->mappings) in virtio_iommu_detach
v13 -> v14:
- added "virtio-iommu-pci: Introduce the x-dt-binding option"
- Removed the mappings gtree ref counting and simply delete
the gtree when the last EP is detached from the domain
Eric Auger (10):
virtio-io
This patch adds the command payload decoding and
introduces the functions that will do the actual
command handling. Those functions are not yet implemented.
Signed-off-by: Eric Auger
Reviewed-by: Jean-Philippe Brucker
Reviewed-by: Peter Xu
Reviewed-by: Michael S. Tsirkin
---
v11 ->
This patch implements the translate callback
Signed-off-by: Eric Auger
Reviewed-by: Jean-Philippe Brucker
Reviewed-by: Michael S. Tsirkin
---
v11 -> v12:
- Added Jean's R-b
- s/qemu_log_mask/error_report_once
v10 -> v11:
- take into account the new value str
The event queue allows to report asynchronous errors.
The translate function now injects faults when relevant.
Signed-off-by: Eric Auger
Reviewed-by: Peter Xu
Reviewed-by: Michael S. Tsirkin
---
v13 -> v14:
- remove loop
- add Peter's R-b
v12 -> v13:
- return on virtio_error()
will need to retrieve the IOMMUdevice
and its IOMMU memory region from the bus number and devfn,
once the bus number is garanteed to be frozen, use an array
of IOMMUPciBus, lazily populated.
Signed-off-by: Eric Auger
Reviewed-by: Peter Xu
Reviewed-by: Michael S. Tsirkin
---
v14 ->
This patchs adds the skeleton for the virtio-iommu device.
Signed-off-by: Eric Auger
Reviewed-by: Peter Xu
Reviewed-by: Michael S. Tsirkin
---
v13 -> v14:
- use device_class_set_props
- updated copyright's year
v12 -> v13
- removed IOMMU_PCI_BUS_MAX and IOMMU_PCI_DEVFN_MAX
This patch implements virtio_iommu_map/unmap.
Signed-off-by: Eric Auger
Reviewed-by: Peter Xu
Reviewed-by: Michael S. Tsirkin
---
v11 -> v12:
- check unmanaged managed flags on map
- removed 2 qemu_log_mask in unmap()
- fix leak
v10 -> v11:
- revisit the implementation of unmap accord
Add Migration support. We rely on recently added gtree and qlist
migration. We only migrate the domain gtree. The endpoint gtree
is re-constructed in a post-load operation.
Signed-off-by: Eric Auger
Acked-by: Peter Xu
Reviewed-by: Juan Quintela
Reviewed-by: Michael S. Tsirkin
---
v15 ->
kernel documentation:
Documentation/devicetree/bindings/virtio/iommu.txt
Signed-off-by: Eric Auger
Reviewed-by: Jean-Philippe Brucker
Reviewed-by: Michael S. Tsirkin
---
v15 -> v16:
- made the device not hotpluggable
v14 -> v15:
- checker whether the machine implements a hotplug handler
Add a new "virtio-iommu" section with the new files
related to this device.
Signed-off-by: Eric Auger
---
MAINTAINERS | 6 ++
1 file changed, 6 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index c7717df720..b7a7a18737 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1623,
pported by the kernel we must make sure we
are in DT mode. This limitation will be removed as soon
as the topology description feature gets supported.
Signed-off-by: Eric Auger
---
v15 -> v16:
- rename create_virtio_iommu into create_virtio_iommu_dt_bindings
v14 -> v15:
- only support the
As we plan to introduce a sysbus TPM_TIS, let's rename
TPM_TIS into TPM_TIS_ISA.
Signed-off-by: Eric Auger
---
hw/i386/acpi-build.c | 6 +++---
hw/tpm/tpm_tis.c | 4 ++--
include/sysemu/tpm.h | 6 +++---
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/hw/i386/acpi-buil
art.
- both ARM and x86 integration were tested.
- acknowledgement: migration has not been tested
Eric Auger (6):
tpm: rename TPM_TIS into TPM_TIS_ISA
tpm: Use TPMState as a common struct
tpm: Separate tpm_tis common functions from isa code
tpm: Separate TPM_TIS and TPM_TIS_ISA configs
tpm:
Introduce the tpm-tis-device which is a sysbus device
and is bound to be used on ARM.
Signed-off-by: Eric Auger
---
hw/tpm/Kconfig | 5 ++
hw/tpm/Makefile.objs| 1 +
hw/tpm/tpm_tis_sysbus.c | 159
include/sysemu/tpm.h| 1 +
4 files
ed to take TPMState
handle.
A bunch of structs also are renamed to be specialized
for the ISA device. Besides those transformations, no
functional change is expected.
Signed-off-by: Eric Auger
---
hw/tpm/tpm_tis.c | 146 +--
1 file changed, 91 inser
Move the device agnostic code into tpm_tis_common.c and
put the ISA device specific code into tpm_tis_isa.c
Signed-off-by: Eric Auger
---
hw/tpm/Makefile.objs | 2 +-
hw/tpm/tpm_tis.h | 91 +++
hw/tpm/{tpm_tis.c => tpm_tis_common.c} |
,id=chrtpm,path=swtpm-sock \
-tpmdev emulator,id=tpm0,chardev=chrtpm \
-device tpm-tis-device,tpmdev=tpm0 \
swtpm/libtpms command line example:
swtpm socket --tpm2 -t -d --tpmstate dir=/tmp/tpm \
--ctrl type=unixio,path=swtpm-sock
Signed-off-by: Eric Auger
---
hw/arm/Kconfig
Let's separate the compilation of tpm_tis_common.c from
the compilation of tpm_tis_isa.c
The common part will be also compiled along with the
tpm_tis_sysbus device.
Signed-off-by: Eric Auger
---
default-configs/i386-softmmu.mak | 2 +-
hw/i386/Kconfig | 2 +-
hw/tpm/Kc
This struct aims at storing information potentially used by
all tests such as the pmu version, the read-only part of the
PMCR, the number of implemented event counters, ...
Signed-off-by: Eric Auger
---
arm/pmu.c | 29 -
1 file changed, 24 insertions(+), 5 deletions
d yet.
Andre Przywara (1):
arm: gic: Provide per-IRQ helper functions
Andrew Jones (1):
arm64: Provide read/write_sysreg_s
Eric Auger (8):
pmu: Let pmu tests take a sub-test parameter
pmu: Add a pmu struct
pmu: Check Required Event Support
pmu: Basic event counter Tests
pmu: Test
overflow bit is set
after the execution of the asm loop.
- mem-access: counts MEM_ACCESS event on counters #0 and #1
with and without 32-bit overflow.
Signed-off-by: Eric Auger
---
arm/pmu.c | 254 ++
arm/unittests.cfg | 18
2 files
Add 2 tests exercising chained counters. The first one uses
CPU_CYCLES and the second one uses SW_INCR.
Signed-off-by: Eric Auger
---
arm/pmu.c | 125 ++
arm/unittests.cfg | 12 +
2 files changed, 137 insertions(+)
diff --git a/arm/pmu.c
From: Andrew Jones
Sometimes we need to test access to system registers which are
missing assembler mnemonics.
Signed-off-by: Andrew Jones
---
lib/arm64/asm/sysreg.h | 11 +++
1 file changed, 11 insertions(+)
diff --git a/lib/arm64/asm/sysreg.h b/lib/arm64/asm/sysreg.h
index a03830b..
As we intend to introduce more PMU tests, let's add
a sub-test parameter that will allow to categorize
them. Existing tests are in the cycle-counter category.
Signed-off-by: Eric Auger
---
arm/pmu.c | 22 ++
arm/unittests.cfg | 7 ---
2 files change
unconditionally required.
This test currently fails on TCG as neither INST_RETIRED
or INST_SPEC are supported.
Signed-off-by: Eric Auger
---
arm/pmu.c | 70 +++
arm/unittests.cfg | 6
2 files changed, 76 insertions(+)
diff --git a/arm/pmu.c
---
arm/pmu.c | 125 +-
arm/unittests.cfg | 6 +++
2 files changed, 130 insertions(+), 1 deletion(-)
diff --git a/arm/pmu.c b/arm/pmu.c
index e185809..47d46a2 100644
--- a/arm/pmu.c
+++ b/arm/pmu.c
@@ -116,6 +116,7 @@ static void test_basic_ev
From: Andre Przywara
A common theme when accessing per-IRQ parameters in the GIC distributor
is to set fields of a certain bit width in a range of MMIO registers.
Examples are the enabled status (one bit per IRQ), the level/edge
configuration (2 bits per IRQ) or the priority (8 bits per IRQ).
Ad
ipi_enable() code would be reusable for other interrupts
than IPI. Let's rename it setup_irq() and pass an interrupt
handler pointer. We also export it to use it in other tests
such as the PMU's one.
Signed-off-by: Eric Auger
---
arm/gic.c | 24 +++-
l
Test overflows for MEM_ACESS and SW_INCR events. Also tests
overflows with 64-bit events.
Signed-off-by: Eric Auger
---
arm/pmu.c | 133 +-
arm/unittests.cfg | 6 +++
2 files changed, 138 insertions(+), 1 deletion(-)
diff --git a/arm/pmu.c
PROPBASER, PENDBASE and GICR_CTRL will be used for LPI management.
Signed-off-by: Eric Auger
---
lib/arm/asm/gic-v3.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/lib/arm/asm/gic-v3.h b/lib/arm/asm/gic-v3.h
index 4a445a5..d02f4a4 100644
--- a/lib/arm/asm/gic-v3.h
+++ b/lib/arm/asm
Introduce additional SZ_256, SZ_8K, SZ_16K macros that will
be used by ITS tests.
Signed-off-by: Eric Auger
---
lib/libcflat.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/libcflat.h b/lib/libcflat.h
index ea19f61..7092af2 100644
--- a/lib/libcflat.h
+++ b/lib/libcflat.h
@@ -36,7
ipi_enable() code would be reusable for other interrupts
than IPI. Let's rename it setup_irq() and pass an interrupt
handler pointer. We also export it to use it in other tests
such as the PMU's one.
Signed-off-by: Eric Auger
---
arm/gic.c | 24 +++-
l
This helper function enables or disables the signaling of LPIs
at redistributor level.
Signed-off-by: Eric Auger
---
lib/arm/asm/gic-v3-its.h | 1 +
lib/arm/gic-v3-its.c | 18 ++
2 files changed, 19 insertions(+)
diff --git a/lib/arm/asm/gic-v3-its.h b/lib/arm/asm/gic-v3
Detect the presence of an ITS as part of the GICv3 init
routine, initialize its base address and read few registers
the IIDR, the TYPER to store its dimensioning parameters.
This is our first ITS test, belonging to a new "its" group.
Signed-off-by: Eric Auger
---
arm/Makef
I think it is beyond the
scope of that series)
For other ITS tests:
./run_tests.sh -g its
non migration tests can be launched invidually. For instance:
./arm-run arm/gic.flat -smp 8 -append 'its-trigger'
Andre Przywara (1):
arm: gic: Provide per-IRQ helper functions
Eric Auger (1
Add two new migration tests. One testing the migration of
a topology where collection were unmapped. The second test
checks the migration of the pending table.
Signed-off-by: Eric Auger
---
arm/gic.c | 148 ++
arm/unittests.cfg | 16 -
2
Add helper routines to parse and set up BASER registers.
Add a new test dedicated to BASER accesses.
Signed-off-by: Eric Auger
---
arm/gic.c| 20 ++
arm/unittests.cfg| 6 +++
lib/arm/asm/gic-v3-its.h | 17
lib/arm/gic-v3-its.c | 84
its_enable_defaults() is the top init function that allocates all
the requested tables (device, collection, lpi config and pending
tables), enable LPIs at distributor level and ITS level.
gicv3_enable_defaults must be called before.
Signed-off-by: Eric Auger
---
lib/arm/asm/gic-v3-its.h | 1
Allocate the LPI configuration and per re-distributor pending table.
Set redistributor's PROPBASER and PENDBASER. The LPIs are enabled
by default in the config table.
Also introduce a helper routine that allows to set the pending table
bit for a given LPI.
Signed-off-by: Eric Auger
---
li
Allocate the command queue and initialize related registers:
CBASER, CREADR, CWRITER.
The command queue is 64kB. This aims at not bothing with fullness.
Signed-off-by: Eric Auger
---
lib/arm/asm/gic-v3-its.h | 7 +++
lib/arm/gic-v3-its.c | 37 +
2
).
Signed-off-by: Eric Auger
---
---
lib/arm/asm/gic-v3-its.h | 20 +
lib/arm/gic-v3-its.c | 46
2 files changed, 66 insertions(+)
diff --git a/lib/arm/asm/gic-v3-its.h b/lib/arm/asm/gic-v3-its.h
index ab639c5..245ef61 100644
--- a/lib
Triggers LPIs through the INT command.
the test checks the LPI hits the right CPU and triggers
the right LPI intid, ie. the translation is correct.
Updates to the config table also are tested, along with inv
and invall commands.
Signed-off-by: Eric Auger
---
arm/gic.c| 174
Implement main ITS commands. The code is largely inherited from
the ITS driver.
Signed-off-by: Eric Auger
---
arm/Makefile.common | 2 +-
lib/arm/asm/gic-v3-its.h | 36 +++
lib/arm/gic-v3-its-cmd.c | 462 +++
3 files changed, 499 insertions(+), 1
From: Andre Przywara
A common theme when accessing per-IRQ parameters in the GIC distributor
is to set fields of a certain bit width in a range of MMIO registers.
Examples are the enabled status (one bit per IRQ), the level/edge
configuration (2 bits per IRQ) or the priority (8 bits per IRQ).
Ad
ar implement is minimalist as it just reads the
data register. It is just meant to read the single character
emitted at the end of the migration by the runner script.
It is not meant to read more data (FIFOs are not enabled).
Signed-off-by: Eric Auger
---
arm/Makefile.common | 2 +-
arm/run
This test maps LPIs (populates the device table, the collection table,
interrupt translation tables, configuration table), migrates and make
sure the translation is correct on the destination.
Signed-off-by: Eric Auger
---
arm/gic.c| 55
per functions
Andrew Jones (1):
arm64: Provide read/write_sysreg_s
Eric Auger (8):
arm: pmu: Let pmu tests take a sub-test parameter
arm: pmu: Add a pmu struct
arm: pmu: Check Required Event Support
arm: pmu: Basic event counter Tests
arm: pmu: Test chained counter
arm: pmu: test 32-
From: Andrew Jones
Sometimes we need to test access to system registers which are
missing assembler mnemonics.
Signed-off-by: Andrew Jones
Reviewed-by: Alexandru Elisei
---
lib/arm64/asm/sysreg.h | 11 +++
1 file changed, 11 insertions(+)
diff --git a/lib/arm64/asm/sysreg.h b/lib/arm
unconditionally required.
This test currently fails on TCG as neither INST_RETIRED
or INST_SPEC are supported.
Signed-off-by: Eric Auger
---
v1 ->v2:
- add a comment to explain the PMCEID0/1 splits
---
arm/pmu.c | 71 +++
arm/unittests.cfg |
Test overflows for MEM_ACCESS and SW_INCR events. Also tests
overflows with 64-bit events.
Signed-off-by: Eric Auger
---
arm/pmu.c | 134 ++
arm/unittests.cfg | 6 +++
2 files changed, 140 insertions(+)
diff --git a/arm/pmu.c b/arm/pmu.c
ipi_enable() code would be reusable for other interrupts
than IPI. Let's rename it setup_irq() and pass an interrupt
handler pointer. We also export it to use it in other tests
such as the PMU's one.
Signed-off-by: Eric Auger
---
arm/gic.c | 24 +++-
l
Add 2 tests exercising chained counters. The first one uses
CPU_CYCLES and the second one uses SW_INCR.
Signed-off-by: Eric Auger
---
arm/pmu.c | 128 ++
arm/unittests.cfg | 12 +
2 files changed, 140 insertions(+)
diff --git a/arm/pmu.c
As we intend to introduce more PMU tests, let's add
a sub-test parameter that will allow to categorize
them. Existing tests are in the cycle-counter category.
Signed-off-by: Eric Auger
---
arm/pmu.c | 24 +++-
arm/unittests.cfg | 7 ---
2 files change
Test configurations where we transit from 32b to 64b
counters and conversely. Also tests configuration where
chain counters are configured but only one counter is
enabled.
Signed-off-by: Eric Auger
---
arm/pmu.c | 135 ++
arm/unittests.cfg
This struct aims at storing information potentially used by
all tests such as the pmu version, the read-only part of the
PMCR, the number of implemented event counters, ...
Signed-off-by: Eric Auger
---
arm/pmu.c | 30 +-
1 file changed, 25 insertions(+), 5 deletions
From: Andre Przywara
A common theme when accessing per-IRQ parameters in the GIC distributor
is to set fields of a certain bit width in a range of MMIO registers.
Examples are the enabled status (one bit per IRQ), the level/edge
configuration (2 bits per IRQ) or the priority (8 bits per IRQ).
Ad
overflow bit is set
after the execution of the asm loop.
- mem-access: counts MEM_ACCESS event on counters #0 and #1
with and without 32-bit overflow.
Signed-off-by: Eric Auger
---
arm/pmu.c | 261 ++
arm/unittests.cfg | 18
2 files
Signed-off-by: Eric Auger
---
v5 - v6:
- by doing more advanced testing with virtio-iommu migration
I noticed this was broken. "prev" field was not set properly.
I improved the tests to manipulate both the next and prev
fields.
- Removed Peter and Juan's R-b
---
include/
Signed-off-by: Eric Auger
---
v5 - v6:
- by doing more advanced testing with virtio-iommu migration
I noticed this was broken. "prev" field was not set properly.
I improved the tests to manipulate both the next and prev
fields.
- Removed Peter and Juan's R-b
---
include/
reas it is already attached to
another address space, first detach it
- fix some error values
- page_sizes = TARGET_PAGE_MASK;
- I haven't changed the unmap() semantics yet, waiting for the
next virtio-iommu spec revision.
v1 -> v2:
- fix redefinition of viommu_as typedef
Eric Auger (
This patch adds the command payload decoding and
introduces the functions that will do the actual
command handling. Those functions are not yet implemented.
Signed-off-by: Eric Auger
---
v10 -> v11:
- use a macro for handle command functions
v9 -> v10:
- make virtio_iommu_handle_
This patch initializes the iommu memory regions so that
PCIe end point transactions get translated. The translation
function is not yet implemented though.
Signed-off-by: Eric Auger
---
v10 -> v11:
- use g_hash_table_new_full for allocating as_by_busptr
v9 -> v10:
- remove pc/virt m
This patch implements the endpoint attach/detach to/from
a domain.
Signed-off-by: Eric Auger
---
---
hw/virtio/virtio-iommu.c | 43
1 file changed, 35 insertions(+), 8 deletions(-)
diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c
index
This patch introduce domain and endpoint internal
datatypes. Both are stored in RB trees. The domain
owns a list of endpoints attached to it.
Helpers to get/put end points and domains are introduced.
get() helpers will become static in subsequent patches.
Signed-off-by: Eric Auger
---
v10
This patch implements virtio_iommu_map/unmap.
Signed-off-by: Eric Auger
---
v10 -> v11:
- revisit the implementation of unmap according to Peter's suggestion
- removed virt_addr and size from viommu_mapping struct
- use g_tree_lookup_extended()
- return VIRTIO_IOMMU_S_RANGE in case a
To avoid code duplication, let's introduce an helper that
fills one IORT ID mappings array index.
Signed-off-by: Eric Auger
---
v8: new
---
hw/arm/virt-acpi-build.c | 43
1 file changed, 26 insertions(+), 17 deletions(-)
diff --git a/hw/arm/virt
This patch implements the translate callback
Signed-off-by: Eric Auger
---
v10 -> v11:
- take into account the new value struct and use
g_tree_lookup_extended
- switched to error_report_once
v6 -> v7:
- implemented bypass-mode
v5 -> v6:
- replace error_report by qemu_log_mask
Adds the "virtio,pci-iommu" node in the host bridge node and
the RID mapping, excluding the IOMMU RID.
Signed-off-by: Eric Auger
---
v10 -> v11:
- remove msi_bypass
v8 -> v9:
- disable msi-bypass property
- addition of the subnode is handled is the hotplug handler
: Eric Auger
---
hw/core/qdev-properties.c| 90
include/exec/memory.h| 6 +++
include/hw/qdev-properties.h | 3 ++
include/qemu/typedefs.h | 1 +
4 files changed, 100 insertions(+)
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev
This patchs adds the skeleton for the virtio-iommu device.
Signed-off-by: Eric Auger
---
v9 -> v10:
- mutex initialized here
- initialize tail
- included hw/qdev-properties.h
- removed g_memdup
- removed s->config.domain_range.start = 0;
v9 -> v10:
- expose VIRTIO_IOMMU_F_MMIO fe
This adds the framework to test the virtio-iommu-pci device
and tests exercising the attach/detach, map/unmap API.
To run the tests:
make tests/qos-test
QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 tests/qos-test V=1
Signed-off-by: Eric Auger
---
tests/Makefile.include | 2
This patch implements the PROBE request. At the moment,
no reserved regions are returned as none are registered
per device. Only a NONE property is returned.
Signed-off-by: Eric Auger
---
v9 -> v10
- fully rewrite the code in preparation of
reserved_regions array property introduction
The event queue allows to report asynchronous errors.
The translate function now injects faults when relevant.
Signed-off-by: Eric Auger
---
v10 -> v11:
- change a virtio_error into an error_report_once
(no buffer available for output faults)
---
hw/virtio/trace-events | 1 +
hw/vir
an MSI region: we bypass the translation.
Signed-off-by: Eric Auger
---
v10 -> v11:
- directly use the reserved_regions properties array
v9 -> v10:
- in case of MSI region, we immediatly return
---
hw/virtio/virtio-iommu.c | 17 +
1 file changed, 17 insertions(+)
diff -
This patch adds virtio-iommu-pci, which is the pci proxy for
the virtio-iommu device.
Signed-off-by: Eric Auger
---
v10 -> v11:
- add the reserved_regions array property
v9 -> v10:
- include "hw/qdev-properties.h" header
v8 -> v9:
- add the msi-bypass property
- create
it re-allocates
all the nodes while reconstructing the trees/lists.
So in post_load we re-construct the relationship between endpoints
and domains.
Signed-off-by: Eric Auger
---
hw/virtio/virtio-iommu.c | 127 ---
1 file changed, 117 insertions(+), 10 del
The machine may need to pass reserved regions to the
virtio-iommu-pci device (such as the MSI window on x86).
So let's add an array of Interval properties.
Signed-off-by: Eric Auger
---
hw/virtio/virtio-iommu-pci.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/virtio/virtio-
-iommu
specification.
Signed-off-by: Eric Auger
---
v8 -> v9:
- iommu RID is not fixed anymore
v7 -> v8:
- exclude the iommu RID (0x8) in the root complex ID mapping
---
hw/arm/virt-acpi-build.c| 50 ++---
include/hw/acpi/acpi-defs.h | 21 +
.
We also declare the [0xfee0 - 0xfeef] MSI reserved region
so that it gets bypassed by the IOMMU.
Signed-off-by: Eric Auger
---
hw/i386/acpi-build.c | 72
hw/i386/pc.c | 15 -
include/hw/i386/pc.h | 2 ++
3 files changed, 88
e
next virtio-iommu spec revision.
v1 -> v2:
- fix redifinition of viommu_as typedef
Eric Auger (15):
update-linux-headers: Import virtio_iommu.h
linux-headers: update against 5.3-rc2
virtio-iommu: Add skeleton
virtio-iommu: Decode the command payload
virtio-iommu: Add the iommu regions
Update the script to update the virtio_iommu.h header.
Signed-off-by: Eric Auger
---
scripts/update-linux-headers.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
index f76d77363b..7805291ca0 100755
--- a/scripts/update
Sync headers against 5.3-rc2 (commit 2a11c76e5301)
Signed-off-by: Eric Auger
---
include/standard-headers/asm-x86/bootparam.h | 2 +
include/standard-headers/asm-x86/kvm_para.h | 3 +
include/standard-headers/linux/ethtool.h | 2 +
include/standard-headers/linux/pci_regs.h
This patch initializes the iommu memory regions so that
PCIe end point transactions get translated. The translation
function is not yet implemented though.
Signed-off-by: Eric Auger
---
v9 -> v10:
- remove pc/virt machine headers
- virtio_iommu_find_add_as: mr_index introduced in that pa
This patch implements the PROBE request. At the moment,
no reserved regions are returned as none are registered
per device. Only a NONE property is returned.
Signed-off-by: Eric Auger
---
v8 -> v9:
- fix filling of properties (changes induced by v0.7 -> v0.8 spec
evolution)
-
This patch implements the endpoint attach/detach to/from
a domain.
Signed-off-by: Eric Auger
---
---
hw/virtio/virtio-iommu.c | 40 ++--
1 file changed, 34 insertions(+), 6 deletions(-)
diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c
index
This patch introduce domain and endpoint internal
datatypes. Both are stored in RB trees. The domain
owns a list of endpoints attached to it.
Helpers to get/put end points and domains are introduced.
get() helpers will become static in subsequent patches.
Signed-off-by: Eric Auger
Reviewed-by
This patchs adds the skeleton for the virtio-iommu device.
Signed-off-by: Eric Auger
---
v9 -> v10:
- expose VIRTIO_IOMMU_F_MMIO feature
- s/domain_bits/domain_range struct
- change error codes
- enforce unmigratable
- Kconfig
v7 -> v8:
- expose VIRTIO_IOMMU_F_BYPASS and VIRTIO_F_VER
an MSI region: we bypass the translation.
Signed-off-by: Eric Auger
---
v9 -> v10:
- in case of MSI region, we immediatly return
---
hw/virtio/virtio-iommu.c | 16
1 file changed, 16 insertions(+)
diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c
index 8e54a17
-by: Eric Auger
---
v8 -> v9:
- pass IOAPIC_RANGE_END to virtio_iommu_register_resv_region
- take into account the change in the struct virtio_iommu_probe_resv_mem
definition
- We just introduce the field here. A property will be introduced later on
at pci proxy level.
---
hw/virtio/vir
This patch implements virtio_iommu_map/unmap.
Signed-off-by: Eric Auger
---
v5 -> v6:
- use new v0.6 fields
- replace error_report by qemu_log_mask
v3 -> v4:
- implement unmap semantics as specified in v0.4
---
hw/virtio/trace-events | 3 ++
hw/virtio/virtio-iommu.
This patch adds the command payload decoding and
introduces the functions that will do the actual
command handling. Those functions are not yet implemented.
Signed-off-by: Eric Auger
---
v9 -> v10:
- make virtio_iommu_handle_* more compact and
remove get_payload_size
v7 -> v8:
- hand
The event queue allows to report asynchronous errors.
The translate function now injects faults when relevant.
Signed-off-by: Eric Auger
---
hw/virtio/trace-events | 1 +
hw/virtio/virtio-iommu.c | 67 ++--
2 files changed, 65 insertions(+), 3 deletions
Adds the "virtio,pci-iommu" node in the host bridge node and
the RID mapping, excluding the IOMMU RID.
Signed-off-by: Eric Auger
---
v8 -> v9:
- disable msi-bypass property
- addition of the subnode is handled is the hotplug handler
and IOMMU RID is notimposed anymore
v6 ->
This patch implements the translate callback
Signed-off-by: Eric Auger
---
v6 -> v7:
- implemented bypass-mode
v5 -> v6:
- replace error_report by qemu_log_mask
v4 -> v5:
- check the device domain is not NULL
- s/printf/error_report
- set flags to IOMMU_NONE in case of all translati
This patch adds virtio-iommu-pci, which is the pci proxy for
the virtio-iommu device.
Signed-off-by: Eric Auger
---
v8 -> v9:
- add the msi-bypass property
- create virtio-iommu-pci.c
---
hw/virtio/Makefile.objs | 1 +
hw/virtio/virtio-iommu-pci.c |
This patchs adds the skeleton for the virtio-iommu device.
Signed-off-by: Eric Auger
Reviewed-by: Peter Xu
---
v13 -> v14:
- use device_class_set_props
- updated copyright's year
v12 -> v13
- removed IOMMU_PCI_BUS_MAX and IOMMU_PCI_DEVFN_MAX
v11 -> v12:
- remove s_by_
MMU MemoryRegion
- add mutex init
- fix as->mappings deletion using g_tree_ref/unref
- when a dev is attached whereas it is already attached to
another address space, first detach it
- fix some error values
- page_sizes = TARGET_PAGE_MASK;
- I haven't changed the unmap() semantics yet, wai
901 - 1000 of 4501 matches
Mail list logo