From: Greg Kurz <gkurz@linux.vnet.ibm.com>
To: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Cc: aik@ozlabs.ru
Subject: [Qemu-devel] [RFC] PPC: KVM: add support for LPCR
Date: Mon, 06 Jan 2014 19:23:48 +0100 [thread overview]
Message-ID: <20140106182221.4294.982.stgit@bahia.local> (raw)
In-Reply-To: <52CA4FC6.1030801@ozlabs.ru>
The LPCR special purpose register was introduced with the PowerPC 970MP family.
This patch initializes LPCR for the following families:
- 970 MP
- POWER5+
- POWER7
- POWER8
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
---
Along with Alexey's fixes for the get/put one reg API, I could drop
the target-ppc/kvm.c bits from:
http://patchwork.ozlabs.org/patch/300210/
and have cross-endian virtio working.
Thanks Alexey. :)
target-ppc/translate_init.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 149a932..35470d4 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -2582,7 +2582,6 @@ static void gen_spr_8xx (CPUPPCState *env)
* HSRR0 => SPR 314 (Power 2.04 hypv)
* HSRR1 => SPR 315 (Power 2.04 hypv)
* LPIDR => SPR 317 (970)
- * LPCR => SPR 318 (970)
* EPR => SPR 702 (Power 2.04 emb)
* perf => 768-783 (Power 2.04)
* perf => 784-799 (Power 2.04)
@@ -6831,6 +6830,11 @@ static void init_proc_970MP (CPUPPCState *env)
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_hior, &spr_write_hior,
0x00000000);
+ /* Logical partitionning */
+ spr_register_kvm(env, SPR_LPCR, "LPCR",
+ SPR_NOACCESS, SPR_NOACCESS,
+ &spr_read_generic, &spr_write_generic,
+ KVM_REG_PPC_LPCR, 0x00000000);
#if !defined(CONFIG_USER_ONLY)
env->slb_nr = 32;
#endif
@@ -6915,6 +6919,11 @@ static void init_proc_power5plus(CPUPPCState *env)
&spr_read_generic, &spr_write_generic,
&spr_read_generic, &spr_write_generic,
0x00000000);
+ /* Logical partitionning */
+ spr_register_kvm(env, SPR_LPCR, "LPCR",
+ SPR_NOACCESS, SPR_NOACCESS,
+ &spr_read_generic, &spr_write_generic,
+ KVM_REG_PPC_LPCR, 0x00000000);
#if !defined(CONFIG_USER_ONLY)
env->slb_nr = 64;
#endif
@@ -7019,6 +7028,11 @@ static void init_proc_POWER7 (CPUPPCState *env)
&spr_read_generic, &spr_write_generic,
&spr_read_generic, &spr_write_generic,
0x00000000);
+ /* Logical partitionning */
+ spr_register_kvm(env, SPR_LPCR, "LPCR",
+ SPR_NOACCESS, SPR_NOACCESS,
+ &spr_read_generic, &spr_write_generic,
+ KVM_REG_PPC_LPCR, 0x00000000);
#if !defined(CONFIG_USER_ONLY)
env->slb_nr = 32;
#endif
next prev parent reply other threads:[~2014-01-06 18:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 5:36 [Qemu-devel] [PATCH 0/2] PPC: KVM: fix set_one_reg Alexey Kardashevskiy
2014-01-06 5:36 ` [Qemu-devel] [PATCH 1/2] target-ppc: fix Authority Mask Register init value Alexey Kardashevskiy
2014-01-06 17:29 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2014-01-06 5:36 ` [Qemu-devel] [PATCH 2/2] PPC: KVM: fix "set one register" Alexey Kardashevskiy
2014-01-06 6:40 ` Alexey Kardashevskiy
2014-01-06 18:23 ` Greg Kurz [this message]
2014-01-09 13:02 ` [Qemu-devel] [Qemu-ppc] [RFC] PPC: KVM: add support for LPCR Alexander Graf
2014-01-06 17:30 ` [Qemu-devel] [Qemu-ppc] [PATCH 2/2] PPC: KVM: fix "set one register" Greg Kurz
2014-01-09 12:59 ` [Qemu-devel] [PATCH 0/2] PPC: KVM: fix set_one_reg Alexander Graf
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=20140106182221.4294.982.stgit@bahia.local \
--to=gkurz@linux.vnet.ibm.com \
--cc=aik@ozlabs.ru \
--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 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.