Commit graph

9453 commits

Author SHA1 Message Date
Juan Quintela 25dc563b09 vmstate: add VMSTATE_BUFFER_TEST
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:44 -05:00
Juan Quintela 96c35cebfe ide: change identify_data type to uint8_t
It is used everywhere as uint8_t except in one place.  Cast to uint16_t
in that place
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:44 -05:00
Juan Quintela 6521dc629c ide: port idebus to vmstate
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:44 -05:00
Juan Quintela 73c595e1d5 mc146818rtc: remove rtc_mm_init()
It was used for Acer Pica 61 emulation, removed in 2008
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:43 -05:00
Juan Quintela e0ca7b94da mc146818rtc: fix indentation
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:43 -05:00
Juan Quintela 6b075b8af6 mc146818rtc: port rtc to vmstate
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:43 -05:00
Juan Quintela 048c74c437 mc145818rtc: fix saving of rtc-td hack properly upgrading the version number
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:43 -05:00
Juan Quintela 817afc614c usb-uhci: port to vmstate
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:43 -05:00
Juan Quintela 64e58fe5c1 usb-uhci: Add num_ports_vmstate to UHCIState
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:42 -05:00
Kusanagi Kouichi 5989020bc1 Add chardev option to disable signal.
If I am using vga and serial which is stdio and hit C-c on
serial console, qemu terminates. That is annoying for me.
So make it configurable whether signal is generated when C-c is hit.

Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:42 -05:00
Gerd Hoffmann 30d335d68d hotplug: more fixes for scsi disk hotplug.
Changes:
 - create common scsi_hot_add function for adding a scsi disk to
   a adapter.
 - Add sanity checks.  You can't drive_add disks to the VGA any more.
 - Ignore the unit value calculated by drive_init, add a comment
   explaining why.  Review the patch to find the details ;)

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:42 -05:00
Gerd Hoffmann 5b684b5a56 hotplug: fix "pci_add storage if=scsi"
Explicitly add the drive to the bus of the newly created scsi adapter
instead of hoping that scsi_bus_legacy_handle_cmdline() picks it up
correctly.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:42 -05:00
Gerd Hoffmann e8ee28fb3e isa: configure serial+parallel by index.
This patch adds a 'index' property to the isa-parallel and isa-serial
devices.  This can be used to create devices with the default isa irqs
and ioports by simply specifying the index, i.e.

   -device isa-serial,index=1

instead of

   -device isa-serial,iobase=0x2f8,irq=3

for ttyS1 aka com2.  Likewise for parallel ports.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:42 -05:00
Gerd Hoffmann 844e78ef9c pc.c: only load e1000 rom.
The other pxe roms are loaded by the drivers individual drivers now.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:42 -05:00
Gerd Hoffmann 9ad4531e1e kill dead nic unplug code.
Cleanup on unplug happens via qdev->exit() callback now.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:41 -05:00
Gerd Hoffmann 1cc33683c8 zap DeviceState->nd
No users left.
Also cleanup obsolete helper functions.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:41 -05:00
Gerd Hoffmann 4c91cd2810 musicpal: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:41 -05:00
Gerd Hoffmann 540f006a23 stellaris_enet: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:41 -05:00
Gerd Hoffmann 17d1ae3cec xilinx_ethlite: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:41 -05:00
Gerd Hoffmann 501321566f smc91c111: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:40 -05:00
Gerd Hoffmann 508ef9367e eepro100: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:40 -05:00
Gerd Hoffmann 97b156213e virtio: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:40 -05:00
Gerd Hoffmann 254111ecc8 rtl8139: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:40 -05:00
Gerd Hoffmann 94e1a912b2 pcnet: split away lance.c (sparc32 code).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:40 -05:00
Gerd Hoffmann 7622483395 pcnet: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:39 -05:00
Gerd Hoffmann fbdaa00259 e1000: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:39 -05:00
Gerd Hoffmann a783cc3e55 ne2k_pci: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:39 -05:00
Gerd Hoffmann dc7aff118b prepare pci nic init path for qdev property configuration.
Initialization path will work with both converted and not-converted
drivers, so we can convert drivers one by one.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:38 -05:00
Gerd Hoffmann d8ed79aea7 qdev: add qdev_prop_exists()
Function test whenever a driver has a specific property.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:38 -05:00
Gerd Hoffmann 93db66850d ne2k_isa: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:38 -05:00
Gerd Hoffmann ed16ab5afa qdev/net: common nic property bits
Add a new type for properties common to all nics.
Add helper functions and macros to deal with it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:38 -05:00
Gerd Hoffmann 851bec091d qdev: add vlan property
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:37 -05:00
Gerd Hoffmann 2ef924b416 qdev: add netdev property
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:37 -05:00
Gerd Hoffmann 1503fff343 qdev: mac addr property fixups
Make the mac property use the newly added type for the mac address.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:37 -05:00
Gerd Hoffmann 76d32cba7e net: add macaddr type.
Add new type for mac addresses.

