From: David Gibson <david@gibson.dropbear.id.au>
To: Greg Kurz <groug@kaod.org>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] spapr: Disallow unsupported kernel-irqchip settings
Date: Mon, 11 Feb 2019 10:23:55 +1100 [thread overview]
Message-ID: <20190210232353.GC7230@umbus.fritz.box> (raw)
In-Reply-To: <154964986747.291716.2679312373018476920.stgit@bahia.lan>
[-- Attachment #1: Type: text/plain, Size: 2402 bytes --]
On Fri, Feb 08, 2019 at 07:17:47PM +0100, Greg Kurz wrote:
> Split mode doesn't make sense on pseries, neither with XICS nor XIVE. But
> passing kernel-irqchip=split silently behaves like kernel-irqchip=on.
> Other architectures that support kernel-irqchip do terminate QEMU when
> split mode is requested but not available though. Do the same with pseries
> for consistency.
>
> Similarly, passing kernel-irqchip=on,accel=tcg starts the machine with the
> emulated interrupt controller, ie, behaves like kernel-irqchip=off. However,
> when passing kernel-irqchip=on,accel=kvm, if we can't initialize the KVM
> XICS for some reason, ie, xics_kvm_init() fails, then QEMU is terminated.
> This is inconsistent. Terminate QEMU all the same when requesting the
> in-kernel interrupt controller without KVM.
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
>
> The odds for someone to have an existing pseries setup with split mode are
> very low since this is really an x86 thingy. And I guess we don't really
> care to break the silly kernel-irqchip=on,accel=tcg case. But if we really
> need to stay bug compatible, the errors can be turned into warnings.
Applied, thanks.
> ---
> hw/ppc/spapr_irq.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c
> index 2d7a7c163876..80b0083b8e38 100644
> --- a/hw/ppc/spapr_irq.c
> +++ b/hw/ppc/spapr_irq.c
> @@ -600,6 +600,19 @@ sPAPRIrq spapr_irq_dual = {
> */
> void spapr_irq_init(sPAPRMachineState *spapr, Error **errp)
> {
> + MachineState *machine = MACHINE(spapr);
> +
> + if (machine_kernel_irqchip_split(machine)) {
> + error_setg(errp, "kernel_irqchip split mode not supported on pseries");
> + return;
> + }
> +
> + if (!kvm_enabled() && machine_kernel_irqchip_required(machine)) {
> + error_setg(errp,
> + "kernel_irqchip requested but only available with KVM");
> + return;
> + }
> +
> /* Initialize the MSI IRQ allocator. */
> if (!SPAPR_MACHINE_GET_CLASS(spapr)->legacy_irq_allocation) {
> spapr_irq_msi_init(spapr, spapr->irq->nr_msis);
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2019-02-10 23:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-08 18:17 [Qemu-devel] [PATCH] spapr: Disallow unsupported kernel-irqchip settings Greg Kurz
2019-02-10 23:23 ` David Gibson [this message]
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=20190210232353.GC7230@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--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).