Re: [PATCH v3 7/8] arm64: exception: handle asynchronous SError interrupt

2017-04-27 Thread Xiongfeng Wang
Hi James, Thanks for your explanation and suggests. On 2017/4/25 1:14, James Morse wrote: > Hi Wang Xiongfeng, > > On 21/04/17 12:33, Xiongfeng Wang wrote: >> On 2017/4/20 16:52, James Morse wrote: >>> On 19/04/17 03:37, Xiongfeng Wang wrote: On 2017/4/18 18:51, James Morse wrote: >

Re: [PATCH v2] arm64: Add ASM modifier for xN register operands

2017-04-27 Thread Matthias Kaehlcke
Hi Mark, Thanks for your comments. El Thu, Apr 27, 2017 at 12:02:56PM +0100 Mark Rutland ha dit: > Hi, > > On Wed, Apr 26, 2017 at 02:46:16PM -0700, Matthias Kaehlcke wrote: > > Many inline assembly statements don't include the 'x' modifier when > > using xN registers as operands. This is

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

2017-04-27 Thread Auger Eric
On 27/04/2017 19:54, Christoffer Dall wrote: > On Thu, Apr 27, 2017 at 07:27:22PM +0200, Auger Eric wrote: >> Hi Christoffer, >> >> On 27/04/2017 18:38, Christoffer Dall wrote: >>> On Thu, Apr 27, 2017 at 05:29:35PM +0200, Auger Eric wrote: On 27/04/2017 16:45, Christoffer Dall

Re: [PATCH v5 16/22] KVM: arm64: vgic-its: Add infrastructure for table lookup

2017-04-27 Thread Auger Eric
Hi, On 27/04/2017 20:06, Christoffer Dall wrote: > On Fri, Apr 14, 2017 at 12:15:28PM +0200, Eric Auger wrote: >> 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

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

2017-04-27 Thread Auger Eric
Hi, On 27/04/2017 20:09, Christoffer Dall wrote: > On Thu, Apr 27, 2017 at 07:44:25PM +0200, Auger Eric wrote: >> Hi, >> >> On 27/04/2017 18:43, Christoffer Dall wrote: >>> On Fri, Apr 14, 2017 at 12:15:24PM +0200, Eric Auger wrote: Up to now the MAPD ITT_addr had been ignored. We will need

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

2017-04-27 Thread Christoffer Dall
On Thu, Apr 27, 2017 at 07:44:25PM +0200, Auger Eric wrote: > Hi, > > On 27/04/2017 18:43, Christoffer Dall wrote: > > On Fri, Apr 14, 2017 at 12:15:24PM +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

[PATCH] arm64: KVM: Fix decoding of Rt/Rt2 when trapping AArch32 CP accesses

2017-04-27 Thread Marc Zyngier
Our 32bit CP14/15 handling inherited some of the ARMv7 code for handling the trapped system registers, completely missing the fact that the fields for Rt and Rt2 are now 5 bit wide, and not 4... Let's fix it, and provide an accessor for the most common Rt case. Cc: sta...@vger.kernel.org

Re: [PATCH v5 16/22] KVM: arm64: vgic-its: Add infrastructure for table lookup

2017-04-27 Thread Christoffer Dall
On Fri, Apr 14, 2017 at 12:15:28PM +0200, Eric Auger wrote: > 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

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

2017-04-27 Thread Christoffer Dall
On Thu, Apr 27, 2017 at 07:27:22PM +0200, Auger Eric wrote: > Hi Christoffer, > > On 27/04/2017 18:38, Christoffer Dall wrote: > > On Thu, Apr 27, 2017 at 05:29:35PM +0200, Auger Eric wrote: > >> > >> > >> On 27/04/2017 16:45, Christoffer Dall wrote: > >>> Hi Eric, > >>> > >>> On Thu, Apr 27,

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

2017-04-27 Thread Auger Eric
Hi, On 27/04/2017 18:43, Christoffer Dall wrote: > On Fri, Apr 14, 2017 at 12:15:24PM +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 >>

Re: [PATCH v5 15/22] KVM: arm64: vgic-its: vgic_its_alloc_ite/device

