aboutsummaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2010-05-24Merge remote branch 'kwolf/for-anthony' into stagingAnthony Liguori1-3/+16
2010-05-24Merge remote branch 'qmp/for-anthony' into stagingAnthony Liguori1-44/+7
2010-05-24microblaze: Handle new elf mach nr for sysemu.Edgar E. Iglesias1-0/+5
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-05-22lsi: Fix value overflow in request tag processingJan Kiszka1-2/+2
This fixes a mismerge of 64d564094cac5f72eeaeb950c442b773a00d3586 (wrong patch version): We need to mask the tag value properly to obtain its device ID. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-22sparc32 protect read-only bits in DMA CSR registersArtyom Tarasenko1-4/+8
On a real hardware changing read-only bits has no effect Use a mask common for SCSI and Ethernet registers. The crucial bit is DMA_INTR, because setting or clearing it may produce spurious interrupts. This patch allows booting Solaris 2.3 Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22vmstate: fix breakage by 7e72abc382b700a72549e8147bdea413534eeedcTeLeMan1-1/+0
cirrus_post_load() will be executed twice when loading vm states and then the wrong physical memory will be registered. This issue may lead to crash qemu. Signed-off-by: TeLeMan <geleman@gmail.com> Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22Fix %lld or %llx printf format useBlue Swirl2-2/+2
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22Compile dma only onceBlue Swirl8-14/+71
Use a qemu_irq to request CPU exit. 7 compilations less for the full build. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22pckbd: improve debuggingBlue Swirl1-13/+15
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22Compile pckbd only onceBlue Swirl4-53/+73
Use a qemu_irq to indicate A20 line changes. Move I/O port 92 to pckbd.c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-21axisdev88: Fix passing of kernel cmdline.Edgar E. Iglesias1-13/+18
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
2010-05-21arm_timer: fix oneshot modeRabin Vincent1-1/+1
In oneshot mode, the delta needs to come from the TimerLoad register, not the maximum limit. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21arm_timer: reload timer when enabledRabin Vincent1-1/+1
Reload the timer when TimerControl is written, if the timer is to be enabled. Otherwise, if an earlier write to TimerLoad was done while periodic mode was not set, s->delta may incorrectly still have the value of the maximum limit instead of the value written to TimerLoad. This problem is evident on versatileap on current linux-next, which enables TIMER_CTRL_32BIT before writing to TimerLoad and then enabling periodic mode and starting the timer. This causes the first periodic tick to be scheduled to occur after 0xffffffff periods, leading to a perceived hang while the kernel waits for the first timer tick. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21pflash_cfi01: add device ID read commandMichael Walle1-0/+20
Add support to read manufacturer and device ID. For everything else (eg. lock bits) 0 is returned. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21virtio-blk: fix barrier supportChristoph Hellwig1-2/+13
Before issuing the barrier to the block driver we need to flush our oustanding queue of write requests, as the flush is supposed to be issued after them. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-05-21virtio-blk: Avoid zeroing every request structureStefan Hajnoczi1-1/+3
The VirtIOBlockRequest structure is about 40 KB in size. This patch avoids zeroing every request by only initializing fields that are read. The other fields are either written to or may not be used at all. Oprofile shows about 10% of CPU samples in memset called by virtio_blk_alloc_request(). The workload is dd if=/dev/vda of=/dev/null iflag=direct bs=8k running concurrently 4 times. This patch makes memset disappear to the bottom of the profile. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-05-20pc: fix segfault introduced by 3d53f5c36ff6Eduard - Gabriel Munteanu1-2/+2
Commit 3d53f5c36ff6 introduced a segfault by erroneously making fw_cfg a 'void **' and passing it around in different ways. Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-19Revert "monitor: Convert do_pci_device_hot_remove() to QObject"Markus Armbruster1-3/+2
We don't want pci_del in QMP. Use device_del instead. This reverts commit 6848d827162fea039f2658414a4adb6164a4f9b0. Conflicts: hw/pci-hotplug.c sysemu.h Signed-off-by: Markus Armbruster <armbru@redhat.com>
2010-05-19Revert "PCI: Convert pci_device_hot_add() to QObject"Markus Armbruster1-41/+5
Short story: We don't want pci_add in QMP. Long story follows. pci_add can do two things: * Hot plug a PCI NIC. device_add is more general. * Hot plug a PCI disk controller, and a drive connected to it. The controller is either virtio-blk-pci (if=virtio) or lsi53c895a (if=scsi). With the latter, the drive is optional. Use drive_add to hotplug additional SCSI drives. Except drive_add is not available in QMP. device_add is more general for controllers and the guest part of drives. I'm working on a more general alternative for the host part of drives. Why am I proposing to remove pci_add from QMP before its replacement is ready? I want it out sooner rather than later, because it isn't fully functional (errors and drive_add are missing), and we do not plan to complete the job. In other words, it's not really usable over QMP now, and it's not what we want for QMP anyway. Since we don't want it to be used over QMP, we should take it out, not leave it around as a trap for the uninitiated. Dan Berrange confirmed that libvirt has no need for pci_add & friends over QMP. This reverts commit 7a344f7ac7bb651d0556a933ed8060d3a9e5d949. Conflicts: hw/pci-hotplug.c sysemu.h Signed-off-by: Markus Armbruster <armbru@redhat.com>
2010-05-18target-ppc: remove dead codeThomas Monjalon1-10/+0
This function had been disabled from the beginning: see 9fddaa0c0cabb610947146a79b4a9a38b0a216e5 cpu_reset() function is in target-ppc/helper.c Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-18target-s390: add firmware codeAlexander Graf1-0/+26
This patch adds a firmware blob to the S390 target. The blob is a simple implementation of a virtio client that tries to read the second stage bootloader from sectors described as of offset 0x20 in the MBR. In combination with an updated zipl this allows for booting from virtio block devices. This firmware is built from the same sources as the second stage bootloader. You can find a virtio capable s390-tools in this repo: git://repo.or.cz/s390-tools.git Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-17Merge remote branch 'kwolf/for-anthony' into stagingAnthony Liguori1-4/+4
2010-05-17Merge remote branch 'mst/for_anthony' into stagingAnthony Liguori3-8/+16
2010-05-17ide: Fix ide_dma_cancelKevin Wolf1-4/+4
When cancelling a request, bdrv_aio_cancel may decide that it waits for completion of a request rather than for cancellation. IDE therefore can't abandon its DMA status before calling bdrv_aio_cancel; otherwise the callback of a completed request would use invalid data. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-05-15Update to a hopefully more future proof FSF addressBlue Swirl2-4/+4
See also 70539e1850ddd3a7ee6f9a8db7bd8e81b85225a4, 8167ee883931cb20c6264fc19d040ce2dc6ceaaa, 530e7615ce3c01882e582c84dc6304ab98a3d5c5 and fad6cb1a565bb73f83fc0e2654489457b489e436. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15Trim unnecessary includesBlue Swirl4-11/+0
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15mc146818rtc: remove #ifdef DEBUG_CMOS.Isaku Yamahata1-8/+10
remove #ifdef DEBUG_CMOS by using macro. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15apm: remove #ifdef DEBUG.Isaku Yamahata1-6/+8
remove #ifdef DEBUG by using macro. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15acpi_piix4: remove #ifdef DEBUG.Isaku Yamahata1-37/+18
removed #ifdef DEBUG by using macro. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15pm_smbus: remove #ifdef DEBUG.Isaku Yamahata1-9/+12
remove #ifdef DEBUG by using macro. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15pci hotadd, acpi_piix4: remove global variablesIsaku Yamahata3-43/+48
remove global variables, gpe and pci0_status by moving them into PIIX4PMState. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15pci hotplug: add argument to pci hot plug callback.Isaku Yamahata3-8/+10
Add argument, DeviceState*, to pci hot plug callback. The argument will be used later to remove global variable. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15acpi_piix4: qdevfy.Isaku Yamahata1-15/+46
qdevfy acpi_piix4. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15rtc: make rtc_xxx accept/return ISADevice instead of RTCState.Isaku Yamahata9-26/+34
To match rtc_xxx with qdev, make rtc_xxx accept and return ISADevice instead of RTCState. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15pc: move rtc declarations from pc.h into a dedicated header file.Isaku Yamahata2-8/+11
Move rtc_xxx declarations from pc.h into mc146818rtc.h. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15pc: split out piix specific part from pc.c into pc_piix.cIsaku Yamahata4-326/+380
Finally, we can safely split out the piix specific part from pc.c into pc_piix.c. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15pc: split out pci device init from pc_init1() into pc_pci_device_init()Isaku Yamahata1-7/+12
Split out pci device initialization from pc_init1() into pc_pci_device_init(). and removed unnecessary braces. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15pc: split out basic device init from pc_init1() into pc_basic_device_init()Isaku Yamahata1-38/+48
Split out basic device, i.e. legacy devices like floppy, initialization from pc_init1() into pc_basic_device_init(). Later it will be used. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15pc: split out vga initialization from pc_init1() into pc_vga_init().Isaku Yamahata1-18/+23
Split out vga initialization which is independent of piix from pc_init1() as pc_vga_init(). Later it will be used. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15pc: split out memory allocation from pc_init1() into pc_memory_init()Isaku Yamahata1-28/+45
Split out memory allocation and rom/bios loading which doesn't depend on piix from pc_init1() into pc_memory_init(). Later it will be used. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15pc: split out cpu initialization from pc_init1() into pc_cpus_init().Isaku Yamahata1-12/+19
split out cpu initialization which is piix independent from pc_init1() into pc_cpus_init(). Later it will be used. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15pc: make pc_init1() not refer ferr_irq directly.Isaku Yamahata2-1/+9
By introducing a registering function, make pc_init1() not refer to ferr_irq directly in order to make ferr_irq piix independent. Later pc_init1() will be split out into another file keeping ferr_irq static. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15pc: introduce a function to allocate cpu irq.Isaku Yamahata1-1/+6
Introduce a function, pc_allocate_cpu_irq(), to allocate cpu irq in order to make pic_irq_request() piix independent. Later piix code will be split out to another file keeping pic_irq_request() static. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15pc: remove global variable rtc_state by using qemu_irq.Isaku Yamahata1-9/+7
Remove the reference to the global variable, rtc_state, by passing function argument to cmos_init_hd(), cmos_init(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Cc: Paolo Bonzini <bonzini@gnu.org> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15pc: remove a global variable, floppy_controller.Isaku Yamahata1-3/+5
Remove a global variable, floppy_controller. Since it is unnecessarily global, make it local and pass it as a function argument. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15pc: make an unnecessary global variable, pit, local.Isaku Yamahata1-1/+1
remove unnecessary global static variables, pit. Make it local. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15pc, i440fx: Make smm enable/disable function i440fx independent.Isaku Yamahata3-5/+22
make cpu_smm_update() generic to be independent on i440fx by registering a callback. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15pc: initialize ioapic before use.Isaku Yamahata1-3/+3
The changeset of 2c8d9340203c7f19265fd4cb2341f568217a3af6 prevents isa_irq_handler() from NULL refering of IsaIrqState::ioapic. However it would be better to initialize the member before reference. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15acpi: split acpi.c into the common part and the piix4 part.Isaku Yamahata2-562/+583
Split acpi.c into the common part and the piix4 specific part. The common part will be used later. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15acpi: add acpi constants from linux header files and use them.Isaku Yamahata2-31/+103
add acpi constants from linux header files and replace the old constants with them. The acpi constants will be used by other file. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>