Re: [PATCH v6 13/24] KVM: arm64: vgic-its: Check the device id matches TYPER DEVBITS range

2017-05-04 Thread Marc Zyngier
On 04/05/17 18:19, Christoffer Dall wrote: > On Thu, May 04, 2017 at 01:44:33PM +0200, Eric Auger wrote: >> 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. >> >> Also check the collectio

Re: [PATCH v3 1/3] arm64: kvm: support kvmtool to detect RAS extension feature

2017-05-04 Thread gengdongjiu
Dear James, > > Hi Dongjiu Geng, > > On 30/04/17 06:37, Dongjiu Geng wrote: >> Handle kvmtool's detection for RAS extension, because sometimes >> the APP needs to know the CPU's capacity > >> diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c >> index d9e9697..1004039 100644 >> --- a/ar

Re: [PATCH v6 13/24] KVM: arm64: vgic-its: Check the device id matches TYPER DEVBITS range

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 01:44:33PM +0200, Eric Auger wrote: > 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. > > Also check the collection ID belongs to the 16 bit range as GITS_TYPER >

Re: [PATCH v6 12/24] KVM: arm64: vgic-its: Interpret MAPD ITT_addr field

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 01:44:32PM +0200, Eric Auger wrote: > 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 > Reviewed-by: Christoffer Dall > --- > v5 -> v6: > - fix its_cmd_get_ittaddr

Re: [PATCH v6 10/24] KVM: arm64: vgic-its: Implement vgic_mmio_uaccess_write_its_iidr

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 01:44:30PM +0200, Eric Auger wrote: > The GITS_IIDR revision field is used to encode the migration ABI > revision. So we need to restore it to check the table layout is > readable by the destination. > > By writing the IIDR, userspace thus forces the ABI revision to be > us

Re: [PATCH v6 09/24] KVM: arm64: vgic-its: Introduce migration ABI infrastructure

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 01:44:29PM +0200, Eric Auger wrote: > We plan to support different migration ABIs, ie. characterizing > the ITS table layout format in guest RAM. For example, a new ABI > will be needed if vLPIs get supported for nested use case. > > So let's introduce an array of supported

Re: [PATCH v6 08/24] KVM: arm64: vgic-its: Implement vgic_mmio_uaccess_write_its_creadr

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 01:44:28PM +0200, Eric Auger wrote: > GITS_CREADR needs to be restored so let's implement the associated > uaccess_write_its callback. The write only is allowed if the its > is disabled. > > Signed-off-by: Eric Auger > > --- > v5 -> v6: > - remove usage of update_64bit_re

Re: [PATCH v6 01/24] KVM: arm/arm64: Add ITS save/restore API documentation

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 04:50:23PM +0200, Auger Eric wrote: > Hi, > > On 04/05/2017 15:23, Christoffer Dall wrote: > > On Thu, May 04, 2017 at 01:44:21PM +0200, Eric Auger wrote: > >> Add description for how to access ITS registers and how to save/restore > >> ITS tables into/from memory. > >> > >

Re: [PATCH v3 3/3] arm/arm64: signal SIBGUS and inject SEA Error

2017-05-04 Thread gengdongjiu
Dear James, Thanks a lot for your review and comments. I am very sorry for the late response. 2017-05-04 23:42 GMT+08:00 gengdongjiu : > Hi Dongjiu Geng, > > On 30/04/17 06:37, Dongjiu Geng wrote: >> when happen SEA, deliver signal bus and handle the ioctl that >> inject SEA abort to guest, s

Re: [PATCH v6 07/24] KVM: arm64: vgic-its: Implement vgic_its_has_attr_regs and attr_regs_access

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 01:44:27PM +0200, Eric Auger wrote: > 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 and GITS_IIDR require to differ

Re:

2017-05-04 Thread gengdongjiu
Dear James, Thanks a lot for your review and comments. I am very sorry for the late response. 2017-05-04 23:42 GMT+08:00 gengdongjiu : > Hi Dongjiu Geng, > > On 30/04/17 06:37, Dongjiu Geng wrote: >> when happen SEA, deliver signal bus and handle the ioctl that >> inject SEA abort to guest, s

Re: [PATCH v3 1/3] arm64: kvm: support kvmtool to detect RAS extension feature

