]> git.proxmox.com Git - qemu.git/log
qemu.git
12 years agoMerge branch 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm
Blue Swirl [Sat, 31 Mar 2012 12:06:10 +0000 (12:06 +0000)]
Merge branch 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm

* 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm:
  ARM: Permit any ARMv6K CPU to read the MVFR0 and MVFR1 VFP registers.
  target-arm: Minimalistic CPU QOM'ification
  target-arm: Drop cpu_arm_close()

12 years agobuildfix: check for old pod2man versions
Gerd Hoffmann [Thu, 29 Mar 2012 08:55:18 +0000 (10:55 +0200)]
buildfix: check for old pod2man versions

Older pod2man don't have a --utf8 switch, check for this in conffigure
and use it only when present.  Fixes build on RHEL-5.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoFix conversion from lower to upper case with Turkish locale
Stefan Weil [Tue, 27 Mar 2012 17:23:53 +0000 (19:23 +0200)]
Fix conversion from lower to upper case with Turkish locale

Some locale settings let make fail or create wrong results
because tr '[:lower:]' '[:upper:]' which is used to convert
from lower to upper case depends on the locale.

With locale tr_TR.UTF-8, lower case 'i' is not converted to 'I'.
This results in wrong entries in config-host.h like these ones:

  #define CONFIG_QEMU_PREFiX "/usr/local"
  #define CONFIG_QEMU_BiNDiR "/usr/local/bin"

This problem was reported by Emre Ersin.

The same problem occurs when configure creates the target specific
files config-target.mak. They get wrong declarations:

TARGET_CRiS=y
TARGET_i386=y
TARGET_MiCROBLAZE=y
TARGET_MiPS64=y
TARGET_MiPS=y
TARGET_UNiCORE32=y

It is sufficient to restrict the conversion to the characters a-z.

Using this explicit range avoids the dependency on the locale
settings and is also shorter.

v2:
POSIX says that 'tr a-z' is unspecified outside of the POSIX
locale, so we must set LC_ALL=C to make sure that we are using
POSIX (hint from Eric Blake, thanks).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoqtest: avoid a warning with RTC test
Blue Swirl [Fri, 30 Mar 2012 17:42:27 +0000 (17:42 +0000)]
qtest: avoid a warning with RTC test

Avoid this warning on OpenBSD:
  CC    tests/rtc-test.o
/src/qemu/tests/rtc-test.c: In function 'check_time':
/src/qemu/tests/rtc-test.c:171: warning: format '%ld' expects type 'long int', but argument 2 has type 'time_t'
/src/qemu/tests/rtc-test.c:173: warning: format '%ld' expects type 'long int', but argument 2 has type 'time_t'

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoqtest: fix 32-bit build
Anthony Liguori [Fri, 30 Mar 2012 17:53:54 +0000 (12:53 -0500)]
qtest: fix 32-bit build

time_t appears to be an unsigned long so use %ld.

Reported-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoqtest: fix out of tree build
Blue Swirl [Fri, 30 Mar 2012 17:39:33 +0000 (17:39 +0000)]
qtest: fix out of tree build

Trace objects are also needed if tracing is enabled.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoqtest: add rtc-test test-case
Anthony Liguori [Wed, 28 Mar 2012 13:42:07 +0000 (15:42 +0200)]
qtest: add rtc-test test-case

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agortc: split out macros into a header file and use in test case
Anthony Liguori [Wed, 28 Mar 2012 13:42:06 +0000 (15:42 +0200)]
rtc: split out macros into a header file and use in test case

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoqtest: add C version of test infrastructure
Anthony Liguori [Wed, 28 Mar 2012 13:42:05 +0000 (15:42 +0200)]
qtest: add C version of test infrastructure

This also includes a qtest wrapper script to make it easier to launch qtest
tests directly.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoqtest: add clock management
Paolo Bonzini [Wed, 28 Mar 2012 13:42:04 +0000 (15:42 +0200)]
qtest: add clock management

This patch combines qtest and -icount together to turn the vm_clock
into a source that can be fully managed by the client.  To this end new
commands clock_step and clock_set are added.  Hooking them with libqtest
is left as an exercise to the reader.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoqtest: IRQ interception infrastructure
Paolo Bonzini [Wed, 28 Mar 2012 13:42:03 +0000 (15:42 +0200)]
qtest: IRQ interception infrastructure

Since /i440fx/piix3 is being removed from the composition tree, the
IO-APIC is placed under /i440fx.  This is wrong and should be changed
as soon as the /i440fx/piix3 path is put back.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoqtest: add test framework
Anthony Liguori [Wed, 28 Mar 2012 13:42:02 +0000 (15:42 +0200)]
qtest: add test framework

The idea behind qtest is pretty simple.  Instead of executing a CPU via TCG or
KVM, rely on an external process to send events to the device model that the CPU
would normally generate.

qtest presents itself as an accelerator.  In addition, a new option is added to
establish a qtest server (-qtest) that takes a character device.  This is what
allows the external process to send CPU events to the device model.

qtest uses a simple line based protocol to send the events.  Documentation of
that protocol is in qtest.c.

I considered reusing the monitor for this job.  Adding interrupts would be a bit
difficult.  In addition, logging would also be difficult.

