]> git.proxmox.com Git - qemu.git/log
qemu.git
14 years agoun-static qemu_chr_parse_compat()
Gerd Hoffmann [Tue, 8 Dec 2009 12:11:49 +0000 (13:11 +0100)]
un-static qemu_chr_parse_compat()

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 33521634bf15996e020c51c47abaaa68e27bf356)

14 years agodefault devices: drives
Gerd Hoffmann [Tue, 8 Dec 2009 12:11:48 +0000 (13:11 +0100)]
default devices: drives

Add a default_drive variable which specified whenever the default drives
(cdrom, floppy, sd) should be created.  It is cleared when the new
-nodefaults switch is specified on the command line.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit aa40fc9c96474b0135d1b940611862f260aedba7)

14 years agodefault devices: network
Gerd Hoffmann [Tue, 8 Dec 2009 12:11:47 +0000 (13:11 +0100)]
default devices: network

Add a default_net variable which specified whenever a default network
should be created.  It is cleared in case any -net option is specified
and it is also added to the new -nodefaults switch.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit cb4522ccf67ba84d246291d9f75bd7f3df137d1a)

14 years agodefault devices: add global cmd line option.
Gerd Hoffmann [Tue, 8 Dec 2009 12:11:46 +0000 (13:11 +0100)]
default devices: add global cmd line option.

Add global command line option to disable default devices.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit d8c208dd8a038d24ba4890156101bc679a8c8fef)

14 years agodefault devices: vga adapter.
Gerd Hoffmann [Tue, 8 Dec 2009 12:11:45 +0000 (13:11 +0100)]
default devices: vga adapter.

Qemu creates a vga display for you in case you didn't specify one on the
command line.  Right now this is tied to the '-vga <type>' command line
switch, which in turn causes trouble if you are creating your gfx card
using '-device VGA,<props>'.

This patch adds a variable default_vga which says whenever a default
serial line should be added.  It is enabled by default.  It is cleared
when qemu finds '-vga' or '-device {VGA,Cirrus VGA,QEMUware SVGA}' on
the command line.

'-device VGA' still doesn't work though due to a initialization order
issue (vga must init before calling i440fx_init_memory_mappings).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 64465297cd4c701942988f36f7ce707fb21cc1d8)

14 years agozap serial_monitor_mux
Gerd Hoffmann [Tue, 8 Dec 2009 12:11:44 +0000 (13:11 +0100)]
zap serial_monitor_mux

The logic in this code obviously predates the multiple monitor
capability of qemu and looks increasingly silly these days.

I think the intention of this piece of code is to get a reasonable
default for the -nographic case: have monitor and serial line muxed
on stdio.

With the new default_serial and default_monitor variables we have now
doing just that became much easier ;)

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit e1c09175bc00dd8dfb2ad1b26e1858dcdc109b59)

14 years agodefault devices: qemu monitor.
Gerd Hoffmann [Tue, 8 Dec 2009 12:11:43 +0000 (13:11 +0100)]
default devices: qemu monitor.

This patch makes the monitor default device configuration work like the
default serial and parallel port devices.  It adds a variable
default_monitor which says whenever a default monitor should be added.
It is enabled by default.  It is cleared when qemu finds '-monitor' on
the command line.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit abdeed06b416eefb7eb1ec65cc1b87241cb3b6d2)

14 years agodefault devices: parallel port.
Gerd Hoffmann [Tue, 8 Dec 2009 12:11:42 +0000 (13:11 +0100)]
default devices: parallel port.

Qemu creates a default parallel port for you in case you didn't specify
one on the command line.  Right now this is tied to the '-parallel
<chardev>' command line switch, which in turn causes trouble if you are
creating your parallel port via '-device isa-parallel,<props>'.

This patch adds a variable default_parallel which says whenever a default
parallel port should be added.  It is enabled by default.  It is cleared
when qemu finds '-parallel' or '-device isa-parallel' on the command line.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 6a5e8b0e310c483d8d14553a2b7b601d39ed8b75)

14 years agodefault devices: core code & serial lines.
Gerd Hoffmann [Tue, 8 Dec 2009 12:11:41 +0000 (13:11 +0100)]
default devices: core code & serial lines.

Qemu creates a default serial line for you in case you didn't specify
one on the command line.  Right now this is tied to the '-serial
<chardev>' command line switch, which in turn causes trouble if you are
creating your serial line via '-device isa-serial,<props>'.

This patch adds a variable default_serial which says whenever a default
serial line should be added.  It is enabled by default.  It is cleared
when qemu finds '-serial' or '-device isa-serial' on the command line.

Part of the patch is some infrastructure for the '-device $driver'
checking (default_driver_check function) which will also be used by the
other patches of this series.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 998bbd74b9d813b14a3a3b5009a5d5a48c7dce51)

14 years agovc: colorize chardev title line with blue background.
Gerd Hoffmann [Tue, 8 Dec 2009 12:11:40 +0000 (13:11 +0100)]
vc: colorize chardev title line with blue background.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 735ba5884943ad91be660b59092ab7592c4bde07)