2017-05-04 Thread James Morse
Hi Dongjiu Geng, On 02/05/17 16:29, James Morse wrote: > I think we need a new API for injecting SError for SEI from Qemu/kvmtool, but > it > shouldn't be related to the RAS extensions. All v8.0 CPUs have HCR_EL2.VSE, so > we need to know KVM supports this API. Thinking about this some more, it

Re: [PATCH v6 10/24] KVM: arm64: vgic-its: Implement vgic_mmio_uaccess_write_its_iidr

2017-05-04 Thread Marc Zyngier
On 04/05/17 12:44, Eric Auger wrote: > The GITS_IIDR revision field is used to encode the migration ABI > revision. So we need to restore it to check the table layout is > readable by the destination. > > By writing the IIDR, userspace thus forces the ABI revision to be > used and this must be les

Re: [PATCH v6 08/24] KVM: arm64: vgic-its: Implement vgic_mmio_uaccess_write_its_creadr

2017-05-04 Thread Auger Eric
Hi Marc, On 04/05/2017 16:16, Marc Zyngier wrote: > On 04/05/17 12:44, Eric Auger wrote: >> GITS_CREADR needs to be restored so let's implement the associated >> uaccess_write_its callback. The write only is allowed if the its >> is disabled. >> >> Signed-off-by: Eric Auger >> >> --- >> v5 -> v6:

Re: [PATCH v6 07/24] KVM: arm64: vgic-its: Implement vgic_its_has_attr_regs and attr_regs_access

2017-05-04 Thread Auger Eric
Hi Marc, On 04/05/2017 16:04, Marc Zyngier wrote: > On 04/05/17 12:44, Eric Auger wrote: >> 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_CREA

Re: [PATCH v6 01/24] KVM: arm/arm64: Add ITS save/restore API documentation

2017-05-04 Thread Auger Eric
Hi, On 04/05/2017 15:23, Christoffer Dall wrote: > On Thu, May 04, 2017 at 01:44:21PM +0200, Eric Auger wrote: >> Add description for how to access ITS registers and how to save/restore >> ITS tables into/from memory. >> >> Signed-off-by: Eric Auger >> >> --- >> v5 -> v6: >> - add restoration ord

Re: [PATCH v6 09/24] KVM: arm64: vgic-its: Introduce migration ABI infrastructure

2017-05-04 Thread Marc Zyngier
On 04/05/17 12:44, Eric Auger wrote: > We plan to support different migration ABIs, ie. characterizing > the ITS table layout format in guest RAM. For example, a new ABI > will be needed if vLPIs get supported for nested use case. > > So let's introduce an array of supported ABIs (at the moment a

Re: [PATCH v6 08/24] KVM: arm64: vgic-its: Implement vgic_mmio_uaccess_write_its_creadr

2017-05-04 Thread Marc Zyngier
On 04/05/17 12:44, Eric Auger wrote: > GITS_CREADR needs to be restored so let's implement the associated > uaccess_write_its callback. The write only is allowed if the its > is disabled. > > Signed-off-by: Eric Auger > > --- > v5 -> v6: > - remove usage of update_64bit_reg and check alignment o

Re: [PATCH v6 07/24] KVM: arm64: vgic-its: Implement vgic_its_has_attr_regs and attr_regs_access

2017-05-04 Thread Marc Zyngier
On 04/05/17 12:44, Eric Auger wrote: > 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 and GITS_IIDR require to differentiate a guest write >

Re: [PATCH v3 02/10] KVM: Add documentation for VCPU requests

2017-05-04 Thread Andrew Jones
On Thu, May 04, 2017 at 02:51:39PM +0200, Paolo Bonzini wrote: > > > On 04/05/2017 14:06, Andrew Jones wrote: > >>> +VCPU threads may need to consider requests before and/or after calling > >>> +functions that may put them to sleep, e.g. kvm_vcpu_block(). Whether > >>> they > >>> +do or not, an

Re: [PATCH v6 02/24] KVM: arm/arm64: Add GICV3 pending table save API documentation

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 01:44:22PM +0200, Eric Auger wrote: > Add description for how to save GICV3 LPI pending bit into > guest RAM pending tables. > > Signed-off-by: Eric Auger > Acked-by: Christoffer Dall > --- > v5: creation > --- > Documentation/virtual/kvm/devices/arm-vgic-v3.txt | 6 +

