[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 30/30] spapr_hcall: Add address-translation-m
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v5 30/30] spapr_hcall: Add address-translation-mode-on-interrupt resource in H_SET_MODE |
Date: |
Tue, 8 Jul 2014 15:37:59 +0100 |
On 4 June 2014 13:51, Alexey Kardashevskiy <address@hidden> wrote:
> This adds handling of the RESOURCE_ADDR_TRANS_MODE resource from
> the H_SET_MODE, for POWER8 (PowerISA 2.07) only.
>
> This defines AIL flags for LPCR special register.
>
> This changes @excp_prefix according to the mode, takes effect in TCG.
>
> This turns support of a new capability PPC2_ISA207S flag for TCG.
I see this has hit master already, but:
> +static target_ulong h_set_mode_resouce_addr_trans_mode(PowerPCCPU *cpu,
> + target_ulong mflags,
> + target_ulong value1,
> + target_ulong value2)
"resource" has two 'r's in it.
> +{
> + CPUState *cs;
> + PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
> + target_ulong prefix;
> +
> + if (!(pcc->insns_flags2 & PPC2_ISA207S)) {
> + return H_P2;
> + }
> + if (value1) {
> + return H_P3;
> + }
> + if (value2) {
> + return H_P4;
> + }
> +
> + switch (mflags) {
> + case H_SET_MODE_ADDR_TRANS_NONE:
> + prefix = 0;
> + break;
> + case H_SET_MODE_ADDR_TRANS_0001_8000:
> + prefix = 0x18000;
> + break;
> + case H_SET_MODE_ADDR_TRANS_C000_0000_0000_4000:
> + prefix = 0xC000000000004000;
Needs an ULL suffix to avoid warnings on 32 bit:
/home/petmay01/linaro/qemu-from-laptop/qemu/hw/ppc/spapr_hcall.c: In
function ‘h_set_mode_resouce_addr_trans_mode’:
/home/petmay01/linaro/qemu-from-laptop/qemu/hw/ppc/spapr_hcall.c:773:
warning: integer constant is too large for ‘long’ type
thanks
-- PMM
- Re: [Qemu-devel] [PATCH v5 30/30] spapr_hcall: Add address-translation-mode-on-interrupt resource in H_SET_MODE,
Peter Maydell <=