[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/32] linux-user: Correct AUXV Cache Line Sizes for
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PULL 01/32] linux-user: Correct AUXV Cache Line Sizes for PowerPC |
Date: |
Fri, 27 Jun 2014 13:51:53 +0200 |
From: Tom Musta <address@hidden>
Set the AT_ICACHEBSIZE and AT_DCACHEBSIZE entries of the AUXV to match the
CPU model's cache line sizes. This fixes memory clobbering problems on more
recent Book 3s implementations; memset(p, 0, N) will use the dcbz instruction
when N is sufficiently large and many of the newer server CPUs have cache lines
sizes of 128 bytes.
Signed-off-by: Tom Musta <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
linux-user/elfload.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 1248eda..64d23fa 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -774,8 +774,9 @@ static uint32_t get_elf_hwcap(void)
#define DLINFO_ARCH_ITEMS 5
#define ARCH_DLINFO \
do { \
- NEW_AUX_ENT(AT_DCACHEBSIZE, 0x20); \
- NEW_AUX_ENT(AT_ICACHEBSIZE, 0x20); \
+ PowerPCCPU *cpu = POWERPC_CPU(thread_cpu); \
+ NEW_AUX_ENT(AT_DCACHEBSIZE, cpu->env.dcache_line_size); \
+ NEW_AUX_ENT(AT_ICACHEBSIZE, cpu->env.icache_line_size); \
NEW_AUX_ENT(AT_UCACHEBSIZE, 0); \
/* \
* Now handle glibc compatibility. \
--
1.8.1.4
- [Qemu-devel] [PULL 00/32] ppc patch queue 2014-06-27, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 01/32] linux-user: Correct AUXV Cache Line Sizes for PowerPC,
Alexander Graf <=
- [Qemu-devel] [PULL 13/32] target-ppc: Remove unused IMM and d extract helpers, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 02/32] target-ppc: Add DFP to Emulated Instructions Flag, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 12/32] vfio: Enable for SPAPR, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 03/32] linux-user: Identify Addition Hardware Capabilities for PowerPC, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 09/32] spapr_iommu: Make in-kernel TCE table optional, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 14/32] target-ppc: Remove unused gen_qemu_ld8s(), Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 11/32] spapr_pci_vfio: Add spapr-pci-vfio-host-bridge to support vfio, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 17/32] target-ppc: Add support for POWER8 pvr 0x4D0000, Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 18/32] spapr: Fix code design style (s/SPAPRMachine/sPAPRMachineState), Alexander Graf, 2014/06/27
- [Qemu-devel] [PULL 05/32] spapr: Add "qemu, boot-menu" property to /chosen, Alexander Graf, 2014/06/27