]> git.proxmox.com Git - qemu.git/log
qemu.git
12 years agoMerge branch 'queues/slirp' of git://git.kiszka.org/qemu
Blue Swirl [Sun, 21 Aug 2011 19:19:29 +0000 (19:19 +0000)]
Merge branch 'queues/slirp' of git://git.kiszka.org/qemu

* 'queues/slirp' of git://git.kiszka.org/qemu:
  slirp: Fix bit field types in IP header structs

12 years agotcg-ia64: Fix typos in AREG0 setup in prologue.
Richard Henderson [Wed, 17 Aug 2011 21:11:49 +0000 (14:11 -0700)]
tcg-ia64: Fix typos in AREG0 setup in prologue.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotcg-hppa: Fix CPU_TEMP_BUF_NLONGS oversight.
Richard Henderson [Wed, 17 Aug 2011 21:11:48 +0000 (14:11 -0700)]
tcg-hppa: Fix CPU_TEMP_BUF_NLONGS oversight.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotcg: Constant fold neg, andc, orc, eqv, nand, nor.
Richard Henderson [Wed, 17 Aug 2011 21:11:47 +0000 (14:11 -0700)]
tcg: Constant fold neg, andc, orc, eqv, nand, nor.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotcg: Always define all of the TCGOpcode enum members.
Richard Henderson [Wed, 17 Aug 2011 21:11:46 +0000 (14:11 -0700)]
tcg: Always define all of the TCGOpcode enum members.

By always defining these symbols, we can eliminate a lot of ifdefs.

To allow this to be checked reliably, the semantics of the
TCG_TARGET_HAS_* macros must be changed from def/undef to true/false.
This allows even more ifdefs to be removed, converting them into
C if statements.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotcg: Add and use TCG_OPF_64BIT.
Richard Henderson [Wed, 17 Aug 2011 21:11:45 +0000 (14:11 -0700)]
tcg: Add and use TCG_OPF_64BIT.

This allows the simplification of the op_bits function from
tcg/optimize.c.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoCheck for presence of compiler -pthread flag.
Brad [Mon, 8 Aug 2011 00:02:11 +0000 (20:02 -0400)]
Check for presence of compiler -pthread flag.

OpenBSD / FreeBSD and some other OS's require the use of
cc -pthread to link threaded programs so have QEMU's
configure script check for the presence of the flag
and use it if so.

Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoConvert last qemu_free and qemu_malloc uses
Blue Swirl [Sun, 21 Aug 2011 18:42:08 +0000 (18:42 +0000)]
Convert last qemu_free and qemu_malloc uses

7267c0947d7e8ae5dff7bafd932c3bc285f43e5c missed
a few cases, fix them.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agomonitor: Show combined protection bits in "info mem"
Austin Clements [Mon, 15 Aug 2011 03:22:28 +0000 (23:22 -0400)]
monitor: Show combined protection bits in "info mem"

Previously, "info mem" considered and displayed only the last-level
protection bits for a memory range, which doesn't accurrately
represent the protection of that range.  Now it shows the combined
protection.

Signed-off-by: Austin Clements <amdragon@mit.edu>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agomonitor: Fix "info mem" to print the last memory range
Austin Clements [Mon, 15 Aug 2011 03:22:04 +0000 (23:22 -0400)]
monitor: Fix "info mem" to print the last memory range

"info mem" groups its output into contiguous ranges with identical
protection bits, but previously forgot to print the last range.

Signed-off-by: Austin Clements <amdragon@mit.edu>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agomonitor: Prevent sign-extension of 32-bit addresses printed by info mem
Austin Clements [Mon, 15 Aug 2011 03:19:21 +0000 (23:19 -0400)]
monitor: Prevent sign-extension of 32-bit addresses printed by info mem

Previously, on 32-bit i386, info mem used signed 32-bit int's to store
the page table indexes.  As a result, address calculation was done in
32 bits and then incorrectly sign-extended to 64 bits, yielding output
like

