aboutsummaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2011-10-26Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori6-19/+42
2011-10-25hda: do not mix output and input stream states, RHBZ #740493Marc-André Lureau3-12/+25
Windows 7 may use the same stream number for input and output. Current code will confuse streams. Changes since v1: - keep running_compat[] for migration version 1 - add running_real[] for migration version 2 Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2011-10-25hda: do not mix output and input streams, RHBZ #740493Marc-André Lureau1-4/+5
Windows 7 may use the same stream number for input and output. That will result in lot of garbage on playback. The hardcoded value of 4 needs to be in sync with GCAP streams description and IN/OUT registers. Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2011-10-24Merge remote-tracking branch 'bonzini/split-main-loop-for-anthony' into stagingAnthony Liguori2-6/+0
2011-10-23m48t59: fix write accessBlue Swirl1-1/+1
Fix incorrect order of arguments, letting writes to NVRAM succeed. It looks like guests never write to the device, only read from it, since the bug originates back to 819385c58b319d9f80d676cefaed0610118f03ac. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23m48t59: drop obsolete address base arithmeticBlue Swirl1-2/+0
Remove now incorrect address base arithmetic, missed by 9936d6e42392f1440505dfa9df065eabd251cadf. Fixes Sparc64 boot. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23pci_bridge: fix typoBlue Swirl1-1/+1
Reviewed-by: Avi Kivity <avi@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-21remove unused functionPaolo Bonzini2-6/+0
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-10-21pc: Fix floppy drives with if=noneKevin Wolf5-16/+38
Commit 63ffb564 broke floppy devices specified on the command line like -drive file=...,if=none,id=floppy -global isa-fdc.driveA=floppy because it relies on drive_get() which works only with -fda/-drive if=floppy. This patch resembles what we're already doing for IDE, i.e. remember the floppy device that was created and use that to extract the BlockDriverStates where needed. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2011-10-21fdc: Fix floppy port I/OKevin Wolf1-0/+2
The floppy device was broken by commit 212ec7ba (fdc: Convert to isa_register_portio_list). While the old interface provided the port number relative to the floppy drive's io_base, the new one provides the real port number, so we need to apply a bitmask now to get the register number. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-10-21xen_disk: Always set feature-barrier = 1Kevin Wolf1-3/+2
The synchronous .bdrv_flush callback doesn't exist any more and a device really shouldn't poke into the block layer internals anyway. All drivers are supposed to have a correctly working bdrv_flush, so let's just hard-code this. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-10-21hw/arm_gic.c: Fix save/load of irq_target arrayDmitry Koshelev1-8/+8
irq_target array saving/loading is in the wrong loop. Version bump. Signed-off-by: Dmitry Koshelev <karaghiozis@gmail.com> Acked-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-10-21hw/omap2: Wire up the IRQ for the 2430's fifth GPIO modulePeter Maydell1-0/+5
The OMAP2430 version of the omap-gpio device has five GPIO modules, not four like the other OMAP2 versions; wire up the fifth module's IRQ line correctly. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-10-20Merge remote-tracking branch 'quintela/migration-pull' into stagingAnthony Liguori2-14/+18
2011-10-20Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into stagingAnthony Liguori22-649/+544
2011-10-20Merge remote-tracking branch 'aneesh/for-upstream-6' into stagingAnthony Liguori12-773/+439
Conflicts: trace-events
2011-10-20migration: rename qemu_file_has_error to qemu_file_get_errorJuan Quintela1-1/+1
Now the function returned errno, so it is better the new name. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2011-10-20migration: change has_error to contain errno valuesJuan Quintela1-1/+1
We normally already have an errno value. When not, abuse EIO. Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-10-20ds1225y: Use stdio instead of QEMUFileJuan Quintela1-12/+16
QEMUFile * is only intended for migration nowadays. Using it for anything else just adds pain and a layer of buffers for no good reason. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2011-10-17tcx: convert to memory APIAvi Kivity1-67/+85
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17tc63963xb: convert to memory APIAvi Kivity3-51/+25
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17syborg: convert to memory APIAvi Kivity1-3/+5
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17sun4u: convert to memory APIAvi Kivity1-9/+13
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17sun4m: convert to memory APIAvi Kivity1-17/+32
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17strongarm: convert to memory APIAvi Kivity3-106/+75
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17spitz: convert to memory APIAvi Kivity1-30/+18
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17spapr: convert to memory APIAvi Kivity1-3/+6
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17sm501: convert to memory APIAvi Kivity1-73/+70
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17s390-virtio: convert to memory APIAvi Kivity1-3/+5
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17realview: convert to memory APIAvi Kivity1-28/+26
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17r2d: convert to memory APIAvi Kivity1-20/+15
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17ppcr500_mpc8544ds: convert to memory APIAvi Kivity1-2/+3
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17pci: simplify memory region registrationAvi Kivity1-11/+2
The two code paths (for ADDRESS_SPACE_IO and ADDRESS_SPACE_MEM) are identical. Unify them. Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17pxa2xx: convert to memory API (part II)Avi Kivity2-87/+66
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17pxa2xx: convert to memory API (part I)Avi Kivity2-68/+49
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17ppc_prep: convert to memory APIAvi Kivity1-66/+41
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17ppc_oldworld: convert to memory APIAvi Kivity1-5/+8
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-16monitor: Restrict pic/irq_info to supporting targetsJan Kiszka13-77/+12
This allows to drop various stubs and move the i8359 into hwlib. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Fix coding styleJan Kiszka1-20/+34
No functional changes. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Convert to qdevJan Kiszka1-57/+100
This key cleanup step requires to move the IRQ debugging bit from i8259_set_irq directly to the per-PIC pic_set_irq, to pass the PIC parameters (I/O base, ELCR address and mask, master/slave mode) as qdev properties, and to interconnect the PICs with their environment via GPIO pins. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16qdev: Add HEX8 propertyJan Kiszka2-0/+32
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Eliminate PicState2Jan Kiszka2-35/+34
Introduce a reference to the slave PIC for the few cases we need to access it without a proper pointer at hand and drop PicState2. We could even live without slave_pic if we had a better way of modeling the cascade bus the PICs are attached to (in addition to the ISA bus). Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Replace PicState::pics_state with master flagJan Kiszka1-9/+9
This reflects how real PICs indentify their role (in non-buffered mode): Pass the state of the /SP input on pic_init and use it instead of pics_state to differentiate between master and slave mode. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: PREP: Replace pic_intack_read with pic_read_irqJan Kiszka3-41/+1
There is nothing in the i8259 spec that justifies the special pic_intack_read. At least the Linux PREP kernels configure the PICs properly so that pic_read_irq returns identical values, and setting read_reg_select in PIC0 cannot be derived from any special i8259 mode. So switch ppc_prep to pic_read_irq and drop the now unused PIC code. CC: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Clean up pic_ioport_readJan Kiszka1-2/+1
Drop redundant local address variable. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Fix poll commandJan Kiszka1-1/+7
This was probably never used so far: According to the spec, polling means ack'ing the pending IRQ and setting its corresponding bit in isr. Moreover, we have to signal a pending IRQ via bit 7 of the returned value, and we must not return a spurious IRQ if none is pending. This implements the poll command without the help of pic_poll_read which is left untouched as pic_intack_read is still using it. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Switch to per-PIC IRQ updateJan Kiszka1-40/+21
This converts pic_update_irq to work against a single PIC instead of the complete cascade. Along this change, the required update after pic_set_irq1 is now moved into that function. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Clear ELCR on resetJan Kiszka1-5/+10
The ELCR is actually part of the chipset but we model it here for simplicity reasons. The PIIX3 clears the ELCR on reset, which was once broken by 4dbe19e181. Fix this by splitting up pic_init_reset from pic_reset and clearing the register in the latter. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Update IRQ state after resetJan Kiszka1-2/+1
MIPS and PPC users of the i8259 output signal expect us to report state updates also after reset. As no consumer (including the master PIC) can misinterpret the deassert as an activation event, it is safe to simply update the IRQ state after reset. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Reorder intack in pic_read_irqJan Kiszka1-4/+6
As we want to move the IRQ update to pic_intack, ordering matters: the slave ack must be executed before the master ack to avoid missing further pending slave IRQs. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>