Re: [PATCH v6 01/24] KVM: arm/arm64: Add ITS save/restore API documentation

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 01:44:21PM +0200, Eric Auger wrote: > Add description for how to access ITS registers and how to save/restore > ITS tables into/from memory. > > Signed-off-by: Eric Auger > > --- > v5 -> v6: > - add restoration ordering > - 256B -> 256 Byte aligned > - DTE Size is number

Re: [PATCH] KVM: arm/arm64: Move shared files to virt/kvm/arm

2017-05-04 Thread Paolo Bonzini
On 04/05/2017 14:33, Christoffer Dall wrote: > For some time now we have been having a lot of shared functionality > between the arm and arm64 KVM support in arch/arm, which not only > required a horrible inter-arch reference from the Makefile in > arch/arm64/kvm, but also created confusion for n

Re: [PATCH] KVM: arm/arm64: Move shared files to virt/kvm/arm

2017-05-04 Thread Andrew Jones
On Thu, May 04, 2017 at 02:33:11PM +0200, Christoffer Dall wrote: > For some time now we have been having a lot of shared functionality > between the arm and arm64 KVM support in arch/arm, which not only > required a horrible inter-arch reference from the Makefile in > arch/arm64/kvm, but also crea

Re: [PATCH v3 02/10] KVM: Add documentation for VCPU requests

2017-05-04 Thread Paolo Bonzini
On 04/05/2017 14:06, Andrew Jones wrote: >>> +VCPU threads may need to consider requests before and/or after calling >>> +functions that may put them to sleep, e.g. kvm_vcpu_block(). Whether they >>> +do or not, and, if they do, which requests need consideration, is >>> +architecture dependent.

Re: [PATCH] KVM: arm/arm64: Move shared files to virt/kvm/arm

2017-05-04 Thread Marc Zyngier
On 04/05/17 13:33, Christoffer Dall wrote: > For some time now we have been having a lot of shared functionality > between the arm and arm64 KVM support in arch/arm, which not only > required a horrible inter-arch reference from the Makefile in > arch/arm64/kvm, but also created confusion for newco

[PATCH] KVM: arm/arm64: Move shared files to virt/kvm/arm

2017-05-04 Thread Christoffer Dall
For some time now we have been having a lot of shared functionality between the arm and arm64 KVM support in arch/arm, which not only required a horrible inter-arch reference from the Makefile in arch/arm64/kvm, but also created confusion for newcomers to the code base, as was recently seen on the

Re: [PATCH v3 08/10] KVM: arm/arm64: change exit request to sleep request

2017-05-04 Thread Andrew Jones
On Thu, May 04, 2017 at 01:38:13PM +0200, Paolo Bonzini wrote: > > > On 03/05/2017 18:06, Andrew Jones wrote: > > -#define KVM_REQ_VCPU_EXIT \ > > +#define KVM_REQ_SLEEP \ > > KVM_ARCH_REQ_FLAGS(0, KVM_REQUEST_NO_WAKEUP | KVM_REQUEST_WAIT) > > > Note that this is still like this in kvm/queu

Re: [PATCH v3 02/10] KVM: Add documentation for VCPU requests

2017-05-04 Thread Andrew Jones
On Thu, May 04, 2017 at 01:27:35PM +0200, Paolo Bonzini wrote: > > > On 03/05/2017 18:06, Andrew Jones wrote: > > Signed-off-by: Andrew Jones > > --- > > Documentation/virtual/kvm/vcpu-requests.rst | 269 > > > > I for one welcome our new reStructuredText overlords

Re: [PATCH v3 09/10] KVM: arm/arm64: use vcpu requests for irq injection

2017-05-04 Thread Paolo Bonzini
On 03/05/2017 18:06, Andrew Jones wrote: > Don't use request-less VCPU kicks when injecting IRQs, as a VCPU > kick meant to trigger the interrupt injection could be sent while > the VCPU is outside guest mode, which means no IPI is sent, and > after it has called kvm_vgic_flush_hwstate(), meaning

[PATCH v6 15/24] KVM: arm64: vgic-its: Read config and pending bit in add_lpi()

2017-05-04 Thread Eric Auger
When creating the lpi we now ask the redistributor what is the state of the LPI (priority, enabled, pending). Signed-off-by: Eric Auger --- v6: creation --- virt/kvm/arm/vgic/vgic-its.c | 35 --- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/vi