ffffffffef000000-ffffffffef031000 0000000000031000 ur-
ffffffffef7bc000-ffffffffef7bd000 0000000000001000 urw
ffffffffef7bd000-ffffffffef7be000 0000000000001000 ur-

This makes these indexes unsigned, which yields correct output

00000000ef000000-00000000ef031000 0000000000031000 ur-
00000000ef7bc000-00000000ef7bd000 0000000000001000 urw
00000000ef7bd000-00000000ef7be000 0000000000001000 ur-

Signed-off-by: Austin Clements <amdragon@mit.edu>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agow32: Fix format string regression
Stefan Weil [Fri, 15 Jul 2011 19:38:14 +0000 (21:38 +0200)]
w32: Fix format string regression

Commit 953ffe0f935f40c0d6061d69e76e0339393b54f8
introduced FMT_pid which is wrong for w32 and w64 getpid():
those getpid() implementations always return an int value.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agow64: Add definition of FMT_pid
Stefan Weil [Fri, 15 Jul 2011 19:38:13 +0000 (21:38 +0200)]
w64: Add definition of FMT_pid

For mingw-w64, pid_t is _pid_t which is __int64,
so this platform needs its own definition of FMT_pid.

Reviewed-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoFix conversions from pointer to tcg_target_long
Stefan Weil [Fri, 15 Jul 2011 19:38:12 +0000 (21:38 +0200)]
Fix conversions from pointer to tcg_target_long

tcg_gen_exit_tb takes a parameter of type tcg_target_long,
so the type casts of pointer to long should be replaced by
type casts of pointer to tcg_target_long.

These changes are needed for build environments where
sizeof(long) != sizeof(void *), especially for w64.

See 4b4a72e55660abf7efe85aca78762dcfea5519ad which fixed the
same issue for the other targets.

Cc: Alexander Graf <agraf@suse.de>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Acked-by: Guan Xuetao<gxt@mprc.pku.edu.cn>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoRemove remenants of qemu_malloc
Anthony Liguori [Sun, 21 Aug 2011 13:36:21 +0000 (08:36 -0500)]
Remove remenants of qemu_malloc

This covers the various check commands

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoUpdate HACKING to refer to g_malloc instead of qemu_malloc
Anthony Liguori [Sun, 21 Aug 2011 13:16:56 +0000 (08:16 -0500)]
Update HACKING to refer to g_malloc instead of qemu_malloc

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoAdd trace points for g_malloc/g_free functions
Anthony Liguori [Sun, 21 Aug 2011 03:38:31 +0000 (22:38 -0500)]
Add trace points for g_malloc/g_free functions

Derived from a patch submitted by Avi Kivity.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoRemove qemu_malloc/qemu_free
Anthony Liguori [Sun, 21 Aug 2011 03:23:03 +0000 (22:23 -0500)]
Remove qemu_malloc/qemu_free

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoUse glib memory allocation and free functions
Anthony Liguori [Sun, 21 Aug 2011 03:09:37 +0000 (22:09 -0500)]
Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoMake glib mandatory and fixup utils appropriately
Anthony Liguori [Sun, 21 Aug 2011 03:18:37 +0000 (22:18 -0500)]
Make glib mandatory and fixup utils appropriately

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoReorder default ram_size initialization
Jan Kiszka [Mon, 15 Aug 2011 23:18:57 +0000 (16:18 -0700)]
Reorder default ram_size initialization

code_gen_alloc depends on it, and that is now called earlier via
configure_accelerator.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
12 years agoscsi-disk: fix DPRINTF
Blue Swirl [Sat, 20 Aug 2011 09:21:42 +0000 (09:21 +0000)]
scsi-disk: fix DPRINTF

