qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	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: Tue, 11 Feb 2014 18:44:09 +1100	[thread overview]
Message-ID: <52F9D4C9.4000107@ozlabs.ru> (raw)
In-Reply-To: <87ob33hzn9.fsf@linux.vnet.ibm.com>

On 01/23/2014 07:26 PM, Aneesh Kumar K.V wrote:
> 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 ?

Does not it?


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


-- 
Alexey

  reply	other threads:[~2014-02-11  7:44 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
2014-02-11  7:44     ` Alexey Kardashevskiy [this message]
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=52F9D4C9.4000107@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --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).