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

2145 Commits

Author SHA1 Message Date
Jason Wessel 40ff16248e serial: fix lost character after sysrq
After creating an automated regression test to test the sysrq
responses while running a linux image in qemu, I found that the
simulated uart was eating the character right after the sysrq about
75% of the time.

The problem is that the qemu sets the LSR_DR (data ready) bit on a
serial break.  The automated tests can send a break and the sysrq
character quickly enough that the qemu serial fifo has a real
character available. When there is valid character in the fifo, it
gets consumed by the serial driver in the guest OS.

The real hardware also appears to set the LSR_DR but always appears to
have a null byte in this condition.  This patch changes the qemu
behavior to match the tested characteristics of a real 16550 chip.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
2009-05-22 10:50:35 -05:00
Jason Wessel 7e57f0493a usb-serial: implement break event.
Implement the serial break via usb serial.

The second data byte in ftdi status packet contains the break status.
The values were already defined in usb-serial.c so it was a matter of
making use of the event_trigger to form a urb to send over to the host
controller with the serial break status set.

This was tested against a linux development image which enables sysrq
via a serial break on the ftdi usb console.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
2009-05-22 10:50:34 -05:00
Jan Kiszka 8217606e6e Introduce reset notifier order
Add the parameter 'order' to qemu_register_reset and sort callbacks on
registration. On system reset, callbacks with lower order will be
invoked before those with higher order. Update all existing users to the
standard order 0.

Note: At least for x86, the existing users seem to assume that handlers
are called in their registration order. Therefore, the patch preserves
this property. If someone feels bored, (s)he could try to identify this
dependency and express it properly on callback registration.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-22 10:50:34 -05:00
Jan Kiszka 93102fd601 kvm: Fix framebuffer dirty log sync
kvm_physical_sync_dirty_bitmap() takes the end address as second
argument, not the region size. Moverover, the kvm API should not be used
directly here, but cpu_physical_sync_dirty_bitmap().

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-22 10:50:33 -05:00
Glauber Costa 19629537bd introduce set_rate_limit function for QEMUFile
This patch converts the current callers of qemu_fopen_ops().

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-22 10:50:30 -05:00
Anthony Liguori 0c257437b2 Introduce is_default field for QEMUMachine
f80f9ec changed the order that machines are registered which had the effect of
changing the default machine.  This changeset introduces a new is_default field
so that machine types can declare that they are the default for an architecture.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-21 20:54:40 -05:00
Anthony Liguori 993fbfdb1b Refactor how display drivers are selected
My previous commit, f92f8afebe,  broke -vnc (spotted by Glauber Costa).  This
is because it's necessary to tell when the no special display parameters have
been passed and default to SDL or VNC appropriately.

This refactors the display selection logic to be less complicated which has
the effect of fixing the regression mentioned above.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-21 20:54:40 -05:00
Blue Swirl 2567f5796c Compile most Xen files only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-05-21 15:54:48 +00:00
Blue Swirl e20a8dff4c Compile fdc, escc and SCSI controllers only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-05-21 15:54:36 +00:00
Blue Swirl 368b90db33 Let the venomous poison spread to more identifiers
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-05-21 18:54:22 +03:00
Anthony Liguori f80f9ec9a6 Convert machine registration to use module init functions
This cleans up quite a lot of #ifdefs, extern variables, and other ugliness.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-21 08:47:55 -05:00
Richard W.M. Jones 42fa1c2e22 Remove initrd warning message
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
2009-05-20 09:24:07 -05:00
Glauber Costa e6ade764eb keep initrd in below 4g area.
initrd must be kept on the memory area below 4g. By not doing this,
we're seeing guests break while using -initrd and values of -mem
superior to 4096.

Signed-off-by: Glauber Costa <glommer@redhat.com>
2009-05-20 09:12:58 -05:00
malc 3a8bae3e05 Remove dead code
Signed-off-by: malc <av1474@comtv.ru>
2009-05-20 03:27:26 +04:00
Paul Brook 1ad2134f91 Hardware convenience library
The only target dependency for most hardware is sizeof(target_phys_addr_t).
Build these files into a convenience library, and use that instead of
building for every target.

Remove and poison various target specific macros to avoid bogus target
dependencies creeping back in.