14 years agochardev: move greeting into vc backend.
Gerd Hoffmann [Tue, 8 Dec 2009 12:11:39 +0000 (13:11 +0100)]
chardev: move greeting into vc backend.

Make the 'vc' chardev backend print a title line with the chardev name
after initialization, using CharDriverState->label.

This replaces the banner printing code in vl.c.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 51bfa4d3160fe1d5c2eca381020b8b6dd69c3c80)

14 years agoRevert "Set default console to virtio on S390x"
Gerd Hoffmann [Tue, 8 Dec 2009 12:11:38 +0000 (13:11 +0100)]
Revert "Set default console to virtio on S390x"

This reverts commit 93d434b4aec0702b87ebf52449a3cdf2c3596825.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 014100bb73d8512fb3d62f5cb123bfb2d04f3089)

14 years agoRevert "monitor: Command-line flag to enable control mode"
Gerd Hoffmann [Tue, 8 Dec 2009 12:11:37 +0000 (13:11 +0100)]
Revert "monitor: Command-line flag to enable control mode"

This reverts commit adcb181afe5a951c521411c7a8e9d9b791aa6742.

Conflicts:

monitor.h

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 4e307fc883b39c89ffc093c79eb9c9735724d227)

14 years agochardev: make chardevs specified in config file work.
Gerd Hoffmann [Tue, 8 Dec 2009 12:11:36 +0000 (13:11 +0100)]
chardev: make chardevs specified in config file work.

The patch decuples the -chardev switch and the actual chardev
initialization.  Without this patch qemu ignores chardev entries
coming via -readconfig.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 1a688d3bbc2a44bfefa3f6774a11b0385dafc029)

14 years agoqdev: also match bus name for global properties
Gerd Hoffmann [Tue, 8 Dec 2009 12:11:35 +0000 (13:11 +0100)]
qdev: also match bus name for global properties

i.e. -global PCI.<property>=<value> will set a default property for all
PCI devices.  Also works for the compat properties used by machine
types.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 07a8de3566bd576dc33e55af830d63dcc2287617)

14 years agoqdev: add command line option to set global defaults for properties.
Gerd Hoffmann [Tue, 8 Dec 2009 12:11:34 +0000 (13:11 +0100)]
qdev: add command line option to set global defaults for properties.

This patch adds infrastructure and command line option for setting
global defaults for device properties, i.e. you can for example use

  -global virtio-blk-pci.vectors=0

to turn off msi by default for all virtio block devices.  The config
file syntax is:

[global]
  driver = "virtio-blk-pci"
  property = "vectors"
  value = "0"

This can also be used to set properties for devices which are not
created via -device but implicitly via machine init, i.e.

  -global isa-fdc,driveA=<name>

This patch uses the mechanism which configures properties for the
compatibility machine types (pc-0.10 & friends).  The command line
takes precedence over the machine type values.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit d0fef6fbea36c62d29f3e3fa2214b7b52322983e)

14 years agoqdev: make compat stuff more generic
Gerd Hoffmann [Tue, 8 Dec 2009 12:11:33 +0000 (13:11 +0100)]
qdev: make compat stuff more generic

This patch renames the compat properties into global properties and
makes them more generic.  The compatibility stuff is only one of
multiple possible users now.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 458fb6792d834474c6b289738b6bf9601fad87ab)

14 years agokvm: x86: Save/restore exception_index
Jan Kiszka [Tue, 8 Dec 2009 16:54:55 +0000 (17:54 +0100)]
kvm: x86: Save/restore exception_index

As KVM now makes use of exception_index to keep pending exceptions, we
have to save&restore this field as well.

NOTE: We have to nail the arch-independent exception_index down to a
certain bit width for proper vmstate processing, namely to 32 bit.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 4d6e3ac5d411c461d0fb4b1cd2ace854963c9e30)

14 years agoFix recently added QERR_ definitions
Markus Armbruster [Tue, 8 Dec 2009 12:33:54 +0000 (13:33 +0100)]
Fix recently added QERR_ definitions

Commits c7c338c441471a237a046f5f and a488be27 used
lower_case_with_underscores for class values.  Existing usage
CamelCase.  ChangeToThatForConsistency.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit bd9d30640c3c2489175fd9ddd5459c69f94688f8)

14 years agoqdev: Replace device names containing whitespace
Markus Armbruster [Wed, 9 Dec 2009 16:07:53 +0000 (17:07 +0100)]
qdev: Replace device names containing whitespace

Device names with whitespace require quoting in the shell and in the
monitor.  Some of the offenders are also overly long.  Some have a
more convenient alias, some don't.

The place for verbose device names is DeviceInfo member desc.  The
name should be short & sweet.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 556cd09885bec3f69ba78228fe4e46dc1dad145b)

14 years agoqdev: Separate USB product description from qdev name
Markus Armbruster [Wed, 9 Dec 2009 16:07:52 +0000 (17:07 +0100)]
qdev: Separate USB product description from qdev name

Using the qdev name for the product description makes for inconvenient
qdev names.

Put the product description in new USBDeviceInfo member product_desc.
Make usb_qdev_init() use it.  No user or guest visible change, since
the value is still the same.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 063846984ce7eb1c1ddce6dda39b662c64a80dc0)

