Commit graph

9437 commits

Author SHA1 Message Date
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
Blue Swirl b280fcdfde sparc32: convert sbi to VMState, vmsd and vmstate reset
Also remove unused include directive.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24 20:08:43 +00:00
Blue Swirl 9a2070d3c0 sparc32: convert Sun4c interrupt controller to reset + vmsd
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24 19:49:15 +00:00
Blue Swirl 78971d57bb sparc32: convert interrupt controller to reset + vmsd
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24 19:44:37 +00:00
Blue Swirl 1a522e8a67 sparc32: convert IOMMU to reset + vmsd
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24 19:39:17 +00:00
Blue Swirl 49ef6c9055 sparc32: convert DMA controller to reset + vmsd, fix reset on init
Add a missing call to reset on device init.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24 19:35:32 +00:00
Blue Swirl 285e468d64 m48t59: convert to vmstate reset
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24 19:22:56 +00:00
Blue Swirl 0e0bfeea68 sparc32: convert slavio_timer to reset + vmsd
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24 17:35:13 +00:00
Blue Swirl 2be3783328 fdc: convert to reset + vmsd
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24 16:56:20 +00:00
Blue Swirl 63235df8a1 esp: convert to reset + vmsd
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24 16:34:21 +00:00
Blue Swirl 82d4c6e683 sparc32: convert cs4231 to VMState, vmsd and reset
Also remove unused include directive.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24 16:20:32 +00:00
Blue Swirl 09330e90fe escc: add chipset docs
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24 16:09:01 +00:00
Blue Swirl bdb78cae61 escc: convert to VMState, vmsd and reset
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24 16:07:10 +00:00
Blue Swirl 5ac574c4d3 sparc32: add chipset docs for eccmemctl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24 15:27:28 +00:00
Blue Swirl 1795057a8f sparc32: convert slavio_misc to reset + vmsd
Also remove unused include directive.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24 15:27:23 +00:00
Blue Swirl 0284dc5410 sparc32: convert eccmemctl to reset + vmsd
Also remove unused include directive.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24 14:14:39 +00:00
Blue Swirl 1c6a50e71c sparc64: remove unused variables
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24 09:15:22 +00:00