[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 09/40] spapr: Remove abuse of rtas_ld() in h_client_arc
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 09/40] spapr: Remove abuse of rtas_ld() in h_client_architecture_support |
Date: |
Mon, 1 Feb 2016 13:30:37 +1100 |
h_client_architecture_support() uses rtas_ld() for general purpose memory
access, despite the fact that it's not an RTAS routine at all and rtas_ld
makes things more awkward.
Clean this up by replacing rtas_ld() calls with appropriate ldXX_phys()
calls.
Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Alexey Kardashevskiy <address@hidden>
---
hw/ppc/spapr_hcall.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index 51083cd..fdd7fea 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -862,7 +862,8 @@ static target_ulong
h_client_architecture_support(PowerPCCPU *cpu_,
target_ulong opcode,
target_ulong *args)
{
- target_ulong list = args[0], ov_table;
+ target_ulong list = ppc64_phys_to_real(args[0]);
+ target_ulong ov_table, ov5;
PowerPCCPUClass *pcc_ = POWERPC_CPU_GET_CLASS(cpu_);
CPUState *cs;
bool cpu_match = false, cpu_update = true, memory_update = false;
@@ -876,9 +877,9 @@ static target_ulong
h_client_architecture_support(PowerPCCPU *cpu_,
for (counter = 0; counter < 512; ++counter) {
uint32_t pvr, pvr_mask;
- pvr_mask = rtas_ld(list, 0);
+ pvr_mask = ldl_be_phys(&address_space_memory, list);
list += 4;
- pvr = rtas_ld(list, 0);
+ pvr = ldl_be_phys(&address_space_memory, list);
list += 4;
trace_spapr_cas_pvr_try(pvr);
@@ -949,14 +950,13 @@ static target_ulong
h_client_architecture_support(PowerPCCPU *cpu_,
/* For the future use: here @ov_table points to the first option vector */
ov_table = list;
- list = cas_get_option_vector(5, ov_table);
- if (!list) {
+ ov5 = cas_get_option_vector(5, ov_table);
+ if (!ov5) {
return H_SUCCESS;
}
/* @list now points to OV 5 */
- list += 2;
- ov5_byte2 = rtas_ld(list, 0) >> 24;
+ ov5_byte2 = ldub_phys(&address_space_memory, ov5 + 2);
if (ov5_byte2 & OV5_DRCONF_MEMORY) {
memory_update = true;
}
--
2.5.0
- [Qemu-ppc] [PULL 25/40] target-ppc: gdbstub: Add VSX support, (continued)
- [Qemu-ppc] [PULL 25/40] target-ppc: gdbstub: Add VSX support, David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 24/40] target-ppc: gdbstub: fix spe registers for little-endian guests, David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 28/40] uninorth.c: add support for UniNorth kMacRISCPCIAddressSelect (0x48) register, David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 37/40] target-ppc: Helper to determine page size information from hpte alone, David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 39/40] target-ppc: Make every FPSCR_ macro have a corresponding FP_ macro, David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 31/40] target-ppc: Rework ppc_store_slb, David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 35/40] target-ppc: Split 44x tlbiva from ppc_tlb_invalidate_one(), David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 32/40] target-ppc: Rework SLB page size lookup, David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 30/40] target-ppc: Convert mmu-hash{32, 64}.[ch] from CPUPPCState to PowerPCCPU, David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 02/40] target-ppc: use cpu_write_xer() helper in cpu_post_load, David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 09/40] spapr: Remove abuse of rtas_ld() in h_client_architecture_support,
David Gibson <=
- [Qemu-ppc] [PULL 20/40] target-ppc: rename and export maybe_bswap_register(), David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 13/40] pseries: Clean up error handling in spapr_validate_node_memory(), David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 04/40] macio: add dma_active to VMStateDescription, David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 14/40] pseries: Clean up error handling in spapr_vga_init(), David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 05/40] mac_dbdma: add DBDMA controller state to VMStateDescription, David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 10/40] spapr: Don't create ibm, dynamic-reconfiguration-memory w/o DR LMBs, David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 12/40] pseries: Clean up error handling of spapr_cpu_init(), David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 08/40] spapr: Remove rtas_st_buffer_direct(), David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 21/40] target-ppc: gdbstub: fix float registers for little-endian guests, David Gibson, 2016/01/31
- [Qemu-ppc] [PULL 38/40] target-ppc: Allow more page sizes for POWER7 & POWER8 in TCG, David Gibson, 2016/01/31