Big/Little endian is not handled because devices should not know or care
about this to start with.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-19 16:17:58 +01:00
Paul Brook 8a637d4443 Disable >4G ram support on 32-bit targets
If the target only has a 32-bit physical address space then
the code to map >4G ram breaks horribly, and causes compiler warnings.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-19 16:05:00 +01:00
Paul Brook bba831e80f Remove obsolete BIOS_SIZE from sysemu.h
BIOS_SIZE is no longer needed by vl.c, so there's no point having it in
sysemu.h.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-19 14:52:42 +01:00
Edgar E. Iglesias fd6dc90ba0 cris: First shot at qdev for CRIS interrupts.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-18 22:24:22 +02:00
Edgar E. Iglesias 96d7ddde19 etrax: Don't keep the passed irq pointer.
Copy passed irq object at channel connect.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-18 21:44:10 +02:00
Edgar E. Iglesias 678fdca87a etrax: Remove unused eth irq line.
The ethernet blocks irq line to report errors is unimplemented in QEMU.
Remove it for now.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-18 21:34:00 +02:00
Paul Brook 340d96e7ce Syborg virtio bindings.
Implement Syborg device bindings for virtio-net.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-18 18:27:44 +01:00
Paul Brook 53c25cea7d Separate virtio PCI code
Split the PCI host bindings from the VRing transport implementation.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-18 18:26:33 +01:00
Paul Brook 89a740e16c Consistently use uint64_t for int properties
I apparently failed to do this properly on the first attempt.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-17 14:55:55 +01:00
Edgar E. Iglesias 979d98ca90 ETRAX-PIC: Untabify.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-16 12:28:33 +02:00
Edgar E. Iglesias 3b1fd90ed1 ETRAX-TIMER: qdevify.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-16 02:14:03 +02:00
Edgar E. Iglesias 84ceea5736 ETRAX-TIMER: Untabify.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-16 02:13:58 +02:00
Edgar E. Iglesias 2a9859e724 ETRAX-SER: Untabify.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-16 02:13:55 +02:00
Edgar E. Iglesias 4b816985b8 ETRAX-SER: qdevify.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-16 02:13:49 +02:00
Edgar E. Iglesias 73cfd29fb3 ETRAX: Simplify PIC interface.
Instead of exporting a custom structure to represent different
interrupt types, just export the irq array and have the top
elements point to the NMI lines.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-16 02:13:08 +02:00
Edgar E. Iglesias d33fd9d14b ETRAX: Correct passing of kernel command line.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-15 16:53:53 +02:00
Paul Brook 4af396115a Syborg (Symbian Virtual Platform) board
A virtual reference platform for SymbianOS development/debugging.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 23:11:09 +01:00
Paul Brook a984a69e57 PXA SSI qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:09 +01:00
Paul Brook 5493e33f12 Stellaris SSI qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:09 +01:00
Paul Brook 90d37239d4 SSP bus framework
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:09 +01:00
Paul Brook 1de9610c8f Stellaris I2C qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:09 +01:00
Paul Brook e325e1f83e I2C cleanup
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook 0077147eab Remove bogus omap i2c slave code
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook 1ea96673c6 SMBus qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook fd1eb2ea42 TOSC DAC i2c qdev voncersion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook d335681177 TWL92230 qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook cdbe40ca83 WM8750 qdev coversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook 697454eb8e TMP105 qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook e3b425361b PXA2xx I2C slave qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook 2d9401aa58 LM832x qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook 6c0bd6bde2 MAX7310 I2C qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook d2199005d5 SSD0303 qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook fe8de49258 I2C qdev support
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook b47b50fa9e MusicPal qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook fe7e8758d0 ARM GIC qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook 0027b06d0e ARM PCI host qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook 0e058a8a6a Virtio-console conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook 2d72c5727f Virtio-balloon qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook 07e3af9ac3 Virtio-blk qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook b4496b13bb PL080 qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:08 +01:00
Paul Brook 82634c2d74 ARM RealView sytem controller qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook 3950f18b9f Versatile/PB core qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook 97aff48165 PL190 qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook cfb9de9ce4 ESP SCSI qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook 418dcf5b7d smc91c111 qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook 6a824ec3d2 ARM timers qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook a7086888fc Integrator/CP core qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook aa9311d8cb PL181 qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook a63bdb3102 PL031 qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook a558046625 Stellaris ethernet qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook cf21e106cd Virtio-net qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook 9d07d7579b PCI network qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook 9be5dafe48 LSI SCSI qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook 86394e969d PL050 qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook a7d518a61b PL011 qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook 2e9bdce56f PL110 qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook 6f68ecb2c1 qdev scsi bus infrastructure
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook 6b1b92d35b PCI qdev support
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:07 +01:00
Paul Brook 4d6ae6741e qdev child bus support
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:06 +01:00
Paul Brook aae9460e24 Basic qdev infrastructure.
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14 22:35:06 +01:00
malc 1a7dafce1d Remove any pretense that there can be more than one AudioState 2009-05-14 03:20:43 +04:00
Paul Brook 5561650587 Include assert.h from qemu-common.h
Include assert.h from qemu-common.h and remove other direct uses.
cpu-all.h still need to include it because of the dyngen-exec.h hacks

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-13 20:54:26 +01:00
Blue Swirl 6c7f4b47f7 Replace gcc variadic macro extension with C99 version (missed one)
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-05-13 18:09:29 +00:00
Blue Swirl 001faf3269 Replace gcc variadic macro extension with C99 version
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-05-13 17:53:17 +00:00
Paul Brook fbe1b5953d Remove vga_ram_size
The vga_ram_size argument to machine init functions always has the same
value, and is ignored by many machines (including SPARC32 which has an
obsolete ifdef for VGA_RAM_SIZE).

Remove it and push VGA_RAM_SIZE into vga_int.h.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-13 17:56:25 +01:00
Edgar E. Iglesias 4af6e404e8 ETRAX: Correct setting of ethernet station address.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-13 10:17:21 +02:00
Paul Brook d3151521ab Follow coding conventions.
More structure renaming.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-12 15:39:52 +01:00
Paul Brook 22d83b140e Push AUD_init down to devices
Now we can safely call AUD_init multiple times we can push it down to
individual audio devices, rather than having to pass it from the board
init.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-12 12:33:04 +01:00
Paul Brook 0d9acba8fd Make AUD_init failure fatal
Failure to initialize the audio subsystem is not handled consistently.
Where it is handled it has guest visible effects, which is wrong.
We already have a "nosound" audio driver as a last resort, so trying to
proceed without an audio backend seems pointless.

