OSDN Git Service

qmiga/qemu.git
13 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>
13 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>
13 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

13 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

13 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

13 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

13 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

13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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

13 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>
13 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>
13 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>
13 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

13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 years agopci: remove pci_register_bar_simple()
Avi Kivity [Mon, 8 Aug 2011 13:09:27 +0000 (16:09 +0300)]
pci: remove pci_register_bar_simple()

Superceded by pci_register_bar_region().

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>
13 years agomsix: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:26 +0000 (16:09 +0300)]
msix: convert to memory API

The msix table is defined as a subregion, to allow for a BAR that
mixes device specific regions with the msix table.

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>
13 years agoxen-platform: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:25 +0000 (16:09 +0300)]
xen-platform: convert to memory API

Since this device bypasses PCI and registers I/O ports directly with
the system bus, it needs further attention.

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>
13 years agouhci: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:24 +0000 (16:09 +0300)]
uhci: convert 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>
13 years agoehci: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:23 +0000 (16:09 +0300)]
ehci: convert 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>
13 years agosun4u: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:22 +0000 (16:09 +0300)]
sun4u: convert to memory API

fixes memory leak on repeated BAR map/unmap

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoisa-mmio: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:21 +0000 (16:09 +0300)]
isa-mmio: convert 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>
13 years agoi6300esb: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:20 +0000 (16:09 +0300)]
i6300esb: convert to memory API

Also add missing destructor.

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>
13 years agopcnet: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:19 +0000 (16:09 +0300)]
pcnet: convert to memory API

Also related chips.

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>
13 years agone2000: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:18 +0000 (16:09 +0300)]
ne2000: convert to memory API

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoppc: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:17 +0000 (16:09 +0300)]
ppc: convert 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>
13 years agolsi53c895a: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:16 +0000 (16:09 +0300)]
lsi53c895a: convert to memory API

An optimization that fast-pathed DMA reads from the SCRIPTS memory
was removed int the process.  Likely it breaks with iommus anyway.

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>
13 years agointel-hda: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:15 +0000 (16:09 +0300)]
intel-hda: convert 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>
13 years agoahci: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:14 +0000 (16:09 +0300)]
ahci: convert 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>
13 years agovirtio-pci: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:13 +0000 (16:09 +0300)]
virtio-pci: convert to memory API

except msix.

[jan: fix build]
[aliguori: fix build]

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>
13 years agoivshmem: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:12 +0000 (16:09 +0300)]
ivshmem: convert to memory API

excluding msix.

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>
13 years agoide: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:11 +0000 (16:09 +0300)]
ide: convert 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>
13 years agoes1370: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:10 +0000 (16:09 +0300)]
es1370: convert 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>
13 years agoeepro100: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:09 +0000 (16:09 +0300)]
eepro100: convert to memory API

Note: the existing code aliases the flash BAR into the MMIO bar.  This is
probably a bug.  This patch does not correct the problem.

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>
13 years agoe1000: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:08 +0000 (16:09 +0300)]
e1000: convert 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>
13 years agoac97: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:07 +0000 (16:09 +0300)]
ac97: convert to memory API

fixes BAR sizing as well.

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>
13 years agortl8139: convert to memory API
Avi Kivity [Mon, 8 Aug 2011 13:09:06 +0000 (16:09 +0300)]
rtl8139: convert 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>
13 years agopci: allow I/O BARs to be registered with pci_register_bar_region()
Avi Kivity [Mon, 8 Aug 2011 13:09:05 +0000 (16:09 +0300)]
pci: allow I/O BARs to be registered with pci_register_bar_region()

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>
13 years agopci: pass I/O address space to new PCI bus
Avi Kivity [Mon, 8 Aug 2011 13:09:04 +0000 (16:09 +0300)]
pci: pass I/O address space to new PCI bus

This lets us register BARs in the I/O address space.

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>
13 years agoIntegrate I/O memory regions into qemu
Avi Kivity [Mon, 8 Aug 2011 13:09:03 +0000 (16:09 +0300)]
Integrate I/O memory regions into qemu

