Re: [PATCH 4/4] pre_init: add ARM implementations

2016-03-02 Thread André Przywara
Hi, On 02/03/16 03:00, Will Deacon wrote: > On Wed, Feb 24, 2016 at 03:33:08PM +, Andre Przywara wrote: >> The pre_init stub consists of two syscalls mouting the host's FS >> via 9pfs and then calling the actual init binary, which can now >> use normal dynamic linking. >> Based on the x86

Re: [PATCH v2 12/17] arm64: KVM: vgic-v2: Make GICD_SGIR quicker to hit

2016-03-02 Thread Christoffer Dall
On Wed, Feb 17, 2016 at 04:40:44PM +, Marc Zyngier wrote: > The GICD_SGIR register lives a long way from the beginning of > the handler array, which is searched linearly. As this is hit > pretty often, let's move it up. This saves us some precious > cycles when the guest is generating IPIs. >

Re: [PATCH v2 11/17] arm64: KVM: vgic-v2: Only wipe LRs on vcpu exit

2016-03-02 Thread Christoffer Dall
On Wed, Feb 17, 2016 at 04:40:43PM +, Marc Zyngier wrote: > So far, we're always writing all possible LRs, setting the empty > ones with a zero value. This is obvious doing a low of work for s/low/lot/ > nothing, and we're better off clearing those we've actually > dirtied on the exit path

Re: [PATCH v2 08/17] arm64: KVM: vgic-v2: Save maintenance interrupt state only if required

2016-03-02 Thread Christoffer Dall
On Wed, Feb 17, 2016 at 04:40:40PM +, Marc Zyngier wrote: > Next on our list of useless accesses is the maintenance interrupt > status registers (GICH_MISR, GICH_EISR{0,1}). > > It is pointless to save them if we haven't asked for a maintenance > interrupt the first place, which can only

Re: [PATCH v2 10/17] arm64: KVM: vgic-v2: Do not save an LR known to be empty

2016-03-02 Thread Christoffer Dall
On Wed, Feb 17, 2016 at 04:40:42PM +, Marc Zyngier wrote: > On exit, any empty LR will be signaled in GICH_ELRSR*. Which > means that we do not have to save it, and we can just clear > its state in the in-memory copy. > > Take this opportunity to move the LR saving code into its > own

Re: [PATCH v2 07/17] arm64: KVM: vgic-v2: Avoid accessing GICH registers

2016-03-02 Thread Christoffer Dall
On Wed, Feb 17, 2016 at 04:40:39PM +, Marc Zyngier wrote: > GICv2 registers are *slow*. As in "terrifyingly slow". Which is bad. > But we're equaly bad, as we make a point in accessing them even if > we don't have any interrupt in flight. > > A good solution is to first find out if we have

Re: [PATCH v2 09/17] arm64: KVM: vgic-v2: Move GICH_ELRSR saving to its own function

2016-03-02 Thread Christoffer Dall
On Wed, Feb 17, 2016 at 04:40:41PM +, Marc Zyngier wrote: > In order to make the saving path slightly more readable and > prepare for some more optimizations, let's more the GICH_ELRSR s/more/move/ > saving to its own function. > > No functional change. > > Signed-off-by: Marc Zyngier

Re: [PATCH 2/3] MSI-X: update GSI routing after changed MSI-X configuration

2016-03-02 Thread André Przywara
Hi, On 02/03/16 01:16, Will Deacon wrote: > On Tue, Mar 01, 2016 at 04:49:37PM +, Andre Przywara wrote: >> When we set up GSI routing to map MSIs to KVM's GSI numbers, we >> write the current device's MSI setup into the kernel routing table. >> However the device driver in the guest can use

Re: Intermittent guest kernel crashes with v4.5-rc6.

2016-03-02 Thread Marc Zyngier
On 02/03/16 15:48, Shanker Donthineni wrote: > We haven't started running heavy workloads in VMs. So far we > have noticed this random nature behavior only during guest > kernel boot (at EL1). > > We didn't see this problem on 4.3 kernel. Do you think it is > related to TLB conflicts? I

Re: Intermittent guest kernel crashes with v4.5-rc6.

2016-03-02 Thread Shanker Donthineni
On 03/02/2016 09:09 AM, Marc Zyngier wrote: > On 02/03/16 14:59, Shanker Donthineni wrote: >> Hi Marc, >> >> Thanks for your quick reply. >> >> On 03/02/2016 08:16 AM, Marc Zyngier wrote: >>> On 02/03/16 13:56, Shanker Donthineni wrote: For some reason v4.5-rc6 kernel is not stable for

Re: [PATCH v2 0/8] arm64: Support for systems without AArch32 state

2016-03-02 Thread Suzuki K. Poulose
On 02/03/16 15:07, Yury Norov wrote: On Wed, Mar 02, 2016 at 12:19:23AM +0300, Yury Norov wrote: On Thu, Feb 25, 2016 at 09:52:40AM +, Suzuki K Poulose wrote: This series add checks to make sure that the AArch32 state is supported before we process the 32bit ID registers. Also checks the

Re: [PATCH v2 0/8] arm64: Support for systems without AArch32 state

2016-03-02 Thread Mark Rutland
On Wed, Mar 02, 2016 at 06:07:21PM +0300, Yury Norov wrote: > ubuntu@arm64:~$ uname -a > Linux arm64 4.5.0-rc5-00019-g3e330b9 #76 SMP PREEMPT Wed Mar 2 17:46:57 MSK > 2016 aarch64 aarch64 aarch64 GNU/Linux > > ubuntu@arm64:~$ cat /proc/cpuinfo > processor : 0-47 > BogoMIPS: 200.00