[PATCH v6 18/24] KVM: arm64: vgic-its: Add infrastructure for table lookup

2017-05-04 Thread Eric Auger
Add a generic scan_its_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 id offset to the next entry and also indicate whether the entry is the last on

[PATCH v6 16/24] KVM: arm64: vgic-its: KVM_DEV_ARM_ITS_SAVE/RESTORE_TABLES

2017-05-04 Thread Eric Auger
Introduce new attributes in KVM_DEV_ARM_VGIC_GRP_CTRL group: - KVM_DEV_ARM_ITS_SAVE_TABLES: saves the ITS tables into guest RAM - KVM_DEV_ARM_ITS_RESTORE_TABLES: restores them into VGIC internal structures. We hold the vcpus lock during the save and restore to make sure no vcpu is running. At t

[PATCH v6 20/24] KVM: arm64: vgic-its: vgic_its_check_id returns the entry's GPA

2017-05-04 Thread Eric Auger
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 Acked-by: Christoffer Dall --- v5 -> v6: - add Christoffer's A-b v3 -> v4: - check eaddr is not NULL to allow passing NULL eaddr parameter

[PATCH v6 22/24] KVM: arm64: vgic-its: ITT save and restore

2017-05-04 Thread Eric Auger
Implement routines to save and restore device ITT and their interrupt table entries (ITE). Signed-off-by: Eric Auger --- v5 -> v6: - accomodate vgic_its_alloc_ite change of proto - check LPI ID on restore, check eventid offset - initializations on separate line - coming after device save/restore

[PATCH v6 24/24] KVM: arm64: vgic-v3: KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES

2017-05-04 Thread Eric Auger
This patch adds a new attribute to GICV3 KVM device KVM_DEV_ARM_VGIC_GRP_CTRL group. This allows userspace to flush all GICR pending tables into guest RAM. Signed-off-by: Eric Auger --- v5 -> v6: - fix stored - GICR_PEND/PROPBASER_ADDRESS were already introduced v4 -> v5: - move pending table s

[PATCH v6 23/24] KVM: arm64: vgic-its: Fix pending table sync

2017-05-04 Thread Eric Auger
In its_sync_lpi_pending_table() we currently ignore the target_vcpu of the LPIs. We sync the pending bit found in the vcpu pending table even if the LPI is not targeting it. Also in vgic_its_cmd_handle_invall() we are supposed to read the config table data for the LPIs associated to the collection

[PATCH v6 21/24] KVM: arm64: vgic-its: Device table save/restore

2017-05-04 Thread Eric Auger
This patch saves the device table entries into guest RAM. Both flat table and 2 stage tables are supported. DeviceId indexing is used. For each device listed in the device table, we also save the translation table using the vgic_its_save/restore_itt routines. Those functions will be implemented in

[PATCH v6 19/24] KVM: arm64: vgic-its: Collection table save/restore

2017-05-04 Thread Eric Auger
The save 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 contai

[PATCH v6 17/24] KVM: arm64: vgic-its: vgic_its_alloc_ite/device

2017-05-04 Thread Eric Auger
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 --- v5 -> v6: - remove Marc's A-b - both functions now return the newly allocated struct v4 -> v5: - add Marc's A-b v3 -> v4: - fix allocation - add comment abou

[PATCH v6 10/24] KVM: arm64: vgic-its: Implement vgic_mmio_uaccess_write_its_iidr

2017-05-04 Thread Eric Auger
The GITS_IIDR revision field is used to encode the migration ABI revision. So we need to restore it to check the table layout is readable by the destination. By writing the IIDR, userspace thus forces the ABI revision to be used and this must be less than or equal to the max revision KVM supports.

[PATCH v6 13/24] KVM: arm64: vgic-its: Check the device id matches TYPER DEVBITS range

2017-05-04 Thread Eric Auger
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. Also check the collection ID belongs to the 16 bit range as GITS_TYPER CIL field equals to 0. Signed-off-by: Eric Auger --- v4 -> v5: - use

[PATCH v6 08/24] KVM: arm64: vgic-its: Implement vgic_mmio_uaccess_write_its_creadr

2017-05-04 Thread Eric Auger
GITS_CREADR needs to be restored so let's implement the associated uaccess_write_its callback. The write only is allowed if the its is disabled. Signed-off-by: Eric Auger --- v5 -> v6: - remove usage of update_64bit_reg and check alignment of cmd offset v4 -> v5: - keep Stalled bit - vgic_mmio_

