On 08.07.14 16:37, Peter Maydell wrote:
On 4 June 2014 13:51, Alexey Kardashevskiy <a...@ozlabs.ru> 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

Wow, and there I thought I always catch those ;).

Can you please quickly fix those up and commit then straight to the tree? I don't think we'll have to do the usual commit dance for changes as trivial as this.


Alex


Reply via email to