From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: qemu-devel@nongnu.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>,
Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH] spapr: make sure RMA is in first mode of first memory node
Date: Fri, 1 Nov 2013 21:21:16 +1100 [thread overview]
Message-ID: <1383301276-29566-1-git-send-email-aik@ozlabs.ru> (raw)
SLOF gets really confused if RTAS/device-tree and everything else
what SLOF can use is not in the very first block of the very first
memory node.
This makes sure that the RMA area is where SLOF expects it to be.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
hw/ppc/spapr.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 09dc635..09a5d94 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1113,7 +1113,7 @@ static void ppc_spapr_init(QEMUMachineInitArgs *args)
int i;
MemoryRegion *sysmem = get_system_memory();
MemoryRegion *ram = g_new(MemoryRegion, 1);
- hwaddr rma_alloc_size;
+ hwaddr rma_alloc_size, node0_size;
uint32_t initrd_base = 0;
long kernel_size = 0, initrd_size = 0;
long load_limit, rtas_limit, fw_size;
@@ -1154,6 +1154,12 @@ static void ppc_spapr_init(QEMUMachineInitArgs *args)
spapr->rma_size = MIN(spapr->rma_size, 0x10000000);
}
}
+ /*
+ * SLOF gets confused if RMA resides not in the first block
+ * of the first memory node so let's fix it.
+ */
+ node0_size = (nb_numa_nodes > 1) ? node_mem[0] : ram_size;
+ spapr->rma_size = MIN(spapr->rma_size, node0_size);
/* We place the device tree and RTAS just below either the top of the RMA,
* or just below 2GB, whichever is lowere, so that it can be
--
1.8.4.rc4
next reply other threads:[~2013-11-01 10:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-01 10:21 Alexey Kardashevskiy [this message]
2013-11-04 10:44 ` [Qemu-devel] [PATCH] spapr: make sure RMA is in first mode of first memory node Alexander Graf
2013-11-04 10:55 ` Benjamin Herrenschmidt
2013-11-04 11:28 ` Alexander Graf
2013-11-04 11:50 ` Thomas Huth
2013-11-04 13:11 ` Alexey Kardashevskiy
2013-11-04 13:19 ` Peter Maydell
2013-11-04 13:35 ` Alexey Kardashevskiy
2013-11-04 22:29 ` Benjamin Herrenschmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1383301276-29566-1-git-send-email-aik@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=agraf@suse.de \
--cc=nikunj@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).