Commit graph

11282 commits

Author SHA1 Message Date
Peter Maydell 059b3527f0 vnc: fix vmware VGA incompatiblities
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTJ/ReAAoJEEy22O7T6HE4qowP/1tx0xpDbB50IxuvamyZCgeg
 w9btoYKTbXFCvPxwvo6MHLkWquo7MjVWCZRjcD1cLeO7c+9Rr5c+PNhaX7hnoJOe
 WFmb1xnug6fUT1AX4kSaAAP/e5WWL9u+L0ByRaNNwh+0mxRLELAzBePS2VmhVUn/
 iUKCpY34+n1KApYIYELSv0QKfZ575wjSupZnW3gqnhtYo+8it+cJRcZEpI1NyZwt
 2CY7mRAEe6YsrZeUNc95GTSDpEcmlaP7uFKigtPlWN8m0qxdFP9zlwLRJO2Ny3/D
 Tm/gNBtdDzXgJ6QqGzXPqyhD5JJPJVQVIXIGOOhMrNmL/nFS8NW0a778CRtKniiB
 T8PW5uZNQvQvQly0oM2WkzMrHVh3AH+Z+Yc+5Q2RHgygJGikR8yhLnAUgVB4UA6i
 +YJ7ZKMYox4v9pE8VahN9mJ98CR/IYdIsbgLuR1F+zYY6iczUYkoXSpnhOtv+DA1
 N+F1v28snF2k8haUTo7+J7ep6oJ1RJ8BYYdpFggpF6Xoq3zD7XHQbPM0gE64iDjR
 7n06VRpMGJjSSq/LgXTpPNH/hL8oYvMKCFFhg+qRm+s7SW5VqNdyi0dZdKSS20BN
 I+l+2o4+VTsKbvw7caCjDc6CXNflBtVSqCcI6XQFBWPM9BUwvXL4WV9nyl3ODQ2I
 0D94LhmT3j8wqpl1z5p5
 =j3EC
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-2' into staging

vnc: fix vmware VGA incompatiblities

# gpg: Signature made Tue 18 Mar 2014 07:23:10 GMT using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"

* remotes/kraxel/tags/pull-vnc-2:
  ui/vnc: fix vmware VGA incompatiblities

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-03-18 16:39:29 +00:00
Peter Maydell 2dda43bacc target-arm queue:
* more A64 Neon instructions
  * fixes to reset CBAR values for A9 and A15 boards
  * fix accesses to PMCR register in -icount mode
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABCAAGBQJTJ3GEAAoJEDwlJe0UNgzevGcP/2ftt3PRACZ9BqUh6s1xBW0/
 /dqcEIildxZYxmTHDH+g5t2ueho+o+qhpmXf+lHO0C+nl86SRm/DVJj+tmuUoWdf
 5BA1eOVjQnvrnmQx72/CS4NI4t0npoYf7Cserkpm9ZOdzweJy68YHZZRVpHLfldS
 Ba7W749EsGPnd5ZEhnplwGSIjM3ZUfixm3yJSsGnHAf6KEskkVKjUUI2lZWecT81
 5f14qN6F7qk7XvH9HGOWZktiKGfaSLVXzZGsmdq6oDVTr+2ZMkoFxn7jMFm4EHtW
 cTDVcwN9Y6tFM2Pm7PIxzXmP9lTc5L+ghVXn9XhuY9OS7ZFD46r/sh3Lkhypq+WP
 SfJaPOG5zZuKkmj+hyO+08hjLxR+TJDIKr26tY62yGrteWN+SkzoJuO6Gn17uuC8
 UhAqjbLuunhSlJA7oy42i7YcR84LXemMCplbqBY/v7W54ZWrxV+QgNKiLtbsIpWF
 tGg8R85jkjE7lV7dfaeK7N+vQjGIMwzT+g9sYyS3zsY0ubFnkIMa04Zn4gMsCheU
 azmyCfQOCmdN71CEEN6rbTWL3AtWw2Oss1RxK1iQu5J8+YgC2TvNsb4hE4K5KctX
 utvoPoVScBWZvvX2zvMv43+qz74arSTOxuBCMW9Gf0pEQA1cT0GdYzRrb3g+8CCp
 n3GuAoTMj2d72c2WO36I
 =YFAg
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140317' into staging

target-arm queue:
 * more A64 Neon instructions
 * fixes to reset CBAR values for A9 and A15 boards
 * fix accesses to PMCR register in -icount mode

# gpg: Signature made Mon 17 Mar 2014 22:04:52 GMT using RSA key ID 14360CDE
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"

