The ITS KVM device exposes a new KVM_DEV_ARM_VGIC_GRP_ITS_REGS
group which allows the userspace to save/restore ITS registers.
At this stage the get/set/has operations are not yet implemented.
Signed-off-by: Eric Auger
---
arch/arm/include/uapi/asm/kvm.h | 1 +
This patch implements vgic_its_has_attr_regs and vgic_its_attr_regs_access
upon the MMIO framework. VGIC ITS KVM device KVM_DEV_ARM_VGIC_GRP_ITS_REGS
group becomes functional.
At least GITS_CREADR requires to differentiate a guest write action from a
user access. As such let's introduce a new
Add description for how to access vITS registers and how to flush/restore
vITS tables into/from memory
Signed-off-by: Eric Auger
---
v1 -> v2:
- DTE and ITE now are 8 bytes
- DTE and ITE now indexed by deviceid/eventid
- use ITE name instead of ITTE
- mentions ITT_addr
The actual abbreviation for the interrupt translation table entry
is ITE. Let's rename all itte instances by ite.
Signed-off-by: Eric Auger
---
virt/kvm/arm/vgic/vgic-its.c | 148 +--
1 file changed, 74 insertions(+), 74
GITS_CREADR needs to be restored so let's implement the associated
uaccess_write_its callback.
Signed-off-by: Eric Auger
---
---
virt/kvm/arm/vgic/vgic-its.c | 22 +-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git
This series specifies and implements an API aimed at saving and restoring
the state of the in-kernel emulated ITS device.
The ITS is programmed through registers and tables. Those latter
are allocated by the guest. Their base address is programmed in
registers or table entries before the ITS is
Up to now the MAPD ITT_addr had been ignored. We will need it
for save/restore. Let's record it in the its_device struct.
Signed-off-by: Eric Auger
---
virt/kvm/arm/vgic/vgic-its.c | 4
1 file changed, 4 insertions(+)
diff --git a/virt/kvm/arm/vgic/vgic-its.c
An ITE size of 8 Bytes is reported to the guest. Combining this
information with the number of event IDs the guest wants to support,
this latter will be able to allocate each device's ITT with the
right size.
Signed-off-by: Eric Auger
---
v1 -> v2:
- correct
Natively sort the device and ITE lists in ascending
deviceId/eventid order. This paves the way to optimized
DTE and ITE scan in guest RAM table where entries are chained
together using a next ID offset.
Signed-off-by: Eric Auger
---
virt/kvm/arm/vgic/vgic-its.c | 36
The flush path copies the collection entries into guest RAM
at the GPA specified in the BASER register. This obviously
requires the BASER to be set. The last written element
is a dummy collection table entry.
We do not index by collection ID as the collection entry
can fit into 8 bytes while
Add two new helpers to allocate an its ite and an its device.
This will avoid duplication on restore path.
Signed-off-by: Eric Auger
---
v1 -> v2:
- report itt_size fix and remove ITE_SIZE
- s/itte/ite/g
---
virt/kvm/arm/vgic/vgic-its.c | 70
Add a generic lookup_table() helper whose role consists in
scanning a contiguous table located in guest RAM and applying
a callback on each entry. Entries can be handled as linked lists
since the callback may return an offset to the next entry and
also tell that an entry is the last one.
Helper
Introduce routines to flush and restore device ITT and their
interrupt table entries (ITE).
The routines will be called on device table flush and
restore.
Signed-off-by: Eric Auger
---
v2: creation
---
virt/kvm/arm/vgic/vgic-its.c | 99
Introduce a new group aiming at saving/restoring the ITS
tables to/from the guest memory.
We hold the its lock during the save and restore to prevent
any command from being executed. This also garantees the LPI
list is not going to change and no MSI injection can happen
during the operation.
At
Up to now the MAPD's ITT size field has been ignored. It encodes
the number of eventid bit minus 1. It should be used to check
the eventid when a MAPTI command is issued on a device. Let's
store the nb_eventid_bits in the its_device and do the check
on MAPTI. Also make sure the ITT size field does
As vgic_its_check_id() computes the device/collection entry's
GPA, let's return it so that new callers can retrieve it easily.
Signed-off-by: Eric Auger
---
v2: new
---
virt/kvm/arm/vgic/vgic-its.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff
On MAPD we currently check the device id can be stored in the device table.
Let's first check it can be encoded within the range defined by TYPER
DEVBITS.
Signed-off-by: Eric Auger
---
virt/kvm/arm/vgic/vgic-its.c | 8 ++--
1 file changed, 6 insertions(+), 2
17 matches
Mail list logo