All of lore.kernel.org
 help / color / mirror / Atom feed
* KVM regression on 64-bit big endian in 5.4
@ 2019-12-09  9:52 Marcus Comstedt
  0 siblings, 0 replies; only message in thread
From: Marcus Comstedt @ 2019-12-09  9:52 UTC (permalink / raw)
  To: kvm-ppc


Hi.

I discovered after upgrading to kernel 5.4 on my Talos II (Power9
Nimbus DD2.2) that KVM didn't work anymore.  The guest would crash
already in SLOF.

After bisecting, I found that the culprit was this commit:

| From 6c85b7bc637b64e681760f62c0eafba2f56745c6 Mon Sep 17 00:00:00 2001
| From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
| Date: Thu, 22 Aug 2019 00:48:38 -0300
| Subject: powerpc/kvm: Use UV_RETURN ucall to return to ultravisor
| 
| When an SVM makes an hypercall or incurs some other exception, the
| Ultravisor usually forwards (a.k.a. reflects) the exceptions to the
| Hypervisor. After processing the exception, Hypervisor uses the
| UV_RETURN ultracall to return control back to the SVM.

Looking at the diff, this change caught my eye:

- ld r6, VCPU_CR(r4)
+ lwz r0, VCPU_CR(r4)

So the loading of VPU_CR has changed from ld to lwz.  This seems
wrong.  ccr is an unsigned long, and the store to VCPU_CR in the same
file uses std, not stw.  So loading VCPU_CR must be done with ld,
otherwise the result will be wrong (truncated on LE, truncated and
left shifted by 16 bits on BE)...


  // Marcus


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-09  9:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-09  9:52 KVM regression on 64-bit big endian in 5.4 Marcus Comstedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.