public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@ozlabs.org>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: kvm-ppc@vger.kernel.org,
	David Gibson <david@gibson.dropbear.id.au>,
	kvm@vger.kernel.org
Subject: Re: [PATCH v6 00/17] KVM: PPC: Book3S HV: add XIVE native exploitation mode
Date: Tue, 30 Apr 2019 20:11:46 +1000	[thread overview]
Message-ID: <20190430101146.GJ32205@blackberry> (raw)
In-Reply-To: <20190418103942.2883-1-clg@kaod.org>

On Thu, Apr 18, 2019 at 12:39:25PM +0200, Cédric Le Goater wrote:
> On the POWER9 processor, the XIVE interrupt controller can control
> interrupt sources using MMIOs to trigger events, to EOI or to turn off
> the sources. Priority management and interrupt acknowledgment is also
> controlled by MMIO in the CPU presenter sub-engine.
> 
> PowerNV/baremetal Linux runs natively under XIVE but sPAPR guests need
> special support from the hypervisor to do the same. This is called the
> XIVE native exploitation mode and today, it can be activated under the
> PowerPC Hypervisor, pHyp. However, Linux/KVM lacks XIVE native support
> and still offers the old interrupt mode interface using a KVM device
> implementing the XICS hcalls over XIVE.
> 
> The following series is proposal to add the same support under KVM.
> 
> A new KVM device is introduced for the XIVE native exploitation
> mode. It reuses most of the XICS-over-XIVE glue implementation
> structures which are internal to KVM but has a completely different
> interface. A set of KVM device ioctls provide support for the
> hypervisor calls, all handled in QEMU, to configure the sources and
> the event queues. From there, all interrupt control is transferred to
> the guest which can use MMIOs.
> 
> These MMIO regions (ESB and TIMA) are exposed to guests in QEMU,
> similarly to VFIO, and the associated VMAs are populated dynamically
> with the appropriate pages using a fault handler. These are now
> implemented using mmap()s of the KVM device fd.
> 
> Migration has its own specific needs regarding memory. The patchset
> provides a specific control to quiesce XIVE before capturing the
> memory. The save and restore of the internal state is based on the
> same ioctls used for the hcalls.
> 
> On a POWER9 sPAPR machine, the Client Architecture Support (CAS)
> negotiation process determines whether the guest operates with a
> interrupt controller using the XICS legacy model, as found on POWER8,
> or in XIVE exploitation mode. Which means that the KVM interrupt
> device should be created at run-time, after the machine has started.
> This requires extra support from KVM to destroy KVM devices. It is
> introduced at the end of the patchset and requires some attention.
> 
> This is based on Linux 5.1-rc5 and is a candidate for 5.2. The OPAL
> patches have been merged now.

Thanks, patch series applied to my kvm-ppc-next tree.  I added two
patches of mine on top to make sure we exclude other execution paths
in the device release method, and to clear the escalation interrupt
hardware pointers on release.  I also modified your last patch to free
the xive structures in book3s.c rather than powerpc.c in order to fix
compilation for Book E configs.

Paul.

  parent reply	other threads:[~2019-04-30 10:12 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-18 10:39 [PATCH v6 00/17] KVM: PPC: Book3S HV: add XIVE native exploitation mode Cédric Le Goater
2019-04-18 10:39 ` [PATCH v6 01/17] powerpc/xive: add OPAL extensions for the XIVE native exploitation support Cédric Le Goater
2019-04-18 10:39 ` [PATCH v6 02/17] KVM: PPC: Book3S HV: add a new KVM device for the XIVE native exploitation mode Cédric Le Goater
2019-04-18 10:39 ` [PATCH v6 03/17] KVM: PPC: Book3S HV: XIVE: introduce a new capability KVM_CAP_PPC_IRQ_XIVE Cédric Le Goater
2019-04-18 10:39 ` [PATCH v6 04/17] KVM: PPC: Book3S HV: XIVE: add a control to initialize a source Cédric Le Goater
2019-04-18 10:39 ` [PATCH v6 05/17] KVM: PPC: Book3S HV: XIVE: add a control to configure " Cédric Le Goater
2019-04-18 10:39 ` [PATCH v6 06/17] KVM: PPC: Book3S HV: XIVE: add controls for the EQ configuration Cédric Le Goater
2019-04-18 10:39 ` [PATCH v6 07/17] KVM: PPC: Book3S HV: XIVE: add a global reset control Cédric Le Goater
2019-04-18 10:39 ` [PATCH v6 08/17] KVM: PPC: Book3S HV: XIVE: add a control to sync the sources Cédric Le Goater
2019-04-18 10:39 ` [PATCH v6 09/17] KVM: PPC: Book3S HV: XIVE: add a control to dirty the XIVE EQ pages Cédric Le Goater
2019-04-18 10:39 ` [PATCH v6 10/17] KVM: PPC: Book3S HV: XIVE: add get/set accessors for the VP XIVE state Cédric Le Goater
2019-04-18 10:39 ` [PATCH v6 11/17] KVM: introduce a 'mmap' method for KVM devices Cédric Le Goater
2019-04-18 10:39 ` [PATCH v6 12/17] KVM: PPC: Book3S HV: XIVE: add a TIMA mapping Cédric Le Goater
2019-04-18 10:39 ` [PATCH v6 13/17] KVM: PPC: Book3S HV: XIVE: add a mapping for the source ESB pages Cédric Le Goater
2019-04-18 10:39 ` [PATCH v6 14/17] KVM: PPC: Book3S HV: XIVE: add passthrough support Cédric Le Goater
2019-04-25  7:07   ` Paul Mackerras
2019-05-06 15:16     ` Cédric Le Goater
2019-04-18 10:39 ` [PATCH v6 15/17] KVM: PPC: Book3S HV: XIVE: activate XIVE exploitation mode Cédric Le Goater
2019-04-18 10:39 ` [PATCH v6 16/17] KVM: introduce a 'release' method for KVM devices Cédric Le Goater
2019-04-18 10:39 ` [PATCH v6 17/17] KVM: PPC: Book3S HV: XIVE: replace the 'destroy' method by a 'release' method Cédric Le Goater
2019-04-23  6:04   ` David Gibson
2019-04-26  6:10   ` [PATCH] KVM: PPC: Book3S HV: XIVE: Prevent races when releasing device Paul Mackerras
2019-04-29  1:24     ` [PATCH v2] " Paul Mackerras
2019-05-06 16:05       ` Cédric Le Goater
2019-04-30 10:11 ` Paul Mackerras [this message]
2019-05-06 16:10   ` [PATCH v6 00/17] KVM: PPC: Book3S HV: add XIVE native exploitation mode Cédric Le Goater

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=20190430101146.GJ32205@blackberry \
    --to=paulus@ozlabs.org \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --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