14 years agoqdev: Rename USBDevice member devname to product_desc
Markus Armbruster [Wed, 9 Dec 2009 16:07:51 +0000 (17:07 +0100)]
qdev: Rename USBDevice member devname to product_desc

It's not a device name, it's the USB product description string.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 0fe6d12e0bc752c29a93ac83a274e3650d457069)

14 years agofix rtc-td-hack on host without high-res timers
Gleb Natapov [Tue, 8 Dec 2009 13:50:54 +0000 (15:50 +0200)]
fix rtc-td-hack on host without high-res timers

On hosts without high-res timers it is impossible to inject rtc interrupt
faster then 1kHz. Windows sometimes configures RTC to generate 1kHz
interrupts, so we can't inject missed interrupts when running on such
hosts. Always injecting an interrupt on REG_C read is also not an option
since Windows wait for REG_C to become zero with interrupt disabled
during boot. This patch uses mixed approach: accelerate timer + inject
up to 1000 interrupts on REG_C read.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit ba32edab7fdab0e74b54696942b4127d26861cf6)

14 years agovirtio: verify features on load
Michael S. Tsirkin [Tue, 8 Dec 2009 18:07:48 +0000 (20:07 +0200)]
virtio: verify features on load

migrating between hosts which have different features
might break silently, if the migration destination
does not support some features supported by source.

Prevent this from happening by comparing acked feature
bits with the mask supported by the device.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 6d74ca5aa83b83fb52332f7735c61ecb7a5328c1)

14 years agovmware_vga: add rom file so that it boots.
Dave Airlie [Fri, 11 Dec 2009 05:47:44 +0000 (15:47 +1000)]
vmware_vga: add rom file so that it boots.

This just adds the rom file to the vmware SVGA chipset so it boots.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit b3c3f123f785fb861d930080f083507b51f5ce79)

14 years agoDo not abort on qemu_malloc(0) in production builds
Anthony Liguori [Wed, 9 Dec 2009 18:59:36 +0000 (12:59 -0600)]
Do not abort on qemu_malloc(0) in production builds

qemu_malloc() does not allow size=0 to be passed in and aborts on this behavior.

Unfortunately, there is good reason to believe that within qemu, there are a
number of, so far, undetected places that assume size=0 can be safely passed.
Since we do not want to abort unnecessarily in production builds, return
qemu_malloc(1) whenever the version file indicates that this is a production
build.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 20ff6c8066eb5346b9e066851cf8a1e0564a0f1a)

14 years agoFix ARM userspace strex implementation.
Paul Brook [Fri, 11 Dec 2009 15:38:10 +0000 (15:38 +0000)]
Fix ARM userspace strex implementation.

Signed-off-by: Paul Brook <paul@codesourcery.com>
14 years agoqemu: delete rule target on error
Michael S. Tsirkin [Mon, 7 Dec 2009 19:04:52 +0000 (21:04 +0200)]
qemu: delete rule target on error

Instruct make to remove any rule target on error. This prevetns
situation where there was an error during build but generated file still
stays behind.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 7dbbbb0c9e4313cf2d2f6559b7899259fb09eb63)

14 years agoQMP: add human-readable description to error response
Markus Armbruster [Mon, 7 Dec 2009 20:37:16 +0000 (21:37 +0100)]
QMP: add human-readable description to error response

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 77e595e7c613c495714d04ce63fb9bce263c29ae)

14 years agomonitor: convert do_getfd() to QError
Markus Armbruster [Mon, 7 Dec 2009 20:37:15 +0000 (21:37 +0100)]
monitor: convert do_getfd() to QError

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 7cdfcfe18f0a9e8603e4a14770a84eb5649521c5)

14 years agoQError: New QERR_TOO_MANY_FILES
Markus Armbruster [Mon, 7 Dec 2009 20:37:14 +0000 (21:37 +0100)]
QError: New QERR_TOO_MANY_FILES

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit a488be27e5fbfd78e3c7f98706e0c2f6af402061)

14 years agoNew QERR_INVALID_PARAMETER
Markus Armbruster [Mon, 7 Dec 2009 20:37:13 +0000 (21:37 +0100)]
New QERR_INVALID_PARAMETER

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 7a046f5f14d3de026197dc08c389cd1f23a3dddf)

14 years agoQError: New QERR_FD_NOT_SUPPLIED
Markus Armbruster [Mon, 7 Dec 2009 20:37:12 +0000 (21:37 +0100)]
QError: New QERR_FD_NOT_SUPPLIED

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 41471a2338522d72955c20179e16cff4d546b32a)

14 years agomonitor: convert do_closefd() to QError
Markus Armbruster [Mon, 7 Dec 2009 20:37:11 +0000 (21:37 +0100)]
monitor: convert do_closefd() to QError

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 063c1a0918d5a08f7ba89300d022b3421174fbf7)

14 years agoQError: New QERR_FD_NOT_FOUND
Markus Armbruster [Mon, 7 Dec 2009 20:37:10 +0000 (21:37 +0100)]
QError: New QERR_FD_NOT_FOUND

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit c7c338c49712eceef0ef584249856928de30cb45)

