From: Sam Bobroff <sam.bobroff@au1.ibm.com>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, david@gibson.dropbear.id.au
Subject: [Qemu-devel] [RFC PATCH 5/9] spapr: Only setup HTP if necessary.
Date: Tue, 7 Feb 2017 13:56:48 +1100 [thread overview]
Message-ID: <f04bb6a57aa50c7c75762e3479252f2ee3fa385a.1486436186.git.sam.bobroff@au1.ibm.com> (raw)
In-Reply-To: <cover.1486436185.git.sam.bobroff@au1.ibm.com>
In-Reply-To: <cover.1486436185.git.sam.bobroff@au1.ibm.com>
Because KVM cannot support radix and hash modes concurrently, QEMU can
avoid allocating a hash page table if KVM supports radix mode.
Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
---
hw/ppc/spapr.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index d629e2630c..1411e470c0 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1150,15 +1150,17 @@ static void ppc_spapr_reset(void)
/* Check for unknown sysbus devices */
foreach_dynamic_sysbus_device(find_unknown_sysbus_device, NULL);
- /* Allocate and/or reset the hash page table */
- spapr_reallocate_hpt(spapr,
+ if (!kvmppc_has_cap_mmu_radix()) {
+ /* Allocate and/or reset the hash page table */
+ spapr_reallocate_hpt(spapr,
spapr_hpt_shift_for_ramsize(machine->maxram_size),
&error_fatal);
- /* Update the RMA size if necessary */
- if (spapr->vrma_adjust) {
- spapr->rma_size = kvmppc_rma_size(spapr_node0_size(),
- spapr->htab_shift);
+ /* Update the RMA size if necessary */
+ if (spapr->vrma_adjust) {
+ spapr->rma_size = kvmppc_rma_size(spapr_node0_size(),
+ spapr->htab_shift);
+ }
}
qemu_devices_reset();
--
2.11.0
next prev parent reply other threads:[~2017-02-07 2:58 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 2:56 [Qemu-devel] [RFC PATCH 0/9] ISA 3.00 KVM guest support Sam Bobroff
2017-02-07 2:56 ` [Qemu-devel] [RFC PATCH 1/9] spapr: fix off-by-one error in spapr_ovec_populate_dt() Sam Bobroff
2017-02-07 15:47 ` [Qemu-devel] [Qemu-ppc] " Thomas Huth
2017-02-09 1:53 ` David Gibson
2017-02-07 22:12 ` [Qemu-devel] " Michael Roth
2017-02-07 22:53 ` Sam Bobroff
2017-02-07 2:56 ` [Qemu-devel] [RFC PATCH 2/9] Update headers using update-linux-headers.sh Sam Bobroff
2017-02-07 12:59 ` [Qemu-devel] [Qemu-ppc] " Thomas Huth
2017-02-09 4:53 ` Sam Bobroff
2017-02-09 7:45 ` Thomas Huth
2017-02-09 1:55 ` [Qemu-devel] " David Gibson
2017-02-09 4:54 ` Sam Bobroff
2017-02-07 2:56 ` [Qemu-devel] [RFC PATCH 3/9] spapr: Add ibm, processor-radix-AP-encodings to the device tree Sam Bobroff
2017-02-09 2:14 ` David Gibson
2017-02-09 5:07 ` Sam Bobroff
2017-02-07 2:56 ` [Qemu-devel] [RFC PATCH 4/9] target-ppc: support KVM_CAP_PPC_MMU_RADIX, KVM_CAP_PPC_MMU_HASH_V3 Sam Bobroff
2017-02-09 2:16 ` David Gibson
2017-02-07 2:56 ` Sam Bobroff [this message]
2017-02-09 2:24 ` [Qemu-devel] [RFC PATCH 5/9] spapr: Only setup HTP if necessary David Gibson
2017-02-07 2:56 ` [Qemu-devel] [RFC PATCH 6/9] spapr: Add h_register_process_table() hypercall Sam Bobroff
2017-02-09 2:32 ` David Gibson
2017-02-09 4:16 ` [Qemu-devel] [Qemu-ppc] " Alexey Kardashevskiy
2017-02-07 2:56 ` [Qemu-devel] [RFC PATCH 7/9] spapr: Set ISA 3.00 radix and hash bits in OV5 Sam Bobroff
2017-02-09 2:34 ` David Gibson
2017-02-07 2:56 ` [Qemu-devel] [RFC PATCH 8/9] spapr: Advertise ISA 3.0 MMU features in pa_features Sam Bobroff
2017-02-09 2:42 ` David Gibson
2017-02-07 2:56 ` [Qemu-devel] [RFC PATCH 9/9] spapr: Small cleanup of PPC MMU enums Sam Bobroff
2017-02-09 2:49 ` David Gibson
2017-02-09 2:51 ` [Qemu-devel] [RFC PATCH 0/9] ISA 3.00 KVM guest support David Gibson
2017-02-09 3:21 ` Alexey Kardashevskiy
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=f04bb6a57aa50c7c75762e3479252f2ee3fa385a.1486436186.git.sam.bobroff@au1.ibm.com \
--to=sam.bobroff@au1.ibm.com \
--cc=david@gibson.dropbear.id.au \
--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).