qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Cc: christophe.leroy@c-s.fr, qemu-ppc@nongnu.org, mikey@neuling.org,
	rogealve@br.ibm.com, kvm@vger.kernel.org, mst@redhat.com,
	mpe@ellerman.id.au, qemu-devel@nongnu.org, npiggin@gmail.com,
	paulus@samba.org, clg@kaod.org, jniethe5@gmail.com,
	pedromfc@br.ibm.com, pbonzini@redhat.com,
	david@gibson.dropbear.id.au
Subject: Re: [PATCH 2/2] ppc: Enable 2nd DAWR support on p10
Date: Thu, 23 Jul 2020 12:58:24 +0200	[thread overview]
Message-ID: <20200723125824.52383e32.cohuck@redhat.com> (raw)
In-Reply-To: <20200723104220.314671-3-ravi.bangoria@linux.ibm.com>

On Thu, 23 Jul 2020 16:12:20 +0530
Ravi Bangoria <ravi.bangoria@linux.ibm.com> wrote:

> As per the PAPR, bit 0 of byte 64 in pa-features property indicates
> availability of 2nd DAWR registers. i.e. If this bit is set, 2nd
> DAWR is present, otherwise not. Use KVM_CAP_PPC_DAWR1 capability to
> find whether kvm supports 2nd DAWR or nor. If it's supported, set
> the pa-feature bit in guest DT so the guest kernel can support 2nd
> DAWR.
> 
> Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
> ---
>  hw/ppc/spapr.c                  | 33 +++++++++++++++++++++++++++++++++
>  include/hw/ppc/spapr.h          |  1 +
>  linux-headers/asm-powerpc/kvm.h |  4 ++++
>  linux-headers/linux/kvm.h       |  1 +
>  target/ppc/cpu.h                |  2 ++
>  target/ppc/kvm.c                |  7 +++++++
>  target/ppc/kvm_ppc.h            |  6 ++++++
>  target/ppc/translate_init.inc.c | 17 ++++++++++++++++-
>  8 files changed, 70 insertions(+), 1 deletion(-)
> 

(...)

> diff --git a/linux-headers/asm-powerpc/kvm.h b/linux-headers/asm-powerpc/kvm.h
> index 38d61b73f5..c5c0f128b4 100644
> --- a/linux-headers/asm-powerpc/kvm.h
> +++ b/linux-headers/asm-powerpc/kvm.h
> @@ -640,6 +640,10 @@ struct kvm_ppc_cpu_char {
>  #define KVM_REG_PPC_ONLINE	(KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xbf)
>  #define KVM_REG_PPC_PTCR	(KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc0)
>  
> +/* POWER10 registers. */
> +#define KVM_REG_PPC_DAWR1	(KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc1)
> +#define KVM_REG_PPC_DAWRX1	(KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc2)
> +
>  /* Transactional Memory checkpointed state:
>   * This is all GPRs, all VSX regs and a subset of SPRs
>   */
> diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
> index a28c366737..015fa4b44b 100644
> --- a/linux-headers/linux/kvm.h
> +++ b/linux-headers/linux/kvm.h
> @@ -1031,6 +1031,7 @@ struct kvm_ppc_resize_hpt {
>  #define KVM_CAP_PPC_SECURE_GUEST 181
>  #define KVM_CAP_HALT_POLL 182
>  #define KVM_CAP_ASYNC_PF_INT 183
> +#define KVM_CAP_PPC_DAWR1 184
>  
>  #ifdef KVM_CAP_IRQ_ROUTING

Same here, this should go together with the headers changes from the
first patch.



  reply	other threads:[~2020-07-23 10:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23 10:42 [PATCH 0/2] ppc: Enable 2nd DAWR support on p10 Ravi Bangoria
2020-07-23 10:42 ` [PATCH 1/2] ppc: Rename current DAWR macros Ravi Bangoria
2020-07-23 10:55   ` Cornelia Huck
2020-07-23 10:42 ` [PATCH 2/2] ppc: Enable 2nd DAWR support on p10 Ravi Bangoria
2020-07-23 10:58   ` Cornelia Huck [this message]
2020-07-24  4:56   ` 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=20200723125824.52383e32.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=christophe.leroy@c-s.fr \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=jniethe5@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=mikey@neuling.org \
    --cc=mpe@ellerman.id.au \
    --cc=mst@redhat.com \
    --cc=npiggin@gmail.com \
    --cc=paulus@samba.org \
    --cc=pbonzini@redhat.com \
    --cc=pedromfc@br.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=ravi.bangoria@linux.ibm.com \
    --cc=rogealve@br.ibm.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).