2017-04-27 Thread Christoffer Dall
On Fri, Apr 14, 2017 at 12:15:27PM +0200, Eric Auger wrote: > 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 > Acked-by: Marc Zyngier > > --- > > v4 -> v5:

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

2017-04-27 Thread Auger Eric
Hi Christoffer, On 27/04/2017 18:38, Christoffer Dall wrote: > On Thu, Apr 27, 2017 at 05:29:35PM +0200, Auger Eric wrote: >> >> >> 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

Re: [PATCH v5 11/22] KVM: arm64: vgic-its: Interpret MAPD Size field and check related errors

2017-04-27 Thread Christoffer Dall
On Thu, Apr 27, 2017 at 07:15:27PM +0200, Auger Eric wrote: > Hi, > On 27/04/2017 18:25, Christoffer Dall wrote: > > On Fri, Apr 14, 2017 at 12:15:23PM +0200, Eric Auger wrote: > >> Up to now the MAPD's ITT size field has been ignored. It encodes > >> the number of eventid bit minus 1. It should

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

2017-04-27 Thread Christoffer Dall
On Thu, Apr 27, 2017 at 07:14:29PM +0200, Auger Eric wrote: > Hi Marc, Christoffer, > > On 27/04/2017 18:23, Marc Zyngier wrote: > > On 27/04/17 16:29, Auger Eric wrote: > >> > >> > >> On 27/04/2017 16:45, Christoffer Dall wrote: > >>> Hi Eric, > >>> > >>> On Thu, Apr 27, 2017 at 02:51:00PM

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

2017-04-27 Thread Auger Eric
Hi, On 27/04/2017 18:48, Christoffer Dall wrote: > On Fri, Apr 14, 2017 at 12:15:25PM +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. >> >> Signed-off-by:

Re: [PATCH v5 14/22] KVM: arm64: vgic-its: KVM_DEV_ARM_ITS_SAVE/RESTORE_TABLES

2017-04-27 Thread Christoffer Dall
On Fri, Apr 14, 2017 at 12:15:26PM +0200, Eric Auger wrote: > 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

Re: [PATCH v5 11/22] KVM: arm64: vgic-its: Interpret MAPD Size field and check related errors

2017-04-27 Thread Auger Eric
Hi, On 27/04/2017 18:25, Christoffer Dall wrote: > On Fri, Apr 14, 2017 at 12:15:23PM +0200, Eric Auger wrote: >> 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

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

2017-04-27 Thread Auger Eric
Hi Marc, Christoffer, On 27/04/2017 18:23, Marc Zyngier wrote: > On 27/04/17 16:29, Auger Eric wrote: >> >> >> 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 13/22] KVM: arm64: vgic-its: Check the device id matches TYPER DEVBITS range

2017-04-27 Thread Christoffer Dall
On Fri, Apr 14, 2017 at 12:15:25PM +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. > > Signed-off-by: Eric Auger > > --- > > v4 ->

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

2017-04-27 Thread Christoffer Dall
On Fri, Apr 14, 2017 at 12:15:24PM +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 > > --- > v4 -> v5: > - its_cmd_get_ittaddr macro now

Re: [PATCH v5 11/22] KVM: arm64: vgic-its: Interpret MAPD Size field and check related errors

2017-04-27 Thread Christoffer Dall
On Fri, Apr 14, 2017 at 12:15:23PM +0200, Eric Auger wrote: > 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

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

2017-04-27 Thread Marc Zyngier
On 27/04/17 16:29, Auger Eric wrote: > > > 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

Re: [RFC kvm-unit-tests PATCH 5/8] Makefile: add explicit mkdir for .o targets

2017-04-27 Thread Paolo Bonzini
On 06/04/2017 21:07, Alex Bennée wrote: > This is fairly direct way of ensuring the target build directories are > created before we build a binary blob. mkdir -p fails gracefully if > the directory is already there. > > Signed-off-by: Alex Bennée > --- > Makefile | 5

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

2017-04-27 Thread Auger Eric
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: > On Wed,