[PATCH v6 12/24] KVM: arm64: vgic-its: Interpret MAPD ITT_addr field

2017-05-04 Thread Eric Auger
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 --- v5 -> v6: - fix its_cmd_get_ittaddr and pass 44 to its_cmd_mask_field v4 -> v5: - its_cmd_get_ittaddr macro now returns the actual ITT GPA v3

[PATCH v6 11/24] KVM: arm64: vgic-its: Interpret MAPD Size field and check related errors

2017-05-04 Thread Eric Auger
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 number of eventid bits in the its_device and do the check on MAPTI. Also make sure the ITT size fiel

[PATCH v6 14/24] KVM: arm64: vgic-v3: vgic_v3_lpi_sync_pending_status

2017-05-04 Thread Eric Auger
this new helper synchronizes the irq pending_latch with the LPI pending bit status found in rdist pending table. As the status is consumed, we reset the bit in pending table. As we need the PENDBASER_ADDRESS() in vgic-v3, let's move its definition in the irqchip header. We restore the full length

[PATCH v6 07/24] KVM: arm64: vgic-its: Implement vgic_its_has_attr_regs and attr_regs_access

2017-05-04 Thread Eric Auger
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 and GITS_IIDR require to differentiate a guest write action from a user access. As such let's introdu

[PATCH v6 04/24] arm/arm64: vgic: turn vgic_find_mmio_region into public

2017-05-04 Thread Eric Auger
We plan to use vgic_find_mmio_region in vgic-its.c so let's turn it into a public function. Also let's take the opportunity to rename the region parameter into regions to emphasize this latter is an array of regions. Signed-off-by: Eric Auger Reviewed-by: Andre Przywara Acked-by: Marc Zyngier

[PATCH v6 09/24] KVM: arm64: vgic-its: Introduce migration ABI infrastructure

2017-05-04 Thread Eric Auger
We plan to support different migration ABIs, ie. characterizing the ITS table layout format in guest RAM. For example, a new ABI will be needed if vLPIs get supported for nested use case. So let's introduce an array of supported ABIs (at the moment a single ABI is supported though). The following

[PATCH v6 05/24] KVM: arm64: vgic-its: KVM_DEV_ARM_VGIC_GRP_ITS_REGS group

2017-05-04 Thread Eric Auger
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 Reviewed-by: Andre Przywara Reviewed-by: Christoffer Dall Acked-by: Marc Zy

[PATCH v6 06/24] KVM: arm/arm64: vgic: expose (un)lock_all_vcpus

2017-05-04 Thread Eric Auger
We need to use those helpers in vgic-its.c so let's expose them in the private vgic header. Signed-off-by: Eric Auger Acked-by: Marc Zyngier Acked-by: Christoffer Dall --- v5 -> v6: - Add Christoffer's A-b v4 -> v5: - Add Marc's A-b --- virt/kvm/arm/vgic/vgic-kvm-device.c | 4 ++-- virt/kvm/

[PATCH v6 01/24] KVM: arm/arm64: Add ITS save/restore API documentation

2017-05-04 Thread Eric Auger
Add description for how to access ITS registers and how to save/restore ITS tables into/from memory. Signed-off-by: Eric Auger --- v5 -> v6: - add restoration ordering - 256B -> 256 Byte aligned - DTE Size is number of bits for the EVENTID - s/GITS_READR/GITS_CREADR v4 -> v5: - take into accoun

[PATCH v6 03/24] KVM: arm/arm64: vgic-its: rename itte into ite

2017-05-04 Thread Eric Auger
The actual abbreviation for the interrupt translation table entry is ITE. Let's rename all itte instances by ite. Signed-off-by: Eric Auger Acked-by: Marc Zyngier --- v5: Add Marc's A-b --- virt/kvm/arm/vgic/vgic-its.c | 148 +-- 1 file changed, 74 inse

[PATCH v6 02/24] KVM: arm/arm64: Add GICV3 pending table save API documentation

2017-05-04 Thread Eric Auger
Add description for how to save GICV3 LPI pending bit into guest RAM pending tables. Signed-off-by: Eric Auger --- v5: creation --- Documentation/virtual/kvm/devices/arm-vgic-v3.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/virtual/kvm/devices/arm-vgic-v3.txt b/Do

