qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, paulus@ozlabs.org
Subject: Re: [Qemu-devel] [QEMU-PPC] [PATCH V2 2/3] target/ppc: Add one reg id for ptcr
Date: Wed, 10 Oct 2018 15:32:31 +1100	[thread overview]
Message-ID: <20181010043230.GK7004@umbus.fritz.box> (raw)
In-Reply-To: <20181008032539.6437-3-sjitindarsingh@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1797 bytes --]

On Mon, Oct 08, 2018 at 02:25:38PM +1100, Suraj Jitindar Singh wrote:
> The ptcr (partition table control register) is used to store the address
> and size of the partition table. For nested kvm-hv we have a level 1
> guest register the location of it's partition table with the hypervisor.
> Thus to support migration we need to be able to read this out of kvm
> and restore it post migration.
> 
> Add the one reg id for the ptcr.
> 
> Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  target/ppc/translate_init.inc.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.inc.c
> index 263e63cb03..487196800b 100644
> --- a/target/ppc/translate_init.inc.c
> +++ b/target/ppc/translate_init.inc.c
> @@ -8197,11 +8197,11 @@ static void gen_spr_power9_mmu(CPUPPCState *env)
>  {
>  #if !defined(CONFIG_USER_ONLY)
>      /* Partition Table Control */
> -    spr_register_hv(env, SPR_PTCR, "PTCR",
> -                    SPR_NOACCESS, SPR_NOACCESS,
> -                    SPR_NOACCESS, SPR_NOACCESS,
> -                    &spr_read_generic, &spr_write_ptcr,
> -                    0x00000000);
> +    spr_register_kvm_hv(env, SPR_PTCR, "PTCR",
> +                        SPR_NOACCESS, SPR_NOACCESS,
> +                        SPR_NOACCESS, SPR_NOACCESS,
> +                        &spr_read_generic, &spr_write_ptcr,
> +                        KVM_REG_PPC_PTCR, 0x00000000);
>  #endif
>  }
>  

-- 
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 --]

  reply	other threads:[~2018-10-10  5:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-08  3:25 [Qemu-devel] [QEMU-PPC] [PATCH V2 0/3] ppc/spapr: Add support for nested kvm-hv Suraj Jitindar Singh
2018-10-08  3:25 ` [Qemu-devel] [QEMU-PPC] [PATCH V2 1/3] target/ppc: Update linux-headers for v4.19-rc7 Suraj Jitindar Singh
2018-10-08  3:25 ` [Qemu-devel] [QEMU-PPC] [PATCH V2 2/3] target/ppc: Add one reg id for ptcr Suraj Jitindar Singh
2018-10-10  4:32   ` David Gibson [this message]
2018-10-08  3:25 ` [Qemu-devel] [QEMU-PPC] [PATCH V2 3/3] ppc/spapr_caps: Add SPAPR_CAP_NESTED_KVM_HV Suraj Jitindar Singh
2018-10-10  4:32   ` 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=20181010043230.GK7004@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=paulus@ozlabs.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=sjitindarsingh@gmail.com \
    /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).