qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [for-5.0 0/4] Fixes for RMA size calculation
@ 2019-11-29  1:35 David Gibson
  2019-11-29  1:35 ` [for-5.0 1/4] spapr,ppc: Simplify signature of kvmppc_rma_size() David Gibson
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: David Gibson @ 2019-11-29  1:35 UTC (permalink / raw)
  To: groug, clg; +Cc: aik, lvivier, qemu-ppc, qemu-devel, David Gibson

PAPR guests have a certain "Real Mode Area" - a subsection of memory
which can be accessed when in guest real mode (that is, with the MMU
"off" from the guest point of view).  This is advertised to the guest
in the device tree.

We want to make the RMA as large as we can, to allow for flexibility
in loading boot images, which need to fit within it.  But, there's a
somewhat complex set of constraints on the size.  At the moment, we
don't always get those correct.  This has caused crashes in some
cases, although for now those are worked around inside the guest
kernel.

These patches clarify and correct the logic here.  They will break
some cases using a host kernel with 4kiB pagesize (which doesn't
include any mainstream distro kernel nowadays).  Since that case is
very rare, and there do exist a number of workarounds for it, I think
that's worth it for the simplified logic and more consistent
behaviour.

David Gibson (4):
  spapr,ppc: Simplify signature of kvmppc_rma_size()
  spapr: Don't attempt to clamp RMA to VRMA constraint
  spapr: Clean up RMA size calculation
  spapr: Correct clamping of RMA to Node 0 size

 hw/ppc/spapr.c         | 110 ++++++++++++++++++++---------------------
 hw/ppc/spapr_hcall.c   |   4 +-
 include/hw/ppc/spapr.h |   3 +-
 target/ppc/kvm.c       |   5 +-
 target/ppc/kvm_ppc.h   |   7 ++-
 5 files changed, 63 insertions(+), 66 deletions(-)

-- 
2.23.0



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

end of thread, other threads:[~2019-12-10  5:45 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-29  1:35 [for-5.0 0/4] Fixes for RMA size calculation David Gibson
2019-11-29  1:35 ` [for-5.0 1/4] spapr,ppc: Simplify signature of kvmppc_rma_size() David Gibson
2019-12-02  7:45   ` Cédric Le Goater
2019-12-02  8:55   ` Greg Kurz
2019-12-02 18:18   ` Cédric Le Goater
2019-12-10  3:58     ` David Gibson
2019-12-03  3:32   ` Alexey Kardashevskiy
2019-11-29  1:35 ` [for-5.0 2/4] spapr: Don't attempt to clamp RMA to VRMA constraint David Gibson
2019-12-03  3:33   ` Alexey Kardashevskiy
2019-11-29  1:35 ` [for-5.0 3/4] spapr: Clean up RMA size calculation David Gibson
2019-12-03  3:44   ` Alexey Kardashevskiy
2019-12-03  5:06     ` Alexey Kardashevskiy
2019-12-10  5:44       ` David Gibson
2019-12-10  5:29     ` David Gibson
2019-11-29  1:35 ` [for-5.0 4/4] spapr: Correct clamping of RMA to Node 0 size David Gibson
2019-12-03  4:18   ` Alexey Kardashevskiy
2019-12-10  5:21     ` David Gibson

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).