From: Stuart Yoder <stuart.yoder@freescale.com>
To: <agraf@suse.de>, <kvm-ppc@vger.kernel.org>, <kvm@vger.kernel.org>
Subject: [PATCH v12 3/8] KVM: PPC: add pvinfo for hcall opcodes on e500mc/e5500
Date: Tue, 3 Jul 2012 10:48:51 -0500 [thread overview]
Message-ID: <1341330536-10080-4-git-send-email-stuart.yoder@freescale.com> (raw)
In-Reply-To: <1341330536-10080-1-git-send-email-stuart.yoder@freescale.com>
From: Stuart Yoder <stuart.yoder@freescale.com>
Signed-off-by: Liu Yu <yu.liu@freescale.com>
[stuart: factored this out from idle hcall support in host patch]
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
---
v12: no changes
arch/powerpc/kvm/powerpc.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index a98f7e0..30cf01c 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -739,9 +739,16 @@ int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf)
static int kvm_vm_ioctl_get_pvinfo(struct kvm_ppc_pvinfo *pvinfo)
{
+ u32 inst_nop = 0x60000000;
+#ifdef CONFIG_KVM_BOOKE_HV
+ u32 inst_sc1 = 0x44000022;
+ pvinfo->hcall[0] = inst_sc1;
+ pvinfo->hcall[1] = inst_nop;
+ pvinfo->hcall[2] = inst_nop;
+ pvinfo->hcall[3] = inst_nop;
+#else
u32 inst_lis = 0x3c000000;
u32 inst_ori = 0x60000000;
- u32 inst_nop = 0x60000000;
u32 inst_sc = 0x44000002;
u32 inst_imm_mask = 0xffff;
@@ -758,6 +765,7 @@ static int kvm_vm_ioctl_get_pvinfo(struct kvm_ppc_pvinfo *pvinfo)
pvinfo->hcall[1] = inst_ori | (KVM_SC_MAGIC_R0 & inst_imm_mask);
pvinfo->hcall[2] = inst_sc;
pvinfo->hcall[3] = inst_nop;
+#endif
return 0;
}
--
1.7.3.4
next prev parent reply other threads:[~2012-07-03 15:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 15:48 [PATCH v12 0/8] KVM: PPC: Add ePAPR idle hcall support Stuart Yoder
2012-07-03 15:48 ` [PATCH v12 1/8] PPC: epapr: create define for return code value of success Stuart Yoder
2012-07-03 15:48 ` [PATCH v12 2/8] KVM: PPC: use definitions in epapr header for hcalls Stuart Yoder
2012-07-03 15:48 ` Stuart Yoder [this message]
2012-07-03 15:48 ` [PATCH v12 4/8] KVM: PPC: Add support for ePAPR idle hcall in host kernel Stuart Yoder
2012-07-03 19:33 ` Alexander Graf
2012-07-03 19:40 ` Yoder Stuart-B08248
2012-07-03 15:48 ` [PATCH v12 5/8] KVM: PPC: ev_idle hcall support for e500 guests Stuart Yoder
2012-07-03 15:48 ` [PATCH v12 6/8] PPC: select EPAPR_PARAVIRT for all users of epapr hcalls Stuart Yoder
2012-07-03 15:48 ` [PATCH v12 7/8] powerpc/fsl-soc: use CONFIG_EPAPR_PARAVIRT for hcalls Stuart Yoder
2012-07-03 15:48 ` [PATCH v12 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation Stuart Yoder
2012-07-03 19:41 ` [PATCH v12 0/8] KVM: PPC: Add ePAPR idle hcall support 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=1341330536-10080-4-git-send-email-stuart.yoder@freescale.com \
--to=stuart.yoder@freescale.com \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.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