[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 06/40] spapr_iommu: Make H_PUT_TCE_INDIRECT endian-sa
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PULL 06/40] spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe |
Date: |
Wed, 3 Jun 2015 23:45:07 +0200 |
From: Alexey Kardashevskiy <address@hidden>
PAPR is defined as big endian so TCEs need an adjustment so
does this patch.
This changes code to have ldq_be_phys() in one place.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Gibson <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
hw/ppc/spapr_iommu.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
index e19bf89..65ca469 100644
--- a/hw/ppc/spapr_iommu.c
+++ b/hw/ppc/spapr_iommu.c
@@ -247,7 +247,7 @@ static target_ulong h_put_tce_indirect(PowerPCCPU *cpu,
target_ulong ioba1 = ioba;
target_ulong tce_list = args[2];
target_ulong npages = args[3];
- target_ulong ret = H_PARAMETER;
+ target_ulong ret = H_PARAMETER, tce = 0;
sPAPRTCETable *tcet = spapr_tce_find_by_liobn(liobn);
CPUState *cs = CPU(cpu);
hwaddr page_mask, page_size;
@@ -267,7 +267,7 @@ static target_ulong h_put_tce_indirect(PowerPCCPU *cpu,
for (i = 0; i < npages; ++i, ioba += page_size) {
target_ulong off = (tce_list & ~SPAPR_TCE_RW) +
i * sizeof(target_ulong);
- target_ulong tce = ldq_phys(cs->as, off);
+ tce = ldq_be_phys(cs->as, off);
ret = put_tce_emu(tcet, ioba, tce);
if (ret) {
@@ -278,8 +278,7 @@ static target_ulong h_put_tce_indirect(PowerPCCPU *cpu,
/* Trace last successful or the first problematic entry */
i = i ? (i - 1) : 0;
trace_spapr_iommu_indirect(liobn, ioba1, tce_list, i,
- ldq_phys(cs->as,
- tce_list + i * sizeof(target_ulong)),
+ tce,
ret);
return ret;
--
1.8.1.4
- [Qemu-devel] [PULL 23/40] spapr_rtas: add get-sensor-state RTAS interface, (continued)
- [Qemu-devel] [PULL 23/40] spapr_rtas: add get-sensor-state RTAS interface, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 31/40] pci: make pci_bar useable outside pci.c, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 05/40] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 33/40] spapr_pci: emit hotplug add/remove events during hotplug, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 04/40] spapr_pci: Fix unsafe signed/unsigned comparisons, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 30/40] spapr_pci: create DRConnectors for each PCI slot during PHB realize, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 15/40] hw/ppc/spapr_iommu: Fix the check for invalid upper bits in liobn, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 24/40] spapr: add rtas_st_buffer_direct() helper, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 12/40] spapr_iommu: Make spapr_tce_find_by_liobn() public, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 08/40] spapr_vio: Introduce a liobn number generating macros, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 06/40] spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe,
Alexander Graf <=
- [Qemu-devel] [PULL 09/40] spapr_pci: Define default DMA window size as a macro, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 07/40] spapr_pci: Introduce a liobn number generating macros, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 18/40] hw/ppc/spapr: Use error_report() instead of hw_error(), Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 14/40] spapr_iommu: Give unique QOM name to TCE table, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 16/40] pseries: Add pseries-2.4 machine type, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 13/40] spapr_pci: Rework device-tree rendering, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 38/40] tci: do not use CPUArchState in tcg-target.h, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 37/40] Add David Gibson for sPAPR in MAINTAINERS file, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 35/40] spapr: override default ram size to 512MB, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 29/40] spapr_pci: add dynamic-reconfiguration option for spapr-pci-host-bridge, Alexander Graf, 2015/06/03