14 years agomonitor: convert do_change() to QObject, QError
Markus Armbruster [Mon, 7 Dec 2009 20:37:09 +0000 (21:37 +0100)]
monitor: convert do_change() to QObject, QError

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit ec3b82afaa0c4c06689d6a6381d351eefc4ee171)

14 years agoQError: New QERR_VNC_SERVER_FAILED
Markus Armbruster [Mon, 7 Dec 2009 20:37:08 +0000 (21:37 +0100)]
QError: New QERR_VNC_SERVER_FAILED

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit a6906e31a8d025a0dd626ee3c14dd58e7b9ab445)

14 years agoQError: New QERR_SET_PASSWD_FAILED
Markus Armbruster [Mon, 7 Dec 2009 20:37:07 +0000 (21:37 +0100)]
QError: New QERR_SET_PASSWD_FAILED

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 7a84cb23c077488b0e1926b3e909ea128a80dc58)

14 years agoQError: New QERR_INVALID_BLOCK_FORMAT
Markus Armbruster [Mon, 7 Dec 2009 20:37:06 +0000 (21:37 +0100)]
QError: New QERR_INVALID_BLOCK_FORMAT

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 17901e75329fff369e26f2464a016e0797789256)

14 years agomonitor: convert do_eject() to QError
Markus Armbruster [Mon, 7 Dec 2009 20:37:05 +0000 (21:37 +0100)]
monitor: convert do_eject() to QError

Also affects do_change(), because the two share eject_device().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 2c2a6bb860c09a80f519cd6297f1c0585a1436ec)

14 years agoQError: New QERR_DEVICE_NOT_REMOVABLE
Markus Armbruster [Mon, 7 Dec 2009 20:37:04 +0000 (21:37 +0100)]
QError: New QERR_DEVICE_NOT_REMOVABLE

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 5cfe026475f3233a4c42351001560450886feddb)

14 years agoQError: New QERR_DEVICE_LOCKED
Markus Armbruster [Mon, 7 Dec 2009 20:37:03 +0000 (21:37 +0100)]
QError: New QERR_DEVICE_LOCKED

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit b086838090e32e05a60b21c2cabca8098c1562c4)

14 years agoQError: Put error definitions in alphabetical order
Markus Armbruster [Mon, 7 Dec 2009 20:37:02 +0000 (21:37 +0100)]
QError: Put error definitions in alphabetical order

Also fix the odd typoe and clean up whitespace.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit e16a18122212e86b87a0ca1dd79269918c7dc667)

14 years agomonitor: Fix double-prompt after "change vnc passwd BLA"
Markus Armbruster [Mon, 7 Dec 2009 20:37:01 +0000 (21:37 +0100)]
monitor: Fix double-prompt after "change vnc passwd BLA"

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 2895e075c6dba0e66c72af781b1eed2bff0c3777)

14 years agomonitor: do_cont(): Don't ask for passwords
Luiz Capitulino [Mon, 7 Dec 2009 20:37:00 +0000 (21:37 +0100)]
monitor: do_cont(): Don't ask for passwords

The do_cont() function will ask the user to enter a password if a
device is encrypted.

This is invalid under QMP, so we raise a QERR_DEVICE_ENCRYPTED
error.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 94171e119cb6f7bab2578896643b0daff1d9b184)

14 years agoQError: new class for device encrypted errors
Luiz Capitulino [Mon, 7 Dec 2009 20:36:59 +0000 (21:36 +0100)]
QError: new class for device encrypted errors

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 0df37c411ccf9f830f38f3f6405fac9320a70bac)

14 years agomonitor: Introduce 'block_passwd' command
Luiz Capitulino [Fri, 4 Dec 2009 17:24:09 +0000 (15:24 -0200)]
monitor: Introduce 'block_passwd' command

When using encrypted disk images, QEMU will prompt the user
for passwords when started.

This makes sense for the user protocol, but doesn't for QMP.

The solution is to have Monitor command which allows the user
or a Client to set passwords in advance, so that we avoid
the prompt completely.

This is what block_passwd does, for example:

(QEMU) block_passwd ide0-hd0 foobar

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit a3a55a2edb7c0fd72bc62a8a4c719a1e1983e6ac)

14 years agoQError: Add class for invalid passwords
Luiz Capitulino [Fri, 4 Dec 2009 17:24:08 +0000 (15:24 -0200)]
QError: Add class for invalid passwords

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit f6d855c50dfd68f33f6dee70e5ccdfb144a2da26)

14 years agopci: interrupt disable bit support
Michael S. Tsirkin [Wed, 25 Nov 2009 14:31:42 +0000 (16:31 +0200)]
pci: interrupt disable bit support

Interrupt disable bit is mandatory in PCI spec.
Implement it to make devices spec compliant.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Isaku Yamahata <yamahata@valinux.co.jp>
(cherry picked from commit b6981cb57be5d66b1b7cf9009a122fb3cdd4b96b)

14 years agopci: interrupt status bit implementation
Michael S. Tsirkin [Wed, 25 Nov 2009 13:44:40 +0000 (15:44 +0200)]
pci: interrupt status bit implementation

interrupt status is a mandatory feature in PCI spec,
so devices must implement it to be spec compliant.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Isaku Yamahata <yamahata@valinux.co.jp>
(cherry picked from commit f9bf77dd1f838b0061172fe41709b221956da2f5)

14 years agopci: prepare irq code for interrupt state
Michael S. Tsirkin [Wed, 25 Nov 2009 13:20:51 +0000 (15:20 +0200)]
pci: prepare irq code for interrupt state

This rearranges code in preparation for interrupt state
implementation.
Changes:
- split up bus walk away from interrupt handling
          into a subroutine
- change irq_state from an array to bitmask
- verify that irq_state values are 0 or 1 on load

There are no functional changes.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Isaku Yamahata <yamahata@valinux.co.jp>
(cherry picked from commit d036bb215e0ac1d1fd467239f1d3b7d904cac90a)

14 years agomsix: function mask support
Michael S. Tsirkin [Wed, 25 Nov 2009 10:19:32 +0000 (12:19 +0200)]
msix: function mask support

Function mask is a mandatory feature in MSIX
spec so not implementing it is a spec violation.
Implement.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 5b5cb08683b6715a2aca5314168e68ff0665912b)

14 years agomsix: macro rename for function mask support
Michael S. Tsirkin [Wed, 25 Nov 2009 10:18:00 +0000 (12:18 +0200)]
msix: macro rename for function mask support

rename ENABLE_OFFSET -> CONTROL_OFFSET, since
same byte includes function mask.
This is in preparation for function mask support.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 2760952ba9610921586e7446d858e23308400391)

14 years agocpuid: Fix multicore setup on Intel
Andre Przywara [Mon, 7 Dec 2009 10:58:02 +0000 (11:58 +0100)]
cpuid: Fix multicore setup on Intel

The multicore CPUID code detects whether the guest is an Intel or an
AMD CPU, because the Linux kernel is picky about the CmpLegacy bit.
KVM by default passes through the host's vendor, which was not
catched by the code. So fork out the vendor determining bits into a
separate function to be used from both places and always get the real
vendor.
This fixes KVM's multicore setup on Intel CPUs.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Reported-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 6d9fef1a02e6efd51e9ebd0130651ca61f75839b)

14 years agokvm: x86: Fix initial kvm_has_msr_star
Jan Kiszka [Sun, 6 Dec 2009 14:51:24 +0000 (15:51 +0100)]
kvm: x86: Fix initial kvm_has_msr_star

KVM_GET_MSR_INDEX_LIST returns -E2BIG when the provided space is too
small for all MSRs. But this is precisely the error we trigger with the
initial request in order to obtain that size. Do not fail in that case.

This caused a subtle corruption of the guest state as MSR_STAR was not
properly saved/restored. The corruption became visible with latest kvm
optimizing the MSR updates.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 6fb6d245546d3ae48c4cb764b3593e4739aa1364)

14 years agoUpdate OpenBIOS images to r640
Aurelien Jarno [Sun, 6 Dec 2009 11:12:56 +0000 (12:12 +0100)]
Update OpenBIOS images to r640

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoUpdate version to -rc1 v0.12.0-rc1
Anthony Liguori [Sat, 5 Dec 2009 17:21:49 +0000 (11:21 -0600)]
Update version to -rc1

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd S390 maintainer information v0.12.0-rc0
Alexander Graf [Sat, 5 Dec 2009 11:44:31 +0000 (12:44 +0100)]
Add S390 maintainer information

This patch adds information about who handles what when it comes to S390.
I'll gladly support anything that's related to the device emulation model and
S390 KVM parts.

Since this patchset doesn't implement S390 CPU emulation, I left that part
with a question mark. As soon as Uli's patchset gets committed I'd recommend
setting him there.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoSet default console to virtio on S390x
Alexander Graf [Sat, 5 Dec 2009 11:44:30 +0000 (12:44 +0100)]
Set default console to virtio on S390x

All "normal" system emulation targets in qemu I'm aware of display output
on either VGA or serial output.

Our S390x virtio machine doesn't have such kind of legacy hardware. So
instead we need to default to a virtio console.

I'm not particularly proud of this patch. It would be a lot better to
have something in the machine description that tells us about the default
terminal.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoS390 GDB stub
Alexander Graf [Sat, 5 Dec 2009 11:44:29 +0000 (12:44 +0100)]
S390 GDB stub

In order to debug funny kernel breakages it's always good to have a working
gdb stub around.

While Uli's patches don't include one one, I needed one that's at least good
enough for 'bt' and some variable examinations during early bootup.

So here it is - the absolute basics to get the qemu gdb stub running with s390x
targets.

Sgined-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoAdd S390x virtio machine description
Alexander Graf [Sat, 5 Dec 2009 11:44:28 +0000 (12:44 +0100)]
Add S390x virtio machine description

In order to use the new S390x virtio bus we just introduced, we also
need a machine description that sets up the machine according to our
PV specification.