Add function which sets the qemu default mac address if it finds the mac
address uninitialized (i.e. all zeros).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:36 -05:00
Nolan 18995b9808 Send a RARP packet after migration.
Currently, after a migration qemu sends a broadcast packet to update
switches' MAC->port mappings.

Unfortunately, it picks a random (constant) ethertype and crosses its
fingers that no one else is using it.

This patch causes it to send a RARP packet instead.  RARP was chosen for
2 reasons.  One, it is always harmless, and will continue to be so even
as new ethertypes are allocated.  Two, it is what VMware ESX sends, so
people who write filtering rules for switches already know about it.

I also changed the code to send SELF_ANNOUNCE_ROUNDS packets, instead of
SELF_ANNOUNCE_ROUNDS + 1, and added a simple backoff scheme.

Signed-off-by: Nolan Leake <nolan <at> sigbus.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:36 -05:00
Juergen Lock ff56954baf multiboot.S patch for old as(1) (was: Re: [Qemu-devel] Some OpenBSD/amd64 build fixes)
On Wed, Sep 23, 2009 at 10:55:02PM +0200, Juergen Lock wrote:
> On Wed, Sep 23, 2009 at 09:31:16PM +0100, Laurence Tratt wrote:
>[...]
> >  then the above error doesn't occur, but
> > pc-bios/optionrom/multiboot.S dies as follows:
> >
> >   $
> >     AS    optionrom/multiboot.o
> >   multiboot.S: Assembler messages:
> >   multiboot.S:116: Error: `%es:-4(%edi)' is not a valid 16 bit base/index
> > expression
> >   $
> >
> > What little Intel assembler I ever knew has long since departed from my
> > brain, so I don't know why that error occurs, nor what a fix might be.
> >
>  It occurs because of too old binutils (as(1) in this case), on FreeBSD
> we now have a port for newer ones,
> 	http://www.freshports.org/devel/binutils
> so I depend on that and have the optionrom Makefile use the new as
> like this: (the first change wrt CFLAGS is unrelated and has probably
> been fixed in the meantime; it caused gmake to complain about
> recursive use of CFLAGS.)
>
> Index: qemu/pc-bios/optionrom/Makefile
> @@ -9,10 +9,13 @@
>
>  CFLAGS = -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin
>  CFLAGS += -I$(SRC_PATH)
> -CFLAGS += $(call cc-option, $(CFLAGS), -fno-stack-protector,"")
> +CFLAGS := $(CFLAGS) $(call cc-option, $(CFLAGS), -fno-stack-protector,"")
>
>  build-all: multiboot.bin
>
> +%.o: %.S
> +	$(CC) -E $(CFLAGS) -o - -c $< |${LOCALBASE}/bin/as -V -Qy -o $@
> +
>  %.img: %.o
>  	$(call quiet-command,$(LD) -Ttext 0 -e _start -s -o $@ $<,"  Building $(TARGET_DIR)$@")
>

That patch didn't seem to help on OpenBSD so I now finally got around
making another one that just emits the bytes of the offending insn
instead so people can keep using old assemblers:

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:36 -05:00
Kevin Wolf d2e4634504 raw/linux-aio: Also initialize POSIX AIO
When using Linux AIO raw still falls back to POSIX AIO sometimes, so we should
initialize it.

Not initializing it happens to work if POSIX AIO is used by another drive, or
if the format is not specified (probing the format uses POSIX AIO) or by pure
luck (e.g. it doesn't seem to happen any more with qcow2 since we have re-added
synchronous qcow2 functions).

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:35 -05:00
Kevin Wolf c5baaa489f qcow2: Fix grow_refcount_table error handling
In case of failure, we haven't increased the refcount for the newly allocated
cluster yet. Therefore we must not free the cluster or its refcount will become
negative (and endless recursion is possible).

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:35 -05:00
Paul Bolle dcc7e25fd1 usb-linux: return USB_RET_STALL on -EPIPE
0) This is an attempt to get an issue in usb-linux.c, for which a patch
was posted about a year ago, finally fixed.

1) Mark Burkley submitted a "EHCI emulation module" for review in in
October 2008 (see:
http://lists.gnu.org/archive/html/qemu-devel/2008-10/msg01326.html). No
EHCI emulation module was ever committed to qemu.

2) Part of that (large) patch was a fix for a separate issue in
usb-linux.c. Max Krasnyansky has ACK'ed that fix (see:
http://lists.gnu.org/archive/html/qemu-devel/2008-11/msg00032.html).

3) I already asked whether this fix was ready to be committed in last
April (see:
http://lists.gnu.org/archive/html/qemu-devel/2009-04/msg01763.html)

4) Maybe submitting this fix as a separate patch (with a really long
commit message but without a Signed-off-by) and cc-ing everbody involved
will help if actually getting this issue fixed.

Paul Bolle

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:35 -05:00
Stefan Weil 581d45f029 Makefile: Change make to be quiet again when doing nothing
This patch makes make quiet again.

There is already a similar patch from Juan Quintela,
but maybe this shorter form is preferred.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:35 -05:00
Stefan Weil 5fa9a0ae49 eepro100: Restructure code
This patch only moves about 150 lines of code from
function eepro100_cu_command to a new function action_command.

A goto statement was replaced by a for loop.

There are no functional changes. Nor did I change comments
starting with // (they will be removed by future patches).

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:34 -05:00
Aurelien Jarno f669df275c target-arm: use native tcg-ops for ror/bic/vorn
Acked-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-10-27 09:46:27 +01:00
Juha Riihimäki 50f67e95e2 target-arm: fix neon shift helper functions
Current code is broken at least on recent compilers, comparison
between signed and unsigned types yield incorrect code and render
the neon shift helper functions defunct. This is the third revision
of this patch, casting all comparisons with the sizeof operator to
signed ssize_t type to force comparisons to be between signed integral
types.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
Acked-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-10-27 09:46:26 +01:00
Juha Riihimäki ca9a32e4f3 target-arm: fix neon vsri, vshl and vsli ops
Shift by immediate value is incorrectly overwritten by a temporary
variable in the processing of NEON vsri, vshl and vsli instructions.
This patch has been revised to also include a fix for the special
case where the code would previously try to shift an integer value
over 31 bits left/right.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
Acked-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-10-27 09:46:26 +01:00
Juha Riihimäki 71b3c3dea2 target-arm: allow modifying vfp fpexc en bit only
All other bits except for the EN in the VFP FPEXC register are defined
as subarchitecture specific and real functionality for any of the
other bits has not been implemented in QEMU. However, current code
allows modifying all bits in the VFP FPEXC register leading to
problems when guest code is writing 1's to the subarchitecture
specific bits and checking whether the bits stay up to verify the
existence of functionality which in fact does not exist in QEMU.
This patch has been revised to include the same behavior change in
the gdb register write function.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
Acked-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-10-27 09:46:26 +01:00
Juha Riihimäki 8449623376 target-arm: add support for neon vld1.64/vst1.64 instructions
Add support for NEON vld1.64 and vst1.64 instructions. This patch is
revised to follow more closely the specification and raises
undefined exception if 64bit element size is used for vld2/vst2 or
vld4/vst4 instructions.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
Acked-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-10-27 09:46:26 +01:00
Juha Riihimäki 2301db4916 target-arm: fix neon vshrn/vrshrn ops
In the existing code shift value is clobbered during the pass loop.
This patch changes the code so that it stores the intermediate
result in the target neon register directly and eliminates the need
to use a temporary to hold the intermediate value thus leaving the
shift value in the temporary variable intact. This is a new patch
in this version of the patch series.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
Acked-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-10-27 09:46:26 +01:00
Juha Riihimäki 25aeb69b8d target-arm: fix incorrect temporary variable freeing
tmp4 and tmp5 temporary variables are allocated using tcg_const_i32
but incorrectly released using dead_tmp which will cause resource
leak tracking to report false leaks.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
Acked-by:  Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-10-26 20:36:47 +01:00
Blue Swirl f79ca11027 sparc32: tcx: remove unused include directive
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-25 15:04:43 +00:00