Also protect against multiple calls to AUD_init so that this can be
pushed down into individual devices.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-12 12:02:38 +01:00
Paul Brook bc24a225af Follow coding conventions
Remove explicit struct qualifiers and rename structure types.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-10 01:44:56 +01:00
Avi Kivity 4e12cd946f vga: Replace VGA_COMMON with a structure
All VGA devices share a common field subset; currently they do so by
a macro which defines the common fields inline their state structures,
relying on the the common state being placed at offset 0 in the structure.
This makes refactoring the code difficult and requires a lot of error prone
casts.

Replace the macro by a new VGACommonState structure, and the casts by
regular field access and container_of() for upcasts.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 16:11:38 -05:00
Amit Shah 4a794a626d e1000: Do not reinit pci config space to 0
pci_register_device already mallocs the pci config space buffer filled
with zeroes.

Doing this again breaks some default config space writes like
setting the subsystem vendor id and subsystem device id.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 15:24:10 -05:00
Glauber Costa d6ecb03610 reset state for load_linux
The linux loader is just an option rom like any other, just with
some special requirements. Right now, our option rom resetting
mechanism is not being applied to it. As a result, users using
-kernel will not be able to successfully reboot their machines

This patch fixes it by saving all the data we generated in
the load_linux() function, to be used later by the option rom
resetting mechanism.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 15:24:10 -05:00
Glauber Costa e28f988427 register reset handler for option_roms
Currently, boot options are not preserved across a system reset.
option roms can modify themselves, or can for instance restore the real
int 0x19 vector after they tried to boot from it.

To properly do that, we need a reset handler registered to deal with option
roms. This patch is based on current version on qemu-kvm.git

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 15:24:10 -05:00
Paul Brook c599710f5c Remove superfluous #includes.
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-08 13:20:23 +01:00
Paul Brook 42a89d7755 Use target_phys_addr_t, not target_ulong.
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-08 13:19:44 +01:00
Paul Brook 2ac711791b Replace cpu_abort with hw_error
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-08 02:35:15 +01:00
Paul Brook 399a4e2106 Fix PL110 framebuffer byteswapping in 32bpp mode.
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-06 16:18:34 +01:00
Edgar E. Iglesias 72af917088 ETRAX: Simplify serport control logic.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-05 13:13:18 +02:00
Edgar E. Iglesias f296426006 ETRAX: Drop _t for the serial type.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-05 12:50:45 +02:00
Edgar E. Iglesias 4ad804df46 ETRAX: Use NULL for subwidth serport reg accesses.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-05 12:48:54 +02:00
Edgar E. Iglesias b23b0fd063 ETRAX: Drop the _t for the internal PIC type.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-05 12:41:35 +02:00
Edgar E. Iglesias 8d13fcc01b ETRAX: Simplify the interrupt controller model.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-05 12:38:39 +02:00
Edgar E. Iglesias 7a3161bafb ETRAX: Simplify interrupt signaling.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-05 12:25:35 +02:00
Isaku Yamahata 425c608c48 minor fix of pci_register_bus()
keep first_bus linked list correct.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-05-03 22:10:59 +03:00
Isaku Yamahata 6407f37373 use PCI_HEADER_TYPE.
use symbolic value instead of 0x0e and related value.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-05-03 19:03:00 +00:00
Paul Brook 03f311edd3 Handle NULL bdrv.
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-03 17:00:48 +01:00
Alex Williamson f654d9e20a Fix hw/acpi.c build w/ DEBUG enabled
Trivial build warning/fixes when the local DEBUG define is enabled.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-01 10:03:18 -05:00
Chris Wright aff427a1ca Pci nic: pci_register_device can fail
The pci_register_device() call in PCI nic initialization routines can
fail.  Handle this failure and propagate a meaningful error message to
the user instead of generating a SEGV.

Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-01 09:47:14 -05:00
Glauber Costa 49669fc551 suport device driver initialization model
According to PnP specification, Appendix B, Option ROMs
that support DDIM (device driver initialization model) should
have their memory space writeable.

KVM deviates from us here, by removing the IO_MEM_ROM flag,
to allow for PCI option ROMs (they require DDIM). However,
there's absolutely no reason we can't do the same.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-01 09:44:11 -05:00
Christoph Hellwig 8b91408b62 fix virtio_blk_inhdr comment
The inhdr is at the end of the S/G list, not the beginning.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-01 09:44:11 -05:00
Richard W.M. Jones 9dd986ccf6 Hardware watchdog
Here is an updated hardware watchdog patch, which should fix
everything that was raised about the previous version ...

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-01 09:44:11 -05:00
Christoph Hellwig 1063b8b15f virtio-blk: add SGI_IO passthru support
[had the qemu list address wrong the first time, reply to this message,
 not the previous if you were on Cc]

Add support for SG_IO passthru (packet commands) to the virtio-blk
backend.  Conceptually based on an older patch from Hannes Reinecke
but largely rewritten to match the code structure and layering in
virtio-blk.

