qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Tom Musta <tommusta@gmail.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org
Cc: "qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH 2/4] spapr: Enable DABRX special register
Date: Thu, 03 Apr 2014 13:42:37 -0500	[thread overview]
Message-ID: <533DAB9D.20702@gmail.com> (raw)
In-Reply-To: <1396530891-6352-3-git-send-email-aik@ozlabs.ru>

On 4/3/2014 8:14 AM, Alexey Kardashevskiy wrote:
> This advertises Data Address Breakpoint Register Extension (DABRX) to
> the guest via hyperrtas list and enables it to migrate.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
>  hw/ppc/spapr.c              | 1 +
>  target-ppc/translate_init.c | 4 ++++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index a11e121..451c473 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -307,6 +307,7 @@ static void *spapr_create_fdt_skel(hwaddr initrd_base,
>      uint32_t start_prop = cpu_to_be32(initrd_base);
>      uint32_t end_prop = cpu_to_be32(initrd_base + initrd_size);
>      char hypertas_prop[] = "hcall-pft\0hcall-term\0hcall-dabr\0hcall-interrupt"
> +        "\0hcall-xdabr"
>          "\0hcall-tce\0hcall-vio\0hcall-splpar\0hcall-bulk\0hcall-set-mode";
>      char qemu_hypertas_prop[] = "hcall-memop1";
>      uint32_t refpoints[] = {cpu_to_be32(0x4), cpu_to_be32(0x4)};


It isn't clear to me what is enabled with this.  Alexey: can you provide a little explanation
of what adding this string actually does?  And I assume the spelling of "xdabr" (versus "dabrx")
is intentional?

> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
> index d07e186..1627bb0 100644
> --- a/target-ppc/translate_init.c
> +++ b/target-ppc/translate_init.c
> @@ -7010,6 +7010,10 @@ static void init_proc_POWER7 (CPUPPCState *env)
>                       SPR_NOACCESS, SPR_NOACCESS,
>                       &spr_read_generic, &spr_write_generic,
>                       KVM_REG_PPC_PMC6, 0x00000000);
> +    spr_register_kvm(env, SPR_DABRX, "DABRX",
> +                     SPR_NOACCESS, SPR_NOACCESS,
> +                     SPR_NOACCESS, SPR_NOACCESS,
> +                     KVM_REG_PPC_DABRX, 0x00000000);
>  #endif /* !CONFIG_USER_ONLY */
>      gen_spr_amr(env);
>      /* XXX : not implemented */
> 

I see a problem with this and it is caused by some of the P8 code that I had added a while back.
The P8 init code  (init_proc_POWER8) calls this init_proc_POWER7 routine.  So by adding DABRX
to the P7 code means P8 gets it for free.  Unfortunately, P8 doesn't have DABRX ... it supports
the new debug facilities (DAWR[X]).  The DABR and IABR registers are in the same boat.   I think
the init_proc_POWER8 code needs to become a self-sufficienct version.

I can fix and send to you or you can fix yourself ... let me know.

  parent reply	other threads:[~2014-04-03 18:42 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-03 13:14 [Qemu-devel] [PATCH 0/4] power7/8 migration patches Alexey Kardashevskiy
2014-04-03 13:14 ` [Qemu-devel] [PATCH 1/4] kvm: Add set_one_reg/get_one_reg helpers Alexey Kardashevskiy
2014-05-08 12:27   ` Alexander Graf
2014-05-09  1:35     ` Alexey Kardashevskiy
2014-05-09  8:06       ` [Qemu-devel] [PATCH] kvm: make one_reg helpers available for everyone Cornelia Huck
2014-05-13 10:01         ` Alexander Graf
2014-04-03 13:14 ` [Qemu-devel] [PATCH 2/4] spapr: Enable DABRX special register Alexey Kardashevskiy
2014-04-03 13:19   ` Alexander Graf
2014-04-04  6:13     ` Alexey Kardashevskiy
2014-04-04 12:21       ` Alexander Graf
2014-04-03 18:42   ` Tom Musta [this message]
2014-04-04  0:51     ` Alexey Kardashevskiy
2014-04-04 12:40       ` Tom Musta
2014-04-03 13:14 ` [Qemu-devel] [PATCH 3/4] KVM: PPC: Support POWER8 registers Alexey Kardashevskiy
2014-04-03 13:33   ` Alexander Graf
2014-04-03 19:12     ` Tom Musta
2014-04-04  6:58       ` Alexey Kardashevskiy
2014-04-04 12:23         ` Alexander Graf
2014-04-03 13:14 ` [Qemu-devel] [PATCH 4/4] spapr: Add support for time base offset migration Alexey Kardashevskiy
2014-04-10 12:34   ` Alexander Graf
2014-04-10 14:31     ` Alexey Kardashevskiy
2014-04-11  9:40       ` Alexander Graf
2014-04-11 21:55         ` Benjamin Herrenschmidt
2014-04-11 22:59           ` Alexander Graf
2014-04-11 23:03             ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2014-04-12  3:44           ` [Qemu-devel] " Alexey Kardashevskiy
2014-04-12  7:25             ` Alexander Graf

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=533DAB9D.20702@gmail.com \
    --to=tommusta@gmail.com \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --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).