Re: Intermittent guest kernel crashes with v4.5-rc6.

2016-03-02 Thread Marc Zyngier
On 02/03/16 14:59, Shanker Donthineni wrote: > Hi Marc, > > Thanks for your quick reply. > > On 03/02/2016 08:16 AM, Marc Zyngier wrote: >> On 02/03/16 13:56, Shanker Donthineni wrote: >>> For some reason v4.5-rc6 kernel is not stable for guest machines on >>> Qualcomm server platforms. >>> We

Re: [PATCH v2 0/8] arm64: Support for systems without AArch32 state

2016-03-02 Thread Yury Norov
On Wed, Mar 02, 2016 at 12:19:23AM +0300, Yury Norov wrote: > On Thu, Feb 25, 2016 at 09:52:40AM +, Suzuki K Poulose wrote: > > This series add checks to make sure that the AArch32 state is > > supported before we process the 32bit ID registers. Also > > checks the same for COMPAT binary

Re: Intermittent guest kernel crashes with v4.5-rc6.

2016-03-02 Thread Shanker Donthineni
Hi Marc, Thanks for your quick reply. On 03/02/2016 08:16 AM, Marc Zyngier wrote: On 02/03/16 13:56, Shanker Donthineni wrote: For some reason v4.5-rc6 kernel is not stable for guest machines on Qualcomm server platforms. We are getting IABT translation faults while booting the guest kernel.

Re: Intermittent guest kernel crashes with v4.5-rc6.

2016-03-02 Thread Marc Zyngier
On 02/03/16 13:56, Shanker Donthineni wrote: > > For some reason v4.5-rc6 kernel is not stable for guest machines on > Qualcomm server platforms. > We are getting IABT translation faults while booting the guest kernel. > The problem disappears with > the following code snippet (insert "dsb ish"

Re: Intermittent guest kernel crashes with v4.5-rc6.

2016-03-02 Thread Marc Zyngier
On 02/03/16 13:56, Shanker Donthineni wrote: > > For some reason v4.5-rc6 kernel is not stable for guest machines on > Qualcomm server platforms. > We are getting IABT translation faults while booting the guest kernel. > The problem disappears with > the following code snippet (insert "dsb ish"

Intermittent guest kernel crashes with v4.5-rc6.

2016-03-02 Thread Shanker Donthineni
For some reason v4.5-rc6 kernel is not stable for guest machines on Qualcomm server platforms. We are getting IABT translation faults while booting the guest kernel. The problem disappears with the following code snippet (insert "dsb ish" instruction just before switching to EL1 guest). I am

Re: [PATCH v7 1/6] KVM: arm/arm64: Add VGICv3 save/restore API documentation

2016-03-02 Thread Christoffer Dall
On Fri, Feb 26, 2016 at 03:01:56PM +, Peter Maydell wrote: > On 7 December 2015 at 12:29, Pavel Fedin wrote: > > From: Christoffer Dall > > > > Factor out the GICv3-specific documentation into a separate > > documentation file. Add

Re: [PATCH v2 8/8] arm64: kvm: Check support for AArch32 for 32bit guests

2016-03-02 Thread Suzuki K. Poulose
On 02/03/16 09:08, Marc Zyngier wrote: On 25/02/16 09:52, Suzuki K Poulose wrote: I really wanted to pass kvm_vcpu down to the helpers. But then, I can't define the arch specific helper in asm/kvm_host.h due to lack of kvm_vcpu's definition yet: In file included from

Re: [RFC v5 00/17] KVM PCIe/MSI passthrough on ARM/ARM64

2016-03-02 Thread Jaggi, Manish
>>From: Eric Auger >>Sent: Tuesday, March 1, 2016 11:57 PM >>To: eric.au...@st.com; eric.au...@linaro.org; robin.mur...@arm.com; >>alex.william...@redhat.com; will.dea...@arm.com; j...@8bytes.org; >>t...@linutronix.de; >>ja...@lakedaemon.net; marc.zyng...@arm.com;

Re: [PULL] KVM/ARM updates for 4.5-rc7

2016-03-02 Thread Paolo Bonzini
On 02/03/2016 10:27, Marc Zyngier wrote: > Hi Paolo, > > I really thought that the previous PR was the last for this release, > but Michael rightly decided to prove me wrong. Oh well. > > Please pull! > >M. > > The following changes since commit

[PATCH] arm/arm64: KVM: Fix ioctl error handling

2016-03-02 Thread Marc Zyngier
From: "Michael S. Tsirkin" Calling return copy_to_user(...) in an ioctl will not do the right thing if there's a pagefault: copy_to_user returns the number of bytes not copied in this case. Fix up kvm to do return copy_to_user(...)) ? -EFAULT : 0; everywhere. Cc:

[PULL] KVM/ARM updates for 4.5-rc7

2016-03-02 Thread Marc Zyngier
Hi Paolo, I really thought that the previous PR was the last for this release, but Michael rightly decided to prove me wrong. Oh well. Please pull! M. The following changes since commit fd451b90e78c4178bcfc5072f2b2b637500c109a: arm64: KVM: vgic-v3: Restore ICH_APR0Rn_EL2 before

Re: [PATCH v2 8/8] arm64: kvm: Check support for AArch32 for 32bit guests

2016-03-02 Thread Marc Zyngier
On 25/02/16 09:52, Suzuki K Poulose wrote: > Add a check to make sure the system supports AArch32 state > before initialising a 32bit guest. > > Cc: Christoffer Dall > Cc: Marc Zyngier > Cc: kvmarm@lists.cs.columbia.edu > Signed-off-by: Suzuki