From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: qemu-devel@nongnu.org
Cc: aik@ozlabs.ru, qemu-ppc@nongnu.org,
"Andreas Färber" <afaerber@suse.de>,
"Alexander Graf" <agraf@suse.de>
Subject: [Qemu-devel] [PATCH v3] xics: Add H_IPOLL implementation
Date: Fri, 23 Aug 2013 22:02:33 +1000 [thread overview]
Message-ID: <1377259353-27815-1-git-send-email-aik@ozlabs.ru> (raw)
In-Reply-To: <1376891726-26122-1-git-send-email-aik@ozlabs.ru>
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This adds support for the H_IPOLL hypercall which the guest
uses to poll for a pending interrupt. This hypercall is
mandatory for PAPR+ and there is no way for the guest to
detect whether it is supported or not so just add it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
hw/intc/xics.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index f439e8d..2e6111d 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -689,6 +689,18 @@ static target_ulong h_eoi(PowerPCCPU *cpu, sPAPREnvironment *spapr,
return H_SUCCESS;
}
+static target_ulong h_ipoll(PowerPCCPU *cpu, sPAPREnvironment *spapr,
+ target_ulong opcode, target_ulong *args)
+{
+ CPUState *cs = CPU(cpu);
+ ICPState *ss = &spapr->icp->ss[cs->cpu_index];
+
+ args[0] = ss->xirr;
+ args[1] = ss->mfrr;
+
+ return H_SUCCESS;
+}
+
static void rtas_set_xive(PowerPCCPU *cpu, sPAPREnvironment *spapr,
uint32_t token,
uint32_t nargs, target_ulong args,
@@ -842,6 +854,7 @@ static void xics_realize(DeviceState *dev, Error **errp)
spapr_register_hypercall(H_IPI, h_ipi);
spapr_register_hypercall(H_XIRR, h_xirr);
spapr_register_hypercall(H_EOI, h_eoi);
+ spapr_register_hypercall(H_IPOLL, h_ipoll);
object_property_set_bool(OBJECT(icp->ics), true, "realized", &error);
if (error) {
--
1.8.4.rc4
next prev parent reply other threads:[~2013-08-23 12:03 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 5:55 [Qemu-devel] [PATCH v3 0/8] xics: reworks and in-kernel support Alexey Kardashevskiy
2013-08-19 5:55 ` [Qemu-devel] [PATCH v3 1/8] target-ppc: Add helper for KVM_PPC_RTAS_DEFINE_TOKEN Alexey Kardashevskiy
2013-08-26 13:11 ` Alexander Graf
2013-08-27 0:43 ` Benjamin Herrenschmidt
2013-08-27 1:48 ` Andreas Färber
2013-08-27 4:10 ` Benjamin Herrenschmidt
2013-08-27 8:36 ` Alexander Graf
2013-08-29 8:18 ` Alexey Kardashevskiy
2013-08-30 14:34 ` Alexander Graf
2013-08-30 22:19 ` Benjamin Herrenschmidt
2013-08-30 23:04 ` Alexander Graf
2013-08-30 20:05 ` Laszlo Ersek
2013-08-19 5:55 ` [Qemu-devel] [PATCH v3 2/8] xics: add pre_save/post_load/cpu_setup dispatchers Alexey Kardashevskiy
2013-08-19 13:54 ` Andreas Färber
2013-08-23 3:39 ` Alexey Kardashevskiy
2013-08-23 11:38 ` Andreas Färber
2013-08-29 8:25 ` Alexey Kardashevskiy
2013-08-29 8:32 ` Andreas Färber
2013-08-26 13:22 ` Alexander Graf
2013-08-19 5:55 ` [Qemu-devel] [PATCH v3 3/8] xics: move registration of global state to realize() Alexey Kardashevskiy
2013-08-26 13:27 ` Alexander Graf
2013-08-19 5:55 ` [Qemu-devel] [PATCH v3 4/8] xics: minor changes and cleanups Alexey Kardashevskiy
2013-08-26 13:36 ` Alexander Graf
2013-08-26 14:20 ` Andreas Färber
2013-08-26 14:31 ` Alexander Graf
2013-08-19 5:55 ` [Qemu-devel] [PATCH v3 5/8] xics: split to xics and xics-common Alexey Kardashevskiy
2013-08-26 13:40 ` Alexander Graf
2013-08-19 5:55 ` [Qemu-devel] [PATCH v3 6/8] xics-kvm: Support for in-kernel XICS interrupt controller Alexey Kardashevskiy
2013-08-27 9:28 ` Alexander Graf
2013-08-29 8:37 ` Andreas Färber
2013-08-29 8:53 ` Alexey Kardashevskiy
2013-08-30 0:10 ` Anthony Liguori
2013-08-23 11:56 ` [Qemu-devel] [PATCH v3 0/8] xics: reworks and in-kernel support Andreas Färber
2013-08-23 12:05 ` Alexey Kardashevskiy
2013-08-23 12:02 ` Alexey Kardashevskiy [this message]
2013-08-27 9:34 ` [Qemu-devel] [PATCH v3] xics: Add H_IPOLL implementation Alexander Graf
2013-08-23 12:03 ` [Qemu-devel] [PATCH v3] xics: Implement H_XIRR_X Alexey Kardashevskiy
2013-08-27 9:35 ` 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=1377259353-27815-1-git-send-email-aik@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--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).