[PATCH v6 00/24] vITS save/restore

2017-05-04 Thread Eric Auger
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 en

Re: [PATCH v3 08/10] KVM: arm/arm64: change exit request to sleep request

2017-05-04 Thread Paolo Bonzini
On 03/05/2017 18:06, Andrew Jones wrote: > -#define KVM_REQ_VCPU_EXIT \ > +#define KVM_REQ_SLEEP \ > KVM_ARCH_REQ_FLAGS(0, KVM_REQUEST_NO_WAKEUP | KVM_REQUEST_WAIT) Note that this is still like this in kvm/queue: #define KVM_REQ_VCPU_EXIT (8 | KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKE

Re: [PATCH v3 02/10] KVM: Add documentation for VCPU requests

2017-05-04 Thread Paolo Bonzini
On 03/05/2017 18:06, Andrew Jones wrote: > Signed-off-by: Andrew Jones > --- > Documentation/virtual/kvm/vcpu-requests.rst | 269 > I for one welcome our new reStructuredText overlords. :) Thanks for the excellent writeup. > 1 file changed, 269 insertions(+) >

Re: [PATCH 5/5] KVM: arm/arm64: Allow setting the timer IRQ numbers from userspace

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 11:54:06AM +0100, Marc Zyngier wrote: > On 04/05/17 10:59, Christoffer Dall wrote: > > On Thu, May 04, 2017 at 10:34:32AM +0100, Marc Zyngier wrote: > >> On 03/05/17 19:33, Christoffer Dall wrote: > >>> First we define an ABI using the vcpu devices that lets userspace set >

Re: [PATCH 5/5] KVM: arm/arm64: Allow setting the timer IRQ numbers from userspace

2017-05-04 Thread Marc Zyngier
On 04/05/17 10:59, Christoffer Dall wrote: > On Thu, May 04, 2017 at 10:34:32AM +0100, Marc Zyngier wrote: >> On 03/05/17 19:33, Christoffer Dall wrote: >>> First we define an ABI using the vcpu devices that lets userspace set >>> the interrupt numbers for the various timers on both the 32-bit and

Re: [PATCH 1/5] KVM: arm64: Allow creating the PMU without the in-kernel GIC

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 11:16:57AM +0100, Marc Zyngier wrote: > On 04/05/17 10:44, Christoffer Dall wrote: > > On Thu, May 04, 2017 at 10:05:43AM +0100, Marc Zyngier wrote: > >> On 04/05/17 09:38, Christoffer Dall wrote: > >>> On Thu, May 04, 2017 at 09:28:50AM +0100, Marc Zyngier wrote: > On

Re: [PATCH 1/5] KVM: arm64: Allow creating the PMU without the in-kernel GIC

2017-05-04 Thread Marc Zyngier
On 04/05/17 10:44, Christoffer Dall wrote: > On Thu, May 04, 2017 at 10:05:43AM +0100, Marc Zyngier wrote: >> On 04/05/17 09:38, Christoffer Dall wrote: >>> On Thu, May 04, 2017 at 09:28:50AM +0100, Marc Zyngier wrote: On 04/05/17 09:13, Christoffer Dall wrote: > On Thu, May 04, 2017 at 09

Re: [PATCH 5/5] KVM: arm/arm64: Allow setting the timer IRQ numbers from userspace

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 10:34:32AM +0100, Marc Zyngier wrote: > On 03/05/17 19:33, Christoffer Dall wrote: > > First we define an ABI using the vcpu devices that lets userspace set > > the interrupt numbers for the various timers on both the 32-bit and > > 64-bit KVM/ARM implementations. > > > > S

Re: [PATCH 1/5] KVM: arm64: Allow creating the PMU without the in-kernel GIC

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 10:05:43AM +0100, Marc Zyngier wrote: > On 04/05/17 09:38, Christoffer Dall wrote: > > On Thu, May 04, 2017 at 09:28:50AM +0100, Marc Zyngier wrote: > >> On 04/05/17 09:13, Christoffer Dall wrote: > >>> On Thu, May 04, 2017 at 09:09:47AM +0100, Marc Zyngier wrote: > On

Re: [PATCH 5/5] KVM: arm/arm64: Allow setting the timer IRQ numbers from userspace