The variable 'status' does not exist anymore, adjust DPRINTF
accordingly.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotarget-cris/opcode-cris.h: rename REG_PC/SP to CRIS_REG_PC/SP
Peter Maydell [Fri, 19 Aug 2011 23:27:04 +0000 (00:27 +0100)]
target-cris/opcode-cris.h: rename REG_PC/SP to CRIS_REG_PC/SP

The REG_PC constant used in opcode-cris.h can clash with a
similar define in system include files. In particular the
Ubuntu Lucid SPARC signal.h will define REG_PC, and since
qemu-common.h now includes signal.h this was causing compile
failures. Rename the constants to avoid this issue.
(NB that REG_SP is not actually used within QEMU.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
12 years agoscsi: do not overwrite memory on REQUEST SENSE commands with a large buffer
Paolo Bonzini [Sun, 14 Aug 2011 21:05:49 +0000 (14:05 -0700)]
scsi: do not overwrite memory on REQUEST SENSE commands with a large buffer

Other scsi_target_reqops commands were careful about not using r->cmd.xfer
directly, and instead always cap it to a fixed length.  This was not done
for REQUEST SENSE, and this patch fixes it.

Reported-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoslirp: Fix bit field types in IP header structs
Jan Kiszka [Sat, 6 Aug 2011 12:23:29 +0000 (14:23 +0200)]
slirp: Fix bit field types in IP header structs

-mms-bitfields prevents that the bitfields in current IP header structs
are packed into a single byte as it is required. Fix this by using
uint8_t as backing type.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
12 years agohw/scsi-bus.c: Fix use of uninitialised variable
Peter Maydell [Fri, 12 Aug 2011 16:49:36 +0000 (17:49 +0100)]
hw/scsi-bus.c: Fix use of uninitialised variable

Don't use req before it has been initialised in scsi_req_new().
This fixes a compile failure due to gcc complaining about this.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoqapi: fix build issue due to missing newline in generated header
Michael Roth [Wed, 10 Aug 2011 18:10:51 +0000 (13:10 -0500)]
qapi: fix build issue due to missing newline in generated header

Fixes a build issue on RHEL5, and potentially other distros, where gcc
will generate an error due to us not writing a trailing "\n" when
generating *qmp-commands.h

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agomemory: correct documentation typos
Avi Kivity [Mon, 8 Aug 2011 16:58:50 +0000 (19:58 +0300)]
memory: correct documentation typos

Noted by Drew Jones.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agomemory: add API for creating ROM/device regions
Avi Kivity [Mon, 8 Aug 2011 16:58:49 +0000 (19:58 +0300)]
memory: add API for creating ROM/device regions

ROM/device regions act as mapped RAM for reads, can I/O memory for
writes.  This allow emulation of flash devices.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agomemory: reclaim resources when a memory region is destroyed for good
Avi Kivity [Mon, 8 Aug 2011 16:58:48 +0000 (19:58 +0300)]
memory: reclaim resources when a memory region is destroyed for good

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agobuild: Move QEMU_INCLUDES before QEMU_CFLAGS
Jiri Denemark [Wed, 10 Aug 2011 10:04:34 +0000 (12:04 +0200)]
build: Move QEMU_INCLUDES before QEMU_CFLAGS

This patch fixes build when any of the include paths from QEMU_CFLAGS
contains a header file with similar name to a header file in qemu
sources. I hit it with error.h included by qapi/qapi-types-core.h. GCC
decided to use /usr/include/alsa/error.h instead of qemu's error.h.

Tested-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoconfigure: Disable guest_agent for mingw32
Stefan Weil [Sat, 6 Aug 2011 20:47:22 +0000 (22:47 +0200)]
configure: Disable guest_agent for mingw32

guest_agent is not supported for mingw32, so the default value
should be 'no', not 'yes'.

This removes the dependencies to glib-2.0 and python which
makes native and cross builds for w32 much easier (no need
to get and install these extra packages).

It also avoids the problems caused by different bitfield alignment
which is required by glib-2.0.

It is still possible to set guest_agent=yes via configure option.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoscsi: add special traces for common commands
Paolo Bonzini [Wed, 3 Aug 2011 08:49:19 +0000 (10:49 +0200)]
scsi: add special traces for common commands

Can be useful when debugging the device scan phase.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoscsi: report unit attention on reset
Paolo Bonzini [Wed, 3 Aug 2011 08:49:18 +0000 (10:49 +0200)]
scsi: report unit attention on reset

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoscsi: add support for unit attention conditions
Paolo Bonzini [Wed, 3 Aug 2011 08:49:17 +0000 (10:49 +0200)]
scsi: add support for unit attention conditions

Unit attention conditions override any sense data the device already
has.  Their signaling and clearing is handled entirely by the SCSIBus
code, and they are completely transparent to the SCSIDevices.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoscsi: add a bunch more common sense codes
Paolo Bonzini [Wed, 3 Aug 2011 08:49:16 +0000 (10:49 +0200)]
scsi: add a bunch more common sense codes

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoscsi: move handling of REQUEST SENSE to common code
Paolo Bonzini [Wed, 3 Aug 2011 08:49:15 +0000 (10:49 +0200)]
scsi: move handling of REQUEST SENSE to common code

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoscsi: move handling of REPORT LUNS and invalid LUNs to common code
Paolo Bonzini [Wed, 3 Aug 2011 08:49:14 +0000 (10:49 +0200)]
scsi: move handling of REPORT LUNS and invalid LUNs to common code

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoscsi: move request parsing to common code
Paolo Bonzini [Wed, 3 Aug 2011 08:49:13 +0000 (10:49 +0200)]
scsi: move request parsing to common code

Also introduce the first occurrence of "independent" SCSIReqOps,
to handle invalid commands in common code.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoscsi: push lun field to SCSIDevice
Paolo Bonzini [Wed, 3 Aug 2011 08:49:12 +0000 (10:49 +0200)]
scsi: push lun field to SCSIDevice

This will let SCSIBus detect requests sent to an invalid LUN, and
handle them itself.  However, there will be still support for only one
LUN per target

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoscsi: introduce SCSICommand
Paolo Bonzini [Wed, 3 Aug 2011 08:49:11 +0000 (10:49 +0200)]
scsi: introduce SCSICommand

This struct is currently unnamed.  Give it a name and use it
explicitly to decouple (some parts of) CDB parsing from
SCSIRequest.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoscsi: pass cdb already to scsi_req_new
Paolo Bonzini [Wed, 3 Aug 2011 08:49:10 +0000 (10:49 +0200)]
scsi: pass cdb already to scsi_req_new

Right now the CDB is not passed to the SCSIBus until scsi_req_enqueue.
Passing it to scsi_req_new will let scsi_req_new dispatch common requests
through different reqops.

Moving the memcpy to scsi_req_new is a hack that will go away as
soon as scsi_req_new will also take care of the parsing.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoscsi: move request-related callbacks from SCSIDeviceInfo to SCSIReqOps
Paolo Bonzini [Wed, 3 Aug 2011 08:49:09 +0000 (10:49 +0200)]
scsi: move request-related callbacks from SCSIDeviceInfo to SCSIReqOps

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoscsi: introduce SCSIReqOps
Paolo Bonzini [Wed, 3 Aug 2011 08:49:08 +0000 (10:49 +0200)]
scsi: introduce SCSIReqOps

This will let allow requests to be dispatched through different callbacks,
either common or per-device.

This patch adjusts the API, the next one will move members to SCSIReqOps.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoscsi: move sense handling to generic code
Paolo Bonzini [Wed, 3 Aug 2011 08:49:07 +0000 (10:49 +0200)]
scsi: move sense handling to generic code

With this patch, sense data is stored in the generic data structures
for SCSI devices and requests.  The SCSI layer takes care of storing
sense data in the SCSIDevice for the subsequent REQUEST SENSE command.

At the same time, get_sense is removed and scsi_req_get_sense can use
an entirely generic implementation.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoscsi: pass status when completing
Paolo Bonzini [Wed, 3 Aug 2011 08:49:06 +0000 (10:49 +0200)]
scsi: pass status when completing

A small improvement in the SCSI request API.  Pass the status
at the time the request is completed, so that we can assert that
no request is completed twice.  This would have detected the
problem fixed in the previous patch.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agovscsi: always use get_sense
Paolo Bonzini [Wed, 3 Aug 2011 08:49:05 +0000 (10:49 +0200)]
vscsi: always use get_sense

vscsi supports autosensing by providing sense data directly in the
response.  When get_sense was added, the older state machine approach
that sent REQUEST SENSE commands separately was left in place.  Remove
it, all existing SCSIDevices do support autosensing and the next patches
will make the support come for free from the SCSIBus.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoscsi-disk: no need to call scsi_req_data on a short read
Paolo Bonzini [Wed, 3 Aug 2011 08:49:04 +0000 (10:49 +0200)]
scsi-disk: no need to call scsi_req_data on a short read

In fact, if the HBA's transfer_data callback goes on with scsi_req_continue
the request will be completed successfully instead of showing a failure.
It can even cause a segmentation fault.

An easy way to trigger it is "eject -f cd" during installation (during media
test if the installer does something like that).

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agopc: make vgabios exit port more useful
Anthony Liguori [Mon, 8 Aug 2011 19:31:37 +0000 (14:31 -0500)]
pc: make vgabios exit port more useful

We've always listened on port 501 for vgabios panic messages.  In the entire
time I've worked on QEMU, I've never actually seen a vgabios panic message :-)