get_system_io() returns the root I/O memory region.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agocirrus: simplify linear framebuffer access functions
Avi Kivity [Mon, 8 Aug 2011 13:09:02 +0000 (16:09 +0300)]
cirrus: simplify linear framebuffer access functions

Make use of the memory API's ability to satisfy multi-byte accesses via
multiple single-byte accesses.

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>
13 years agovga: simplify vga window mmio access functions
Avi Kivity [Mon, 8 Aug 2011 13:09:01 +0000 (16:09 +0300)]
vga: simplify vga window mmio access functions

Make use of the memory API's ability to satisfy multi-byte accesses via
multiple single-byte accesses.

We have to keep vga_mem_{read,write}b() since they're used by cirrus.

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>
13 years agocirrus: simplify vga window mmio access functions
Avi Kivity [Mon, 8 Aug 2011 13:09:00 +0000 (16:09 +0300)]
cirrus: simplify vga window mmio access functions

Make use of the memory API's ability to satisfy multi-byte accesses via
multiple single-byte accesses.

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>
13 years agocirrus: simplify bitblt BAR access functions
Avi Kivity [Mon, 8 Aug 2011 13:08:59 +0000 (16:08 +0300)]
cirrus: simplify bitblt BAR access functions

Make use of the memory API's ability to satisfy multi-byte accesses via
multiple single-byte accesses.

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>
13 years agocirrus: simplify mmio BAR access functions
Avi Kivity [Mon, 8 Aug 2011 13:08:58 +0000 (16:08 +0300)]
cirrus: simplify mmio BAR access functions

Make use of the memory API's ability to satisfy multi-byte accesses via
multiple single-byte accesses.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agovga: convert vga and its derivatives to the memory API
Avi Kivity [Mon, 8 Aug 2011 13:08:57 +0000 (16:08 +0300)]
vga: convert vga and its derivatives to the memory API

Convert all vga memory to the memory API.  Note we need to fall back to
get_system_memory(), since the various buses don't pass the vga window
as a memory region.

We no longer need to sync the dirty bitmap of the cirrus mapped memory
banks, since the memory API takes care of that for us.

[jan: fix vga-pci logging]

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agovmsvga: don't remember pci BAR address in callback any more
Avi Kivity [Mon, 8 Aug 2011 13:08:56 +0000 (16:08 +0300)]
vmsvga: don't remember pci BAR address in callback any more

We're going to remove the callback, so we can't use it to save the
address.  Use the pci API instead.

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>
13 years agopci: add API to get a BAR's mapped address
Avi Kivity [Mon, 8 Aug 2011 13:08:55 +0000 (16:08 +0300)]
pci: add API to get a BAR's mapped address

Some (hacky) devices that have a back-channel to read this
address back outside the normal configuration mechanisms, such
as VMware svga.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agomemory: rename PORTIO_END to PORTIO_END_OF_LIST
Avi Kivity [Mon, 8 Aug 2011 13:08:54 +0000 (16:08 +0300)]
memory: rename PORTIO_END to PORTIO_END_OF_LIST

For consistency with other _END_OF_LIST macros.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoUnbreak the build on ppc32
malc [Mon, 8 Aug 2011 09:46:51 +0000 (13:46 +0400)]
Unbreak the build on ppc32

Signed-off-by: malc <av1474@comtv.ru>
13 years agoMerge branch 'master' of git://git.qemu.org/qemu
malc [Mon, 8 Aug 2011 09:37:44 +0000 (13:37 +0400)]
Merge branch 'master' of git://git.qemu.org/qemu

13 years ago[virtio-9p] Change all pdu handlers to coroutines.
Venkateswararao Jujjuri (JV) [Wed, 18 May 2011 21:18:05 +0000 (14:18 -0700)]
[virtio-9p] Change all pdu handlers to coroutines.

This patch changes the top level handlers to coroutines and sets the base.
It will be followed up with series of patches to convert all filesystem
calls to threaded coroutines pushing all blocking clals in VirtFS out
of vcpu threads.

Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
13 years ago[virtio-9p] Add infrastructure to support glib threads and coroutines.
Venkateswararao Jujjuri (JV) [Sun, 24 Apr 2011 01:40:22 +0000 (18:40 -0700)]
[virtio-9p] Add infrastructure to support glib threads and coroutines.