2017-05-04 Thread Marc Zyngier
On 03/05/17 19:33, Christoffer Dall wrote: > First we define an ABI using the vcpu devices that lets userspace set > the interrupt numbers for the various timers on both the 32-bit and > 64-bit KVM/ARM implementations. > > Second, we add the definitions for the groups and attributes introduced > b

Re: [PATCH 1/5] KVM: arm64: Allow creating the PMU without the in-kernel GIC

2017-05-04 Thread Marc Zyngier
On 04/05/17 09:38, Christoffer Dall wrote: > On Thu, May 04, 2017 at 09:28:50AM +0100, Marc Zyngier wrote: >> On 04/05/17 09:13, Christoffer Dall wrote: >>> On Thu, May 04, 2017 at 09:09:47AM +0100, Marc Zyngier wrote: On 03/05/17 19:32, Christoffer Dall wrote: > Since we got support for d

Re: [PATCH v5 19/22] KVM: arm64: vgic-its: ITT save and restore

2017-05-04 Thread Auger Eric
Hi, On 04/05/2017 10:23, Christoffer Dall wrote: > On Thu, May 04, 2017 at 09:40:35AM +0200, Auger Eric wrote: >> Hi Christoffer, >> >> On 04/05/2017 09:31, Christoffer Dall wrote: >>> On Wed, May 03, 2017 at 11:55:34PM +0200, Auger Eric wrote: Hi Christoffer, On 03/05/2017 18:37, Ch

Re: [PATCH 1/5] KVM: arm64: Allow creating the PMU without the in-kernel GIC

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 09:28:50AM +0100, Marc Zyngier wrote: > On 04/05/17 09:13, Christoffer Dall wrote: > > On Thu, May 04, 2017 at 09:09:47AM +0100, Marc Zyngier wrote: > >> On 03/05/17 19:32, Christoffer Dall wrote: > >>> Since we got support for devices in userspace which allows reporting the

Re: [PATCH 1/5] KVM: arm64: Allow creating the PMU without the in-kernel GIC

2017-05-04 Thread Marc Zyngier
On 04/05/17 09:13, Christoffer Dall wrote: > On Thu, May 04, 2017 at 09:09:47AM +0100, Marc Zyngier wrote: >> On 03/05/17 19:32, Christoffer Dall wrote: >>> Since we got support for devices in userspace which allows reporting the >>> PMU overflow output status to userspace, we should actually allow

Re: [PATCH v5 19/22] KVM: arm64: vgic-its: ITT save and restore

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 09:40:35AM +0200, Auger Eric wrote: > Hi Christoffer, > > On 04/05/2017 09:31, Christoffer Dall wrote: > > On Wed, May 03, 2017 at 11:55:34PM +0200, Auger Eric wrote: > >> Hi Christoffer, > >> > >> On 03/05/2017 18:37, Christoffer Dall wrote: > >>> On Wed, May 03, 2017 at 0

Re: [PATCH v3 1/3] arm64: kvm: support kvmtool to detect RAS extension feature

2017-05-04 Thread James Morse
Hi Paolo, On 02/05/17 16:48, Paolo Bonzini wrote: > On 02/05/2017 09:56, Christoffer Dall wrote: >> The subject and description of these patches are also misleading. >> Hopefully this is in no way tied to kvmtool, but to userspace >> generically, for example also to be used by QEMU? > > Yes, QEMU

Re: [PATCH 1/5] KVM: arm64: Allow creating the PMU without the in-kernel GIC

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 09:09:47AM +0100, Marc Zyngier wrote: > On 03/05/17 19:32, Christoffer Dall wrote: > > Since we got support for devices in userspace which allows reporting the > > PMU overflow output status to userspace, we should actually allow > > creating the PMU on systems without an in

Re: [PATCH 3/5] KVM: arm/arm64: Move irq_is_ppi() to header file

2017-05-04 Thread Marc Zyngier
On 03/05/17 19:32, Christoffer Dall wrote: > We are about to need this define in the arch timer code as well so move > it to a common location. > > Signed-off-by: Christoffer Dall > --- > include/kvm/arm_vgic.h | 2 ++ > virt/kvm/arm/pmu.c | 2 -- > 2 files changed, 2 insertions(+), 2 deleti

Re: [PATCH 1/5] KVM: arm64: Allow creating the PMU without the in-kernel GIC