If we change the semantics of this port a little bit, it makes it possible to
use it for more interesting use-cases.  I chose this approach instead of adding
a new I/O port because it avoids having a guest visible change.

This change allows single-byte access to port 501 and also uses the value
written to construct an exit code.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoMerge remote-tracking branch 'stefanha/trivial-patches' into staging
Anthony Liguori [Fri, 12 Aug 2011 13:06:02 +0000 (08:06 -0500)]
Merge remote-tracking branch 'stefanha/trivial-patches' into staging

12 years agoMerge remote-tracking branch 'aneesh/for-upstream-1' into staging
Anthony Liguori [Fri, 12 Aug 2011 12:52:53 +0000 (07:52 -0500)]
Merge remote-tracking branch 'aneesh/for-upstream-1' into staging

12 years agoMerge remote-tracking branch 'spice/spice.v41' into staging
Anthony Liguori [Fri, 12 Aug 2011 12:51:09 +0000 (07:51 -0500)]
Merge remote-tracking branch 'spice/spice.v41' into staging

12 years agoMerge remote-tracking branch 'kraxel/usb.23' into staging
Anthony Liguori [Fri, 12 Aug 2011 12:50:35 +0000 (07:50 -0500)]
Merge remote-tracking branch 'kraxel/usb.23' into staging