* remotes/pmaydell/tags/pull-target-arm-20140317: (30 commits)
  scripts/qemu-binfmt-conf.sh: Add AArch64 registration
  target-arm: A64: Add [UF]RSQRTE (reciprocal root estimate)
  target-arm: A64: Implement FCVTXN
  target-arm: A64: Implement scalar saturating narrow ops
  target-arm: A64: Move handle_2misc_narrow function
  target-arm: A64: Implement AdvSIMD reciprocal estimate insns URECPE, FRECPE
  softfloat: export squash_input_denormal functions
  target-arm: A64: Implement FCVTZS, FCVTZU in the shift-imm categories
  target-arm: A64: Handle saturating left shifts SQSHL, SQSHLU, UQSHL
  exec-all.h: Increase MAX_OP_PER_INSTR for ARM A64 decoder
  target-arm: A64: Implement FRINT*
  target-arm: A64: Implement SRI
  target-arm: A64: Add FRECPX (reciprocal exponent)
  target-arm: A64: List unsupported shift-imm opcodes
  target-arm: A64: Implement FCVTL
  target-arm: A64: Implement FCVTN
  target-arm: A64: Implement FCVT[NMAPZ][SU] SIMD instructions
  target-arm: A64: Implement SHLL, SHLL2
  target-arm: A64: Implement SADDLP, UADDLP, SADALP, UADALP
  target-arm: A64: Saturating and narrowing shift ops
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-03-18 14:31:42 +00:00
Peter Lieven 2f487a3d40 ui/vnc: fix vmware VGA incompatiblities
this fixes invalid rectangle updates observed after commit 12b316d
with the vmware VGA driver. The issues occured because the server
and client surface update seems to be out of sync at some points
and the max width of the surface is not dividable by
VNC_DIRTY_BITS_PER_PIXEL (16).

Reported-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-18 08:21:24 +01:00
Christian Borntraeger 4f3ed190a6 s390x/sclpconsole-lm: Fix and simplify irq setup
valgrind complains about a memory leak in irq setup of sclpconsole:

==42117== 8 bytes in 1 blocks are definitely lost in loss record 89of 833
==42117==    at 0x4031AFE: malloc (vg_replace_malloc.c:292)
==42117==    by 0x8022F855: malloc_and_trace (vl.c:2715)
==42117==    by 0x4145569: g_malloc (in /usr/lib64/libglib-2.0.so.0.3400.2)
==42117==    by 0x800F696D: qemu_extend_irqs (irq.c:51)
==42117==    by 0x800F6AF7: qemu_allocate_irqs (irq.c:68)
==42117==    by 0x800F5685: console_init (sclpconsole.c:235)
==42117==    by 0x80297C79: event_realize (event-facility.c:386)
==42117==    by 0x80105071: device_set_realized (qdev.c:693)
==42117==    by 0x801CDC4B: property_set_bool (object.c:1337)
 ==42117==    by 0x801CBD7F: object_property_set (object.c:819)
[...]

We dont need the indirection of an qemu irq to inject an slcp interrupt.
Fixes a valgrind error and makes the code simpler.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
2014-03-17 22:01:19 +01:00
Christian Borntraeger b074e62205 s390x/sclpconsole: Fix and simplify interrupt injection
valgrind complains about a memory leak in irq setup of sclpconsole:

==42117== 8 bytes in 1 blocks are definitely lost in loss record 89 of 833
==42117==    at 0x4031AFE: malloc (vg_replace_malloc.c:292)
==42117==    by 0x8022F855: malloc_and_trace (vl.c:2715)
==42117==    by 0x4145569: g_malloc (in /usr/lib64/libglib-2.0.so.0.3400.2)
==42117==    by 0x800F696D: qemu_extend_irqs (irq.c:51)
==42117==    by 0x800F6AF7: qemu_allocate_irqs (irq.c:68)
==42117==    by 0x800F5685: console_init (sclpconsole.c:235)
==42117==    by 0x80297C79: event_realize (event-facility.c:386)
==42117==    by 0x80105071: device_set_realized (qdev.c:693)
==42117==    by 0x801CDC4B: property_set_bool (object.c:1337)
==42117==    by 0x801CBD7F: object_property_set (object.c:819)
[...]