Note that currently we issue the hose SG_IO synchronously.  We could
easily switch to async I/O, but that would required either bloating
the VirtIOBlockReq by the size of struct sg_io_hdr or an additional
memory allocation for each SG_IO request.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-01 09:44:10 -05:00
Paul Brook 582af0da2a Remove redundant cirrus vga ram functions.
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-01 15:16:15 +01:00
Paul Brook 1dcea8e82b Remove vga LFB accessor hacks.
These are redundant now that we remap the LFB ram area.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-04-30 18:35:05 +01:00
Blue Swirl c0c440f39c Synch to VGA 2009-04-27 18:10:37 +00:00
Avi Kivity 12c7e75a7c [RESEND] Fix vga segfaults or screen corruption with large memory guests
page0 and friends are ram addresses; a smaller size will overflow and
cause a segfault or random corruption.

Change them to ram_addr_t.

Signed-off-by: Avi Kivity <avi@redhat.com>
2009-04-27 17:57:12 +00:00
Blue Swirl 6fcfeff9fa Fix compilation when x86_64 is defined 2009-04-25 08:00:11 +00:00
Blue Swirl c433bedf76 Fix warning 2009-04-25 07:31:43 +00:00
aliguori d9f75a4eb4 qemu: create helper for event notification (Marcelo Tosatti)
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7236 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-24 18:03:11 +00:00
blueswir1 96248fd890 Fix typo, thanks to Andreas Faerber for spotting
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7235 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-23 18:42:30 +00:00
blueswir1 fc1f79f71c Use a more natural order
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7234 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-23 18:29:47 +00:00
aliguori 93b665693d Change RTC time drift IRQ re-injection (Gleb Natapov)
Currently IRQ are reinjected as soon as they are acknowledged to
the RTC, but Windows sometimes do acknowledgement in a loop with
global interrupt disabled waiting for interrupt to be cleared and
it does not mask RTC vector in PIC/APIC while doing this. In such
situation interrupt injection always fails and RTC interrupt is never
cleared.

Instead of reinjecting coalesced IRQs on acknowledgement the patch below
reinjects them by accelerating RTC clock a bit. This way RTC interrupt
is not constantly raced after coalesced interrupt.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7231 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-22 20:20:22 +00:00
aliguori e268ca5232 implement qemu_blockalign (Stefano Stabellini)
this patch adds a buffer_alignment field to BlockDriverState and
implements a qemu_blockalign function that uses that field to allocate a
memory aligned buffer to be used by the block driver.
buffer_alignment is initialized to 512 but each block driver can set
a different value (at the moment none of them do).
This patch modifies ide.c, block-qcow.c, block-qcow2.c and block.c to
use qemu_blockalign instead of qemu_memalign.
There is only one place left that still uses qemu_memalign to allocate
buffers used by block drivers that is posix-aio-compat:handle_aiocb_rw
because it is not possible to get the BlockDriverState from that
function. However I think it is not important because posix-aio-compat
already deals with driver specific code so it is supposed to know its
own needs.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7229 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-22 20:20:00 +00:00
aliguori 94909d9fd9 xen: add -vga xenfb option, configure xenfb (Gerd Hoffmann)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7228 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-22 15:19:53 +00:00
aliguori 9306acb509 xen: pv domain builder. (Gerd Hoffmann)
This adds domain building support for paravirtual domains to qemu.
This allows booting xen guests directly with qemu, without Xend
and the management stack.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7226 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-22 15:19:44 +00:00
aliguori 2c8b24a391 xen: blk & nic configuration via cmd line. (Gerd Hoffmann)
This patch makes qemu create backend and frontend device entries in
xenstore for devices configured on the command line.  It will use
qdisk and qnic backend names, so the qemu internal backends will
be used.

Disks can be created using -drive if=xen,file=...
Nics can be created using -net nic,macaddr=...

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7225 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-22 15:19:39 +00:00
aliguori e613b064a8 xen: add net backend driver. (Gerd Hoffmann)
This patch adds a network interface backend driver to qemu.  It is a pure
userspace implemention using the gntdev interface.  It uses "qnet" as
backend name in xenstore so it doesn't interfere with the netback
backend (aka "vnif").

The network backend is hooked into the corrosponding qemu vlan, i.e.
vif 0 is hooked into vlan 0.  To make the packages actually arrive
somewhere you additionally have to link the vlan to the outside world
using the usual qemu command line options such as "-net tap,...".

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7224 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-22 15:19:35 +00:00
aliguori 62d23efac8 xen: add block device backend driver. (Gerd Hoffmann)
This patch adds a block device backend driver to qemu.  It is a pure
userspace implemention using the gntdev interface.  It uses "qdisk" as
backend name in xenstore so it doesn't interfere with the other existing
backends (blkback aka "vbd" and tapdisk aka "tap").

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7223 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-22 15:19:30 +00:00
aliguori e7151f83e2 xen: add framebuffer backend driver (Gerd Hoffmann)
This patch adds a frsamebuffer (and kbd+mouse) backend driver.  It
it based on current xen-unstable code.  It has been changed to make
use of the common backend driver code.  It also has been changed to
compile with xen headers older than release 3.3

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7222 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-22 15:19:25 +00:00
aliguori e57dd20bb7 xen: add console backend driver. (Gerd Hoffmann)
This patch adds a xenconsole backend driver.  It it based on current
xen-unstable code.  It has been changed to make use of the common
backend driver code.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7221 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-22 15:19:19 +00:00
aliguori d94f948620 xen: backend driver core (Gerd Hoffmann)
This patch adds infrastructure for xen backend drivers living in qemu,
so drivers don't need to implement common stuff on their own.  It's
mostly xenbus management stuff: some functions to access xentore,
setting up xenstore watches, callbacks on device discovery and state
changes, handle event channel, ...

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7220 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-22 15:19:15 +00:00
aliguori e37630ca4f xen: groundwork for xen support (Gerd Hoffmann)
- configure script and build system changes.
- wind up new machine type.
- add -xen-* command line options.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7219 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-22 15:19:10 +00:00
aliguori 11c2fd3e01 sending NUMA topology to BIOS (Andre Przywara)
uses the QEMU firmware configuration interfacce to send the NUMA
topology to the BIOS, which has to setup the tables. Only one firmware
configuration channel is used.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7212 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-21 22:31:41 +00:00
blueswir1 640f42e4e9 kqemu: merge CONFIG_KQEMU and USE_KQEMU
Basically a recursive ":%s/USE_KQEMU/CONFIG_KQEMU/g".

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7189 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-19 10:18:01 +00:00
aurel32 ac611340c9 Adds SM501 usb host emulation feature.
It makes usb keyboard available for sh4/r2d system emulation.