Let's add that machine description and be happy!

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoAdd S390x virtio machine bus
Alexander Graf [Sat, 5 Dec 2009 11:44:27 +0000 (12:44 +0100)]
Add S390x virtio machine bus

On S390x we don't want to go through the hassle of emulating real existing
hardware, because we don't need to for running Linux.

So let's instead implement a machine that is 100% based on VirtIO which we
fortunately implement already.

This patch implements the bus that is the groundwork for such an S390x
virtio machine.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoAdd support for S390x system emulation
Alexander Graf [Sat, 5 Dec 2009 11:44:26 +0000 (12:44 +0100)]
Add support for S390x system emulation

Let's enable the basics for system emulation so we can run virtual machines
with KVM!

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoAllocate physical memory in low virtual address space
Alexander Graf [Sat, 5 Dec 2009 11:44:25 +0000 (12:44 +0100)]
Allocate physical memory in low virtual address space

KVM on S390x requires the virtual address space of the guest's RAM to be
within the first 256GB.

The general direction I'd like to see KVM on S390 move is that this requirement
is losened, but for now that's what we're stuck with.

So let's just hack up qemu_ram_alloc until KVM behaves nicely :-).

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoAdd KVM support for S390x
Alexander Graf [Sat, 5 Dec 2009 11:44:24 +0000 (12:44 +0100)]
Add KVM support for S390x

S390x was one of the first platforms that received support for KVM back in the
day. Unfortunately until now there hasn't been a qemu implementation that would
enable users to actually run guests.

So let's include support for KVM S390x in qemu!

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoS/390 fake TCG implementation
Alexander Graf [Sat, 5 Dec 2009 11:44:23 +0000 (12:44 +0100)]
S/390 fake TCG implementation

Qemu won't let us run a KVM target without having host TCG support. Well, for
now we don't have any so let's implement a fake target that only stubs out
everything.

I tried to keep the patch as close to Uli's source as possible, so whenever
he feels like it he can easily diff his version against this one.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoS/390 host/target build system support
Alexander Graf [Sat, 5 Dec 2009 11:44:22 +0000 (12:44 +0100)]
S/390 host/target build system support

This patch makes configure aware of S390 hosts and guests. When not explicitly
defined using --target-list= no S390 targets will be built though.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoS/390 CPU fake emulation
Alexander Graf [Sat, 5 Dec 2009 11:44:21 +0000 (12:44 +0100)]
S/390 CPU fake emulation

Because Qemu currently requires a TCG target to exist and there are quite some
useful helpers here to lay the groundwork for out KVM target, let's create a
stub TCG emulation target for S390X CPUs.

This is required to make tcg happy. The emulation target itself won't work
though.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoSparc64: handle MMU global bit and nucleus context
Blue Swirl [Sat, 5 Dec 2009 11:14:55 +0000 (11:14 +0000)]
Sparc64: handle MMU global bit and nucleus context

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agomonitor: fix use of plain integer as NULL pointer, spotted by Sparse
Blue Swirl [Fri, 4 Dec 2009 20:52:02 +0000 (20:52 +0000)]
monitor: fix use of plain integer as NULL pointer, spotted by Sparse

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoAdd "static" to please Sparse
Blue Swirl [Fri, 4 Dec 2009 20:44:44 +0000 (20:44 +0000)]
Add "static" to please Sparse

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoscsi: fix incorrect ?: use
Blue Swirl [Fri, 4 Dec 2009 18:08:59 +0000 (18:08 +0000)]
scsi: fix incorrect ?: use

Fixes OpenBSD build.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agomonitor: use qemu_gettimeofday(), not gettimeofday()
Blue Swirl [Fri, 4 Dec 2009 18:06:39 +0000 (18:06 +0000)]
monitor: use qemu_gettimeofday(), not gettimeofday()

Fix mingw32 build.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agowin32: fix variable use before initialization
Blue Swirl [Fri, 4 Dec 2009 18:06:20 +0000 (18:06 +0000)]
win32: fix variable use before initialization

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agomonitor: rename EVENT_* to QEVENT_* to avoid conflict on mingw32
Blue Swirl [Fri, 4 Dec 2009 18:05:45 +0000 (18:05 +0000)]
monitor: rename EVENT_* to QEVENT_* to avoid conflict on mingw32

Partially fixes mingw32 build.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc64: fix compilation with DEBUG_MMU
Blue Swirl [Fri, 4 Dec 2009 16:16:33 +0000 (16:16 +0000)]
Sparc64: fix compilation with DEBUG_MMU

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoide: implement stub for audio control/volume read
Thadeu Lima de Souza Cascardo [Mon, 30 Nov 2009 19:37:03 +0000 (17:37 -0200)]
ide: implement stub for audio control/volume read

This implements the audio control or volume read support as needed by
some systems. A Conectiva Parolin system required this to detect an IDE
device as CD-ROM, through the CDVOLREAD ioctl.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoide: Use some already defined page macros instead of constants
Thadeu Lima de Souza Cascardo [Mon, 30 Nov 2009 19:36:54 +0000 (17:36 -0200)]
ide: Use some already defined page macros instead of constants

