kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BUG ALERT: ARM32 KVM does not work in 4.4-rc3
@ 2015-12-01  7:24 Pavel Fedin
  2015-12-01  9:25 ` Marc Zyngier
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Fedin @ 2015-12-01  7:24 UTC (permalink / raw)
  To: kvmarm, kvm; +Cc: marc.zyngier

 Hello!

 My project involves ARM64, but from time to time i also test ARM32 KVM. I have discovered that it stopped working in 4.4-rc3. The
same virtual machine works perfectly under current kvmarm/next, but gets stuck at random point under 4.4-rc3 from linux-stable.
 I'm not sure that i have time to investigate this quickly, but i'll post some new information as soon as i get it

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG ALERT: ARM32 KVM does not work in 4.4-rc3
  2015-12-01  7:24 BUG ALERT: ARM32 KVM does not work in 4.4-rc3 Pavel Fedin
@ 2015-12-01  9:25 ` Marc Zyngier
  2015-12-01  9:29   ` Pavel Fedin
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Marc Zyngier @ 2015-12-01  9:25 UTC (permalink / raw)
  To: Pavel Fedin, kvmarm, kvm

On 01/12/15 07:24, Pavel Fedin wrote:
> Hello!
> 
> My project involves ARM64, but from time to time i also test ARM32
> KVM. I have discovered that it stopped working in 4.4-rc3. The same
> virtual machine works perfectly under current kvmarm/next, but gets
> stuck at random point under 4.4-rc3 from linux-stable. I'm not sure
> that i have time to investigate this quickly, but i'll post some new
> information as soon as i get it

root@canarsie:~# uname -a
Linux canarsie 4.4.0-rc3 #5044 SMP PREEMPT Tue Dec 1 09:12:40 GMT 2015 armv7l GNU/Linux
root@canarsie:~# cat /proc/cpuinfo 
processor	: 0
model name	: ARMv7 Processor rev 4 (v7l)
BogoMIPS	: 48.00
Features	: half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xc07
CPU revision	: 4

processor	: 1
model name	: ARMv7 Processor rev 4 (v7l)
BogoMIPS	: 48.00
Features	: half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xc07
CPU revision	: 4

Hardware	: Generic DT based system
Revision	: 0000
Serial		: 0000000000000000

The same kernel is used both as a guest and a host with v4.4-rc3.

So until you bisect it to an exact commit and configuration, I declare
the alert over. ;-)

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: BUG ALERT: ARM32 KVM does not work in 4.4-rc3
  2015-12-01  9:25 ` Marc Zyngier
@ 2015-12-01  9:29   ` Pavel Fedin
  2015-12-01 10:03   ` Pavel Fedin
  2015-12-02  8:19   ` Pavel Fedin
  2 siblings, 0 replies; 6+ messages in thread
From: Pavel Fedin @ 2015-12-01  9:29 UTC (permalink / raw)
  To: 'Marc Zyngier', kvmarm, kvm

 Hello!

> The same kernel is used both as a guest and a host with v4.4-rc3.
> 
> So until you bisect it to an exact commit and configuration, I declare
> the alert over. ;-)

 By this time i have also tried it on another machine, and there it also works. Looks like it's triggered only on some particular
HW. I'll try to figure this out.

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: BUG ALERT: ARM32 KVM does not work in 4.4-rc3
  2015-12-01  9:25 ` Marc Zyngier
  2015-12-01  9:29   ` Pavel Fedin
@ 2015-12-01 10:03   ` Pavel Fedin
  2015-12-01 12:09     ` Pavel Fedin
  2015-12-02  8:19   ` Pavel Fedin
  2 siblings, 1 reply; 6+ messages in thread
From: Pavel Fedin @ 2015-12-01 10:03 UTC (permalink / raw)
  To: 'Marc Zyngier', kvmarm, kvm
  Cc: 'Ard Biesheuvel', christoffer.dall

 Hello!

> > My project involves ARM64, but from time to time i also test ARM32
> > KVM. I have discovered that it stopped working in 4.4-rc3. The same
> > virtual machine works perfectly under current kvmarm/next, but gets
> > stuck at random point under 4.4-rc3 from linux-stable. I'm not sure
> > that i have time to investigate this quickly, but i'll post some new
> > information as soon as i get it

[skip]

> So until you bisect it to an exact commit and configuration, I declare
> the alert over. ;-)

 The commit in question is e6fab54423450d699a09ec2b899473a541f61971 ("ARM/arm64: KVM: test properly for a PTE's uncachedness").
Reverting it fixes the problem.
 Study in qemu shows that the CPU gets stuck at PC = 0x0C with LR = 0x10. So i quickly decided that it might have to do with