12 years agoMerge remote-tracking branch 'kraxel/seabios' into staging
Anthony Liguori [Fri, 12 Aug 2011 12:50:16 +0000 (07:50 -0500)]
Merge remote-tracking branch 'kraxel/seabios' into staging

12 years agofix QLIST usage for RAM list
Paolo Bonzini [Fri, 12 Aug 2011 11:18:14 +0000 (13:18 +0200)]
fix QLIST usage for RAM list

Spotted while reviewing the migration thread patches.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agohw/qdev: Don't crash if qdev_create(NULL, ...) fails
Peter Maydell [Wed, 3 Aug 2011 22:49:04 +0000 (23:49 +0100)]
hw/qdev: Don't crash if qdev_create(NULL, ...) fails

If an attempt to create a qdev device on the default sysbus (by passing
NULL as the bus to qdev_create) fails, print a useful error message
rather than crashing trying to dereference a NULL pointer.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoscsi-bus: use DO_UPCAST
Zhi Yong Wu [Thu, 4 Aug 2011 07:40:35 +0000 (15:40 +0800)]
scsi-bus: use DO_UPCAST

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoetrax-ser: printf -> qemu_log.
Edgar E. Iglesias [Thu, 11 Aug 2011 07:17:28 +0000 (09:17 +0200)]
etrax-ser: printf -> qemu_log.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
12 years agoetrax: QDevify the Ethernet MAC.
Edgar E. Iglesias [Tue, 9 Aug 2011 11:24:04 +0000 (13:24 +0200)]
etrax: QDevify the Ethernet MAC.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
12 years agoui/spice-core: report compiled-version in info spice/query-spice
Alon Levy [Wed, 10 Aug 2011 16:31:46 +0000 (19:31 +0300)]
ui/spice-core: report compiled-version in info spice/query-spice

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agoseabios: update to master
Gerd Hoffmann [Wed, 10 Aug 2011 15:34:13 +0000 (17:34 +0200)]
seabios: update to master

commit 8e301472e324b6d6496d8b4ffc66863e99d7a505

user visible changes in seabios:
  * ahci is enabled by default (and thus in this build).
  * bootorder support for ahci.
  * two-pass pci allocator (orders bars by size for better packing).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agoqxl: unbreak after memory API conversion
Alon Levy [Tue, 9 Aug 2011 20:53:34 +0000 (23:53 +0300)]
qxl: unbreak after memory API conversion

Break is only noticable with newer spice-server library (0.8.2 release
or 0.9.0 and newer on master branch).

ioport_write's val was changed from uint32_t to uint64_t, this
broke two printfs. Use PRId64 instead of %d.

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agoqxl: allowing the command rings to be not empty when spice worker is stopped RHBZ...
Yonit Halperin [Tue, 9 Aug 2011 13:12:40 +0000 (16:12 +0300)]
qxl: allowing the command rings to be not empty when spice worker is stopped RHBZ #728984

same as 8927cfbba232e28304734f7afd463c1b84134031, but for qxl_check_state, that was
triggered by qxl_pre_load (which calls qxl_hard_reset, which calls qxl_soft_reset),
and caused the migration target to crash.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agousb-hid: remove usb_hid_datain_cb
Gerd Hoffmann [Wed, 10 Aug 2011 08:53:50 +0000 (10:53 +0200)]
usb-hid: remove usb_hid_datain_cb

No users left, all migrated over to hw/hid.[ch].
Yea!  Zap it!

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agomilkymist-softusb: use hid code directly
Michael Walle [Tue, 9 Aug 2011 21:54:55 +0000 (23:54 +0200)]
milkymist-softusb: use hid code directly

Remove the dummy USB device and use the HID code directly. Use the HID code
for the mouse support, too.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agousb-hid: use hid vmstate macro
Michael Walle [Tue, 9 Aug 2011 21:54:54 +0000 (23:54 +0200)]
usb-hid: use hid vmstate macro

Use new hid vmstate macro. Version stays the same, because there is no
reordering of the fields.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agohid: introduce hid vmstate macros
Michael Walle [Tue, 9 Aug 2011 21:54:53 +0000 (23:54 +0200)]
hid: introduce hid vmstate macros

Add VMSTATE macros to describe a HIDState. Based on usb-hid.c descriptions.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agohid: register kbd hander in init()
Michael Walle [Tue, 9 Aug 2011 21:54:52 +0000 (23:54 +0200)]
hid: register kbd hander in init()

Register the keyboard event handler in hid's init() instead of its reset()
function.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agousb/hid: add hid_pointer_activate, use it
Gerd Hoffmann [Tue, 9 Aug 2011 10:35:57 +0000 (12:35 +0200)]
usb/hid: add hid_pointer_activate, use it

