sim-card
/
qemu
Archived
10
0
Fork 0
Commit Graph

5856 Commits

Author SHA1 Message Date
Paolo Bonzini 7e218df518 scsi: pass correct sense code for ENOMEDIUM
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-10-28 19:25:50 +02:00
Kevin Wolf fb60105d49 ide: Fix off-by-one error in array index check
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2011-10-28 19:25:49 +02:00
Anthony Liguori e86d9b12b5 Merge remote-tracking branch 'kwolf/for-anthony' into staging 2011-10-26 10:29:24 -05:00
Marc-André Lureau ba43d28916 hda: do not mix output and input stream states, RHBZ #740493
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-25 19:15:20 +04:00
Marc-André Lureau 36ac4ad3d0 hda: do not mix output and input streams, RHBZ #740493
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-25 19:15:07 +04:00
Anthony Liguori 952e849c15 Merge remote-tracking branch 'bonzini/split-main-loop-for-anthony' into staging 2011-10-24 10:51:12 -05:00
Blue Swirl b1f88301b5 m48t59: fix write access
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 819385c58b.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23 14:08:30 +00:00
Blue Swirl 0fb56ffc5e m48t59: drop obsolete address base arithmetic
Remove now incorrect address base arithmetic, missed by
9936d6e423. Fixes Sparc64 boot.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23 14:07:38 +00:00
Blue Swirl 52ce6f05c1 pci_bridge: fix typo
Reviewed-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-23 14:05:46 +00:00
Paolo Bonzini 0abc2712b8 remove unused function
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-10-21 18:14:29 +02:00
Kevin Wolf 34d4260e18 pc: Fix floppy drives with if=none
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-21 17:34:13 +02:00
Kevin Wolf a18e67f5f9 fdc: Fix floppy port I/O
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-21 17:34:13 +02:00
Kevin Wolf 5cce43bb28 xen_disk: Always set feature-barrier = 1
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-21 17:34:12 +02:00
Dmitry Koshelev c2e2343e1f hw/arm_gic.c: Fix save/load of irq_target array
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-21 17:19:56 +02:00
Peter Maydell f45b885ffc hw/omap2: Wire up the IRQ for the 2430's fifth GPIO module
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-21 17:19:53 +02:00
Anthony Liguori a6e43daa73 Merge remote-tracking branch 'quintela/migration-pull' into staging 2011-10-20 08:46:55 -05:00
Anthony Liguori 46cd37e771 Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into staging 2011-10-20 08:43:00 -05:00
Anthony Liguori 1f99b94932 Merge remote-tracking branch 'aneesh/for-upstream-6' into staging
Conflicts:
	trace-events
2011-10-20 08:42:08 -05:00
Juan Quintela 624b9cc209 migration: rename qemu_file_has_error to qemu_file_get_error
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-20 13:23:52 +02:00
Juan Quintela dcd1d224df migration: change has_error to contain errno values
We normally already have an errno value.  When not, abuse EIO.

Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-10-20 13:23:52 +02:00
Juan Quintela 3a230256e8 ds1225y: Use stdio instead of QEMUFile
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-20 13:23:51 +02:00
Avi Kivity d08151bf7c tcx: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity fe06bd93e3 tc63963xb: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity 9f7adc31ad syborg: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity d4edce380c sun4u: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity 3150fa5010 sun4m: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity eb2fefbc44 strongarm: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity 7cc09e6c4b spitz: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity 890c2b772d spapr: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity 25793bfafa sm501: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:18 +02:00
Avi Kivity ca3dbc2757 s390-virtio: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:17 +02:00
Avi Kivity 35e87820d7 realview: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:17 +02:00
Avi Kivity 5dea2efb3b r2d: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:17 +02:00
Avi Kivity 2646c133b5 ppcr500_mpc8544ds: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:17 +02:00
Avi Kivity 8b881e776a pci: simplify memory region registration
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-17 15:59:17 +02:00
Avi Kivity adfc39eaef pxa2xx: convert to memory API (part II)
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:17 +02:00
Avi Kivity 9c843933fc pxa2xx: convert to memory API (part I)
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:16 +02:00
Avi Kivity 0c90c52fab ppc_prep: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:16 +02:00
Avi Kivity c92bb2c725 ppc_oldworld: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17 15:59:16 +02:00
Jan Kiszka 661f1929d0 monitor: Restrict pic/irq_info to supporting targets
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-16 11:11:55 +00:00
Jan Kiszka 81a02f93ba i8259: Fix coding style
No functional changes.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16 11:11:55 +00:00
Jan Kiszka 747c70af78 i8259: Convert to qdev
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-16 11:11:53 +00:00
Jan Kiszka 6835678c25 qdev: Add HEX8 property
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-16 11:11:51 +00:00
Jan Kiszka c17725f473 i8259: Eliminate PicState2
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-16 11:11:13 +00:00
Jan Kiszka 2598539642 i8259: Replace PicState::pics_state with master flag
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-16 11:11:12 +00:00
Jan Kiszka 6e5580ca2b i8259: PREP: Replace pic_intack_read with pic_read_irq
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-16 11:11:10 +00:00
Jan Kiszka fc1a5e0a24 i8259: Clean up pic_ioport_read
Drop redundant local address variable.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16 11:11:09 +00:00
Jan Kiszka 8d484caa84 i8259: Fix poll command
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-16 11:11:08 +00:00
Jan Kiszka b76750c1ab i8259: Switch to per-PIC IRQ update
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-16 11:11:07 +00:00
Jan Kiszka 86fbf97ceb i8259: Clear ELCR on reset
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-16 11:11:06 +00:00