Re: [PATCH v5 10/22] KVM: arm64: vgic-its: Implement vgic_mmio_uaccess_write_its_iidr

2017-04-27 Thread Christoffer Dall
On Fri, Apr 14, 2017 at 12:15:22PM +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 force the ABI revision to be

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

2017-04-27 Thread Christoffer Dall
On Fri, Apr 14, 2017 at 12:15:21PM +0200, Eric Auger wrote: > We plan to support different migration ABIs, ie. characterizing > the ITS table layout format in guest RAM. Typically a new ABI will nit: s/Typically/For example, > be needed if vLPIs get supported for nested use case. > > So let's

Re: [PATCH v5 08/22] KVM: arm64: vgic-its: Implement vgic_mmio_uaccess_write_its_creadr

2017-04-27 Thread Auger Eric
Hi, On 27/04/2017 13:27, Christoffer Dall wrote: > On Fri, Apr 14, 2017 at 12:15:20PM +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

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

2017-04-27 Thread Auger Eric
Hi Christoffer, On 27/04/2017 13:02, Christoffer Dall wrote: > On Thu, Apr 27, 2017 at 11:33:39AM +0200, Auger Eric wrote: >> Hi Christoffer, >> >> On 27/04/2017 10:57, Christoffer Dall wrote: >>> On Wed, Apr 26, 2017 at 05:48:32PM +0200, Auger Eric wrote: Hi Christoffer, On

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

2017-04-27 Thread Auger Eric
Hi Christoffer, On 27/04/2017 13:00, Christoffer Dall wrote: > On Fri, Apr 14, 2017 at 12:15:19PM +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

Re: [PATCH v5 08/22] KVM: arm64: vgic-its: Implement vgic_mmio_uaccess_write_its_creadr

2017-04-27 Thread Christoffer Dall
On Fri, Apr 14, 2017 at 12:15:20PM +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 > > --- > v4 -> v5: > - keep

Re: [PATCH v5 03/22] KVM: arm/arm64: vgic-its: rename itte into ite

2017-04-27 Thread Christoffer Dall
On Thu, Apr 27, 2017 at 11:40:16AM +0200, Auger Eric wrote: > Hi Christoffer, Andre, > > On 27/04/2017 11:20, Andre Przywara wrote: > > Hi, > > > > On 27/04/17 10:05, Christoffer Dall wrote: > >> On Fri, Apr 14, 2017 at 12:15:15PM +0200, Eric Auger wrote: > >>> The actual abbreviation for the

Re: [PATCH v2] arm64: Add ASM modifier for xN register operands

2017-04-27 Thread Mark Rutland
Hi, On Wed, Apr 26, 2017 at 02:46:16PM -0700, Matthias Kaehlcke wrote: > Many inline assembly statements don't include the 'x' modifier when > using xN registers as operands. This is perfectly valid, however it > causes clang to raise warnings like this: > > warning: value size does not match

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

2017-04-27 Thread Christoffer Dall
On Fri, Apr 14, 2017 at 12:15:19PM +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

Re: [PATCH v5 04/22] arm/arm64: vgic: turn vgic_find_mmio_region into public

2017-04-27 Thread Christoffer Dall
On Fri, Apr 14, 2017 at 12:15:16PM +0200, Eric Auger wrote: > 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. > >

Re: [PATCH v5 03/22] KVM: arm/arm64: vgic-its: rename itte into ite

2017-04-27 Thread Christoffer Dall
On Fri, Apr 14, 2017 at 12:15:15PM +0200, Eric Auger wrote: > The actual abbreviation for the interrupt translation table entry > is ITE. Let's rename all itte instances by ite. Is there really any confusion or problems with using itte? This is a lot of churn... Thanks, -Christoffer > >

Re: [PATCH v5 00/22] vITS save/restore

2017-04-27 Thread Auger Eric
Hi Brahmajyosyula, On 26/04/2017 13:38, Prakash B wrote: > Verified on Cavium ThunderX platform > Continousily migrated Guest more than 500 times b/w different hosts. > Please feel free to add Tested-by: Prakash, Brahmajyosyula > I really appreciate. Many