caching, and my first hit was correct. The guest crashes in this state very early, sometimes it even cannot fully print
"Uncompressing kernel".
 The machine which reproduces it is custom Samsung's out-of-tree board. I'll investigate it further in order to determine how
exactly the commit could harm. I know that it passed reviews and testing, and i was involved too. Perhaps it's board's code fault,
however.

Cc'ed to others involved.

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: BUG ALERT: ARM32 KVM does not work in 4.4-rc3
  2015-12-01 10:03   ` Pavel Fedin
@ 2015-12-01 12:09     ` Pavel Fedin
  0 siblings, 0 replies; 6+ messages in thread
From: Pavel Fedin @ 2015-12-01 12:09 UTC (permalink / raw)
  To: 'Marc Zyngier', kvmarm, kvm
  Cc: 'Ard Biesheuvel', christoffer.dall

Hello!

> -----Original Message-----
> From: kvm-owner@vger.kernel.org [mailto:kvm-owner@vger.kernel.org] On Behalf Of Pavel Fedin
> Sent: Tuesday, December 01, 2015 1:03 PM
> To: 'Marc Zyngier'; kvmarm@lists.cs.columbia.edu; kvm@vger.kernel.org
> Cc: 'Ard Biesheuvel'; christoffer.dall@linaro.org
> Subject: RE: BUG ALERT: ARM32 KVM does not work in 4.4-rc3
> 
>  Hello!
> 
> > > My project involves ARM64, but from time to time i also test ARM32
> > > KVM. I have discovered that it stopped working in 4.4-rc3. The same
> > > virtual machine works perfectly under current kvmarm/next, but gets
> > > stuck at random point under 4.4-rc3 from linux-stable. I'm not sure
> > > that i have time to investigate this quickly, but i'll post some new
> > > information as soon as i get it
> 
> [skip]
> 
> > So until you bisect it to an exact commit and configuration, I declare
> > the alert over. ;-)
> 
>  The commit in question is e6fab54423450d699a09ec2b899473a541f61971 ("ARM/arm64: KVM: test
> properly for a PTE's uncachedness").
> Reverting it fixes the problem.
>  Study in qemu shows that the CPU gets stuck at PC = 0x0C with LR = 0x10. So i quickly decided
> that it might have to do with
> caching, and my first hit was correct. The guest crashes in this state very early, sometimes
> it even cannot fully print
> "Uncompressing kernel".
>  The machine which reproduces it is custom Samsung's out-of-tree board. I'll investigate it
> further in order to determine how
> exactly the commit could harm. I know that it passed reviews and testing, and i was involved
> too. Perhaps it's board's code fault,
> however.
> 
> Cc'ed to others involved.

 The problem seems to be triggered by ARCH_SPARSEMEM_ENABLE. My top-secret machine uses it, while more widespread things like
vexpress and Exynos don't.

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: BUG ALERT: ARM32 KVM does not work in 4.4-rc3
  2015-12-01  9:25 ` Marc Zyngier
  2015-12-01  9:29   ` Pavel Fedin
  2015-12-01 10:03   ` Pavel Fedin
@ 2015-12-02  8:19   ` Pavel Fedin
  2 siblings, 0 replies; 6+ messages in thread
From: Pavel Fedin @ 2015-12-02  8:19 UTC (permalink / raw)
  To: 'Marc Zyngier', kvmarm, kvm

 Hello!

> > My project involves ARM64, but from time to time i also test ARM32
> > KVM. I have discovered that it stopped working in 4.4-rc3. The same
> > virtual machine works perfectly under current kvmarm/next, but gets
> > stuck at random point under 4.4-rc3 from linux-stable. I'm not sure
> > that i have time to investigate this quickly, but i'll post some new
> > information as soon as i get it

[skip]

> So until you bisect it to an exact commit and configuration, I declare
> the alert over. ;-)

 Just in case, to make sure you don't miss it. I have found the problem, and it's just good luck that it works on some machines.
Unreliably, BTW. The problem is that it verifies guest's physical addresses (IPA) against host memory map; and the fix is here:
http://www.spinics.net/lists/kvm/msg124561.html

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-12-02  8:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-01  7:24 BUG ALERT: ARM32 KVM does not work in 4.4-rc3 Pavel Fedin
2015-12-01  9:25 ` Marc Zyngier
2015-12-01  9:29   ` Pavel Fedin
2015-12-01 10:03   ` Pavel Fedin
2015-12-01 12:09     ` Pavel Fedin
2015-12-02  8:19   ` Pavel Fedin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).