This patch is originally made by Arun Bharadwaj for glib support.
Later Harsh Prateek Bora added coroutines support.
This version implemented with suggestions from
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>.

Signed-off-by: Arun R Bharadwaj <arun@linux.vnet.ibm.com>
Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
13 years agocoroutine: add gthread dependency
Stefan Hajnoczi [Mon, 8 Aug 2011 07:34:05 +0000 (13:04 +0530)]
coroutine: add gthread dependency

Commit 1fc7bd4a86a2bfeafcec29445871eb97469a2699 removed the gthread and
gio dependency since qemu-ga did not require it.  Coroutines require
gthread, so add it back in.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
13 years agoFix forcing multicast msgs to loopback on OpenBSD.
Brad [Sun, 7 Aug 2011 11:06:43 +0000 (11:06 +0000)]
Fix forcing multicast msgs to loopback on OpenBSD.

Fix forcing multicast msgs to loopback on OpenBSD.
e.g.
$ sudo qemu -m 128 -no-fd-bootchk \
        -hda virtual.img -boot n -nographic \
        -net nic,vlan=0,model=rtl8139,macaddr=52:54:00:12:34:03 \
        -net user -tftp /usr/src/sys/arch/i386/compile/TEST -bootp pxeboot \
        -net nic,vlan=1,model=rtl8139,macaddr=52:54:00:23:03:01 \
        -net tap,vlan=1,script=no \
        -net nic,vlan=3,model=rtl8139,macaddr=52:54:00:23:03:03 \
        -net socket,vlan=3,mcast=230.0.0.1:10003
setsockopt(SOL_IP, IP_MULTICAST_LOOP): Invalid argument
qemu: -net socket,vlan=3,mcast=230.0.0.1:10003: Device 'socket' could not be initialized

Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoUse mmap to allocate execute memory
Tobias Nygren [Sun, 7 Aug 2011 09:57:05 +0000 (09:57 +0000)]
Use mmap to allocate execute memory

Use mmap to allocate executable memory on NetBSD as well.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoFix network interface tap backend
Manuel Bouyer [Sun, 7 Aug 2011 09:48:59 +0000 (09:48 +0000)]
Fix network interface tap backend

Fix network interface tap backend work on NetBSD.
It uses an ioctl to get the tap name.

Signed-off-by: Christoph Egger<Christoph.Egger@amd.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agodarwin-user: Remove two unused variables
Stefan Weil [Wed, 20 Jul 2011 19:40:18 +0000 (21:40 +0200)]
darwin-user: Remove two unused variables

cppcheck report:

darwin-user/signal.c:322: style: Unused variable: i
darwin-user/signal.c:322: style:
Variable 'err' is assigned a value that is never used

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoTCG: fix copy propagation
Blue Swirl [Sat, 6 Aug 2011 13:58:47 +0000 (13:58 +0000)]
TCG: fix copy propagation

Copy propagation introduced in 22613af4a6d9602001e6d0e7b6d98aa40aa018dc
considered only global registers. However, register temps and stack
allocated locals must be handled differently because register temps
don't survive across brcond.

Fix by propagating only within same class of temps.

Tested-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoRemove unused is_softmmu parameter from cpu_handle_mmu_fault
Blue Swirl [Mon, 1 Aug 2011 16:12:17 +0000 (16:12 +0000)]
Remove unused is_softmmu parameter from cpu_handle_mmu_fault

Parameter is_softmmu (and its evil mutant twin brother is_softmuu)
is not used in cpu_*_handle_mmu_fault() functions, remove them
and adjust callers.

Acked-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoFix handling of conditional branches in delay slot of a conditional branch
Artyom Tarasenko [Sat, 6 Aug 2011 15:01:24 +0000 (17:01 +0200)]
Fix handling of conditional branches in delay slot of a conditional branch

Check whether dc->npc is dynamic before using its value for branch.

Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoMerge remote-tracking branch 'kiszka/queues/slirp' into staging
Anthony Liguori [Fri, 5 Aug 2011 17:17:04 +0000 (12:17 -0500)]
Merge remote-tracking branch 'kiszka/queues/slirp' into staging