summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* milkymist-vgafb: add missing registerMichael Walle2012-04-011-1/+4
| | | | | | | | | This bug existed since the first commit. Fortunately, the affected registers have no functionality in qemu. This will only prevent the following warning: milkymist_vgafb: write access to unknown register 0x00000034 Signed-off-by: Michael Walle <michael@walle.cc>
* milkymist-sysctl: support for new core versionMichael Walle2012-03-311-9/+17
| | | | | | | | | The new version introduces the following new registers: - SoC clock frequency: read-only of system clock used on the SoC - debug scratchpad: 8 bit scratchpad register - debug write lock: write once register, without any function on QEMU Signed-off-by: Michael Walle <michael@walle.cc>
* Merge branch 'arm-devs.for-upstream' of ↵Blue Swirl2012-03-315-54/+78
|\ | | | | | | | | | | | | | | | | | | | | git://git.linaro.org/people/pmaydell/qemu-arm * 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm: pl031: switch clock base to rtc_clock pl031: rearm alarm timer upon load arm: switch real-time clocks to rtc_clock omap: switch omap_lpg to vm_clock rtc: add -rtc clock=rt
| * pl031: switch clock base to rtc_clockPaolo Bonzini2012-03-301-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets the user specify the desired semantics. By default, the RTC will follow adjustments from the host's NTP client, and will remain in sync when the virtual machine is stopped. The previous behavior, which provides determinism with both icount and qtest, remains available with "-rtc clock=vm". pl031 supports migration, so we need to convert the time base from rtc_clock to vm_clock and back for backwards compatibility. (The rtc_clock may not be synchronized on the two machines, especially with savevm/loadvm, so the conversion is needed anyway. And since any time base will do, why not pick the one base that is backwards compatible). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * pl031: rearm alarm timer upon loadPaolo Bonzini2012-03-301-15/+24
| | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * arm: switch real-time clocks to rtc_clockPaolo Bonzini2012-03-304-25/+26
| | | | | | | | | | | | | | | | | | | | This lets the user specify the desired semantics. By default, the RTC will follow adjustments from the host's NTP client. "-rtc clock=vm" will improve determinism with both icount and qtest. Finally, the previous behavior is available with "-rtc clock=rt". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * omap: switch omap_lpg to vm_clockPaolo Bonzini2012-03-301-3/+3
| | | | | | | | | | | | | | | | | | The output of the pulse generator needs to be deterministic when running in -icount mode, and to remain constant whenever the VM is stopped. So the right clock to use is vm_clock. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | rtc: split out macros into a header file and use in test caseAnthony Liguori2012-03-303-35/+63
| | | | | | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | qtest: IRQ interception infrastructurePaolo Bonzini2012-03-303-0/+25
| | | | | | | | | | | | | | | | | | Since /i440fx/piix3 is being removed from the composition tree, the IO-APIC is placed under /i440fx. This is wrong and should be changed as soon as the /i440fx/piix3 path is put back. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | Merge remote-tracking branch 'sstabellini/disk_io' into stagingAnthony Liguori2012-03-281-5/+5
|\ \ | | | | | | | | | | | | | | | * sstabellini/disk_io: xen_disk: when using AIO flush after the operation is completed xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO
| * | xen_disk: when using AIO flush after the operation is completedStefano Stabellini2012-03-231-3/+3
| | | | | | | | | | | | | | | | | | | | | If ioreq->postsync call bdrv_flush when the AIO operation is actually completed. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
| * | xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIOStefano Stabellini2012-03-231-2/+2
| | | | | | | | | | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* | | xen_disk: detach the blkdev before bdrv_deleteStefano Stabellini2012-03-271-0/+1
| | | | | | | | | | | | | | | | | | | | | We need to detach the blkdev from the BlockDriverState before calling bdrv_delete. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* | | xen_console: ignore console disconnect events from console/0Stefano Stabellini2012-03-271-0/+3
| |/ |/| | | | | | | | | | | | | | | The first console has a different location compared to other PV devices (console, rather than device/console/0) and doesn't obey the xenstore state protocol. We already special case the first console in con_init and con_initialise, we should also do it in con_disconnect. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* | fix screendumpGerd Hoffmann2012-03-243-7/+4
|/ | | | | | | | | | | | | | | | Commit 45efb16124efef51de5157afc31984b5a47700f9 optimized a bit too much. We can skip the vga_invalidate_display() in case no console switch happened because we don't need a full redraw then. We can *not* skip vga_hw_update() though, because the screen content will be stale then in case nobody else calls vga_hw_update(). Trigger: vga textmode with vnc display and no client connected. Reported-by: Avi Kivity <avi@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com> Tested-by: Avi Kivity <avi@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge remote-tracking branch 'sstabellini/saverestore-8' into stagingAnthony Liguori2012-03-191-4/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sstabellini/saverestore-8: xen: do not allocate RAM during INMIGRATE runstate xen mapcache: check if memory region has moved. xen: record physmap changes to xenstore Set runstate to INMIGRATE earlier Introduce "xen-save-devices-state" cirrus_vga: do not reset videoram Conflicts: qapi-schema.json Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * cirrus_vga: do not reset videoramStefano Stabellini2012-03-131-4/+0
| | | | | | | | | | | | | | | | There is no need to set the videoram to 0xff in cirrus_reset, because it is the BIOS' job. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Avi Kivity <avi@redhat.com>
* | Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2012-03-192-1/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stefanha/trivial-patches: qemu-ga: for w32, fix leaked handle ov.hEvent in ga_channel_write() ioapic: fix build with DEBUG_IOAPIC .gitignore: add qemu-bridge-helper and option rom build products cleanup obsolete typedef monitor: Remove unused bool field 'qapi' in mon_cmd_t struct ds1338: Add missing break statement vnc: Fix packed boolean struct members Remove type field in ModuleEntry as it's not used
| * | ioapic: fix build with DEBUG_IOAPICJason Wang2012-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | ioapic.c:198: error: format ‘%08x’ expects type ‘unsigned int’, but argument 3 has type ‘uint64_t’ Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | ds1338: Add missing break statementStefan Weil2012-03-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without the break statement, case 5 sets month and year from the same data. This does not look correct. The missing break was reported by splint. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | | Merge remote-tracking branch 'spice/spice.v50' into stagingAnthony Liguori2012-03-192-98/+91
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * spice/spice.v50: spice: fix broken initialization hw/qxl.c: Fix compilation failures on 32 bit hosts qxl/qxl_render.c: add trace events qxl: switch qxl.c to trace-events qxl: init_pipe_signaling: exit on failure monitor: fix client_migrate_info error handling spice: set spice uuid and name
| * | | hw/qxl.c: Fix compilation failures on 32 bit hostsPeter Maydell2012-03-191-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix compilation failures on 32 bit hosts (cast from pointer to integer of different size; %ld expects 'long int' not uint64_t). Reported-by: Steve Langasek <steve.langasek@canonical.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | qxl/qxl_render.c: add trace eventsAlon Levy2012-03-191-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | qxl: switch qxl.c to trace-eventsAlon Levy2012-03-191-72/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dprint is still used for qxl_init_common one time prints. also switched parts of spice-display.c over, mainly all the callbacks to spice server. All qxl device trace events start with the qxl device id. Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | qxl: init_pipe_signaling: exit on failureAlon Levy2012-03-191-10/+11
| |/ / | | | | | | | | | | | | | | | | | | | | | If pipe creation fails, exit, don't log and continue. Fix indentation at the same time. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori2012-03-193-16/+53
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bonzini/scsi-next: scsi: add get_dev_path virtio-scsi: call unregister_savevm properly scsi: copy serial number into VPD page 0x83 scsi-cd: check ready condition before processing several commands get rid of CONFIG_VIRTIO_SCSI
| * | | scsi: add get_dev_pathPaolo Bonzini2012-03-191-0/+18
| | | | | | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | | virtio-scsi: call unregister_savevm properlyPaolo Bonzini2012-03-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a use-after-free when migrating after hot-unplug. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | | scsi: copy serial number into VPD page 0x83Paolo Bonzini2012-03-191-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently QEMU passes the qdev device id to the guest in an ASCII-string designator in page 0x83. While this is fine, it does not match what real hardware does; usually the ASCII-string designator there hosts another copy of the serial number (there can be other designators, for example with a world-wide name). Do the same for QEMU SCSI disks. ATAPI does not support VPD pages, so it does not matter there. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | | scsi-cd: check ready condition before processing several commandsPaolo Bonzini2012-03-191-13/+29
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is more or less obvious. What it caused is less obvious: SCSI CD drives failed to eject under Linux, though for example the "change" command worked okay. This happens because of the autoclose option in the Linux CD-ROM driver. The actual chain of events is quite complex and somehow involves udev helpers; the actual command that matters is READ TOC, though honestly it's not really clear to me how because it should always be invoked after autoclose, not before. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | | Merge remote-tracking branch 'qemu-kvm/memory/urgent' into stagingAnthony Liguori2012-03-1925-333/+445
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qemu-kvm/memory/urgent: (42 commits) memory: check for watchpoints when getting code ram_addr exec: fix write tlb entry misused as iotlb Sparc: avoid AREG0 wrappers for memory access helpers Sparc: avoid AREG0 for memory access helpers TCG: add 5 arg helpers to def-helper.h softmmu templates: optionally pass CPUState to memory access functions i386: Remove REGPARM sparc64: implement PCI and ISA irqs sparc: reset CPU state on reset apb: use normal PCI device header for PBM device w64: Fix data type of next_tb and tcg_qemu_tb_exec softfloat: fix for C99 vmstate: fix varrays with uint32_t indexes Fix large memory chunks allocation with tcg_malloc. hw/pxa2xx.c: Fix handling of pxa2xx_i2c variable offset within region hw/pxa2xx_lcd.c: drop target_phys_addr_t usage in device state hw/pxa2xx_dma.c: drop target_phys_addr_t usage in device state ARM: Remove unnecessary subpage workarounds malta: Fix display for LED array malta: Use symbolic hardware addresses ...
| * | sparc64: implement PCI and ISA irqsBlue Swirl2012-03-173-32/+76
| | | | | | | | | | | | | | | | | | | | | Generate correct trap for external interrupts. Map PCI and ISA IRQs to RIC/UltraSPARC-IIi interrupt vectors. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
| * | apb: use normal PCI device header for PBM deviceBlue Swirl2012-03-171-1/+0
| | | | | | | | | | | | | | | | | | PBM has a normal PCI device header, fix. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
| * | Merge branch 'arm-devs.for-upstream' of ↵Blue Swirl2012-03-1711-101/+118
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.linaro.org/people/pmaydell/qemu-arm * 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm: hw/pxa2xx.c: Fix handling of pxa2xx_i2c variable offset within region hw/pxa2xx_lcd.c: drop target_phys_addr_t usage in device state hw/pxa2xx_dma.c: drop target_phys_addr_t usage in device state ARM: Remove unnecessary subpage workarounds hw/omap_i2c: Convert to qdev
| | * | hw/pxa2xx.c: Fix handling of pxa2xx_i2c variable offset within regionPeter Maydell2012-03-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pxa2xx I2C controller can have its registers at an arbitrary offset within the MemoryRegion it creates. We use this to create two controllers, one which covers a region of size 0x10000 with registers starting at an offset 0x1600 into that region, and a second one which covers a region of size just 0x100 with the registers starting at the base of the region. The implementation of this offsetting uses two qdev properties, "offset" (which sets the offset which must be subtracted from the address to get the offset into the actual register bank) and "size", which is the size of the MemoryRegion. We were actually using "offset" for two purposes: firstly the required one of handling the registers not being at the base of the MemoryRegion, and secondly as a workaround for a deficiency of QEMU. Until commit 5312bd8b3, if a MemoryRegion was mapped at a non-page boundary, the address passed into the read and write functions would be the offset from the start of the page, not the offset from the start of the MemoryRegion. So when calculating the value to set the "offset" qdev property we included a rounding to a page boundary. Following commit 5312bd8b3 MemoryRegion read/write functions are now correctly passed the offset from the base of the region, and our workaround now means we're subtracting too much from addresses, resulting in warnings like "pxa2xx_i2c_read: Bad register 0xffffff90". The fix for this is simply to remove the rounding to a page boundary; this allows us to slightly simplify the expression since base - (base & (~region_size)) == base & region_size The qdev property "offset" itself must remain because it is still performing its primary job of handling register banks not being at the base of the MemoryRegion. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de>
| | * | hw/pxa2xx_lcd.c: drop target_phys_addr_t usage in device stateMitsyanko Igor2012-03-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pxa2xx LCD controller is intended to work with 32-bit bus and it has no knowledge of system's physical address size, so it should not use target_phys_addr_t in it's state. Convert three variables in DMAChannel state from target_phys_addr_t to uint32_t, use VMSTATE_UINT32 instead of VMSTATE_UINTTL for these variables. We can do this safely because: 1) pxa2xx has 32-bit physical address; 2) rest of the code in file never assumes converted variables to have any size different from uint32_t; 3) we shouldn't have used VMSTATE_UINTTL in the first place because this macro is for target_ulong type (which can be different from target_phys_addr_t). Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| | * | hw/pxa2xx_dma.c: drop target_phys_addr_t usage in device stateMitsyanko Igor2012-03-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pxa2xx DMA controller is a 32-bit device and it has no knowledge of system's physical address size, so it should not use target_phys_addr_t in it's state. Convert variables descr, src and dest from type target_phys_addr_t to uint32_t, use VMSTATE_UINT32 instead of VMSTATE_UINTTL for these variables. We can do this safely because: 1) pxa2xx actually has 32-bit physical address size; 2) rest of the code in file never assumes descr, src and dest variables to have size different from uint32_t; 3) we shouldn't have used VMSTATE_UINTTL in the first place because this macro is for target_ulong type (which can be different from target_phys_addr_t). Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| | * | ARM: Remove unnecessary subpage workaroundsPeter Maydell2012-03-163-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the ARM per-CPU peripherals (GIC, private timers, SCU, etc), remove workarounds for subpage memory region read/write functions being passed offsets from the start of the page rather than the start of the region. Following commit 5312bd8b3 the masking off of high bits of the address offset is now harmless but unnecessary. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de>
| | * | hw/omap_i2c: Convert to qdevJuha Riihimäki2012-03-155-79/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the omap_i2c device to qdev. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | Merge branch 'malta' of git://qemu.weilnetz.de/qemuBlue Swirl2012-03-171-48/+36
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'malta' of git://qemu.weilnetz.de/qemu: malta: Fix display for LED array malta: Use symbolic hardware addresses malta: Always allocate flash memory malta: Clean allocation of bios region alias
| | * | | malta: Fix display for LED arrayStefan Weil2012-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 8-LED array was already implemented in the first commit to Malta, but this implementation was incomplete. Signed-off-by: Stefan Weil <sw@weilnetz.de>
| | * | | malta: Use symbolic hardware addressesStefan Weil2012-03-151-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch adds definitions of some hardware addresses and uses these definitions. It also replaces the type of all addresses from signed to unsigned values. This is only a cosmetic change because addresses are unsigned values, the functions called also expect unsigned values, and we need no sign extension here. Signed-off-by: Stefan Weil <sw@weilnetz.de>
| | * | | malta: Always allocate flash memoryStefan Weil2012-03-151-32/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no reason why there should not be a flash memory when the Malta emulation is started with a Linux kernel. When flash memory is always available, the code is simpler, and it can be better tested. Signed-off-by: Stefan Weil <sw@weilnetz.de>
| | * | | malta: Clean allocation of bios region aliasStefan Weil2012-03-151-15/+6
| | |/ / | | | | | | | | | | | | | | | | | | | | It is sufficient to define the region alias once for all code branches. Signed-off-by: Stefan Weil <sw@weilnetz.de>
| * | | PPC: Fix openpic with relative memregionsAlexander Graf2012-03-151-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit 5312bd8b3152 we got memory region relative offsets into our mmio callbacks instead of page boundary based offsets. This broke the OpenPIC emulation which expected offsets to be on page boundary and substracted its region offset manually. This patch gets rid of that manual substraction and lets the memory api do its magic instead. Signed-off-by: Alexander Graf <agraf@suse.de>
| * | | pseries: Configure PCI bridge using propertiesDavid Gibson2012-03-152-76/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the function spapr_create_phb() uses its parameters to initialize the correct memory windows for the new PCI Host Bridge (PHB). This is not the way things are supposed to be done with qdevs, and means you can't create extra PHBs easily using -device. Since pSeries machines can and do have many PHBs with various configurations, this is a real limitation, not just a theoretical. This patch, therefore, alters the PHB initialization code to use qdev properties to set these parameters of the new bridge, moving most of the code from spapr_create_phb() to spapr_phb_init(). While we're at it, we change the naming of each PCI bus and its associated memory regions to be less arbitrary and make it easier to relate the guest and qemu views of memory to each other. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | | pseries: Add support for level interrupts to XICSDavid Gibson2012-03-156-38/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pseries "xics" interrupt controller, like most interrupt controllers can support both message (i.e. edge sensitive) interrupts and level sensitive interrupts, but it needs to know which are which. When I implemented the xics emulation for qemu, the only devices we supported were the PAPR virtual IO devices. These devices only use message interrupts, so they were the only ones I implemented in xics. Since then, however, we have added support for PCI devices, which use level sensitive interrupts. It turns out the message interrupt logic still actually works most of the time for these, but there are circumstances where we can lost interrupts due to the incorrect interrupt logic. This patch, therefore, implements the correct xics level-sensitive interrupt logic. The type of the interrupt is set when a device allocates a new xics interrupt. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | | pseries: Remove PCI device from PCI host bridge codeAlexey Kardashevskiy2012-03-151-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sPAPR PCI code defines a PCI device "spapr-pci-host-bridge-pci" which is never used. This came over from the earlier bridge driver we used as a template. Some other bridges appear on their own PCI bus as a device, but that is not true of pSeries bridges, which are pure host to PCI with no visible presence on the PCI side. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | | pseries: Remove unused constant from PCI codeDavid Gibson2012-03-151-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'bars' constant array was used in experimental device allocation code which is no longer necessary now that we always run the SLOF firmware. This patch removes the now redundant variable. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | | ppc: Add missing 'static' to spin_rw_opsStefan Weil2012-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | spin_rw_ops is only used in hw/ppce500_spin.c. Signed-off-by: Stefan Weil <sw@weilnetz.de> Acked-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
OpenPOWER on IntegriCloud