2017-05-04 Thread Marc Zyngier
On 03/05/17 19:32, Christoffer Dall wrote: > Since we got support for devices in userspace which allows reporting the > PMU overflow output status to userspace, we should actually allow > creating the PMU on systems without an in-kernel irqchip, which in turn > requires us to slightly clarify error

Re: [PATCH v5 01/22] KVM: arm/arm64: Add ITS save/restore API documentation

2017-05-04 Thread Auger Eric
Hi Marc, On 04/05/2017 09:40, Marc Zyngier wrote: > On 04/05/17 08:00, Auger Eric wrote: >> Hi Christoffer, >> >> On 27/04/2017 16:45, Christoffer Dall wrote: >>> Hi Eric, >>> >>> On Thu, Apr 27, 2017 at 02:51:00PM +0200, Auger Eric wrote: On 27/04/2017 13:02, Christoffer Dall wrote: > On

Re: [PATCH v5 01/22] KVM: arm/arm64: Add ITS save/restore API documentation

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 09:00:29AM +0200, Auger Eric wrote: > Hi Christoffer, > > On 27/04/2017 16:45, Christoffer Dall wrote: > > Hi Eric, > > > > On Thu, Apr 27, 2017 at 02:51:00PM +0200, Auger Eric wrote: > >> On 27/04/2017 13:02, Christoffer Dall wrote: > >>> On Thu, Apr 27, 2017 at 11:33:39A

Re: [PATCH v5 01/22] KVM: arm/arm64: Add ITS save/restore API documentation

2017-05-04 Thread Marc Zyngier
On 04/05/17 08:00, Auger Eric wrote: > Hi Christoffer, > > On 27/04/2017 16:45, Christoffer Dall wrote: >> Hi Eric, >> >> On Thu, Apr 27, 2017 at 02:51:00PM +0200, Auger Eric wrote: >>> On 27/04/2017 13:02, Christoffer Dall wrote: On Thu, Apr 27, 2017 at 11:33:39AM +0200, Auger Eric wrote: >>

Re: [PATCH v5 19/22] KVM: arm64: vgic-its: ITT save and restore

2017-05-04 Thread Auger Eric
Hi Christoffer, On 04/05/2017 09:31, Christoffer Dall wrote: > On Wed, May 03, 2017 at 11:55:34PM +0200, Auger Eric wrote: >> Hi Christoffer, >> >> On 03/05/2017 18:37, Christoffer Dall wrote: >>> On Wed, May 03, 2017 at 06:08:58PM +0200, Auger Eric wrote: Hi Christoffer, On 30/04/2

Re: [PATCH v5 19/22] KVM: arm64: vgic-its: ITT save and restore

2017-05-04 Thread Christoffer Dall
On Wed, May 03, 2017 at 11:55:34PM +0200, Auger Eric wrote: > Hi Christoffer, > > On 03/05/2017 18:37, Christoffer Dall wrote: > > On Wed, May 03, 2017 at 06:08:58PM +0200, Auger Eric wrote: > >> Hi Christoffer, > >> > >> On 30/04/2017 22:14, Christoffer Dall wrote: > >>> On Fri, Apr 14, 2017 at 1

Re: [PATCH v5 21/22] KVM: arm64: vgic-its: Fix pending table sync

2017-05-04 Thread Christoffer Dall
On Thu, May 04, 2017 at 12:20:13AM +0200, Auger Eric wrote: > Hi, > > On 30/04/2017 23:10, Christoffer Dall wrote: > > On Fri, Apr 14, 2017 at 12:15:33PM +0200, Eric Auger wrote: > >> In its_sync_lpi_pending_table() we currently ignore the > >> target_vcpu of the LPIs. We sync the pending bit foun

Re: [PATCH v5 01/22] KVM: arm/arm64: Add ITS save/restore API documentation

2017-05-04 Thread Auger Eric
Hi Christoffer, On 27/04/2017 16:45, Christoffer Dall wrote: > Hi Eric, > > On Thu, Apr 27, 2017 at 02:51:00PM +0200, Auger Eric wrote: >> On 27/04/2017 13:02, Christoffer Dall wrote: >>> On Thu, Apr 27, 2017 at 11:33:39AM +0200, Auger Eric wrote: On 27/04/2017 10:57, Christoffer Dall wrote: