From: David Gibson <david@gibson.dropbear.id.au> To: "Cédric Le Goater" <clg@kaod.org> Cc: linuxppc-dev@lists.ozlabs.org, Paul Mackerras <paulus@samba.org>, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Subject: Re: [PATCH v3 10/17] KVM: PPC: Book3S HV: XIVE: add get/set accessors for the VP XIVE state Date: Tue, 19 Mar 2019 16:08:22 +1100 [thread overview] Message-ID: <20190319050821.GC31018@umbus.fritz.box> (raw) In-Reply-To: <20190315120609.25910-11-clg@kaod.org> [-- Attachment #1: Type: text/plain, Size: 2185 bytes --] On Fri, Mar 15, 2019 at 01:06:02PM +0100, Cédric Le Goater wrote: > The state of the thread interrupt management registers needs to be > collected for migration. These registers are cached under the > 'xive_saved_state.w01' field of the VCPU when the VPCU context is > pulled from the HW thread. An OPAL call retrieves the backup of the > IPB register in the underlying XIVE NVT structure and merges it in the > KVM state. > > Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> [snip] > diff --git a/Documentation/virtual/kvm/devices/xive.txt b/Documentation/virtual/kvm/devices/xive.txt > index e6a984592189..eb864d72ddc3 100644 > --- a/Documentation/virtual/kvm/devices/xive.txt > +++ b/Documentation/virtual/kvm/devices/xive.txt > @@ -104,6 +104,25 @@ the legacy interrupt mode, referred as XICS (POWER7/8). > -ENOENT: Unknown source number > -EINVAL: Not initialized source number > > +* VCPU state > + > + The XIVE IC maintains VP interrupt state in an internal structure > + called the NVT. When a VP is not dispatched on a HW processor > + thread, this structure can be updated by HW if the VP is the target > + of an event notification. > + > + It is important for migration to capture the cached IPB from the NVT > + as it synthesizes the priorities of the pending interrupts. We > + capture a bit more to report debug information. > + > + KVM_REG_PPC_VP_STATE (4 * 64bits) > + bits: | 63 .... 32 | 31 .... 0 | > + values: | TIMA word0 | TIMA word1 | > + bits: | 127 .......... 64 | > + values: | unused | > + bits: | 255 .......... 128 | > + values: | unused | > + > * Migration: > > Saving the state of a VM using the XIVE native exploitation mode Nit: looks like this doc needs to be updated now that only 2x 64-bit values are returned. -- 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 --]
WARNING: multiple messages have this Message-ID (diff)
From: David Gibson <david@gibson.dropbear.id.au> To: "Cédric Le Goater" <clg@kaod.org> Cc: linuxppc-dev@lists.ozlabs.org, Paul Mackerras <paulus@samba.org>, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Subject: Re: [PATCH v3 10/17] KVM: PPC: Book3S HV: XIVE: add get/set accessors for the VP XIVE state Date: Tue, 19 Mar 2019 05:08:22 +0000 [thread overview] Message-ID: <20190319050821.GC31018@umbus.fritz.box> (raw) In-Reply-To: <20190315120609.25910-11-clg@kaod.org> [-- Attachment #1: Type: text/plain, Size: 2185 bytes --] On Fri, Mar 15, 2019 at 01:06:02PM +0100, Cédric Le Goater wrote: > The state of the thread interrupt management registers needs to be > collected for migration. These registers are cached under the > 'xive_saved_state.w01' field of the VCPU when the VPCU context is > pulled from the HW thread. An OPAL call retrieves the backup of the > IPB register in the underlying XIVE NVT structure and merges it in the > KVM state. > > Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> [snip] > diff --git a/Documentation/virtual/kvm/devices/xive.txt b/Documentation/virtual/kvm/devices/xive.txt > index e6a984592189..eb864d72ddc3 100644 > --- a/Documentation/virtual/kvm/devices/xive.txt > +++ b/Documentation/virtual/kvm/devices/xive.txt > @@ -104,6 +104,25 @@ the legacy interrupt mode, referred as XICS (POWER7/8). > -ENOENT: Unknown source number > -EINVAL: Not initialized source number > > +* VCPU state > + > + The XIVE IC maintains VP interrupt state in an internal structure > + called the NVT. When a VP is not dispatched on a HW processor > + thread, this structure can be updated by HW if the VP is the target > + of an event notification. > + > + It is important for migration to capture the cached IPB from the NVT > + as it synthesizes the priorities of the pending interrupts. We > + capture a bit more to report debug information. > + > + KVM_REG_PPC_VP_STATE (4 * 64bits) > + bits: | 63 .... 32 | 31 .... 0 | > + values: | TIMA word0 | TIMA word1 | > + bits: | 127 .......... 64 | > + values: | unused | > + bits: | 255 .......... 128 | > + values: | unused | > + > * Migration: > > Saving the state of a VM using the XIVE native exploitation mode Nit: looks like this doc needs to be updated now that only 2x 64-bit values are returned. -- 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 --]
next prev parent reply other threads:[~2019-03-19 5:08 UTC|newest] Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-03-15 12:05 [PATCH v3 00/17] KVM: PPC: Book3S HV: add XIVE native exploitation mode Cédric Le Goater 2019-03-15 12:05 ` Cédric Le Goater 2019-03-15 12:05 ` [PATCH v3 01/17] powerpc/xive: add OPAL extensions for the XIVE native exploitation support Cédric Le Goater 2019-03-15 12:05 ` Cédric Le Goater 2019-03-15 12:05 ` [PATCH v3 02/17] KVM: PPC: Book3S HV: add a new KVM device for the XIVE native exploitation mode Cédric Le Goater 2019-03-15 12:05 ` Cédric Le Goater 2019-03-17 23:48 ` David Gibson 2019-03-17 23:48 ` David Gibson 2019-03-15 12:05 ` [PATCH v3 03/17] KVM: PPC: Book3S HV: XIVE: introduce a new capability KVM_CAP_PPC_IRQ_XIVE Cédric Le Goater 2019-03-15 12:05 ` Cédric Le Goater 2019-03-18 0:19 ` David Gibson 2019-03-18 0:19 ` David Gibson 2019-03-18 10:00 ` Cédric Le Goater 2019-03-18 10:00 ` Cédric Le Goater 2019-03-15 12:05 ` [PATCH v3 04/17] KVM: PPC: Book3S HV: XIVE: add a control to initialize a source Cédric Le Goater 2019-03-15 12:05 ` Cédric Le Goater 2019-03-18 1:38 ` David Gibson 2019-03-18 1:38 ` David Gibson 2019-03-15 12:05 ` [PATCH v3 05/17] KVM: PPC: Book3S HV: XIVE: add a control to configure " Cédric Le Goater 2019-03-15 12:05 ` Cédric Le Goater 2019-03-15 12:05 ` [PATCH v3 06/17] KVM: PPC: Book3S HV: XIVE: add controls for the EQ configuration Cédric Le Goater 2019-03-15 12:05 ` Cédric Le Goater 2019-03-18 3:23 ` David Gibson 2019-03-18 3:23 ` David Gibson 2019-03-18 14:12 ` Cédric Le Goater 2019-03-18 14:12 ` Cédric Le Goater 2019-03-18 14:38 ` Cédric Le Goater 2019-03-18 14:38 ` Cédric Le Goater 2019-03-19 4:54 ` David Gibson 2019-03-19 4:54 ` David Gibson 2019-03-19 15:47 ` Cédric Le Goater 2019-03-19 15:47 ` Cédric Le Goater 2019-03-20 3:44 ` David Gibson 2019-03-20 3:44 ` David Gibson 2019-03-20 6:44 ` Cédric Le Goater 2019-03-20 6:44 ` Cédric Le Goater 2019-03-15 12:05 ` [PATCH v3 07/17] KVM: PPC: Book3S HV: XIVE: add a global reset control Cédric Le Goater 2019-03-15 12:05 ` Cédric Le Goater 2019-03-18 3:25 ` David Gibson 2019-03-18 3:25 ` David Gibson 2019-03-15 12:06 ` [PATCH v3 08/17] KVM: PPC: Book3S HV: XIVE: add a control to sync the sources Cédric Le Goater 2019-03-15 12:06 ` Cédric Le Goater 2019-03-18 3:28 ` David Gibson 2019-03-18 3:28 ` David Gibson 2019-03-15 12:06 ` [PATCH v3 09/17] KVM: PPC: Book3S HV: XIVE: add a control to dirty the XIVE EQ pages Cédric Le Goater 2019-03-15 12:06 ` Cédric Le Goater 2019-03-18 3:31 ` David Gibson 2019-03-18 3:31 ` David Gibson 2019-03-15 12:06 ` [PATCH v3 10/17] KVM: PPC: Book3S HV: XIVE: add get/set accessors for the VP XIVE state Cédric Le Goater 2019-03-15 12:06 ` Cédric Le Goater 2019-03-19 5:08 ` David Gibson [this message] 2019-03-19 5:08 ` David Gibson 2019-03-15 12:06 ` [PATCH v3 11/17] KVM: introduce a 'mmap' method for KVM devices Cédric Le Goater 2019-03-15 12:06 ` Cédric Le Goater 2019-03-18 3:32 ` David Gibson 2019-03-18 3:32 ` David Gibson 2019-03-15 12:06 ` [PATCH v3 12/17] KVM: PPC: Book3S HV: XIVE: add a TIMA mapping Cédric Le Goater 2019-03-15 12:06 ` Cédric Le Goater 2019-03-15 12:06 ` [PATCH v3 13/17] KVM: PPC: Book3S HV: XIVE: add a mapping for the source ESB pages Cédric Le Goater 2019-03-15 12:06 ` Cédric Le Goater 2019-03-15 12:06 ` [PATCH v3 14/17] KVM: PPC: Book3S HV: XIVE: add passthrough support Cédric Le Goater 2019-03-15 12:06 ` Cédric Le Goater 2019-03-19 5:22 ` David Gibson 2019-03-19 5:22 ` David Gibson 2019-03-15 12:06 ` [PATCH v3 15/17] KVM: PPC: Book3S HV: XIVE: activate XIVE exploitation mode Cédric Le Goater 2019-03-15 12:06 ` Cédric Le Goater 2019-03-18 6:42 ` David Gibson 2019-03-18 6:42 ` David Gibson 2019-03-15 12:06 ` [PATCH v3 16/17] KVM: introduce a KVM_DESTROY_DEVICE ioctl Cédric Le Goater 2019-03-15 12:06 ` Cédric Le Goater 2019-03-18 6:42 ` David Gibson 2019-03-18 6:42 ` David Gibson 2019-03-15 12:06 ` [PATCH v3 17/17] KVM: PPC: Book3S HV: XIVE: clear the vCPU interrupt presenters Cédric Le Goater 2019-03-15 12:06 ` Cédric Le Goater 2019-03-19 5:37 ` David Gibson 2019-03-19 5:37 ` David Gibson
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=20190319050821.GC31018@umbus.fritz.box \ --to=david@gibson.dropbear.id.au \ --cc=clg@kaod.org \ --cc=kvm-ppc@vger.kernel.org \ --cc=kvm@vger.kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.