Turns out that we actually dont need the indirection, so trigger the
sclp interrupt directly.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
2014-03-17 22:01:19 +01:00
Christian Borntraeger 7b53f2940e s390x/cpu hotplug: Fix memory leak
valgrind complains about the following:
==42117== 8 bytes in 1 blocks are definitely lost in loss record 88 of 833
==42117==    at 0x4031AFE: malloc (vg_replace_malloc.c:292)
==42117==    by 0x8022F855: malloc_and_trace (vl.c:2715)
==42117==    by 0x4145569: g_malloc (in /usr/lib64/libglib-2.0.so.0.3400.2)
==42117==    by 0x800F696D: qemu_extend_irqs (irq.c:51)
==42117==    by 0x800F6AF7: qemu_allocate_irqs (irq.c:68)
==42117==    by 0x8029FA4B: irq_cpu_hotplug_init (sclpcpu.c:84)
==42117==    by 0x80297C79: event_realize (event-facility.c:386)
==42117==    by 0x80105071: device_set_realized (qdev.c:693)
[...]

Right it is. Don't drop the pointer of the irq.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Jason J. Herne <jjherne@us.ibm.com>
2014-03-17 22:01:19 +01:00
Christian Borntraeger 0a1bec8a4e s390/ipl: Fix error path on BIOS loading
commit 18674b2678
(elf-loader: add more return codes) enabled the elf loader to return
other errors than -1.

