All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 3/3] spapr-hcall: add address-translation-mode-on-interrupt resource in H_SET_MODE
Date: Thu, 23 Jan 2014 13:56:50 +0530	[thread overview]
Message-ID: <87ob33hzn9.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1390369426-6462-4-git-send-email-aik@ozlabs.ru>

Alexey Kardashevskiy <aik@ozlabs.ru> writes:

> This adds handling of the RESOURCE_ADDR_TRANS_MODE resource from
> the H_SET_MODE, for POWER8 (PowerISA 2.07) only.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
>  hw/ppc/spapr_hcall.c | 26 ++++++++++++++++++++++++++
>  target-ppc/cpu.h     |  2 ++
>  2 files changed, 28 insertions(+)
>
> diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
> index b21d74b..7e4fc5f 100644
> --- a/hw/ppc/spapr_hcall.c
> +++ b/hw/ppc/spapr_hcall.c
> @@ -721,6 +721,32 @@ static target_ulong h_set_mode(PowerPCCPU *cpu, sPAPREnvironment *spapr,
>          default:
>              ret = H_UNSUPPORTED_FLAG;
>          }
> +    } else if (resource == H_SET_MODE_RESOURCE_ADDR_TRANS_MODE) {
> +        PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
> +
> +        if (!(pcc->insns_flags2 & PPC2_ISA207S)) {
> +            return H_P2;
> +        }
> +        if (value1) {
> +            ret = H_P3;
> +            goto out;
> +        }
> +        if (value2) {
> +            ret = H_P4;
> +            goto out;
> +        }
> +        switch (mflags) {
> +        case 0:

Shouldn't case 0 clear the LPCR_AIL bit ?

> +        case 2:
> +        case 3:
> +            CPU_FOREACH(cs) {
> +                set_spr(cs, SPR_LPCR, mflags << LPCR_AIL_SH, LPCR_AIL);
> +            }
> +            return H_SUCCESS;
> +
> +        default:
> +            return H_UNSUPPORTED_FLAG;
> +        }
>      }
>  

-aneesh

  reply	other threads:[~2014-01-23  8:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-22  5:43 [Qemu-devel] [PATCH v3 0/3] spapr: fix H_SET_MODE Alexey Kardashevskiy
2014-01-22  5:43 ` [Qemu-devel] [PATCH v3 1/3] target-ppc: introduce powerisa-207-server flag Alexey Kardashevskiy
2014-01-22  5:43 ` [Qemu-devel] [PATCH v3 2/3] spapr-hcall: fix little-endian resource handling in H_SET_MODE Alexey Kardashevskiy
2014-01-22  5:43 ` [Qemu-devel] [PATCH v3 3/3] spapr-hcall: add address-translation-mode-on-interrupt resource " Alexey Kardashevskiy
2014-01-23  8:26   ` Aneesh Kumar K.V [this message]
2014-02-11  7:44     ` Alexey Kardashevskiy
2014-02-11  7:44 ` [Qemu-devel] [PATCH v3 0/3] spapr: fix H_SET_MODE Alexey Kardashevskiy
2014-02-11 12:12   ` Alexander Graf
2014-02-11 12:16     ` Alexey Kardashevskiy
2014-02-14  9:30       ` Alexey Kardashevskiy
2014-03-07  4:01         ` Alexey Kardashevskiy

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=87ob33hzn9.fsf@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --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 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.