Some PAGE constants were used instead of the macros we already have
defined in internal.h.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoeepro100: Improve debug messages
Stefan Weil [Fri, 27 Nov 2009 11:06:02 +0000 (12:06 +0100)]
eepro100: Improve debug messages

* buf was too small for longer register names.
* Use consistent upper case for nouns in register names.
* Use better name for array with e100 register names.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRemove rule for config-devices.h
Stefan Weil [Wed, 25 Nov 2009 20:59:38 +0000 (21:59 +0100)]
Remove rule for config-devices.h

Since commit a992fe3d0fc185112677286f7a02204d8245b61e
config-devices.h is no longer used.

So there is no need to keep the dependency rules
any longer.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoeepro100: Allocate a larger buffer for regname()
David Benjamin [Thu, 26 Nov 2009 02:20:10 +0000 (21:20 -0500)]
eepro100: Allocate a larger buffer for regname()

This should avoid truncating the register name when debugging.

Signed-off-by: David Benjamin <davidben@mit.edu>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agomultiboot: Use signed type for negative error numbers
Kevin Wolf [Wed, 18 Nov 2009 11:15:21 +0000 (12:15 +0100)]
multiboot: Use signed type for negative error numbers

In mb_mod_length a return value is stored that is negative in error case. With
an unsigned type the check goes wrong.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoposix-aio-compat: Fix error check
Kevin Wolf [Wed, 18 Nov 2009 11:15:10 +0000 (12:15 +0100)]
posix-aio-compat: Fix error check

Checking for nbytes < 0 is pointless as long as it's a size_t. If we want to
use negative numbers for error codes, we should use signed types.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqemu-img: Fix memory leak
Kevin Wolf [Wed, 18 Nov 2009 09:48:01 +0000 (10:48 +0100)]
qemu-img: Fix memory leak

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoFix compile error when LSI_DEBUG is defined
Ryan Harper [Fri, 20 Nov 2009 19:55:12 +0000 (13:55 -0600)]
Fix compile error when LSI_DEBUG is defined

This patch fixes the follow error when LSI_DEBUG is set.

  CC    libhw64/lsi53c895a.o
cc1: warnings being treated as errors
qemu/hw/lsi53c895a.c: In function 'lsi_io_mapfunc':
qemu/hw/lsi53c895a.c:1932: error: format '%08x' expects type 'unsigned int', but argument 2 has type 'pcibus_t'
qemu/hw/lsi53c895a.c: In function 'lsi_ram_mapfunc':
/qemu/hw/lsi53c895a.c:1947: error: format '%08x' expects type 'unsigned int', but argument 2 has type 'pcibus_t'
qemu/hw/lsi53c895a.c: In function 'lsi_mmio_mapfunc':
qemu/hw/lsi53c895a.c:1957: error: format '%08x' expects type 'unsigned int', but argument 2 has type 'pcibus_t'
make[1]: *** [lsi53c895a.o] Error 1
make: *** [subdir-libhw64] Error 2

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoFix build for mingw32 on windows ($$ expansion)
Stefan Weil [Thu, 19 Nov 2009 19:19:56 +0000 (20:19 +0100)]
Fix build for mingw32 on windows ($$ expansion)

Make using mingw32 on windows fails when running grep "=y$$".
The command is expanded to grep "=y$ and the missing "
results in an error.

I don't expect a file config-devices.mak with =y somewhere in
the middle of a line (they are always at the end of the line),
so simplifying the regular expression to =y seems to be permitted.

This avoids problems with wrong expansion.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoFix build for mingw32 on windows ($@ in macro)
Stefan Weil [Thu, 19 Nov 2009 19:07:52 +0000 (20:07 +0100)]
Fix build for mingw32 on windows ($@ in macro)

Make using mingw32 on windows does not preserve $@ in macros
when they are modified using this pattern:
target: macro += something

This behaviour results in an error when QEMU_CFLAGS containing
"-MMD -MP -MT $@" is modified for compilation of source files
which use SDL: $@ will expand to nothing, -MT no longer has
the correct argument (it will take the next one from the command
line) and the build will fail or run with a wrong command line.

The problem is fixed by using a new macro QEMU_DGFLAGS
which is not modified by a target rule.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoe1000: Fix warning from code review
Stefan Weil [Thu, 19 Nov 2009 18:44:55 +0000 (19:44 +0100)]
e1000: Fix warning from code review

A code review run by Steve Grubb complained about code in e1000.c:

In hw/e1000.c at line 89, vlan is declared to be 4 bytes.
At line 382 is an attempt to do a memmove over it with a size of 12.

This was fixed by splitting the memmove in two calls and
adding a comment to the declaration of vlan and data.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agomultiboot: Fix module loading and setting of mmap.
Adam Lackorzynski [Mon, 30 Nov 2009 22:25:44 +0000 (23:25 +0100)]
multiboot: Fix module loading and setting of mmap.

Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoMake -kernel for linux work with bochsbios
Alexander Graf [Tue, 17 Nov 2009 16:49:16 +0000 (17:49 +0100)]
Make -kernel for linux work with bochsbios