Lets also handle that case for our "BIOS" on s390.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
CC: Alexey Kardashevskiy <aik@ozlabs.ru>
CC: Alexander Graf <agraf@suse.de>
2014-03-17 22:01:19 +01:00
Peter Maydell ba7500852d virt: Set reset-cbar on CPUs
Set the reset-cbar property on CPUs used by the virt board,
if they have it. This isn't necessary for correct functioning
under Linux (since the A9 isn't a valid CPU for the virt board),
but it is the correct behaviour.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 1394462692-8871-5-git-send-email-peter.maydell@linaro.org
2014-03-17 16:31:46 +00:00
Peter Maydell 4719ab918a exynos4210: Set reset-cbar property of Cortex-A9 CPUs
Set the reset-cbar property of the Exynos4210 SoC's Cortex-A9
CPUs, so that Linux doesn't misrecognize them as a broken
uniprocessor SoC.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 1394462692-8871-4-git-send-email-peter.maydell@linaro.org
2014-03-17 16:31:46 +00:00
Peter Maydell b5a3ca3e30 realview-pbx-a9: Set reset-cbar property for CPUs
If the CPU is a Cortex-A9 then we should set its reset-cbar property
so that the guest can read the correct PERIPHBASE/CBAR register value;
newer versions of the Linux kernel (as of commit bc41b8724 in 3.12)
will otherwise assume the CPU is a buggy single core A9 SoC. The
realview-pbx-a9 is the only one of the cluster of boards in realview.c
which works with the Cortex-A9 (ie which gets an a9mpcore_priv device);
make sure it also has reset-cbar set correctly.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 1394462692-8871-3-git-send-email-peter.maydell@linaro.org
2014-03-17 16:31:45 +00:00
Peter Maydell 9948c38bd9 vexpress: Set reset-cbar property for CPUs
Newer versions of the Linux kernel (as of commit bc41b8724 in 3.12)
now assume that if the CPU is a Cortex-A9 and the reset value of the
PERIPHBASE/CBAR register is zero then the CPU is a specific buggy
single core A9 SoC, and will not try to start other cores. Since we
now have a CPU property for the reset value of the CBAR, we can
just fix the vexpress board model to correctly set CBAR so SMP
works again. To avoid duplicate boilerplate code in both the A9
and A15 daughterboard init functions, we split out the CPU and
private memory region init to its own function.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reported-by: Rob Herring <rob.herring@linaro.org>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 1394462692-8871-2-git-send-email-peter.maydell@linaro.org
2014-03-17 16:31:45 +00:00
Fabien Chouteau 9c749e4dbe FSL eTSEC: Fix typo in rx ring
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-03-15 13:54:18 +04:00
Stefan Weil 69df1c3c9d audio: Add 'static' attributes to several variables
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-03-15 13:54:18 +04:00
Stefan Weil 3b163b0165 misc: Fix typos in comments
Codespell found and fixed these new typos:

* doesnt -> doesn't
* funtion -> function
* perfomance -> performance
* remaing -> remaining

A coding style issue (line too long) was fixed manually.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-03-15 13:54:18 +04:00
Sebastian Huber 9d5614d582 hw/timer/grlib_gptimer: Avoid integer overflows
The GPTIMER uses 32-bit registers.  Use a 64-bit operation to get the
ptimer count, otherwise we end up with a count of 0 for GPTIMER counter
values of 0xffffffff.

Use the GPTIMER counter value for tracing to avoid an overflow of the
32-bit value passed to trace_grlib_gptimer_enable().

Reviewed-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-03-15 13:54:18 +04:00
Paolo Bonzini aa7a6a399f virtio-scsi: actually honor sense_size from configuration space
We were always truncating the sense size to 96 bytes.

Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-03-14 13:38:03 +01:00
Fam Zheng 2e323f03bf scsi: Fix migration of scsi sense data
c5f52875 changed the size of sense array in vmstate_scsi_device by
mistake. This patch restores the old size, and add a subsection for the
remaining part of the buffer size. So that migration is not broken.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-03-14 10:06:55 +01:00
Alexey Kardashevskiy 22956a3755 spapr-vscsi: fix CRQ status
Normally VIOSRP_OK (0) means success and non-zero value means error
except VIOSRP_OK2 (0x99) which is another success code by weird accident.

This uses 0 as success code always as some guests do not cope with
the 0x99 value well. The existing linux driver checks for both VIOSRP_OK
and VIOSRP_OK2 since 2.6.32.

This returns non-zero code (VIOSRP_ADAPTER_FAIL == 0x10) on errors which
can only happen if DMA write failed.

Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-03-14 10:06:55 +01:00
Peter Maydell b19fc63cad QOM/QTest infrastructure fixes
* QOM cast fix for virtserialport and regression test
 * QTest error handling fix
 * QTest output cleanup
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTIhh2AAoJEPou0S0+fgE/6jAP/362k1KrTFe5edcdBEJE6IgI
 FssJBenl/A8eKbfhbeLWK4I3q1RZJb8oDfSVDFpwmgSIknmYFAldDS+Ju/UePX/9
 PikS9CYjBnDMmWBnmFAhgRtCrDq3gazu2c7hicBdnLemFD/1CaBkL65VNIwvXEvY
 KUYtleABUr6YbmjgMYtf8gCUZjYBcI5tw2ZgG6T0jgZRqPPGsEozKxBTctM9PIuW
 LtQdLDvhD2rfJAeDTG4jrTCeDBrgJCs8UGXDaNctMBwsESMQBuCjW0TeVsmdI0Qp
 P/y30N3HDfQfhuMkJk8Udm8iiOs1LX0YNRi08aeHOYxoWb3dc9C3mtLMFU8UYTLP
 ddpJZ5WEOVt42rsZvtmnwdv6kGBkbphcIzCP56eJN0w+HallKQf6qusRH04nO3GM
 ISr+1xIfchl1CzXdP41AiHrodfCDozROhItz+SgIynJGs1kFOETsjJQhHCUutDx+
 u4Y8+NGDVRxd2a0h0eLYwqqt8ObpBs8a0+Xnsr7HEES6zPg0eN7VPe9x3jR3TFZN
 trvKCDiV9zycrC82wlwx6z+KFrFPJE+9yvzGlELyDhw0McBtCpt9VaEk94jEWkK5
 tSs1AsIehAom8oMTZweU28TZwiS4p2bLuJfLlw99E0cnGqOvMr8dmvbcVLOmIPZl
 oFy0sTD3JECuYa1wR8dI
 =WXjm
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-2.0' into staging

QOM/QTest infrastructure fixes

* QOM cast fix for virtserialport and regression test
* QTest error handling fix
* QTest output cleanup

# gpg: Signature made Thu 13 Mar 2014 20:43:34 GMT using RSA key ID 3E7E013F
# gpg: Good signature from "Andreas Färber <afaerber@suse.de>"
# gpg:                 aka "Andreas Färber <afaerber@suse.com>"

* remotes/afaerber/tags/qom-devices-for-2.0:
  main-loop: Suppress "I/O thread spun" warnings for qtest
  qtest: Fix crash if SIGABRT during qtest_init()
  virtio-console-test: Test virtserialport as well
  virtio-console: Fix VIRTIO_CONSOLE() cast macro

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-03-13 21:50:40 +00:00
Peter Maydell 90c5d39cb8 PowerPC queue for 2.0
* Fixes for -device VGA
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTIg2YAAoJEPou0S0+fgE/3ckP/0ZS6CIpOnQp83t8jPnXjhGJ
 ztS2J7yxxCzcCqw97IjyHO/tOJXL5Bw1XUt1G9dDgAIr/4ZRqL2iI3ltH4MyX/lQ
 Zvdfua9VSACQrbH0S29sh5tJFt0jZ3zbLN9V/SUZ56r+04WaSy3ij8zEvEirebi1
 CdQu3vT6pymgvnRkGaXel9RqCjMj4MpZcu54uRKC+YmF5HcfHobj5tUi36iB3KJV
 YYVAUwmTAEsS46msSWSX0O9SilJTyNPI343K58BDb5oOeiJBr9cXKqRG78sVawzW
 zkDYsuU61ZIMJvGcFA2IgJaFO8T3if7isVgmoAPD3VWz0VJFN0KEa1UGA04tLdr7
 3FsRHjU6mJeGJnQMQ29g2U4/jxbpC5djFQzCStM9vJ8klJhxy8uT+9hqf+gNUB1N
 a8Whng+wnJz5AgkQ9tLK2XbWHTUKnOgbU+8Nxg30qA0MNHEGLA2mbViVnQf7R1+v
 qQu8HjFnHhe5fH9P8RYkOTctkNKOjkr4zN9xaPEkq8vfENMmveIQKGdIGzcSOFC8
 tMMAsHLqzKsvNm6IKhjgbclk/z+MjJXy3sirWtOw1qEVuzbGbjmkdVBPfLKLxLPQ
 ihnQReNxX86vrbWkQZNahLmql1NqYJN9bP/J1DRLmhNeWqsZdW+aG08vyHfysJFy
 j8o0/JYAq0Ljh4lClt/a
 =f+Kw
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/afaerber/tags/ppc-for-2.0' into staging

PowerPC queue for 2.0

* Fixes for -device VGA

# gpg: Signature made Thu 13 Mar 2014 19:57:12 GMT using RSA key ID 3E7E013F
# gpg: Good signature from "Andreas Färber <afaerber@suse.de>"
# gpg:                 aka "Andreas Färber <afaerber@suse.com>"

* remotes/afaerber/tags/ppc-for-2.0:
  spapr: Fix return value of vga initialization
  Fix vga_interface_type for command line argument '-device VGA'

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-03-13 21:27:54 +00:00
Andreas Färber be21c33616 virtio-console: Fix VIRTIO_CONSOLE() cast macro
Commit 0399a3819b (virtio-console: QOM
cast cleanup for VirtConsole) broke virtserialport since it shares
functions and state struct with virtconsole. Let virtconsole inherit
from virtserialport, and use virtserialport type for casting.

Note that virtio-serial-port is the abstract base type in
virtio-serial-bus.c, whereas virtserialport is the user-instantiatable
type in virtio-console.c. Therefore using TYPE_VIRTIO_CONSOLE_SERIAL_PORT.

Reported-by: Richard W.M. Jones <rjones@redhat.com>
Acked-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 21:12:07 +01:00
Peter Maydell 8bf0975902 PReP machine and devices
* ppc_rom.bin update
 * Raven PCI host bridge preparations for OpenBIOS
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTIgblAAoJEPou0S0+fgE/kO0P/0QCzC8omYaBg5jTJvYLQhvw
 CQ1gOPp4HzundgK1fLXPhBOD6JhXK1uS0QnkwnrpnU69nSKL2snCdfb6rrN4BQRe
 L0MFjJmSQHW528DfUf4KbUhl+XeOZPiEnxjwXCUQdcVjVl1uo3DJHt1cur8adESW
 yoYxLbvMhkVxA3hhIXR/lZNiQBZVIxQ1DM92hgPtttiTEuC0yf+Ke9acyKrehi72
 xr5Ke2b6Osq3mR51X+8LOhmxV5zSmCEndP3gTHQ6ma1kOZ1Q0mbomrFjuhS6dWI0
 nNxi47A6roKLrwLH/ZMADaqJ1nviBWCQsNoKSwuT+rxLltvXhipY05pCRcTX0HQ8
 1Be9rcx83jEJnZMijwSComkML9W7e/fwFj6d3Au+t+k9xQwBj9iphR6u+gekgVwZ
 JxElpx2agjuEkKjCfL5oNBKJfXeAPDFGvtTYX85PHAHAHseZ1ygTBK8zBJ86JT2Q
 fUWTfZplPWmu8TFqeEyY7oYW2rMRtylblF3XC1G4NrvAvcAJvSTDpdPnNnuHgEf8
 aSISKxYJhea0mjIbqn/064yZfVYBGPzA5x8gsm0z4zetPtq7qo3LZjwzkwbsMQOW
 xNycQufNiIn+nMKWEf8SQj3alNNaFhltbRju2W8B+Rn2LVplOEB72frZ/lx5ea7F
 NMLotmkJV1fi9WZeIF63
 =rkuo
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/afaerber/tags/prep-for-2.0' into staging

PReP machine and devices

* ppc_rom.bin update
* Raven PCI host bridge preparations for OpenBIOS

# gpg: Signature made Thu 13 Mar 2014 19:28:37 GMT using RSA key ID 3E7E013F
# gpg: Good signature from "Andreas Färber <afaerber@suse.de>"
# gpg:                 aka "Andreas Färber <afaerber@suse.com>"

* remotes/afaerber/tags/prep-for-2.0:
  raven: Move BIOS loading from board code to PCI host
  prep: Update ppc_rom.bin

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-03-13 20:09:11 +00:00
Mark Wu 7effdaa321 spapr: Fix return value of vga initialization
Before spapr_vga_init will returned false if the vga is specified by
the command '-device VGA' because vga_interface_type was evaluated to
VGA_NONE. With the change in previous patch of this series,
spapr_vga_init should return true if it's told that the vga will be
initialized in flow of the generic devices initialization.

To keep '-nodefaults' have the semantics of bare minimum, it adds a
check of 'has_defaults' in usb_enabled() to avoid that a USB controller
is added by '-nodefautls, -device VGA' implicitly.

This patch also makes two cleanups:
1. skip initialization for VGA_NONE
2. remove the useless 'break'

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mark Wu <wudxw@linux.vnet.ibm.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 20:53:28 +01:00
Hervé Poussineau d0b2542574 raven: Move BIOS loading from board code to PCI host
Raven datasheet explains where firmware lives in system memory, so do
it there instead of in board code. Other boards using the same PCI
host will not have to copy the firmware loading code.

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
[AF: Drop BIOS size workaround in favor of replacing our firmware blob]
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2014-03-13 20:15:37 +01:00
Andreas Färber 00c8cb0a36 cputlb: Change tlb_flush() argument to CPUState
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 19:52:47 +01:00
Andreas Färber 0ea8cb8895 cpu-exec: Change cpu_resume_from_signal() argument to CPUState
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 19:20:48 +01:00
Andreas Färber 648f034c6c translate-all: Change tb_gen_code() argument to CPUState
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 19:20:48 +01:00
Andreas Färber 3f38f309b2 translate-all: Change cpu_restore_state() argument to CPUState
This lets us drop some local variables in tlb_fill() functions.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 19:20:47 +01:00
Andreas Färber 27103424c4 cpu: Move exception_index field from CPU_COMMON to CPUState
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 19:20:46 +01:00
Andreas Färber 93afeade09 cpu: Move mem_io_{pc,vaddr} fields from CPU_COMMON to CPUState
Reset them.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 19:20:46 +01:00
Eduardo Habkost ef02ef5f45 target-i386: Enable x2apic by default on KVM
When on KVM mode, enable x2apic by default on all CPU models.

Normally we try to keep the CPU model definitions as close as the real
CPUs as possible, but x2apic can be emulated by KVM without host CPU
support for x2apic, and it improves performance by reducing APIC access
overhead. x2apic emulation is available on KVM since 2009 (Linux
2.6.32-rc1), there's no reason for not enabling x2apic by default when
running KVM.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 19:01:49 +01:00
Eduardo Habkost 8fb4f821e9 target-i386: Introduce x86_cpu_compat_disable_kvm_features()
Instead of the feature-specific disable_kvm_pv_eoi() function, create a
more general function that can be used to disable other feature bits in
machine-type compat code.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 19:01:49 +01:00
Andreas Färber 33276f1b9c target-ppc: Clean up ENV_GET_CPU() usage
Commits fdfba1a298,
ab1da85791,
f606604f1c and
2c17449b30 added usages of ENV_GET_CPU()
macro in target-specific code.

Use ppc_env_get_cpu() instead.

Cc: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 19:01:48 +01:00
Peter Maydell 57fac92c2d Block pull request
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJTIbe5AAoJEJykq7OBq3PI0/AH/jglW+rsN+0/kAr5wIY4BQUn
 qvzYHBP9xvPtd0cGubTt2N3bZPlb/zTVFe/OOpJmaENrVJY/rPZNF3nKqdrr5uOP
 WrBbQZi2hkOG82uuiN2BiGh324zOMBNSh3d2WaHmJpxjabZcjN28UOkx5WGlBImu
 VAHY/HaImOLMkS120GxbMsFziXRLM66o9XWEbA/l0EBOISM6KloX6mtZd7y6MGzA
 a35JbUueyRo+hvndFEHY2P2XvUc5ZycOYF2yOz59X5QrqhmP6I+Ym4ohtyO2Olga
 jpoAO7jDpV/7PJwo1xC8j+1jhl3VGdX2L7iWgDUTJ0jY8mV3hQWhy58fOEwYY+k=
 =0llk
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging

Block pull request

# gpg: Signature made Thu 13 Mar 2014 13:50:49 GMT using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/block-pull-request: (24 commits)
  block/raw-win32: bdrv_parse_filename() for hdev
  block/raw-posix: Strip protocol prefix on creation
  block/raw-posix: bdrv_parse_filename() for cdrom
  block/raw-posix: bdrv_parse_filename() for floppy
  block/raw-posix: bdrv_parse_filename() for hdev
  qemu-io: Fix warnings from static code analysis
  block: Unlink temporary file
  qcow2: Don't write with BDRV_O_INCOMING
  qcow2: Keep option in qcow2_invalidate_cache()
  qmp: add query-iothreads command
  iothread: stash thread ID away
  dataplane: replace internal thread with IOThread
  iothread: add "iothread" qdev property type
  qdev: make get_pointer() handle temporary strings
  iothread: add I/O thread object
  aio: add aio_context_acquire() and aio_context_release()
  rfifolock: add recursive FIFO lock
  object: add object_get_canonical_path_component()
  block: Rewrite the snapshot authorization mechanism for block filters.
  iotests: Test corruption during COW request
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-03-13 15:33:04 +00:00
Stefan Hajnoczi 48ff269272 dataplane: replace internal thread with IOThread
Today virtio-blk dataplane uses a 1:1 device-per-thread model.  Now that
IOThreads have been introduced we can generalize this to N:M devices per
threads.

This patch drops thread code from dataplane in favor of running inside
an IOThread AioContext.

As a bonus we solve the case where a guest keeps submitting I/O requests
while dataplane is trying to stop.  Previously the dataplane thread
would continue to process requests until the request gave it a break.
Now we can shut down in bounded time thanks to
aio_context_acquire/release.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13 14:42:24 +01:00
Stefan Hajnoczi 6e4a876b43 iothread: add "iothread" qdev property type
Add a "iothread" qdev property type so devices can be hooked up to an
IOThread from the comand-line:

  qemu -object iothread,id=iothread0 \
       -device some-device,x-iothread=iothread0

Note that Paolo Bonzini <pbonzini@redhat.com> has suggested using QOM
links instead.  This way the relationship between the objects is
reflected in QOM.  There are currently shortcomings of
object_property_add_link() which prevent this use case.  I will attempt
to fix them and move to QOM links in a separate series.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13 14:42:24 +01:00
Igor Mammedov 7d1de46448 qdev: make get_pointer() handle temporary strings
get_pointer()'s print() callback might return a heap allocated
string, to avoid adding dedicated get_pointer_foo for this case
convert current print() callbacks to return temporary heap
allocated string and make get_pointer() free it.

Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13 14:42:24 +01:00
Peter Maydell be86c53c05 PowerPC queue for 2.0-rc0
* QEMUMachine include cleanup
 * SLOF update
 * XICS reset fix
 * sPAPR PCI host bridge refactorings
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTIR0LAAoJEPou0S0+fgE/4rMP/ReyYRPSXFFu2PXt2werCYcA
 P5Agynib/O5LXTBgZCOSkTrRYBE2+5bq3Zp3iQe7gkLrpbRjHJLulwBpFW3rlVQO
 5IWxMoFC1eW+PE9k+V0hRdTFXMfVxvvHam3g77XVGb4lm/thwHkQ2RYa7z1V4zCP
 hbj/gVdZA7pzXQZfLnOU6illaVCBjYeajEle5sagLlN+DANFSm3G/BdYWPTtxKxq
 MLiMEdaZJkBG/NG3zocyuCsWeF+oLyh8fB4IQUjORq7x8v749DgprQjFUy3YMrB5
 Ph5CQXyVyyiZSXmfbdINMpQPxdPaVm2rtBD9ol7p+mXtc6UOS3uzbFQ75XXiG401
 crqDpc74iXYpxmwtSs9FwD8TFqh5n8NFGEN8U3MOkhcNQ3zdjnlbVRMG1aqFIUne
 SbQeWC5Qg3MI7UruStq9n3l/3SL3KJSRRrT11ndO/4UoHT6PZfBKQ4eCD8XiHmPu
 /p0ahfnl8/UvMyTWVJhBvLt5G6+v8aumKJR/47jhrPnqLFCk4yUDbCdT5a5KSDjt
 ZauyfGlIQcORXKRbVw+DRgSQjeGLoQJMtOVqDXnKwS8j8cuhF2JebBCVTPHHjC72
 UTRYk5/tLjcZCLD7Vscpd4uRiuz69xJu/MCvwqUwSZ3TssuoW3Vl0/giLyajMxTU
 RLn0uLaFguDX+DoSNIAy
 =icAj
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/afaerber/tags/ppc-for-2.0' into staging

PowerPC queue for 2.0-rc0

* QEMUMachine include cleanup
* SLOF update
* XICS reset fix
* sPAPR PCI host bridge refactorings

# gpg: Signature made Thu 13 Mar 2014 02:50:51 GMT using RSA key ID 3E7E013F
# gpg: Good signature from "Andreas Färber <afaerber@suse.de>"
# gpg:                 aka "Andreas Färber <afaerber@suse.com>"

* remotes/afaerber/tags/ppc-for-2.0:
  spapr-pci: Convert fprintf() to error_report()
  spapr-pci: Convert to QOM realize
  xics-kvm: Fix reset function
  pseries: Update SLOF firmware image to qemu-slof-20140304
  Move QEMUMachine typedef to qemu/typedefs.h
  Revert "KVM: Split QEMUMachine typedef into separate header"

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-03-13 13:19:46 +00:00
Alexey Kardashevskiy 295d51aa6a spapr-pci: Convert fprintf() to error_report()
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Mike Day <ncmike@ncultra.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 03:49:48 +01:00
Alexey Kardashevskiy c6ba42f6bc spapr-pci: Convert to QOM realize
This converts the old-style SysBusDevice::init() callback to a new-style
DeviceClass::realize() callback.

As a part of conversion, this replaces fprintf(stderr) with error_setg()
as realize() does not "return" any value, instead it puts the extended
error into **errp.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Mike Day <ncmike@ncultra.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 03:49:48 +01:00
Alexey Kardashevskiy fb0e843a11 xics-kvm: Fix reset function
Currently interrupt priorities are set to 0 (highest) at the very
beginning of the guest execution which is not correct and makes the guest
produce random interrupt error messages such as:
"Interrupt 0x1001 (real) is invalid, disabling it".
This also prevents interrupt states from correct migration.

This initializes priority to 0xFF as the emulated XICS does.

Suggested-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 03:49:48 +01:00
Bandan Das d2f69df746 pci: Move VMState registration/unregistration to QOM realize/unrealize
Use the realize and unrealize hooks to register and unregister
vmstate_pcibus respectively.

Relocate some stuff to avoid forward declarations.

Signed-off-by: Bandan Das <bsd@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
[AF: Keep using PCI_BUS() cast macro]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 01:21:57 +01:00
Bandan Das 5c21ce77d7 qdev: Realize buses on device realization
Integrate (un)realization of child buses with realization/unrealization
of the device hosting them. Code in device_unparent() is reordered for
unrealization of buses to work as part of device unrealization.

That way no changes need to be made to bus instantiation.

Signed-off-by: Bandan Das <bsd@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 01:21:57 +01:00
Bandan Das 02e7f85dac qdev: Prepare realize/unrealize hooks for BusState
Add a "realized" property calling realize/unrealize hooks as for devices.

Signed-off-by: Bandan Das <bsd@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 01:21:57 +01:00
Andreas Färber 2ef66625f3 virtio-serial-port: Convert to QOM realize/unrealize
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 01:21:57 +01:00
Andreas Färber 0399a3819b virtio-console: QOM cast cleanup for VirtConsole
Introduce type constant, cast macro and rename parent field.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 01:21:57 +01:00
Marcel Apfelbaum 36d20cb2b3 hw/core: Introduce QEMU machine as QOM object
The main functional change is to convert QEMUMachine into MachineClass
and QEMUMachineInitArgs into MachineState, instance of MachineClass.

As a first step, in order to make possible an incremental development,
both QEMUMachine and QEMUMachineInitArgs are being embedded into the
new types.

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-12 20:13:02 +01:00
Alexey Kardashevskiy 1b8601b0ea spapr-pci: Change the default PCI bus naming
Previously libvirt required the first/default PCI bus to have name "pci".
Since QEMU can support multiple buses now, libvirt wants "pci.0" now.

This removes custom bus name and lets QEMU make up default names.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-12 20:13:02 +01:00
Peter Crosthwaite cdccf7d7e7 block/m25p80: Remove FROM_SSI_SLAVE() usages
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
[AF: Rename parent field]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-12 20:13:02 +01:00
Peter Crosthwaite 7c77b654c5 misc/max111x: QOM casting sweep
Define and use QOM cast macro. Removes some usages of legacy casting
systems.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
[AF: Rename parent field]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-12 20:13:02 +01:00