HID reorganziation broke the usb tablet in windows xp.  The reason is
that xp activates idle before it starts polling, which creates a
chicken-and-egg issue:  We don't call hid_pointer_poll because there are
no pending events.  We don't get any events because the activation code
in hid_pointer_poll is never executed and thus all pointer events are
routed to the PS/2 mouse by qemu.

Fix this by creating a hid_pointer_activate function and call it from
usb-hid when the guest sets the idle state.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agoMerge remote-tracking branch 'pm-arm/for-upstream' into pm
Edgar E. Iglesias [Tue, 9 Aug 2011 17:16:43 +0000 (19:16 +0200)]
Merge remote-tracking branch 'pm-arm/for-upstream' into pm

12 years agoetrax: Allocate DMA connections at board level.
Edgar E. Iglesias [Tue, 9 Aug 2011 10:13:26 +0000 (12:13 +0200)]
etrax: Allocate DMA connections at board level.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
12 years agoetrax: Remove hw/etraxfs.c.
Edgar E. Iglesias [Tue, 9 Aug 2011 10:18:23 +0000 (12:18 +0200)]
etrax: Remove hw/etraxfs.c.

The Bare ETRAX FS board was a fictive machine that I used when
developing the CRIS system emulation. Since we support the
real AXIS-dev88 developer boards, there is no reason to
keep the fictive one around.

This commit also removes the double registration of the axis-dev88
board.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
12 years agolance: unbreak after memory API conversion
Avi Kivity [Tue, 9 Aug 2011 06:54:22 +0000 (09:54 +0300)]
lance: unbreak after memory API conversion

The conversion passed the wrong opaque pointer, causing a crash on first use.
Pass the correct opaque.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
12 years agoMerge remote-tracking branch 'qemu-kvm/uq/master' into staging
Anthony Liguori [Mon, 8 Aug 2011 19:38:42 +0000 (14:38 -0500)]
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging

12 years agohw/9pfs: Update vfs_rename to use coroutines
Aneesh Kumar K.V [Sat, 7 May 2011 10:31:33 +0000 (16:01 +0530)]
hw/9pfs: Update vfs_rename to use coroutines

I guess TRENAME 9p operation needs an update. The 9p op should
more similar renameat. Otherwise anything other than path cannot track
the fid.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Add yeild support to rename coroutine
Aneesh Kumar K.V [Sat, 7 May 2011 10:39:10 +0000 (16:09 +0530)]
hw/9pfs: Add yeild support to rename coroutine

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Update v9fs_remove to use coroutines
Venkateswararao Jujjuri [Mon, 8 Aug 2011 18:20:20 +0000 (23:50 +0530)]
hw/9pfs: Update v9fs_remove to use coroutines

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Add yield support for remove
Venkateswararao Jujjuri [Mon, 8 Aug 2011 18:18:29 +0000 (23:48 +0530)]
hw/9pfs: Add yield support for remove

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Update mkdir to use coroutines
Venkateswararao Jujjuri [Mon, 8 Aug 2011 18:16:14 +0000 (23:46 +0530)]
hw/9pfs: Update mkdir to use coroutines

Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Add yield support for mkdir coroutine
Venkateswararao Jujjuri [Mon, 8 Aug 2011 18:14:24 +0000 (23:44 +0530)]
hw/9pfs: Add yield support for mkdir coroutine

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Update v9fs_mknod to use coroutines
Aneesh Kumar K.V [Wed, 18 May 2011 23:06:51 +0000 (16:06 -0700)]
hw/9pfs: Update v9fs_mknod to use coroutines

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Add yield support to mknod coroutine
Aneesh Kumar K.V [Wed, 18 May 2011 23:06:38 +0000 (16:06 -0700)]
hw/9pfs: Add yield support to mknod coroutine

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Update v9fs_xattrcreate to use coroutines
Aneesh Kumar K.V [Wed, 18 May 2011 23:06:26 +0000 (16:06 -0700)]
hw/9pfs: Update v9fs_xattrcreate to use coroutines

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Update v9fs_xattrwalk to coroutines
Aneesh Kumar K.V [Wed, 18 May 2011 23:05:48 +0000 (16:05 -0700)]
hw/9pfs: Update v9fs_xattrwalk to coroutines

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Add yield support to xattr related coroutine
Aneesh Kumar K.V [Wed, 18 May 2011 23:05:34 +0000 (16:05 -0700)]
hw/9pfs: Add yield support to xattr related coroutine

