- Apr 15, 2012
-
-
Juan Quintela authored
machine.c is only compiled for softmmu targets, so checks for !defined(CONFIG_USER_ONLY) are unnecessary and can be dropped. Signed-off-by:
Juan Quintela <quintela@redhat.com> [AF: Use more verbose commit message suggested by PMM] Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andreas Färber <afaerber@suse.de>
-
Meador Inge authored
commit f7aa5583 pulled the dcache and icache line size initialization inside of a '#if !defined(CONFIG_USER_ONLY)' block. This is not correct because instructions like 'dcbz' need the dcache size initialized even for user mode. Signed-off-by:
Meador Inge <meadori@codesourcery.com> Cc: Varun Sethi <Varun.Sethi@freescale.com> [AF: Simplify #ifdefs by using cache line size 32 for *-user as before] Suggested-by:
Scott Wood <scottwood@freescale.com> Signed-off-by:
Andreas Färber <afaerber@suse.de>
-
Stefan Weil authored
This changes nothing for other hosts. Signed-off-by:
Stefan Weil <sw@weilnetz.de> Signed-off-by:
Andreas Färber <afaerber@suse.de>
-
Andreas Färber authored
Move code from cpu_state_reset() into ppc_cpu_reset(). Reorder #include of helper_regs.h to use it in translate_init.c. Adjust whitespace and add braces. Signed-off-by:
Andreas Färber <afaerber@suse.de> Acked-by:
David Gibson <david@gibson.dropbear.id.au>
-
Andreas Färber authored
Move code not dependent on ppc_def_t from cpu_ppc_init() into an initfn. Signed-off-by:
Andreas Färber <afaerber@suse.de> Acked-by:
David Gibson <david@gibson.dropbear.id.au>
-
Andreas Färber authored
Embed CPUPPCState as first member of PowerPCCPU. Distinguish between "powerpc-cpu", "powerpc64-cpu" and "embedded-powerpc-cpu". Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by:
Andreas Färber <afaerber@suse.de> Acked-by:
David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
On target-ppc, our table of CPU types and features encodes the features as found on the hardware, regardless of whether these features are actually usable under TCG or KVM. We already have cases where the information from the cpu table must be fixed up to account for limitations in the emulation method we're using. e.g. TCG does not support the DFP and VSX instructions and KVM needs different numbering of the CPUs in order to tell it the correct thread to core mappings. This patch cleans up these hacks to handle emulation limitations by consolidating them into a pair of functions specifically for the purpose. Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> [AF: Style and typo fixes, rename new functions and drop ppc_def_t arg] Signed-off-by:
Andreas Färber <afaerber@suse.de>
-
Andreas Färber authored
It is unused, so avoid QOM'ifying it unneededly. Signed-off-by:
Andreas Färber <afaerber@suse.de> Acked-by:
David Gibson <david@gibson.dropbear.id.au>
-
Mark Cave-Ayland authored
Commit 41557447 also introduced a subtle TLB flush bug. By applying a mask to the interrupt MSR which cleared the IR/DR bits at the start of the interrupt handler, the logic towards the end of the handler to force a TLB flush if either one of these bits were set would never be triggered. This patch simply changes the IR/DR bit check in the TLB flush logic to use the original MSR value (albeit with some interrupt-specific bits cleared) so that the IR/DR bits are preserved at the point where the check takes place. Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Andreas Färber <afaerber@suse.de>
-
- Apr 14, 2012
-
-
Blue Swirl authored
Use uintptr_t instead of void * or unsigned long in several op related functions, env->mem_io_pc and GETPC() macro. Reviewed-by:
Stefan Weil <sw@weilnetz.de> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Apr 07, 2012
-
-
Stefan Weil authored
The official spelling is QEMU. Signed-off-by:
Stefan Weil <sw@weilnetz.de> Reviewed-by:
Andreas Färber <afaerber@suse.de> [blauwirbel@gmail.com: fixed comment style in hw/sun4m.c] Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Mar 15, 2012
-
-
Alexander Graf authored
When we dump the CPU registers, there's a certain chance they haven't been synchronized with KVM yet, so we have to manually trigger that. This aligns the code with x86 and fixes a bug where the register state was bogus on invalid/unknown kvm exit reasons. Reported-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Meador Inge authored
'POWERPC_INSNS2_DEFAULT' was defined incorrectly which was causing the opcode table creation code to erroneously register 'eieio' and 'mbar' for the "default" processor: ** ERROR: opcode 1a already assigned in opcode table 16 *** ERROR: unable to insert opcode [1f-16-1a] *** ERROR initializing PowerPC instruction 0x1f 0x16 0x1a Signed-off-by:
Meador Inge <meadori@codesourcery.com> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Nathan Whitehorn authored
Fix large page support in TCG. The old code would overwrite the large page table entry with the fake 4 KB one generated here whenever the ref/change bits were updated, causing it to point to the wrong area of memory. Signed-off-by:
Nathan Whitehorn <nwhitehorn@freebsd.org> Acked-by:
David Gibson <david@gibson.drobpear.id.au> [agraf: fix whitespace, braces] Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Nathan Whitehorn authored
The POWER7 emulation is missing the Processor Identification Register, mandatory in recent POWER CPUs, that is required for SMP on at least some operating systems (e.g. FreeBSD) to function properly. This patch copies the existing PIR code from the other CPUs that implement it. Signed-off-by:
Nathan Whitehorn <nwhitehorn@freebsd.org> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Thomas Huth authored
These instructions for loading and storing byte-swapped 64-bit values have been introduced in PowerISA 2.06. Signed-off-by:
Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
David Gibson authored
For the pseries machine, TCE (IOMMU) tables can either be directly malloc()ed in qemu or, when running on a KVM which supports it, mmap()ed from a KVM ioctl. The latter option is used when available, because it allows the (frequent bottlenext) H_PUT_TCE hypercall to be KVM accelerated. However, even when KVM is persent, TCE acceleration is not always possible. Only KVM HV supports this ioctl(), not KVM PR, or the kernel could run out of contiguous memory to allocate the new table. In this case we need to fall back on the malloc()ed table. When a device is removed, and we need to remove the TCE table, we need to either munmap() or free() the table as appropriate for how it was allocated. The code is supposed to do that, but we buggily fail to initialize the tcet->fd variable in the malloc() case, which is used as a flag to determine which is the right choice. This patch fixes the bug, and cleans up error messages relating to this path while we're at it. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
- Mar 14, 2012
-
-
Andreas Färber authored
Scripted conversion: for file in *.[hc] hw/*.[hc] hw/kvm/*.[hc] linux-user/*.[hc] linux-user/m68k/*.[hc] bsd-user/*.[hc] darwin-user/*.[hc] tcg/*/*.[hc] target-*/cpu.h; do sed -i "s/CPUState/CPUArchState/g" $file done All occurrences of CPUArchState are expected to be replaced by QOM CPUState, once all targets are QOM'ified and common fields have been extracted. Signed-off-by:
Andreas Färber <afaerber@suse.de> Reviewed-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Andreas Färber authored
Scripted conversion: sed -i "s/CPUState/CPUPPCState/g" target-ppc/*.[hc] sed -i "s/#define CPUPPCState/#define CPUState/" target-ppc/cpu.h Signed-off-by:
Andreas Färber <afaerber@suse.de> Acked-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Andreas Färber authored
Frees the identifier cpu_reset for QOM CPUs (manual rename). Don't hide the parameter type behind explicit casts, use static functions with strongly typed argument to indirect. Signed-off-by:
Andreas Färber <afaerber@suse.de> Reviewed-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Alexander Graf authored
On ppc405ep there is a register that allows for software to reset the core, but not the whole system. Implement this reset using a reset interrupt. This gets rid of a bunch of #if 0'ed code. Reported-by:
Andreas Färber <afaerber@suse.de> Signed-off-by:
Alexander Graf <agraf@suse.de> Signed-off-by:
Andreas Färber <afaerber@suse.de>
-
- Feb 28, 2012
-
-
Stefan Weil authored
Remove some include statements which are not needed. Acked-by:
Alexander Graf <agraf@suse.de> Signed-off-by:
Stefan Weil <sw@weilnetz.de>
-
- Feb 11, 2012
-
-
Blue Swirl authored
Fix this error: /src/qemu/target-ppc/helper.c: In function 'booke206_tlb_to_page_size': /src/qemu/target-ppc/helper.c:1296:14: error: variable 'tlbncfg' set but not used [-Werror=unused-but-set-variable] Tested-by:
Andreas Färber <afaerber@suse.de> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Feb 02, 2012
-
-
Alexander Graf authored
When running Linux on e500 with powersave-nap enabled, Linux tries to read out the L1CFG0 register and calculates some things from it. Passing 0 there ends up in a division by 0, resulting in -1, resulting in badness. So let's populate the L1CFG0 register with reasonable defaults. That way guests aren't completely confused. Reported-by:
Shrijeet Mukherjee <shm@cumulusnetworks.com> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
The e500mc implements Embedded.Processor Control, so enable it and thus enable guests to IPI each other. This makes -smp work with -cpu e500mc. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
This patch implements the msgsnd instruction. It is part of the Embedded.Processor Control specification and allows one CPU to IPI another CPU without going through an interrupt controller. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
This patch implements the msgclr instruction. It is part of the Embedded.Processor Control specification and clears pending doorbell interrupts on the current CPU. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
We already had all the code available to have doorbell exceptions be handled properly. It was just disabled. Enable it, so we can rely on it. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
We're soon going to implement processor control features. Add the feature flag, so we're well prepared. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
We're going to introduce doorbell instructions (called processor control in the spec) soon. Add some defines for easier patch readability later. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
Our EXCP list is getting outdated. By now, 3 new exception vectors have been introduced. Update the list so we have everything at one place. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
We can have TLBs that only support a single page size. This is defined by the absence of the AVAIL flag in TLBnCFG. If this is the case, we currently write invalid size info into the TLB, but override it on internal fault. Let's move the check over to tlbwe, so we don't have the AVAIL check in the hotter fault path. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
Our internal helpers to fetch TLB entries were not able to tell us that an entry doesn't even exist. Pass an error out if we hit such a case to not accidently pass beyond the TLB array. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
The PowerPC 2.06 BookE ISA defines an opcode called "tlbilx" which is used to flush TLB entries. It's the recommended way of flushing in virtualized environments. So far we got away without implementing it, but Linux for e500mc uses this instruction, so we better add it :). Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
When setting a TLB entry, we need to check if the TLB we're putting it in actually supports the given size. According to the 2.06 PowerPC ISA, a value that's out of range can either be redefined to something implementation dependent or we can raise an illegal opcode exception. We do the latter. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
When using MAV 2.0 TLB registers, we have another range of TLB registers available to read the supported page sizes from. Add SPR definitions for those and add a helper function that we can use to receive such a bitmap even when using MAV 1.0. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
We might want to call the tlb check function without actually caring about the real address resolution. Check if we really should write the value back. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
The msync instruction as defined today is only valid on 4xx cores, not on e500 which also supports msync, but treats it the same way as sync. Rename it to reflect that it's 4xx only. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
The e500 CPUs don't use 440's msync which falls on the same opcode IDs, but instead use the real powerpc sync instruction. This is important, since the invalid mask differs between the two. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
E500mc supports IVORs 36-41. Add them to the support mask. Drop SPE support too. Signed-off-by:
Alexander Graf <agraf@suse.de>
-