From: Scott Wood <scottwood@freescale.com>
To: Paul Mackerras <paulus@samba.org>
Cc: <kvm-ppc@vger.kernel.org>, <kvm@vger.kernel.org>,
<linuxppc-dev@ozlabs.org>, Alexander Graf <agraf@suse.de>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Gleb Natapov <gleb@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [PATCH] KVM: PPC: Book3S: Add support for H_IPOLL and H_XIRR_X in XICS emulation
Date: Tue, 28 May 2013 12:41:42 -0500 [thread overview]
Message-ID: <1369762902.18630.2@snotra> (raw)
In-Reply-To: <20130524014221.GA19310@iris.ozlabs.ibm.com> (from paulus@samba.org on Thu May 23 20:42:21 2013)
On 05/23/2013 08:42:21 PM, Paul Mackerras wrote:
> This adds the remaining two hypercalls defined by PAPR for
> manipulating
> the XICS interrupt controller, H_IPOLL and H_XIRR_X. H_IPOLL returns
> information about the priority and pending interrupts for a virtual
> cpu, without changing any state. H_XIRR_X is like H_XIRR in that it
> reads and acknowledges the highest-priority pending interrupt, but it
> also returns the timestamp (timebase register value) from when the
> interrupt was first received by the hypervisor. Currently we just
> return the current time, since we don't do any software queueing of
> virtual interrupts inside the XICS emulation code.
>
> These hcalls are not currently used by Linux guests, but may be in
> future.
>
> Signed-off-by: Paul Mackerras <paulus@samba.org>
> ---
> Unfortunately I missed these two hcalls in the previous submissions.
> It would be good to get this patch into 3.10 so we don't have a
> kernel version with these calls missing from the API, in case future
> guest kernels want to use them.
>
> Alex, given you're on vacation at the moment, are you OK with Ben
> taking this through his tree?
I believe Alex is staying far away from e-mail on his vacation. He's
asked me to fill in for him while he's gone.
The patch itself seems reasonable (though I don't know much about XICS,
and do have one question...), but I'll leave it up to Gleb/Marcelo/Ben
if it should go in for 3.10 and via which tree. I understand the
desire to not have an incomplete ABI in a released version, but Linus
is already grumbling about how much went into rc3, and you say the
hcalls aren't currently used... Are they likely to be used in any
timeframe in which we'd reasonably care about 3.10? If so, would the
effect of not having them implemented be such that it would be worse
than not having in-kernel XICS at all?
> @@ -787,6 +804,18 @@ int kvmppc_xics_hcall(struct kvm_vcpu *vcpu, u32
> req)
> if (!xics || !vcpu->arch.icp)
> return H_HARDWARE;
>
> + /* These requests don't have real-mode implementations at
> present */
> + switch (req) {
> + case H_XIRR_X:
> + res = kvmppc_h_xirr(vcpu);
> + kvmppc_set_gpr(vcpu, 4, res);
> + kvmppc_set_gpr(vcpu, 5, get_tb());
> + return rc;
> + case H_IPOLL:
> + rc = kvmppc_h_ipoll(vcpu, kvmppc_get_gpr(vcpu, 4));
> + return rc;
> + }
> +
> /* Check for real mode returning too hard */
> if (xics->real_mode)
> return kvmppc_xics_rm_complete(vcpu, req);
Could you explain what's going on here relative to
kvmppc_xics_rm_complete()? What does "returning too hard" mean, and
why must rm_action not be checked for these hcalls?
-Scott
next prev parent reply other threads:[~2013-05-28 17:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-24 1:42 [PATCH] KVM: PPC: Book3S: Add support for H_IPOLL and H_XIRR_X in XICS emulation Paul Mackerras
2013-05-28 17:41 ` Scott Wood [this message]
2013-05-29 0:41 ` Benjamin Herrenschmidt
2013-05-29 23:38 ` Scott Wood
2013-05-29 23:57 ` Benjamin Herrenschmidt
2013-05-30 0:07 ` Scott Wood
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=1369762902.18630.2@snotra \
--to=scottwood@freescale.com \
--cc=agraf@suse.de \
--cc=benh@kernel.crashing.org \
--cc=gleb@redhat.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mtosatti@redhat.com \
--cc=paulus@samba.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