qtest has extensive logging support.  All protocol commands are logged with
time stamps using a new command line option (-qtest-log).  Logging is important
since ultimately, this is a feature for debugging.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agotest makefile overhaul
Paolo Bonzini [Wed, 28 Mar 2012 13:42:01 +0000 (15:42 +0200)]
test makefile overhaul

This introduces new test reporting infrastructure based on
gtester and gtester-report.

Also, all existing tests are moved to tests/, and tests/Makefile
is reorganized to factor out the commonalities in the rules.

Signed-off-by: Anthony Liguori <aliguori@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoARM: Permit any ARMv6K CPU to read the MVFR0 and MVFR1 VFP registers.
Andrew Towers [Thu, 29 Mar 2012 02:41:08 +0000 (02:41 +0000)]
ARM: Permit any ARMv6K CPU to read the MVFR0 and MVFR1 VFP registers.

This patch replaces the ARM_FEATURE_VFP3 test when reading MVFR registers
with a test for a new feature flag ARM_FEATURE_MVFR, and sets this feature
for all ARMv6K cores (ARM1156 is not a v6K core, yet supports MVFR; qemu
does not support ARM1156 at this time.)

MVFR0 and MVFR1 were introduced in ARM1136JF-S r1p0 (ARMv6K, VFPv2) and are
present in ARM1156T2F-S (non-v6K), ARM1176JZF-S, ARM11MPCore and newer cores.
Reference: ARM DDI 0211H, 0290G, 0301H, 0360E.
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0211h/Ffbefjag.html