While trying to run -kernel with -bios pc-bios/pcbios.bin, I realized
that I was actually writing data to %es, but only set up %ds to a 32-bit
segment we want to write to.

So at the end of the day the data hasn't actually been copied. Oops.

So here's a fix to set ES instead of DS, which makes -kernel work with
BOCHS bios again (and actually makes the code do the correct thing)!

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoFix recently introduced bugs in -usbdevice host
Markus Armbruster [Fri, 27 Nov 2009 12:05:53 +0000 (13:05 +0100)]
Fix recently introduced bugs in -usbdevice host

Commit 26a9e82a has the following flaws:

* It enabled DEBUG.

* It referenced two properties by the wrong name in
  usb_host_device_open(), which crashes with "qdev_prop_set: property
  "USB Host Device.bus" not found".

* It broke "-usbdevice host:auto:..." by calling parse_filter()
  incorrectly.

* It broke parsing of "-usbdevice host:BUS.ADDR" and "-usbdevice
  host:VID:PRID" with a trivial pasto.

* It broke wildcards in "-usbdevice host:auto:...".  Before, the four
  filter components were stored as int, and the wildcard was encoded
  as -1.  The faulty commit changed storage to uint32_t, and the
  wildcard encoding to 0.  But it failed to update parse_filter()
  accordingly.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoFix description of size parameter in qemu-img's help text
Pierre Riteau [Fri, 27 Nov 2009 13:14:56 +0000 (14:14 +0100)]
Fix description of size parameter in qemu-img's help text

Valid description taken from qemu-img.texi, although it would be better
to have this information recorded in only one place.

Signed-off-by: Pierre Riteau <Pierre.Riteau@irisa.fr>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoSuppress optionrom build on Solaris x86
Andreas Faerber [Fri, 27 Nov 2009 21:18:52 +0000 (22:18 +0100)]
Suppress optionrom build on Solaris x86

To avoid the build failing with:

gcc -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-
builtin -I/export/home/andreas/QEMU/qemu   -Wall -Wstrict-prototypes -
Werror -fomit-frame-pointer -fno-builtin -I/export/home/andreas/QEMU/
qemu   -c -o multiboot.o multiboot.S
/var/tmp//ccd3aWyk.s: Assembler messages:
/var/tmp//ccd3aWyk.s:15: Error: value of 512 too large for field of 1
bytes at 0000000000000002
gmake[1]: *** [multiboot.o] Error 1

disable recursion into pc-bios/optionrom, as done for Darwin already.

Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRename DriveInfo.onerror to on_write_error
Kevin Wolf [Fri, 27 Nov 2009 12:25:36 +0000 (13:25 +0100)]
Rename DriveInfo.onerror to on_write_error

Either rename variables and functions to refer to write errors (which is what
they actually do) or introduce a parameter to distinguish reads and writes.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoSCSI: Fix Standard INQUIRY data
Laszlo Ast [Thu, 19 Nov 2009 10:07:12 +0000 (11:07 +0100)]
SCSI: Fix Standard INQUIRY data

Vendor identification, product identification and product revision level
should be padded with spaces without a terminating NULL character, see
SCSI-2 standard, 8.2.5.1 Standard INQUIRY data.

Signed-off-by: Laszlo Ast <laszlo.ast@siemens-enterprise.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agokvm: x86: Add support for VCPU event states
Jan Kiszka [Tue, 24 Nov 2009 23:33:03 +0000 (00:33 +0100)]
kvm: x86: Add support for VCPU event states

This patch extends the qemu-kvm state sync logic with support for
KVM_GET/SET_VCPU_EVENTS, giving access to yet missing exception,
interrupt and NMI states.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agokvm: x86: Fix merge artifact of f8d926e9 about mp_state
Jan Kiszka [Tue, 24 Nov 2009 23:31:03 +0000 (00:31 +0100)]
kvm: x86: Fix merge artifact of f8d926e9 about mp_state

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agotarge-ppc: Sync CPU state for KVM
Alexander Graf [Wed, 2 Dec 2009 22:20:29 +0000 (23:20 +0100)]
targe-ppc: Sync CPU state for KVM

Some recent change made PPC guests always start at address 0x0 because env
isn't synced to kvm_state on first bootup.

I'm not sure if this is the correct bugfix, but at least it makes PPC boot
again with KVM enabled.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotarget-ppc: Get MMU state on register sync
Alexander Graf [Wed, 2 Dec 2009 22:19:47 +0000 (23:19 +0100)]
target-ppc: Get MMU state on register sync

While x86 only needs to sync cr0-4 to know all about its MMU state and enable
qemu to resolve virtual to physical addresses, we need to sync all of the
segment registers on PPC to know which mapping we're in.

So let's grab the segment register contents to be able to use the "x" monitor
command and also enable the gdbstub to resolve virtual addresses.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoqemu: cleanup unused macros in cirrus
Michael S. Tsirkin [Mon, 30 Nov 2009 19:02:32 +0000 (21:02 +0200)]
qemu: cleanup unused macros in cirrus

Cirrus vga has a copy of many PCI macros,
and it doesn't even use them. Clean up.
We also don't need to override header type
as it is NORMAL by default.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>