The changes for "hw/usb-ohci.c" are as follows.
 - 'localmem_base' is introduced as OHCIState struct member.
   SM501 has a local memory, and it is used to pass and receive data with
   OHCI driver.  OHCI driver accesses it with SH4 physical memory address,
   and SM501 accesses it with SM501 local address.  'localmem_base' holds
   where the SM501 local memory is mapped into SH4 physical address space.
 - Memory access functions modified to adjust address with 'localmem_base'.
   The functions are, ohci_read_*(), ohci_put_*(), and ohci_copy_*().
 - ohci_read_hcca() and ohci_put_hcca() are introduced for more consistent
   implementation.

For other source files, it does,
 - introduces usb_ohci_init_sm501().
 - adds irq argument for SM501 initialization, to emulate USB interrupts.

Signed-off-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7188 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-19 09:15:50 +00:00
balrog 2ba2d70607 Fix indices in Menelaus save/load.
Version increase won't be helpful here.  Spotted by Sergei Steshenko / Blau
Wirbel.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7186 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-19 00:26:31 +00:00
aliguori 3787324101 hpet: Fix emulation of HPET_TN_SETVAL (Jan Kiszka)
While Intel's spec is not that clear here, latest changes to Linux' HPET
code (commit c23e253e67c9d8a91a0ffa33c1f571a17f0a2403, "x86: hpet: stop
HPET_COUNTER when programming periodic mode") strongly suggest that
HPET_TN_SETVAL rather means: Set _both_ the comparator value and
register.

With this patch applied, I'm again able to boot 2.6.30-rc kernels as
they no longer panic like this (which was due to the comparator
register remaining 0):

ENABLING IO-APIC IRQs
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
..MP-BIOS bug: 8254 timer not connected to IO-APIC
...trying to set up timer (IRQ0) through the 8259A ...
..... (found apic 0 pin 2) ...
....... failed.
...trying to set up timer as Virtual Wire IRQ...
..... failed.
...trying to set up timer as ExtINT IRQ...
..... failed :(.
Kernel panic - not syncing: IO-APIC + timer doesn't work! [...]

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7168 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-17 20:50:58 +00:00
aliguori b6f6e3d3a7 qemu: Add support for SMBIOS command line otions (Alex Williamson)
Create a new -smbios option (x86-only) to allow binary SMBIOS entries
to be passed through to the BIOS or modify the default values of
individual fields of type 0 and 1 entries on the command line.

Binary SMBIOS entries can be generated as follows:

dmidecode -t 1 -u | grep $'^\t\t[^"]' | xargs -n1 | \
        perl -lne 'printf "%c", hex($_)' > smbios_type_1.bin

These can then be passed to the BIOS using this switch:

 -smbios file=smbios_type_1.bin

Command line generation supports the following syntax:

 -smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d]
 -smbios type=1[,manufacturer=str][,product=str][,version=str][,serial=str]
              [,uuid=$(uuidgen)][,sku=str][,family=str]

For instance, to add a serial number to the type 1 table:

 -smbios type=1,serial=0123456789

Interface is extensible to support more fields/tables as needed.

aliguori: remove texi formatting from help output

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7163 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-17 18:59:56 +00:00
aliguori b946a15332 Introduce VLANClientState::cleanup() (Mark McLoughlin)
We're currently leaking memory and file descriptors on device
hot-unplug.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7150 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-17 17:11:08 +00:00
aliguori 32a8f6ae93 Use NICInfo::model for eepro100 savevm ID string (Mark McLoughlin)
NICInfo::model will always be identical to the device name strings
we're currently passing to nic_init(). Just re-use NICInfo::model.

This makes it clear why we use vc->model for unregister_savevm()
in a subsequent patch.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7149 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-17 17:11:03 +00:00
aliguori 41bd13afda Add unregister_savevm() (Mark McLoughlin)
Currently there's no way to unregister a savevm callback, so
e.g. if a NIC is hot-unplugged and a savevm is issued, we'll
segfault.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7148 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-17 17:10:59 +00:00
aliguori ad06714858 Remove NICInfo from e1000 and mipsnet state (Mark McLoughlin)
NICInfo isn't used after initialization, so remove it from the driver
state structures.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7147 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-17 17:10:56 +00:00
aliguori eefb4091d2 Don't fail PCI hotplug if no NIC model is supplied (Mark McLoughlin)
It's perfectly fine to not supply a NIC model when adding
a new NIC - we supply the default model to pci_nic_init()
and it uses that if one wasn't explicitly supplied.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7145 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-17 17:10:47 +00:00
aliguori 559a8f45f3 Remove stray GSO code from virtio_net (Mark McLoughlin)
Obviously merged from kvm-userspace accidentally.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7142 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-17 17:10:34 +00:00
aliguori 4b16eb9d95 vga: Cleanup dirty logging (Jan Kiszka)
In theory, there are no more quirks in the KVM slot management that
requires dirty log start/stop all over the place. We just have to start
the logging each time the mapping may have changed. This patch drops
vga_dirty_log_stop for both standard and cirrus VGA. It also reverts
#6851 as it was obviously a tribute to the old slot system.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7141 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-17 14:26:41 +00:00
aliguori e7f3dcc4a7 vga: Fix inconsistent tracking of map_addr (Jan Kiszka)
Only track video RAM mapping in map_addr and use the correct RAM size.
Furthermore, make sure the reset the address in case unmapping took
place via PCI reconfiguration.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7140 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-17 14:26:37 +00:00
aliguori 3c892168a0 kvm: Apply SMM-already-initialized workaround on reset (Jan Kiszka)
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7136 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-17 14:26:21 +00:00
aurel32 a65f56eeba Implement sonic netcard (MIPS Jazz)
Attached patch adds emulation of a SONIC netcard. This card has been used
in MIPS Jazz machines and in some Apple Mac 68K.

Emulation has been done using dp83932 specification, but can be enhanced
(if needed) to also emulate dp83916, dp83934 or dp83936 chipsets.

This has been tested in Linux 2.1, NetBSD 1.6.2 and MS Windows NT/MIPS

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7112 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-15 14:57:54 +00:00
aurel32 29463b24a8 target-alpha: lower parent irq when irq is lowered.
Signed-off-by: Tristan Gingold <gingold@adacore.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7108 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-15 14:42:30 +00:00
blueswir1 3f4cb3d37f Fix OpenSolaris gcc4 warnings: iovec type mismatches, missing 'static'
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7103 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-13 16:31:01 +00:00
pbrook b2ee0ce237 Add named initializers.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7091 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-11 17:41:32 +00:00
pbrook 190cd0215b Remove redundant ram_require machine properly.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7090 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-11 17:33:00 +00:00
pbrook a0b753dfd3 Remove more redundant ram size checks.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7089 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-11 17:24:39 +00:00
pbrook b0457b6920 Fix/remove bogus ram size checks.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7087 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-11 17:01:42 +00:00
pbrook 520860ef61 Allocate enough vram for 24-bit planes.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7086 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-11 16:55:44 +00:00
aurel32 3930367245 mips malta: fix commit 7064
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7079 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-11 07:02:25 +00:00
aurel32 68238a9e90 Clean up rc4030 init function
At the moment, rc4030 init function is returning some function pointers.
Mark them non-static and define them in header file instead.
Export also a function to read/write DMA memory, it will be required by
the netcard.

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7072 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-10 21:26:55 +00:00
aliguori c2c5104b22 Make PCI config status register read-only
From the documentation I can find, this register is supposed to be read-only.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7070 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-10 20:48:17 +00:00
pbrook 7ec632b45c Wean device tree code off phys_ram_base.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7068 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-10 16:23:59 +00:00
pbrook 5c130f659b Yet more phys_ram_base elimination.
Signed-off-by: Paul Brook <paul@cofdesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7067 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-10 14:29:45 +00:00
pbrook d758525180 More phys_ram_base elimination.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7064 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-10 03:36:49 +00:00
pbrook b584726df9 Clean up VGA ram allocation.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7063 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-10 02:24:36 +00:00
pbrook a8b01dd87f Fix RTC breakage from r7031.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7062 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-10 02:19:52 +00:00
pbrook 930c86820e Musicpal ram access cleanup.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7061 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-10 01:24:26 +00:00
pbrook 4465449097 More phys_ram_base removal.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7060 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-10 00:26:15 +00:00
pbrook dc828ca1b5 Cleanup SPARC/TCX framebuffer allocation.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7059 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-09 22:21:07 +00:00
pbrook 7ffa47675c Use cpu_physical_memory_write_rom instead of memcpy.
Signed-off-by: Glauber Costa <glommer@redhat.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7058 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-09 21:02:04 +00:00
pbrook f753ff1638 Register a single area for vga bios and option roms
Those guys are not different in nature. They're all roms,
not blessed with the graces of being written to. So there's
not need to issue multiple requests to memory registration areas:
just treat them as brothers, and put them all in the same
region.

It also has the nice side effect of improving the loading code
a little bit. Besides some of the ugliness going away, we're now
avoiding phys_ram_base dependencies in option rom code.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Paul Brook <paul@codesourcery.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7057 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-09 20:59:05 +00:00
pbrook dcac9679fe Use load_image_targphys and avoid phys_ram_base.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7056 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-09 20:05:49 +00:00
pbrook f78630ab2f More phys_ram_base removal.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7055 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-09 17:48:30 +00:00
pbrook 3b760e046b Use load_image_targphys.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7054 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-09 17:30:32 +00:00
pbrook 52b437377f Use guest memory access functions when setting up arm boorloader.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7053 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-09 17:19:47 +00:00
pbrook 7ffab4d78c Use qemu_ram_alloc.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7052 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-09 17:15:18 +00:00
aurel32 f1afe02aef pcnet: Avoid double conversion via PHYSADDR
rdra and tdra are already kept converted in the pcnet state structure.
Avoid converting derivatives a second time. The same case with the local
variable xmit_cxda: it already contains a converted cxda address. This
issue only causes troubles when using the pcnet in 16-bit legacy mode.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7049 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-08 22:56:33 +00:00
aurel32 2c7c13d4b8 apic: Fix access to non-existent APIC
When running with -M isapc, there is no env->apic_state. Fix
cpu_get/set_apic_* helpers to handle this corner case gracefully.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7048 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-08 22:56:26 +00:00
aurel32 100d9891d6 mc146818: add square wave output support
This is necessary for es40 as the sqw output is directly connected to the
core chipset.

Signed-off-by: Tristan Gingold <gingold@adacore.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7031 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-07 22:28:50 +00:00
aurel32 9ea0b7a139 rc4030 registers improvements
Attached patch documents some registers and simplifies one hack.

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7030 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-07 22:03:44 +00:00
aliguori 9d1b494a2d Fix crash on resolution change -> screen dump -> vga redraw (Avi Kivity)
The vga screen dump function updates last_width and last_height,
but does not change the DisplaySurface that these variables describe.
A consequent vga_draw_graphic() will therefore fail to resize the
surface and crash.

Fix by invalidating the display state after a screen dump, forcing
vga_draw_graphic() to reallocate the DisplaySurface.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7026 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-07 20:55:58 +00:00
aliguori 799e709b43 Revert r6989
There is a much more elegant fix that will follow up after this commit.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7025 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-07 20:55:29 +00:00
aliguori c87c067293 remove bdrv_aio_read/bdrv_aio_write (Christoph Hellwig)
Always use the vectored APIs to reduce code churn once we switch the BlockDriver
API to be vectored.


Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7019 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-07 18:43:20 +00:00
blueswir1 7442511ca1 Don't try to return result from a void function (spotted by Sparse)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7017 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-07 18:22:35 +00:00
aliguori 4dabe24883 create qemu_file_set_error (Glauber Costa)
This is mainly for consistency, since we don't want
anything outside of savevm setting it explicitly. There
are current no users of that in qemu tree, but there
are potential candidates on kvm-userspace. And avi
is a nice guy, let's be nice with him.

Based on a patch by Yaniv Kamay

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6998 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-05 19:30:51 +00:00
aliguori 9586fefefe Fix display breakage when resizing the screen (v2) (Avi Kivity)
When the vga resolution changes, a new display surface is not allocated
immediately; instead that is deferred until the next update.  However,
if we're running without a display client attached, that won't happen
and the next bitblt is likely to cause a segfault by overflowing the
display surface.

Fix by reallocating the display immediately when the resolution changes.

Tested with (Windows|Linux) x (cirrus|std) x (curses|sdl).

Changes from v1:
 - fix segfault when switching virtual consoles with curses

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6989 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-05 18:41:18 +00:00
aliguori 8707eccac8 pci_add storage: fix error handling for 'if' parameter (Eduardo Habkost)
This fixes:

 - The error message to show the actual if= argument value. It was showing
   the filename instead, because 'buf' is reaused on the filename parsing.
 - A bug that makes a block device to be created even when an unsupported if= arg
   is passed to pci_add.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6981 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-05 17:40:55 +00:00
aliguori 8eca6b1bc7 Fix oops on 2.6.25 guest (Rusty Russell)
I believe this is behind the following:
https://bugs.edge.launchpad.net/ubuntu/jaunty/+source/linux/+bug/331128

virtio_pci in 2.6.25 didn't do feature negotiation correctly: it acked every
bit.  Fortunately, we can detect this.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6975 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-05 17:40:08 +00:00
pbrook 714fa308a3 Implement and use shared memory framebuffer device rendering reoutine.
Use DMA mapping API.

Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6965 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-01 12:27:59 +00:00
pbrook 602dafcf43 Use pixel_ops.h
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6964 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-01 11:43:02 +00:00
blueswir1 61f14e1074 Remove unused variable
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6963 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-31 17:18:10 +00:00
pbrook d0a981b2d5 Avoid rounding problems in ptimer_get_count
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6961 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-31 14:34:24 +00:00
blueswir1 58a2c43689 Misc scsi disk/cdrom fixes/improvements 4/4
Implement Test Unit Ready command (return NOT READY as above
if !bdrv_is_inserted(...))

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6954 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-29 15:40:59 +00:00
blueswir1 ed6a9b307b misc scsi disk/cdrom fixes/improvements 3/4
Add asc 0x3a, ascq 0: Medium not present to NOT READY sense
(needed to keep some guests from retrying causing long sleeps in the
kernel)

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6953 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-29 15:40:42 +00:00
blueswir1 b2056c167d misc scsi disk/cdrom fixes/improvements 2/4
Implement cdrom load/eject functionality (Start Stop Unit command)

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6952 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-29 15:40:21 +00:00
blueswir1 ee16b24ac8 misc scsi disk/cdrom fixes/improvements 1/4
Use correct sector size for cdrom Read TOC command

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6951 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-29 15:39:59 +00:00
aurel32 f3e3aa8cdd target-sh4: r2d --append option support
Remove qemu_ram_alloc(SDRAM_BASE) and related changes.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6919 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-28 23:18:47 +00:00
aurel32 7ab2589cbb hw/eeprom93xx.c: support 93xx EEPROMs with more than 255 words
In the head of eeprom93xx.c we promise to support chips with 256 words,
but store the size in an unsigned byte. This patch replaces this with an
16 bit variable and changes the load/store code accordingly (introducing a
new version).

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6918 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-28 23:14:52 +00:00
aurel32 d4ae799cd1 hw/eeprom93xx.c: substitute structure dump with discrete dump in eeprom_save/load
The EEPROM 93xx device used to dump a C structure to the migration stream.
This structure includes mixed 8 and 16bit variables and is thus subject to
compiler dependent padding. Replace this with discrete dumps of each member
(and add a padding byte to ensure compatibility, a version update is
included in the following patch).

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6917 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-28 23:14:41 +00:00
aurel32 e8afa06581 target-sh4: r2d --append option support
Add linux kernel command line ("--append" option) support.
Fix kernel loading address to appropriate position when --append used.
Using --kernel but --append case is left untouched for backward compatibility.

This also change the host<->SH address mapping for r2d to
 host addr == phys_ram_base + SH addr.

Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6916 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-28 23:14:32 +00:00
aliguori 26b258e138 Use the DMA api to map virtio elements.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6904 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-28 17:46:18 +00:00
aliguori d28a1b6ec6 virtio-blk: use generic vectored I/O APIs (Christoph Hellwig)
Use the generic bdrv_aio_readv/bdrv_aio_writev APIs instead of linearizing
buffers directly.  This enables using the future native preadv/pwritev
support.


Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6903 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-28 17:46:14 +00:00
aliguori cef3017cd7 Clean some PCI defines (Stefan Weil)
this patch adds some more defines from linux/pci_regs.h to
hw/pci.h. There is now no longer a need to define them in
eepro100.c, so they were removed there.

Some defines from linux/pci_regs.h had similar, but not
the same defines in hw/pci.h (PCI_REVISION_ID / PCI_REVISION,
PCI_SUBSYSTEM_VENDOR_ID / PCI_SUBVENDOR_ID,
PCI_SUBSYSTEM_ID / PCI_SUBDEVICE_ID).

I suggest to use the "standard" from linux/pci_regs.h and
replace the "old" Qemu ones. To facilitate the migration,
my patch does not remove the old defines but marks them
as obsolete. After a migration to the "standard" defines,
pci.h could use linux/pci_regs.h which is far more complete.

The patch is needed for an updated maintainer version of
hw/eepro100.c which I'd like to see in Qemu stable.

 * Remove declarations already declared in header file from eepro100.c
 * Add missing declarations from pci_regs.h to pci.h
 * Mark "non-standard" declarations in pci.h as obsolete

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6901 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-28 17:29:07 +00:00
aliguori 81f099ad32 Fix monitor command (screendump) (Stefan Weil)
starting with r6839, the monitor command 'screendump'
raises a nullpointer memory access which crashs Qemu.

Fix crash when calling screendump from monitor.

This was a regression introduced with r6839:
DisplayAllocator interface (Stefano Stabellini)

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6900 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-28 17:29:02 +00:00
aliguori 6295e564f7 Remove nodisk_ok machine feature (Jan Kiszka)
All archs have some kind of firmware to load and can be fine with it
already. So there is not much use in enforcing the presence of a disk.
If the system setup requires one, the user will notice it anyway once
the firmware/bios fails to boot from it.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6899 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-28 17:28:58 +00:00
aliguori bf9b48af99 musicpal: Fix regression caused by 6839 (Jan Kiszka)
Pass correct DisplayState field to is_surface_bgr().

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6898 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-28 17:28:53 +00:00
aliguori 34b39c2ba6 get roms more room. (Glauber Costa)
This patch increases by 50 % the size available for option roms.
The main motivator is that some roms grew bigger than the 64k we
currently allocate for them (Hey, it's 2009!)

One example is the gpxe project, that produces some roms with 69k,
70k, etc. The space proposed by this patch actually makes it as
big as 84k. Probably still a fit for some time.

But there is no free lunch. This space must come from somewhere,
and we take it from vga rom space. Currently, our vga roms are
around 35k in size. With this patch, option rom space will begin
just after vga ends, aligned to the next 2k boundary.

Technicaly, we could do the same with the uper space (the bios itself),
but since bochs bios is already 128 k in size, I don't see an
urgent need to do it.

[ fix case for vgabioses smaller than 30k, by Carl-Daniel Hailfinger ]

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6896 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-28 17:28:45 +00:00
aliguori 221f715d90 new scsi-generic abstraction, use SG_IO (Christoph Hellwig)
Okay, I started looking into how to handle scsi-generic I/O in the
new world order.

I think the best is to use the SG_IO ioctl instead of the read/write
interface as that allows us to support scsi passthrough on disk/cdrom
devices, too.  See Hannes patch on the kvm list from August for an
example.

Now that we always do ioctls we don't need another abstraction than
bdrv_ioctl for the synchronous requests for now, and for asynchronous
requests I've added a aio_ioctl abstraction keeping it simple.

Long-term we might want to move the ops to a higher-level abstraction
and let the low-level code fill out the request header, but I'm lazy
enough to leave that to the people trying to support scsi-passthrough
on a non-Linux OS.

Tested lightly by issuing various sg_ commands from sg3-utils in a guest
to a host CDROM device.


Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6895 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-28 17:28:41 +00:00