Without this change, the linux kernel will not boot with VFP support enabled
under ARM1176 system emulation, due to the unconditional use of MVFR1 at the
end of vfp_init() in arch/arm/vfp/vfpmodule.c:

  VFP support v0.3: implemetor 41 architecture 1 part 20 variant b rev 5
  Internal error: Oops - undefined instruction: 0 [#1]

Signed-off-by: Andrew Towers <atowers@gmail.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agoMerge remote-tracking branch 'origin/master' into staging
Anthony Liguori [Thu, 29 Mar 2012 18:32:41 +0000 (13:32 -0500)]
Merge remote-tracking branch 'origin/master' into staging

* origin/master:
  qemu tcg: Remove one entry of INDEX_op_ld_i64 from ppc_op_defs

12 years agotarget-arm: Minimalistic CPU QOM'ification
Andreas Färber [Thu, 29 Mar 2012 04:50:31 +0000 (04:50 +0000)]
target-arm: Minimalistic CPU QOM'ification

Introduce only one non-abstract type TYPE_ARM_CPU and do not touch
cp15 registers to not interfere with Peter's ongoing remodelling.
Embed CPUARMState as first (additional) field of ARMCPU.

Let CPUClass::reset() call cpu_state_reset() for now.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agotarget-arm: Drop cpu_arm_close()
Andreas Färber [Thu, 29 Mar 2012 04:50:30 +0000 (04:50 +0000)]
target-arm: Drop cpu_arm_close()

It's unused, so no need to QOM'ify it later.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agoqemu tcg: Remove one entry of INDEX_op_ld_i64 from ppc_op_defs
Li Zhang [Thu, 29 Mar 2012 03:29:02 +0000 (14:29 +1100)]
qemu tcg: Remove one entry of INDEX_op_ld_i64 from ppc_op_defs

There two entries of INDEX_op_ld_i64 in the ppc_op_defs.  That causes an
assertion failure in tcg_add_target_add_op_defs() when --enable-debug is
used on a ppc64 backend (that's ppc64 host, not target).

Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: malc <av1474@comtv.ru>
12 years agoMerge remote-tracking branch 'sstabellini/disk_io' into staging
Anthony Liguori [Wed, 28 Mar 2012 17:46:39 +0000 (12:46 -0500)]
Merge remote-tracking branch 'sstabellini/disk_io' into staging

* sstabellini/disk_io:
  xen_disk: when using AIO flush after the operation is completed
  xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO

12 years agoMerge remote-tracking branch 'sstabellini/xen-fixes' into staging
Anthony Liguori [Wed, 28 Mar 2012 17:46:11 +0000 (12:46 -0500)]
Merge remote-tracking branch 'sstabellini/xen-fixes' into staging

* sstabellini/xen-fixes:
  xen_disk: detach the blkdev before bdrv_delete
  xen_console: ignore console disconnect events from console/0

12 years agoMerge remote-tracking branch 'qmp/queue/qmp' into staging
Anthony Liguori [Wed, 28 Mar 2012 17:45:22 +0000 (12:45 -0500)]
Merge remote-tracking branch 'qmp/queue/qmp' into staging

* qmp/queue/qmp:
  qmp: document strict parsing
  qmp: parse commands in strict mode
  qmp: add and use q type specifier
  qapi: add strict mode to input visitor
  qapi: place outermost object on qiv stack
  qapi: untangle next_list
  qapi: allow freeing partially-allocated objects
  qapi: shortcut visits on errors
  qapi: fix memory leak on error
  qapi: fail hard on stack imbalance
  qapi: add a test case for type errors
  qapi: add struct-errors test case to test-qmp-output-visitor
  qapi: fix double free in qmp_output_visitor_cleanup()

12 years agoMerge remote-tracking branch 'alon/libcacard' into staging
Anthony Liguori [Wed, 28 Mar 2012 17:44:04 +0000 (12:44 -0500)]
Merge remote-tracking branch 'alon/libcacard' into staging

* alon/libcacard:
  libcacard/vcard_emul_nss: add warning for old coolkey
  libcacard/vcard_emul_nss: handle no readers at startup
  libcacard/vcard_emul_nss: don't stop thread when there are no slots

12 years agosparc: pass page aligned addresses to tlb_set_page
Blue Swirl [Sun, 18 Mar 2012 11:31:23 +0000 (11:31 +0000)]
sparc: pass page aligned addresses to tlb_set_page

Mask incoming page address early so that resolved addresses
are page aligned. Remove further address masking.

Tested-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoxen_disk: detach the blkdev before bdrv_delete
Stefano Stabellini [Tue, 27 Mar 2012 16:03:07 +0000 (16:03 +0000)]
xen_disk: detach the blkdev before bdrv_delete

We need to detach the blkdev from the BlockDriverState before calling
bdrv_delete.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
12 years agoxen_console: ignore console disconnect events from console/0
Stefano Stabellini [Tue, 27 Mar 2012 16:02:21 +0000 (16:02 +0000)]
xen_console: ignore console disconnect events from console/0

The first console has a different location compared to other PV devices
(console, rather than device/console/0) and doesn't obey the xenstore
state protocol. We already special case the first console in con_init
and con_initialise, we should also do it in con_disconnect.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
12 years agoqmp: document strict parsing
Paolo Bonzini [Thu, 22 Mar 2012 21:39:39 +0000 (22:39 +0100)]
qmp: document strict parsing

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqmp: parse commands in strict mode
Paolo Bonzini [Thu, 22 Mar 2012 11:51:12 +0000 (12:51 +0100)]
qmp: parse commands in strict mode

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqmp: add and use q type specifier
Paolo Bonzini [Thu, 22 Mar 2012 11:51:11 +0000 (12:51 +0100)]
qmp: add and use q type specifier

"O" is being used by the transaction and qom-set commands to mean "any
QObject", but it really means "do not validate the argument list".
Add a new specifier with the correct meaning.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: add strict mode to input visitor
Paolo Bonzini [Thu, 22 Mar 2012 11:51:10 +0000 (12:51 +0100)]
qapi: add strict mode to input visitor

While QMP in general is designed so that it is possible to ignore
unknown arguments, in the case of the QMP server it is better to
reject them to detect bad clients.  In fact, we're already doing
this at the top level in the argument checker.  To extend this to
complex structures, add a mode to the input visitor where it checks
for unvisited keys and raises an error if it finds one.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: place outermost object on qiv stack
Paolo Bonzini [Thu, 22 Mar 2012 11:51:09 +0000 (12:51 +0100)]
qapi: place outermost object on qiv stack

This is a slight change in the implementation of QMPInputVisitor
that helps when adding strict mode.

Const QObjects cannot be inc/decref-ed, and that's why QMPInputVisitor
relies heavily on weak references to inner objects.  I'm not removing
the weak references now, but since refcount+const is a lost battle in C
(C++ has "mutable") I think removing const is fine in this case.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: untangle next_list
Paolo Bonzini [Thu, 22 Mar 2012 21:38:40 +0000 (22:38 +0100)]
qapi: untangle next_list

Right now, the semantics of next_list are complicated.  The caller must:

* call start_list

* call next_list for each element *including the first*

* on the first call to next_list, the second argument should point to
NULL and the result is the head of the list.  On subsequent calls,
the second argument should point to the last node (last result of
next_list) and next_list itself tacks the element at the tail of the
list.

This works for both input and output visitor, but having the visitor
write memory when it is only reading the list is ugly.  Plus, relying
on *list to detect the first call is tricky and undocumented.

We can initialize so->entry in next_list instead of start_list, leaving
it NULL in start_list.  This way next_list sees clearly whether it is
on the first call---as a bonus, it discriminates the cases based on
internal state of the visitor rather than external state.  We can
also pull the assignment of the list head from generated code up to
next_list.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: allow freeing partially-allocated objects
Paolo Bonzini [Thu, 22 Mar 2012 11:51:07 +0000 (12:51 +0100)]
qapi: allow freeing partially-allocated objects

Objects going through the dealloc visitor can be only partially allocated.
Detect the situation and avoid a segfault.  This also helps with the
input visitor, when there are errors.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: shortcut visits on errors
Paolo Bonzini [Thu, 22 Mar 2012 11:51:06 +0000 (12:51 +0100)]
qapi: shortcut visits on errors

We can exit very soon if we enter a visitor with a preexisting error.
This simplifies some cases because we will not have to deal with
obj being non-NULL while *obj is NULL.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: fix memory leak on error
Paolo Bonzini [Thu, 22 Mar 2012 11:51:05 +0000 (12:51 +0100)]
qapi: fix memory leak on error

QmpInputVisitor would leak the malloced struct if the stack was
overflowed.  This can be easily fixed using error_propagate.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: fail hard on stack imbalance
Paolo Bonzini [Thu, 22 Mar 2012 11:51:04 +0000 (12:51 +0100)]
qapi: fail hard on stack imbalance

QmpOutputVisitor will segfault if an imbalanced end function is
called.  So we can abort in QmpInputVisitor too.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: add a test case for type errors
Paolo Bonzini [Thu, 22 Mar 2012 11:51:03 +0000 (12:51 +0100)]
qapi: add a test case for type errors

There is no test case for parse errors, add one.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: add struct-errors test case to test-qmp-output-visitor
Paolo Bonzini [Tue, 20 Mar 2012 10:22:49 +0000 (11:22 +0100)]
qapi: add struct-errors test case to test-qmp-output-visitor

This test case verifies that invalid native enums are caught, and causes
qapi to tear down the QObject tree under construction, exercising the
previous patch.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: fix double free in qmp_output_visitor_cleanup()
Laszlo Ersek [Tue, 20 Mar 2012 10:22:48 +0000 (11:22 +0100)]
qapi: fix double free in qmp_output_visitor_cleanup()

Stack entries in QmpOutputVisitor are navigation links (weak references),
except the bottom (ie. least recently added) entry, which owns the root
QObject [1]. Make qmp_output_visitor_cleanup() drop the stack entries,
then release the QObject tree by the root.

Attempting to serialize an invalid enum inside a dictionary is an example
for triggering the double free.

[1] http://lists.nongnu.org/archive/html/qemu-devel/2012-03/msg03276.html

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoMerge remote-tracking branch 'mdroth/qga-pull-3-26-12' into staging
Anthony Liguori [Mon, 26 Mar 2012 20:17:51 +0000 (15:17 -0500)]
Merge remote-tracking branch 'mdroth/qga-pull-3-26-12' into staging

* mdroth/qga-pull-3-26-12:
  qemu-ga: fix bsd build, and re-org linux-specific implementations

12 years agoMerge remote-tracking branch 'stefanha/trivial-patches' into staging
Anthony Liguori [Mon, 26 Mar 2012 20:08:26 +0000 (15:08 -0500)]
Merge remote-tracking branch 'stefanha/trivial-patches' into staging

* stefanha/trivial-patches:
  trace-events: Fix broken build caused by wrong format specifier
  test: add test-qmp-commands to make check
  qapi: remove print statements from test-qmp-commands
  test: remove qemu-ga reference
  vl.c: fix '-cpu ?' segfault

12 years agoMerge remote-tracking branch 'spice/spice.v51' into staging
Anthony Liguori [Mon, 26 Mar 2012 20:08:15 +0000 (15:08 -0500)]
Merge remote-tracking branch 'spice/spice.v51' into staging

* spice/spice.v51:
  ui/spice-display: use uintptr_t when casting qxl physical addresses
  ui/spice-display.c: Fix compilation warnings on 32 bit hosts

12 years agotest: remove qemu-ga reference
Michael Roth [Wed, 21 Mar 2012 15:10:46 +0000 (10:10 -0500)]
test: remove qemu-ga reference

This was added by mistake a while back.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoMan page: Add -global description
Miroslav Rezanina [Wed, 21 Mar 2012 12:46:54 +0000 (13:46 +0100)]
Man page: Add -global description

There's only TODO information in qemu man page for -global option. This is a basic description of this option with simple example.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
v4:
 - break long line

v3:
 - add use case description
 - use prop instead of property

v2:
 - Use better value in example
Patch:
--
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoqapi: add c_fun to escape function names
Federico Simoncelli [Tue, 20 Mar 2012 13:54:35 +0000 (13:54 +0000)]
qapi: add c_fun to escape function names

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agolibcacard/vcard_emul_nss: add warning for old coolkey
Alon Levy [Thu, 22 Mar 2012 18:00:36 +0000 (20:00 +0200)]
libcacard/vcard_emul_nss: add warning for old coolkey

Older coolkey versions (before the future fix of RHBZ 802435) have
a fake card reader created if no reader is detected during module
initialization. Warn libcacard users if the faulty coolkey is detected
by checking for the fake reader name "E-Gate 0 0".

Signed-off-by: Alon Levy <alevy@redhat.com>
12 years agolibcacard/vcard_emul_nss: handle no readers at startup
Alon Levy [Thu, 22 Mar 2012 17:58:58 +0000 (19:58 +0200)]
libcacard/vcard_emul_nss: handle no readers at startup

When starting with no readers, coolkey should show no slots (with
RHBZ 806038 fixed). Fix initialization to launch the event handling
thread for each module that isn't the internal module regardless of the
number of slots detected for it at initialization time, since slot
number may start as 0 and is dynamic.

RHBZ: 802435
Signed-off-by: Alon Levy <alevy@redhat.com>
12 years agolibcacard/vcard_emul_nss: don't stop thread when there are no slots
Alon Levy [Thu, 22 Mar 2012 17:44:49 +0000 (19:44 +0200)]
libcacard/vcard_emul_nss: don't stop thread when there are no slots

Signed-off-by: Alon Levy <alevy@redhat.com>
12 years agotrace-events: Fix broken build caused by wrong format specifier
Stefan Weil [Sat, 24 Mar 2012 07:13:34 +0000 (08:13 +0100)]
trace-events: Fix broken build caused by wrong format specifier

mem is an uint64_t value, so %lx was wrong.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agotest: add test-qmp-commands to make check
Michael Roth [Tue, 20 Mar 2012 00:18:26 +0000 (19:18 -0500)]
test: add test-qmp-commands to make check

All the deps are here but the test was never added to the list of tests
for make check

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoqapi: remove print statements from test-qmp-commands
Michael Roth [Tue, 20 Mar 2012 00:18:25 +0000 (19:18 -0500)]
qapi: remove print statements from test-qmp-commands

This is necessary for nicer make check integration.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agotest: remove qemu-ga reference
Michael Roth [Wed, 21 Mar 2012 15:10:46 +0000 (10:10 -0500)]
test: remove qemu-ga reference

This was added by mistake a while back.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agovl.c: fix '-cpu ?' segfault
Eduardo Habkost [Wed, 21 Mar 2012 12:33:40 +0000 (09:33 -0300)]
vl.c: fix '-cpu ?' segfault

Fix stupid copy&paste mistake at commit
ecf40beae7dcbb057d4f115207f9d8276832a774: I moved code around but kept
"optarg" on the cpu_list() call.

Reported-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoqemu-ga: fix bsd build, and re-org linux-specific implementations
Michael Roth [Sun, 25 Mar 2012 18:59:41 +0000 (13:59 -0500)]
qemu-ga: fix bsd build, and re-org linux-specific implementations

12 years agotcg-sparc: Add debug_frame support.
Richard Henderson [Sat, 24 Mar 2012 17:47:39 +0000 (10:47 -0700)]
tcg-sparc: Add debug_frame support.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotcg-hppa: Add debug_frame support.
Richard Henderson [Sat, 24 Mar 2012 17:47:38 +0000 (10:47 -0700)]
tcg-hppa: Add debug_frame support.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotcg: Allow ELF_HOST_FLAGS and ELF_OSABI overrides in gdb-jit.
Richard Henderson [Sat, 24 Mar 2012 17:47:37 +0000 (10:47 -0700)]
tcg: Allow ELF_HOST_FLAGS and ELF_OSABI overrides in gdb-jit.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotcg: Add debug_info to JIT ELF image.
Richard Henderson [Sat, 24 Mar 2012 17:47:36 +0000 (10:47 -0700)]
tcg: Add debug_info to JIT ELF image.

This allows us to actually supply a function name in softmmu builds;
gdb doesn't pick up the minimal symbol table otherwise.  Also add a
bit of documentation and statically generate more of the ELF image.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotarget-alpha: Use noreturn marker in helper.h.
Richard Henderson [Sat, 24 Mar 2012 16:51:15 +0000 (09:51 -0700)]
target-alpha: Use noreturn marker in helper.h.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotarget-alpha: Make use of fp_status.flush_inputs_to_zero.
Richard Henderson [Sat, 24 Mar 2012 16:51:14 +0000 (09:51 -0700)]
target-alpha: Make use of fp_status.flush_inputs_to_zero.

This softfp feature post-dates the last major update to the Alpha
fpu translation.  We can make use of this to eliminate at least
one helper function that was performing this operation by hand.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotarget-alpha: Move memory helpers to mem_helper.c.
Richard Henderson [Sat, 24 Mar 2012 16:51:13 +0000 (09:51 -0700)]
target-alpha: Move memory helpers to mem_helper.c.

This completes the transition away from AREG0.  This patch must
be last because it requires CONFIG_TCG_PASS_AREG0 set too.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotarget-alpha: Move palcode support helpers to sys_helper.c.
Richard Henderson [Sat, 24 Mar 2012 16:51:12 +0000 (09:51 -0700)]
target-alpha: Move palcode support helpers to sys_helper.c.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotarget-alpha: Move integer overflow helpers to int_helper.c.
Richard Henderson [Sat, 24 Mar 2012 16:51:11 +0000 (09:51 -0700)]
target-alpha: Move integer overflow helpers to int_helper.c.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotarget-alpha: Move fpcr helpers from op_helper.c to helper.c.
Richard Henderson [Sat, 24 Mar 2012 16:51:10 +0000 (09:51 -0700)]
target-alpha: Move fpcr helpers from op_helper.c to helper.c.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotarget-alpha: Move floating-point helpers to fpu_helper.c.
Richard Henderson [Sat, 24 Mar 2012 16:51:09 +0000 (09:51 -0700)]
target-alpha: Move floating-point helpers to fpu_helper.c.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotarget-alpha: Move exception helpers to helper.c.
Richard Henderson [Sat, 24 Mar 2012 16:51:08 +0000 (09:51 -0700)]
target-alpha: Move exception helpers to helper.c.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotarget-alpha: Move integer helpers to int_helper.c.
Richard Henderson [Sat, 24 Mar 2012 16:51:07 +0000 (09:51 -0700)]
target-alpha: Move integer helpers to int_helper.c.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoalpha-linux-user: Initialize fpu to round-to-normal.
Richard Henderson [Sat, 24 Mar 2012 16:51:06 +0000 (09:51 -0700)]
alpha-linux-user: Initialize fpu to round-to-normal.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agogdbserver: Don't send a GDB syscall until the system CPU is stopped
Meador Inge [Thu, 15 Mar 2012 17:49:45 +0000 (17:49 +0000)]
gdbserver: Don't send a GDB syscall until the system CPU is stopped

Fix an issue where the GDB server implementation was sending GDB syscall
requests while the system CPU was still running.  Syscall requests must
be sent while the CPU is stopped otherwise replies from the GDB client
might get dropped and the GDB server might be incorrectly transitioned
into a 'RUN_STATE_PAUSED' state.

Signed-off-by: Meador Inge <meadori@codesourcery.com>
[PMM: trivial rebase, reinstated comma after last item in RSState enum]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoSupport utf8 chars in pod docs
Michael Tokarev [Mon, 19 Mar 2012 22:25:57 +0000 (02:25 +0400)]
Support utf8 chars in pod docs

We've at least one UTF8 char in the qemu texi doc:

 $ grep Tibor qemu-doc.texi
 by Tibor "TS" Schütz.
 $ man ./qemu.1 | grep Tibor
        by Tibor "TS" SchA~Xtz.

This patch allows utf8 in man/pod docs.

Initially it was split into two parts and sent on 2012-02-02.
Resending it again (3rd time) now in merged form.  If any
other generalizations of $(POD2MAN) are needed it can be done
in a separate patch.  Current form of $(POD2MAN) is choosen
to be able to easily change it if some implementation does
not support utf8 or resulting output has issues with local
man(1) program/macros.

First, add @documentencoding in scripts/texi2pod.pl:

Currently our texi2pod ignores @documentencoding even if it is set
properly in *.texi files.  This results in a mojibake in documents
generated from qemu.pod (which is generated from qemu-doc.texi by
texi2pod), because the rest of the tools assumes ASCII encoding.

This patch recognizes first @documentencoding in input and places
it at the beginning of output as =encoding directive.

Second, run pod2man with --utf8 option to enable utf8 in manpages:

This option makes no difference for manpages which contains only
ascii chars.  But for manpages with actual UTF8 characters (qemu
docs contains these), this change allows to see real characters
instead of mojibakes or substitutes.

Signed-off-By: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotcg: Use the GDB JIT debugging interface.
Richard Henderson [Mon, 19 Mar 2012 19:25:11 +0000 (12:25 -0700)]
tcg: Use the GDB JIT debugging interface.

This allows us to generate unwind info for the dynamicly generated
code in the code_gen_buffer.  Only i386 is converted at this point.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agofix screendump
Gerd Hoffmann [Thu, 1 Mar 2012 07:34:40 +0000 (08:34 +0100)]
fix screendump

Commit 45efb16124efef51de5157afc31984b5a47700f9 optimized a bit too
much.  We can skip the vga_invalidate_display() in case no console
switch happened because we don't need a full redraw then.  We can *not*
skip vga_hw_update() though, because the screen content will be stale
then in case nobody else calls vga_hw_update().

Trigger: vga textmode with vnc display and no client connected.

Reported-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
Tested-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotarget-sparc: Add compiler attribute to some functions which don't return
Stefan Weil [Sun, 18 Mar 2012 22:16:04 +0000 (23:16 +0100)]
target-sparc: Add compiler attribute to some functions which don't return

helper_raise_exception does not return, nor does do_unaligned_access.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotarget-mips: Add compiler attribute to some functions which don't return
Stefan Weil [Sun, 18 Mar 2012 22:16:03 +0000 (23:16 +0100)]
target-mips: Add compiler attribute to some functions which don't return

helper_raise_exception_err does not return, nor do helper_raise_exception
and do_unaligned_access.

Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoAdd support for target helper functions which don't return
Stefan Weil [Sun, 18 Mar 2012 22:16:02 +0000 (23:16 +0100)]
Add support for target helper functions which don't return

Most functions which handle exceptions don't return.

With a compiler attribute (added by QEMU_NORETURN),
gcc can optimize the code.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoscripts: add gdb support script
Avi Kivity [Sun, 18 Mar 2012 14:48:44 +0000 (16:48 +0200)]
scripts: add gdb support script

Add a script that enhances gdb to be aware of QEMU data structures.

This patch adds a single gdb command, 'qemu mtree'.  The command is
similar to the monitor's 'info mtree', except that it prints MemoryRegion
addresses, and except for working from a core dump as well as a live instance.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoxen_disk: when using AIO flush after the operation is completed
Stefano Stabellini [Fri, 23 Mar 2012 11:37:25 +0000 (11:37 +0000)]
xen_disk: when using AIO flush after the operation is completed

If ioreq->postsync call bdrv_flush when the AIO operation is actually
completed.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
12 years agoxen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO
Stefano Stabellini [Fri, 23 Mar 2012 11:39:51 +0000 (11:39 +0000)]
xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
12 years agoui/spice-display: use uintptr_t when casting qxl physical addresses
Alon Levy [Wed, 21 Mar 2012 16:17:18 +0000 (18:17 +0200)]
ui/spice-display: use uintptr_t when casting qxl physical addresses

The current intptr_t casts are a problem when the address's highest
bit is 1, and it is cast to a intptr_t and then to uint64_t, such
as at:
     surface.mem        = (intptr_t)ssd->buf;

This causes the sign bit to be extended which causes a wrong address to
be passed on to spice, which then complains when it gets the wrong
slot_id number, since the slot_id is taken from the higher bits.

The assertion happens early - during the first primary surface creation.

This fixes running "-vga qxl -spice" with 32 bit compiled
qemu-system-i386.

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agoui/spice-display.c: Fix compilation warnings on 32 bit hosts
Peter Maydell [Wed, 7 Mar 2012 13:36:48 +0000 (13:36 +0000)]
ui/spice-display.c: Fix compilation warnings on 32 bit hosts

Fix compilation failures ("cast from pointer to integer of
different size [-Werror=pointer-to-int-cast]") by using
uintptr_t instead.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agoMerge remote-tracking branch 'sstabellini/saverestore-8' into staging
Anthony Liguori [Mon, 19 Mar 2012 18:39:42 +0000 (13:39 -0500)]
Merge remote-tracking branch 'sstabellini/saverestore-8' into staging

* sstabellini/saverestore-8:
  xen: do not allocate RAM during INMIGRATE runstate
  xen mapcache: check if memory region has moved.
  xen: record physmap changes to xenstore
  Set runstate to INMIGRATE earlier
  Introduce "xen-save-devices-state"
  cirrus_vga: do not reset videoram

Conflicts:
qapi-schema.json

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoMerge remote-tracking branch 'stefanha/trivial-patches' into staging
Anthony Liguori [Mon, 19 Mar 2012 18:37:41 +0000 (13:37 -0500)]
Merge remote-tracking branch 'stefanha/trivial-patches' into staging

* stefanha/trivial-patches:
  qemu-ga: for w32, fix leaked handle ov.hEvent in ga_channel_write()
  ioapic: fix build with DEBUG_IOAPIC
  .gitignore: add qemu-bridge-helper and option rom build products
  cleanup obsolete typedef
  monitor: Remove unused bool field 'qapi' in mon_cmd_t struct
  ds1338: Add missing break statement
  vnc: Fix packed boolean struct members
  Remove type field in ModuleEntry as it's not used

12 years agoMerge remote-tracking branch 'spice/spice.v50' into staging
Anthony Liguori [Mon, 19 Mar 2012 18:37:23 +0000 (13:37 -0500)]
Merge remote-tracking branch 'spice/spice.v50' into staging

* spice/spice.v50:
  spice: fix broken initialization
  hw/qxl.c: Fix compilation failures on 32 bit hosts
  qxl/qxl_render.c: add trace events
  qxl: switch qxl.c to trace-events
  qxl: init_pipe_signaling: exit on failure
  monitor: fix client_migrate_info error handling
  spice: set spice uuid and name

12 years agoMerge remote-tracking branch 'bonzini/scsi-next' into staging
Anthony Liguori [Mon, 19 Mar 2012 18:36:37 +0000 (13:36 -0500)]
Merge remote-tracking branch 'bonzini/scsi-next' into staging

* bonzini/scsi-next:
  scsi: add get_dev_path
  virtio-scsi: call unregister_savevm properly
  scsi: copy serial number into VPD page 0x83
  scsi-cd: check ready condition before processing several commands
  get rid of CONFIG_VIRTIO_SCSI

12 years agoMerge remote-tracking branch 'qemu-kvm/memory/urgent' into staging
Anthony Liguori [Mon, 19 Mar 2012 18:36:18 +0000 (13:36 -0500)]
Merge remote-tracking branch 'qemu-kvm/memory/urgent' into staging

* qemu-kvm/memory/urgent:
  exec: fix guest memory access for Xen

12 years agoxen: do not allocate RAM during INMIGRATE runstate
Anthony PERARD [Wed, 25 Jan 2012 12:36:06 +0000 (12:36 +0000)]
xen: do not allocate RAM during INMIGRATE runstate

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
12 years agoxen mapcache: check if memory region has moved.
Anthony PERARD [Wed, 18 Jan 2012 12:21:38 +0000 (12:21 +0000)]
xen mapcache: check if memory region has moved.

This patch changes the xen_map_cache behavior. Before trying to map a guest
addr, mapcache will look into the list of range of address that have been moved
(physmap/set_memory). There is currently one memory space like this, the vram,
"moved" from were it's allocated to were the guest will look into.

This help to have a succefull migration.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
12 years agoxen: record physmap changes to xenstore
Stefano Stabellini [Thu, 19 Jan 2012 15:56:11 +0000 (15:56 +0000)]
xen: record physmap changes to xenstore

Write to xenstore any physmap changes so that the hypervisor can be
aware of them.
Read physmap changes from xenstore on boot.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
12 years agoSet runstate to INMIGRATE earlier
Stefano Stabellini [Wed, 18 Jan 2012 12:23:13 +0000 (12:23 +0000)]
Set runstate to INMIGRATE earlier

Set runstate to RUN_STATE_INMIGRATE as soon as we can on resume.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoIntroduce "xen-save-devices-state"
Stefano Stabellini [Wed, 25 Jan 2012 12:24:51 +0000 (12:24 +0000)]
Introduce "xen-save-devices-state"

- add an "is_ram" flag to SaveStateEntry;

- register_savevm_live sets is_ram for live_savevm devices;

- introduce a "xen-save-devices-state" QAPI command that can be used to save
the state of all devices, but not the RAM or the block devices of the
VM.

Changes in v8:

- rename save-devices-state to xen-save-devices-state.

Changes in v7:

- rename save_devices to save-devices-state.

Changes in v6:

- remove the is_ram parameter from register_savevm_live and sets is_ram
if the device is a live_savevm device;

- introduce save_devices as a QAPI command, write a better description
for it;

- fix CODING_STYLE;

- introduce a new doc to explain the save format used by save_devices.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoexec: fix guest memory access for Xen
Anthony PERARD [Mon, 19 Mar 2012 15:54:34 +0000 (15:54 +0000)]
exec: fix guest memory access for Xen

In cpu_physical_memory_rw, a change has been introduced and qemu_get_ram_ptr is
no longuer called with the ram addr we want to access, but only with the
section address. This patch fixes this. (All other call to qemu_get_ram_ptr are
already called with the right address.)

This patch fixes Xen guest.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoMerge remote-tracking branch 'origin/master' into staging
Anthony Liguori [Mon, 19 Mar 2012 16:37:44 +0000 (11:37 -0500)]
Merge remote-tracking branch 'origin/master' into staging

* origin/master:
  tcg: fix sparc host for AREG0 free operation

12 years agoscsi: add get_dev_path
Paolo Bonzini [Mon, 19 Mar 2012 14:30:40 +0000 (15:30 +0100)]
scsi: add get_dev_path

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
12 years agovirtio-scsi: call unregister_savevm properly
Paolo Bonzini [Mon, 19 Mar 2012 14:21:57 +0000 (15:21 +0100)]
virtio-scsi: call unregister_savevm properly

This fixes a use-after-free when migrating after hot-unplug.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
12 years agoscsi: copy serial number into VPD page 0x83
Paolo Bonzini [Fri, 16 Mar 2012 18:12:43 +0000 (19:12 +0100)]
scsi: copy serial number into VPD page 0x83

Currently QEMU passes the qdev device id to the guest in an ASCII-string
designator in page 0x83.  While this is fine, it does not match what
real hardware does; usually the ASCII-string designator there hosts
another copy of the serial number (there can be other designators,
for example with a world-wide name).  Do the same for QEMU SCSI
disks.

ATAPI does not support VPD pages, so it does not matter there.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
12 years agoscsi-cd: check ready condition before processing several commands
Paolo Bonzini [Fri, 16 Mar 2012 18:11:43 +0000 (19:11 +0100)]
scsi-cd: check ready condition before processing several commands

This commit is more or less obvious.  What it caused is less obvious:
SCSI CD drives failed to eject under Linux, though for example the
"change" command worked okay.  This happens because of the autoclose
option in the Linux CD-ROM driver.

The actual chain of events is quite complex and somehow involves
udev helpers; the actual command that matters is READ TOC, though
honestly it's not really clear to me how because it should always be
invoked after autoclose, not before.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
12 years agoget rid of CONFIG_VIRTIO_SCSI
Paolo Bonzini [Fri, 16 Mar 2012 18:21:35 +0000 (19:21 +0100)]
get rid of CONFIG_VIRTIO_SCSI

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
12 years agoMerge remote-tracking branch 'qemu-kvm/memory/urgent' into staging
Anthony Liguori [Mon, 19 Mar 2012 13:51:50 +0000 (08:51 -0500)]
Merge remote-tracking branch 'qemu-kvm/memory/urgent' into staging

* qemu-kvm/memory/urgent: (42 commits)
  memory: check for watchpoints when getting code ram_addr
  exec: fix write tlb entry misused as iotlb
  Sparc: avoid AREG0 wrappers for memory access helpers
  Sparc: avoid AREG0 for memory access helpers
  TCG: add 5 arg helpers to def-helper.h
  softmmu templates: optionally pass CPUState to memory access functions
  i386: Remove REGPARM
  sparc64: implement PCI and ISA irqs
  sparc: reset CPU state on reset
  apb: use normal PCI device header for PBM device
  w64: Fix data type of next_tb and tcg_qemu_tb_exec
  softfloat: fix for C99
  vmstate: fix varrays with uint32_t indexes
  Fix large memory chunks allocation with tcg_malloc.
  hw/pxa2xx.c: Fix handling of pxa2xx_i2c variable offset within region
  hw/pxa2xx_lcd.c: drop target_phys_addr_t usage in device state
  hw/pxa2xx_dma.c: drop target_phys_addr_t usage in device state
  ARM: Remove unnecessary subpage workarounds
  malta: Fix display for LED array
  malta: Use symbolic hardware addresses
  ...

12 years agoMerge remote-tracking branch 'qmp/queue/qmp' into staging
Anthony Liguori [Mon, 19 Mar 2012 13:51:06 +0000 (08:51 -0500)]
Merge remote-tracking branch 'qmp/queue/qmp' into staging

* qmp/queue/qmp:
  qapi: Convert migrate
  Purge migration of (almost) everything to do with monitors
  Error: Introduce error_copy()
  QError: Introduce new errors for the migration command

12 years agospice: fix broken initialization
Alon Levy [Wed, 14 Mar 2012 18:33:37 +0000 (20:33 +0200)]
spice: fix broken initialization

Commit 1b71f7c14fab6f00c2680d4489fbee7baf796e4f moved MODULE_INIT_QOM to
way before MODULE_INIT_MACHINE, thereby breaking assumptions made in
spice-core.c which registered both a type initializer and a machine
intializer.

This fix removes the type registration, and replaces it with calling
qemu_spice_init in vl.c after command line parsing (second pass) is
done, and after timers are armed, required by spice server.

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agohw/qxl.c: Fix compilation failures on 32 bit hosts
Peter Maydell [Fri, 16 Mar 2012 13:50:04 +0000 (13:50 +0000)]
hw/qxl.c: Fix compilation failures on 32 bit hosts

Fix compilation failures on 32 bit hosts (cast from pointer to
integer of different size; %ld expects 'long int' not uint64_t).

Reported-by: Steve Langasek <steve.langasek@canonical.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>