summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-10-11fdc: Convert to isa_register_portio_listRichard Henderson1-30/+4
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-11isa: Add isa_register_portio_list()Avi Kivity2-1/+47
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-11memory: Fix old portio word accessesJan Kiszka1-0/+10
As we register old portio regions via ioport_register, we are also responsible for providing the word access wrapper. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-11Introduce PortioListAvi Kivity5-6/+135
Add a type and methods for manipulating a list of disjoint I/O ports, used in some older hardware devices. Based on original patch by Richard Henderson. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-10isa: Tidy support code for isabus_get_fw_dev_pathRichard Henderson2-24/+6
The only user of ISADevice.ioports is isabus_get_fw_dev_path, and it only looks at the first entry of the array. Which suggests that this entire array+sort operation can be replaced by a simple minimum. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-10ppc_newworld: convert to memory APIAvi Kivity1-22/+17
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-10hw/versatile_pci: Expose multiple sysbus mmio regionsPeter Maydell3-38/+28
Clean up versatile_pci to expose the various PCI mmio regions properly as separate mmio regions rather than as a single mmio which uses callbacks to map and unmap everything. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-10hw/arm11mpcore: Clean up to avoid using sysbus_mmio_init_cb2Peter Maydell1-12/+1
Clean up the initialisation of the realview_mpcore device to avoid using sysbus_init_mmio_cb2(): we can pass through the MemoryRegion of the private arm11mpcore_priv device directly now. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-10ppc405_boards: convert to memory APIAvi Kivity1-48/+37
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-10petalogix_s2adsp1800: convert to memory APIAvi Kivity1-8/+10
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-10petalogix_ml605: convert to memory APIAvi Kivity1-8/+7
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-10palm: convert to memory APIAvi Kivity1-28/+25
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-10hw/lan9118.c: Convert to MemoryRegionPeter Maydell1-18/+11
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-09Restore consistent formattingmalc3-15/+14
Signed-off-by: malc <av1474@comtv.ru>
2011-10-09Merge remote-tracking branch 'upstream' into memory/batchAvi Kivity78-660/+3465
* upstream: (87 commits) target-alpha: Fix compilation errors for 32 bit hosts target-alpha: Add high-resolution access to wall clock and an alarm. target-alpha: Implement HALT IPR. target-alpha: Implement WAIT IPR. target-alpha: Add CLIPPER emulation. target-alpha: Add custom PALcode image for CLIPPER emulation. target-alpha: Honor icount for RPCC instruction. tcg/s390: Remove unused tcg_out_addi() tcg/ia64: Remove unused tcg_out_addi() ARM: fix segfault ppc64: Fix linker script pseries: Implement set-time-of-day RTAS function pseries: Refactor spapr irq allocation PPC: Clean up BookE timer code PPC: booke timers KVM: PPC: Use HIOR setting for -M pseries with PR KVM KVM: Update kernel headers KVM: Update kernel headers PPC: Fix heathrow PIC to use little endian MMIO PPC: Fix via-cuda memory registration ... Conflicts: hw/milkymist-uart.c hw/ppce500_mpc8544ds.c Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-09target-alpha: Fix compilation errors for 32 bit hostsStefan Weil2-8/+15
On i386, these errors were reported: qemu/hw/alpha_dp264.c: In function ‘clipper_init’: qemu/hw/alpha_dp264.c:158: error: integer constant is too large for ‘unsigned long’ type qemu/hw/alpha_typhoon.c: In function ‘typhoon_init’: qemu/hw/alpha_typhoon.c:737: error: integer constant is too large for ‘long’ type qemu/hw/alpha_typhoon.c:741: error: integer constant is too large for ‘long’ type qemu/hw/alpha_typhoon.c:745: error: integer constant is too large for ‘long’ type qemu/hw/alpha_typhoon.c:749: error: integer constant is too large for ‘long’ type qemu/hw/alpha_typhoon.c:757: error: integer constant is too large for ‘long’ type qemu/hw/alpha_typhoon.c:767: error: integer constant is too large for ‘long’ type qemu/hw/alpha_typhoon.c:772: error: integer constant is too large for ‘long’ type Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-08Merge branch 'axp-system-7' of git://repo.or.cz/qemu/rthBlue Swirl16-18/+1261
* 'axp-system-7' of git://repo.or.cz/qemu/rth: target-alpha: Add high-resolution access to wall clock and an alarm. target-alpha: Implement HALT IPR. target-alpha: Implement WAIT IPR. target-alpha: Add CLIPPER emulation. target-alpha: Add custom PALcode image for CLIPPER emulation. target-alpha: Honor icount for RPCC instruction.
2011-10-08target-alpha: Add high-resolution access to wall clock and an alarm.Richard Henderson5-5/+68
The alarm is a fully general one-shot time comparator, which will be usable under Linux as a hrtimer source. It's much more flexible than the RTC source available on real hardware. The wall clock allows the guest access to the host timekeeping. Much like the KVM wall clock source for other guests. Both are accessed via the PALcode Cserve entry point. Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-08target-alpha: Implement HALT IPR.Richard Henderson3-0/+16
Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-08target-alpha: Implement WAIT IPR.Richard Henderson1-10/+21
Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-08target-alpha: Add CLIPPER emulation.Richard Henderson6-0/+1132
This is a DP264 variant, SMP capable, no unusual hardware present. The emulation does not currently include any PCI IOMMU code. Hopefully the generic support for that can be merged to HEAD soon. Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-08target-alpha: Add custom PALcode image for CLIPPER emulation.Richard Henderson6-2/+15
Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-08target-alpha: Honor icount for RPCC instruction.Richard Henderson1-2/+10
Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-08Merge branch 'for-upstream' of git://git.serverraum.org/git/mw/qemu-lm32Blue Swirl5-21/+75
* 'for-upstream' of git://git.serverraum.org/git/mw/qemu-lm32: milkymist: new interrupt map milkymist_uart: support new core version lm32: add missing qemu_init_vcpu() call
2011-10-08Merge branch 'tracing' of git://repo.or.cz/qemu/stefanhaBlue Swirl4-5/+15
* 'tracing' of git://repo.or.cz/qemu/stefanha: trace: add arguments to bdrv_co_io_em() trace event trace: trace monitor qmp dispatch/completion trace: trace bdrv_open_common() hmp: re-enable trace-file command
2011-10-08tcg/s390: Remove unused tcg_out_addi()Peter Maydell1-5/+0
Remove the unused function tcg_out_addi() from the s390 TCG backend; this brings it into line with other backends. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-08tcg/ia64: Remove unused tcg_out_addi()Peter Maydell1-19/+0
Remove the unused function tcg_out_addi() from the ia64 TCG backend; this brings it into line with other backends. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-08Merge branch 'ppc-next' of git://repo.or.cz/qemu/agrafBlue Swirl50-580/+1960
* 'ppc-next' of git://repo.or.cz/qemu/agraf: (64 commits) ppc64: Fix linker script pseries: Implement set-time-of-day RTAS function pseries: Refactor spapr irq allocation PPC: Clean up BookE timer code PPC: booke timers KVM: PPC: Use HIOR setting for -M pseries with PR KVM KVM: Update kernel headers KVM: Update kernel headers PPC: Fix heathrow PIC to use little endian MMIO PPC: Fix via-cuda memory registration ppc: move ADB stuff from ppc_mac.h to adb.h openpic: Unfold write_IRQreg openpic: Unfold read_IRQreg ppc405: use RAM_ADDR_FMT instead of %08lx Gdbstub: handle read of fpscr vscsi: send the CHECK_CONDITION status down together with autosense data pseries: Implement hcall-bulk hypervisor interface Implement POWER7's CFAR in TCG ppc: booke206: use MAV=2.0 TSIZE definition, fix 4G pages ppc: booke206: add "info tlb" support ...
2011-10-08ARM: fix segfaultBlue Swirl1-0/+1
Fix a bug in bccd9ec5f098668576342c83d90d6d6833d61d33, target-arm/op_helper.c missed a change unlike all other targets. This lead to a NULL pointer dereferences. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-06ppc64: Fix linker scriptAndreas Färber1-2/+2
Since commit 8733f609 (Fix linker scripts) linking on Linux/ppc64 fails: LINK ppc64-linux-user/qemu-ppc64 /usr/lib64/gcc/powerpc64-suse-linux/4.3/../../../../powerpc64-suse-linux/bin/ld:/home/afaerber/qemu/ppc64.ld:84: syntax error collect2: ld gab 1 als Ende-Status zurück make[1]: *** [qemu-ppc64] Fehler 1 make: *** [subdir-ppc64-linux-user] Fehler 2 Fix by removing a leftover line in the ppc64 linker script. Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06pseries: Implement set-time-of-day RTAS functionBreno Leitao2-1/+24
Currently there is no implementation for set-time-of-day rtas function, which causes the following warning "setting the clock failed (-1)" on the guest. This patch just creates this function, get the timedate diff and store in the papr environment, so that the correct value will be returned by get-time-of-day. In order to try it, just adjust the hardware time, run hwclock --systohc, so that, on when the system runs hwclock --hctosys, the value is correctly adjusted, i.e. the host time plus the timediff. Signed-off-by: Breno Leitao <brenohl@br.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06pseries: Refactor spapr irq allocationDavid Gibson4-11/+31
Paulo Bonzini changed the original spapr code, which manually assigned irq numbers for each virtual device, to allocate them automatically from the device initialization. That allowed spapr virtual devices to be constructed with -device, which is a good start. However, the way that patch worked doesn't extend nicely for the future when we want to support devices other than sPAPR VIO devices (e.g. virtio and PCI). This patch rearranges the irq allocation to be global across the sPAPR environment, so it can be used by other bus types as well. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06PPC: Clean up BookE timer codeAlexander Graf1-13/+1
The BookE timer code had some written-but-not-read variables. Get rid of them. Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06PPC: booke timersFabien Chouteau9-101/+427
While working on the emulation of the freescale p2010 (e500v2) I realized that there's no implementation of booke's timers features. Currently mpc8544 uses ppc_emb (ppc_emb_timers_init) which is close but not exactly like booke (for example booke uses different SPR). Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06KVM: PPC: Use HIOR setting for -M pseries with PR KVMAlexander Graf1-3/+22
When running with PR KVM, we need to set HIOR directly. Thankfully there is now a new interface to set registers individually so we can just use that and poke HIOR into the guest vcpu's HIOR register. While at it, this also sets SDR1 because -M pseries requires it to run. With this patch, -M pseries works properly with PR KVM. Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06KVM: Update kernel headersAlexander Graf2-0/+35
Update HIOR and generic register get/set. Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06KVM: Update kernel headersAlexander Graf2-9/+0
Removes ABI-breaking HIOR parts - KVM patch to follow. Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06PPC: Fix heathrow PIC to use little endian MMIOAlexander Graf1-1/+1
During the memory API conversion, the indication on little endianness of MMIO for the heathrow PIC got dropped. This patch adds it back again. Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06PPC: Fix via-cuda memory registrationAlexander Graf1-12/+16
Commit 23c5e4ca (convert to memory API) broke the VIA Cuda emulation layer by not registering the IO structs. This patch registers them properly and thus makes -M g3beige and -M mac99 work again. Tested-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06ppc: move ADB stuff from ppc_mac.h to adb.hLaurent Vivier6-43/+71
Allow to use ADB in non-ppc macintosh Signed-off-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06openpic: Unfold write_IRQregAlexander Graf1-42/+37
The helper function write_IRQreg was always called with a specific argument on the type of register to access. Inside the function we were simply doing a switch on that constant argument again. It's a lot easier to just unfold this into two separate functions and call each individually. Reported-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06openpic: Unfold read_IRQregAlexander Graf1-31/+25
The helper function read_IRQreg was always called with a specific argument on the type of register to access. Inside the function we were simply doing a switch on that constant argument again. It's a lot easier to just unfold this into two separate functions and call each individually. Reported-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06ppc405: use RAM_ADDR_FMT instead of %08lxStefan Hajnoczi1-2/+3
The RAM_ADDR_FMT macro hides the type of ram_addr_t so that format strings can be safely used. Make sure to use RAM_ADDR_FMT so that the build works on 32-bit hosts with Xen enabled. Whether Xen should affect ppc TCG targets is questionable but a separate issue. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06Gdbstub: handle read of fpscrFabien Chouteau2-3/+2
Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06vscsi: send the CHECK_CONDITION status down together with autosense dataPaolo Bonzini1-1/+0
I introduced this bug in commit 05751d3 (vscsi: always use get_sense, 2011-08-03) because at the time there was no way to expose a sense condition to SLOF and Linux manages to work around the bug. However, the bug becomes evident now that SCSI devices also report unit attention on reset. SLOF also has problems dealing with unit attention conditions, so it still will not boot even with this fix (just like OpenBIOS). IBM folks are aware of their part of the bug. :-) Reported-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06pseries: Implement hcall-bulk hypervisor interfaceDavid Gibson2-13/+114
This patch adds support for the H_REMOVE_BULK hypercall on the pseries machine. Strictly speaking this isn't necessarym since the kernel will only attempt to use this if hcall-bulk is advertised in the device tree, which previously it was not. Adding this support may give a marginal performance increase, but more importantly it reduces the differences between the emulated machine and an existing PowerVM or kvm system, both of which already implement hcall-bulk. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06Implement POWER7's CFAR in TCGDavid Gibson3-1/+58
This patch implements support for the CFAR SPR on POWER7 (Come From Address Register), which snapshots the PC value at the time of a branch or an rfid. The latest powerpc-next kernel also catches it and can show it in xmon or in the signal frames. This works well enough to let recent kernels boot (which otherwise oops on the CFAR access). It hasn't been tested enough to be confident that the CFAR values are actually accurate, but one thing at a time. Signed-off-by: Ben Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06ppc: booke206: use MAV=2.0 TSIZE definition, fix 4G pagesScott Wood3-5/+6
This definition is backward compatible with MAV=1.0 as long as the guest does not set reserved bits in MAS1/MAS4. Also, fix the shift in booke206_tlb_to_page_size -- it's the base that should be able to hold a 4G page size, not the shift count. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06ppc: booke206: add "info tlb" supportScott Wood4-3/+94
Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06kvm: ppc: booke206: use MMU APIScott Wood3-0/+89
Share the TLB array with KVM. This allows us to set the initial TLB both on initial boot and reset, is useful for debugging, and could eventually be used to support migration. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>