This include llistxattr and lgetxattr.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Update v9fs_setattr to use coroutines
Aneesh Kumar K.V [Wed, 18 May 2011 23:05:10 +0000 (16:05 -0700)]
hw/9pfs: Update v9fs_setattr to use coroutines

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Add yield support to setattr related coroutines
Aneesh Kumar K.V [Wed, 18 May 2011 23:04:58 +0000 (16:04 -0700)]
hw/9pfs: Add yield support to setattr related coroutines

This include chmod, utimensat, chown and truncate.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Update v9fs_getattr to use coroutines
Aneesh Kumar K.V [Wed, 18 May 2011 23:04:33 +0000 (16:04 -0700)]
hw/9pfs: Update v9fs_getattr to use coroutines

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Add yield support to lstat coroutine
Aneesh Kumar K.V [Wed, 18 May 2011 23:04:13 +0000 (16:04 -0700)]
hw/9pfs: Add yield support to lstat coroutine

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Update v9fs_statfs to use coroutines
Aneesh Kumar K.V [Wed, 18 May 2011 23:04:01 +0000 (16:04 -0700)]
hw/9pfs: Update v9fs_statfs to use coroutines

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Add yield support to statfs coroutine
Aneesh Kumar K.V [Wed, 18 May 2011 23:03:49 +0000 (16:03 -0700)]
hw/9pfs: Add yield support to statfs coroutine

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Update v9fs_readdir to use coroutines
Aneesh Kumar K.V [Wed, 18 May 2011 22:57:17 +0000 (15:57 -0700)]
hw/9pfs: Update v9fs_readdir to use coroutines

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Add yield support for readdir related coroutines
Aneesh Kumar K.V [Wed, 18 May 2011 22:42:42 +0000 (15:42 -0700)]
hw/9pfs: Add yield support for readdir related coroutines

This include readdir, telldir, seekdir, rewinddir.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Update v9fs_readlink to use coroutine
Venkateswararao Jujjuri [Mon, 8 Aug 2011 18:06:41 +0000 (23:36 +0530)]
hw/9pfs: Update v9fs_readlink to use coroutine

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Add yeild support for readlink
Venkateswararao Jujjuri (JV) [Mon, 8 Aug 2011 18:03:48 +0000 (23:33 +0530)]
hw/9pfs: Add yeild support for readlink

Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agopci: remove support for pre memory API BARs
Avi Kivity [Mon, 8 Aug 2011 13:09:32 +0000 (16:09 +0300)]
pci: remove support for pre memory API BARs

Not used anymore.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agopci: rename pci_register_bar_region() to pci_register_bar()
Avi Kivity [Mon, 8 Aug 2011 13:09:31 +0000 (16:09 +0300)]
pci: rename pci_register_bar_region() to pci_register_bar()

Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agopci: fold BAR mapping function into its caller
Avi Kivity [Mon, 8 Aug 2011 13:09:30 +0000 (16:09 +0300)]
pci: fold BAR mapping function into its caller

There is only one function, so no need for a function pointer.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agopci: remove pci_register_bar()
Avi Kivity [Mon, 8 Aug 2011 13:09:29 +0000 (16:09 +0300)]
pci: remove pci_register_bar()

Superceded by pci_register_bar_region().  The implementations
are folded together.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agopci: convert pci rom to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:28 +0000 (16:09 +0300)]
pci: convert pci rom to memory API

Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>