Commit Graph

55369 Commits

Author SHA1 Message Date
Peter Maydell
72b384f4a7 mmio-interface: Mark as not user creatable
The mmio-interface device is not something we want to allow
users to create on the command line:
 * it is intended as an implementation detail of the memory
   subsystem, which gets created and deleted by that
   subsystem on demand; it makes no sense to create it
   by hand on the command line
 * it uses a pointer property 'host_ptr' which can't be
   set on the command line

Mark the device as not user_creatable to avoid confusion.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1502807418-9994-1-git-send-email-peter.maydell@linaro.org
Reviewed-by: Thomas Huth <thuth@redhat.com>
2017-08-15 17:42:02 +01:00
Alistair Francis
4a2fdb78e7 target/arm: Require alignment for load exclusive
According to the ARM ARM exclusive loads require the same alignment as
exclusive stores. Let's update the memops used for the load to match
that of the store. This adds the alignment requirement to the memops.

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20170815145714.17635-4-richard.henderson@linaro.org
[rth: Require 16-byte alignment for 64-bit LDXP.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-15 17:38:44 +01:00
Richard Henderson
19514cde3b target/arm: Correct load exclusive pair atomicity
We are not providing the required single-copy atomic semantics for
the 64-bit operation that is the 32-bit paired load.

At the same time, leave the entire 64-bit value in cpu_exclusive_val
and stop writing to cpu_exclusive_high.  This means that we do not
have to re-assemble the 64-bit quantity when it comes time to store.

At the same time, drop a redundant temporary and perform all loads
directly into the cpu_exclusive_* globals.

Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20170815145714.17635-3-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-15 17:38:44 +01:00
Alistair Francis
955fd0ad5d target/arm: Correct exclusive store cmpxchg memop mask
When we perform the atomic_cmpxchg operation we want to perform the
operation on a pair of 32-bit registers. Previously we were just passing
the register size in which was set to MO_32. This would result in the
high register to be ignored. To fix this issue we hardcode the size to
be 64-bits long when operating on 32-bit pairs.

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Tested-by: Portia Stephens <portia.stephens@xilinx.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20170815145714.17635-2-richard.henderson@linaro.org
Message-Id: <bc18dddca56e8c2ea4a3def48d33ceb5d21d1fff.1502488636.git.alistair.francis@xilinx.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-15 16:11:22 +01:00
Paolo Bonzini
47025a0193 qxl: call qemu_spice_display_init_common for secondary devices
Fixes this 2.10 regression:

  $ qemu-system-x86_64  -cpu host -m 6144 -vga qxl -device qxl
  qemu-system-x86_64: util/qemu-thread-posix.c:64: qemu_mutex_lock: Assertion `mutex->initialized' failed.

Reported-by: ademaria@redhat.com
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20170814231552.24593-1-pbonzini@redhat.com
Cc: kraxel@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-15 15:04:51 +01:00
Peter Maydell
81a6a2d48a -----BEGIN PGP SIGNATURE-----
iQEcBAABAgAGBQJZkvbGAAoJEJykq7OBq3PI7boH/R80wRA3VDhOafoTTzCvPt72
 9I58RQDyLQPwVTbkh1M21i1sAhhm1W1CmgMkCgMYIbNY9dmMZtlYhPoJDvG5KD3d
 PtJCzt21TKerI7CdEabIlK2+EYu/a9uDa/HBkPmz/r4nwSpo3vB4dxv3oWS60yf3
 zdZhQ1r5ecXL3AkS9XE0OuWCCZvOsSJyHUzNdMI6mYZUS7wTV2mFBUYeeliViOyG
 pzg5bO7PdMl0vPoy9tGKzVQDpOyHAWiiQumAehUn9+oIV1UkuQUWhWTcD1T6oma+
 S57qjpK8jLWWCgaYVXnGlsA4HFn4CwKT/UxjukZU1tq7L2D0YR+hm20wiP63KXo=
 =fD2o
 -----END PGP SIGNATURE-----

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

# gpg: Signature made Tue 15 Aug 2017 14:27:34 BST
# gpg:                using RSA key 0x9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/tracing-pull-request:
  simpletrace: fix flight recorder --no-header option
  trace: use static event ID mapping in simpletrace.stp

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-15 14:29:03 +01:00
Stefan Hajnoczi
840d835177 simpletrace: fix flight recorder --no-header option
The simpletrace.py script can pretty-print flight recorder ring buffers.
These are not full simpletrace binary trace files but just the end of a
trace file.  There is no header and the event ID mapping information is
often unavailable since the ring buffer may have filled up and discarded
event ID mapping records.

The simpletrace.stp script that generates ring buffer traces uses the
same trace-events-all input file as simpletrace.py.  Therefore both
scripts have the same global ordering of trace events.  A dynamic event
ID mapping isn't necessary: just use the trace-events-all file as the
reference for how event IDs are numbered.

It is now possible to analyze simpletrace.stp ring buffers again using:

  $ ./simpletrace.py trace-events-all path/to/ring-buffer

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 20170815084430.7128-3-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-08-15 12:50:29 +01:00
Stefan Hajnoczi
d6b76d6805 trace: use static event ID mapping in simpletrace.stp
This is a partial revert of commit
7f1b588f20 ("trace: emit name <-> ID
mapping in simpletrace header"), which broke the SystemTap flight
recorder because event mapping records may not be present in the ring
buffer when the trace is analyzed.  This means simpletrace.py
--no-header does not know the event ID mapping needed to pretty-print
the trace.

Instead of numbering events dynamically, use a static event ID mapping
as dictated by the event order in the trace-events-all file.

The simpletrace.py script also uses trace-events-all so the next patch
will fix the simpletrace.py --no-header option to take advantage of this
knowledge.

Cc: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 20170815084430.7128-2-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-08-15 12:50:29 +01:00
Peter Maydell
c4a6a8887c -----BEGIN PGP SIGNATURE-----
iQFEBAABCAAuFiEEUAN8t5cGD3bwIa1WyjViTGqRccYFAlmS0fwQHGZhbXpAcmVk
 aGF0LmNvbQAKCRDKNWJMapFxxpmuB/94sfeSRzzyELILrZHXWPMfADO8MU0jlZRz
 +h6pJ3z0ebRgOdpXYie8Aq9Xrp1eSF7MuZVgbPkMdMqB3tUhNU+yiv05wmUj0eZs
 4auFmYc0jLs6BqRflPHq4+DOxZ+KVULWCo8fa8+WhHbLjBlBQpUqBDEI++WEB2O6
 ZGLvBaT7XvERHF4DqB8g2VfD0qaMp7Nh/h4EV0eR83S0mn6To8wrl0Gaim8Isyl2
 1/Do2jku9eyltcih67ecL/vnUpcQ/2F9pgdhevpOWEWd5ov23pkI6kZr/V6UHL4J
 8EHl9mjbkE8tuDCF98KukyNZgPW0SKaArq2J2ADiYTRtWsWnoevQ
 =YYke
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/famz/tags/build-and-test-pull-request' into staging

# gpg: Signature made Tue 15 Aug 2017 11:50:36 BST
# gpg:                using RSA key 0xCA35624C6A9171C6
# gpg: Good signature from "Fam Zheng <famz@redhat.com>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 5003 7CB7 9706 0F76 F021  AD56 CA35 624C 6A91 71C6

* remotes/famz/tags/build-and-test-pull-request:
  docker: add centos7 image
  docker: install more packages on CentOS to extend code coverage
  docker: add Xen libs to centos6 image
  docker: use one package per line in CentOS config
  Makefile: Let "make check-help" work without running ./configure

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-15 12:10:50 +01:00
Peter Maydell
5681da2922 Regression fix for 'make clean' on s390x.
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJZkqHGAAoJEN7Pa5PG8C+vf2wP/3JflqH8GL63iOxxYYdPg8XT
 1kSR4PC5nA166EwN70YRTfsOIjFJ6xca58HUi5E46qUdl4ngciv78uGWONxYnlU4
 ozRP/FsW/KRw1PDW5RtR0OOrODJpSZXKDXBH6uagmvXcOafSlOLqRM7Tw1GOONmI
 O3tzT1Pa0gQjR/3YiG2OUBGBX35ijWfLqNvizI3Alz/lPsPK2onTE8oz5ngnp96t
 ldm+v0yslVP6Y9/bMRBd4H1RQjomGSLHLiSZLO1Vbj9Hpif/zIMKIGT4O45judhz
 tFwof3AdhT4ZyHaW4A86AIC48QJdfHWJqW75QBzT561EK7sDVU5ZkvZz4Xmn5dlH
 ke5oCBnRHu7f+flTtB3u3EXAJR+pJ/EezCdrSOfYuAlLfBHhE3//5V3AErJml/12
 sDH6JNR23JUPyNLVOPH982pcbbwM1j0r3GhwyI/p1M1W77NrffP9ZgQrMJIH2wfk
 FV1lLDcwMz09pqxPVyAuDfgkRdt2yeaCCPFt9lRsfUp0xqm/BL5ehPrOuzSK6F0j
 XGU8V8CuglANh+awrCL/Cwa1yA6Pi2SntVes7GMiQT1qhqK+RHEJcpp1dpQcpBpc
 5Cz5O9HMPVf3kBDlscVyq9wXlfwww89IEwHn861Ho4rIdCymVvFuepBgRuVLEPHg
 ybAG3PObnOyEh3bs9xlI
 =pYme
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170815' into staging

Regression fix for 'make clean' on s390x.

# gpg: Signature made Tue 15 Aug 2017 08:24:54 BST
# gpg:                using RSA key 0xDECF6B93C6F02FAF
# gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>"
# gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>"
# gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>"
# gpg:                 aka "Cornelia Huck <cohuck@kernel.org>"
# gpg:                 aka "Cornelia Huck <cohuck@redhat.com>"
# Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF

* remotes/cohuck/tags/s390x-20170815:
  pc-bios/s390-ccw: Use rm command during make clean

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-15 09:39:14 +01:00
Philippe Mathieu-Daudé
a8132a2f28 docker: add centos7 image
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20170728233316.13352-5-f4bug@amsat.org>
Signed-off-by: Fam Zheng <famz@redhat.com>
2017-08-15 15:16:45 +08:00
Philippe Mathieu-Daudé
06f3c7b852 docker: install more packages on CentOS to extend code coverage
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20170728233316.13352-4-f4bug@amsat.org>
Signed-off-by: Fam Zheng <famz@redhat.com>
2017-08-15 15:16:45 +08:00
Philippe Mathieu-Daudé
18a2b7affc docker: add Xen libs to centos6 image
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20170728233316.13352-3-f4bug@amsat.org>
Signed-off-by: Fam Zheng <famz@redhat.com>
2017-08-15 15:16:45 +08:00
Philippe Mathieu-Daudé
6aef2ad70b docker: use one package per line in CentOS config
This ease rebase/cherry-pick, also it is faster to visually find if a package
is here.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20170728233316.13352-2-f4bug@amsat.org>
Signed-off-by: Fam Zheng <famz@redhat.com>
2017-08-15 15:16:45 +08:00
Fam Zheng
e45eaef9b6 Makefile: Let "make check-help" work without running ./configure
Currently if you do "make check-help" in a fresh checkout, only an error
is printed which is not nice:

    $ make check-help V=1
    cc -nostdlib  -o check-help.mo
    cc: fatal error: no input files
    compilation terminated.
    rules.mak:115: recipe for target 'check-help.mo' failed
    make: *** [check-help.mo] Error 1

Move the config-host.mak condition into the body of
tests/Makefile.include and always include the rule for check-help.

Reported-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20170810085025.14076-1-famz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Fam Zheng <famz@redhat.com>
2017-08-15 15:10:15 +08:00
Eric Farman
88b3739acd pc-bios/s390-ccw: Use rm command during make clean
This reverts a change that replaced the "rm -f" command with the
undefined variable RM (expected to be set by make), and causes the
"make clean" command to fail for a s390 target:

make[1]: Entering directory '/usr/src/qemu/build/pc-bios/s390-ccw'
rm -f *.timestamp
*.o *.d *.img *.elf *~ *.a
/bin/sh: *.o: command not found
Makefile:39: recipe for target 'clean' failed
make[1]: *** [clean] Error 127
make[1]: Leaving directory '/usr/src/qemu/build/pc-bios/s390-ccw'
Makefile:489: recipe for target 'clean' failed
make: *** [clean] Error 1

Fixes: 3e4415a751 ("pc-bios/s390-ccw: Add core files for the network
                      bootloading program")
Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com>
Message-Id: <20170814204450.24118-2-farman@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-08-15 09:06:01 +02:00
KONRAD Frederic
83c3a1f616 xlnx-qspi: add a property for mmio-execution
This adds mmio-exec property to workaround the migration bug.
When enabled the migration is blocked and will return an error.

Signed-off-by: KONRAD Frederic <frederic.konrad@adacore.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1502438052-5117-1-git-send-email-frederic.konrad@adacore.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-14 14:17:18 +01:00
Peter Maydell
def50953be -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
 
 iQEcBAABAgAGBQJZkZhKAAoJEO8Ells5jWIR8GAIAIebmE5pXT1zSoAiJpnV+Y2h
 H07JnAlFVmCKJt2xZDmkEVPA3mmvt1afSCXSwa7T1cqgmJHqfdMf147hghmTcwXz
 lfhdgnoqwlWXFRE5M9mi1d6WXiZAW3i3GBVOcItIe4BHVA+1lq0J05q02I66a9OX
 teLvBY4XHzQO1a7ogaRwyLlfVW0y7t4Nqz/TfZLvAAHyb60AbEF9WXAAmMRMiyTS
 sRSd+vqFTc+T99YRSM/x6gbLUGZdN6Wxx1rzyvZC/NczGtrsxV601f+TG69wXuVK
 6qykwkGwlTtdJxSyOfhTFuaVQCPvCGcVF1lp1HI6b5t0BK5d77pS+9WfQmDGPyI=
 =CyY7
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging

# gpg: Signature made Mon 14 Aug 2017 13:32:10 BST
# gpg:                using RSA key 0xEF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasowang/tags/net-pull-request:
  qemu-doc: Mention host_net_add/-remove in the deprecation chapter

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-14 13:35:33 +01:00
Thomas Huth
bd7adc8449 qemu-doc: Mention host_net_add/-remove in the deprecation chapter
The two HMP commands host_net_add and -remove have recently been
marked as deprecated, too, so we should now mention them in the
chapter of deprecated features.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
2017-08-14 20:29:48 +08:00
Peter Maydell
87ecd4f340 trivial patches for 2017-08-14
-----BEGIN PGP SIGNATURE-----
 
 iQFDBAABCAAtFiEEe3O61ovnosKJMUsicBtPaxppPlkFAlmRhFcPHG1qdEB0bHMu
 bXNrLnJ1AAoJEHAbT2saaT5ZFYMIAMHSUNij3qFTk1O2TI8h30DXUcTqzJPyZgdl
 qqNJDqVN/vHlyZksixY2ggwSMdccp3/BRLOHKemoIR6oI17111NlPL/dlfpp5cbA
 /8HiwasGmHzhdn0SnNRibdvlZkslppOcSeuJyd8RTnMe+cH49/WZf+CHwTxu063s
 lVbdt3eHa/pzkGg6M0ho5veCko4/hHJO1hSRaYBwy4NCcoCk4EAArtNnlKpZORz+
 W/baq6v+qm3RDx2i39Xrot1/KZ57fBs8778e8GC453UmUpNzGYBULUqUt9KpRceX
 XFupYhOAFvc0BYnO42qibAdJlJLiOj0YzZlTmdXLUGWUzNq+giM=
 =psjp
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-fetch' into staging

trivial patches for 2017-08-14

# gpg: Signature made Mon 14 Aug 2017 12:07:03 BST
# gpg:                using RSA key 0x701B4F6B1A693E59
# gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
# gpg:                 aka "Michael Tokarev <mjt@corpit.ru>"
# gpg:                 aka "Michael Tokarev <mjt@debian.org>"
# Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
#      Subkey fingerprint: 7B73 BAD6 8BE7 A2C2 8931  4B22 701B 4F6B 1A69 3E59

* remotes/mjt/tags/trivial-patches-fetch:
  hw/misc/mmio_interface: Return after error_setg() to avoid crash
  qemu-iotests: remove comment about root privileges requirement
  qemu-iotests: remove commented out variables
  qemu-iotests: get rid of _full_imgproto_details()
  qemu-doc: Fix "-net van" typo
  libqtest: Fix typo in comments
  unicore32: abort when entering "x 0" on the monitor

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-14 12:43:07 +01:00
Peter Maydell
6fef22d7e6 * Lone typo fix (Thomas)
-----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAlmRYlAUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroNUjAf+PUHQx8lXSjNPXP1amfkKqBnyDsJq
 97HqcneZzsenkOSYCLLBQ587ZydGkOfZfAWpWqyWOl6Y+eaWtMF4oMud/BFL0jj3
 nA3EDWij8LxpS+grkx443OuJkExaNxK1t6yMGhiTGBLYHCpq/GVQAa9N2xKvfK8V
 txhf4x76RQTW1JtkEDMrm6rEiVBBashho7lIgUT+gol+rRhH+7PXYo610mVED8kg
 t7AACz1zhTkxcauTKjzO31m6JrOtFZbWBG8+q0ZlIDBaak2NjqCj/DXsjMA5N6Is
 V8rKizJfATZrO62kHk/yG1p4NI6hJHuXCY8UaqnLoX+nzNm2DZ5rP3OZQw==
 =fiCC
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging

* Lone typo fix (Thomas)

# gpg: Signature made Mon 14 Aug 2017 09:41:52 BST
# gpg:                using RSA key 0xBFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini/tags/for-upstream:
  qemu-doc: Fix "-net van" typo

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-14 11:41:24 +01:00
Thomas Huth
a808c0865b hw/misc/mmio_interface: Return after error_setg() to avoid crash
QEMU currently abort()s if the user tries to specify the mmio_interface
device without parameters:

x86_64-softmmu/qemu-system-x86_64 -nographic -device mmio_interface
qemu-system-x86_64: /home/thuth/devel/qemu/util/error.c:57: error_setv:
 Assertion `*errp == ((void *)0)' failed.
Aborted (core dumped)

This happens because the realize function is trying to set the errp
twice in this case. After setting an error, the realize function
should immediately return instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-08-14 13:06:54 +03:00
Cleber Rosa
a3e08c2dbd qemu-iotests: remove comment about root privileges requirement
The check script contains a commented out root user requirement,
probably because of its xfstests heritage.  This requirement doesn't
apply to qemu-iotests, so it better be gone.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-08-14 13:06:54 +03:00
Cleber Rosa
80758ec57d qemu-iotests: remove commented out variables
The variables FULL_MKFS_OPTIONS and FULL_MOUNT_OPTIONS are commented
out, never used, and even refer to functions that do exist.  The last
time these were touched was around 8 years ago, so I guess it's safe
to assume outputting such information on test execution is still on the
radar.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-08-14 13:06:54 +03:00
Cleber Rosa
657c572afe qemu-iotests: get rid of _full_imgproto_details()
Although this function is used, its implementation does nothing
besides echoing a variable name.  There's no need to wrap this
functionality in a function, and based on the one usage it has, it's
not even required to adhere to a convention or code style.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-08-14 13:06:54 +03:00
Thomas Huth
88552b553b qemu-doc: Fix "-net van" typo
While Andrew S. Tanenbaum has a point by saying "Never underestimate the
bandwidth of a station wagon full of tapes hurtling down the highway",
we don't support that way of transportation in QEMU yet, so replace the
typo with the correct word "vlan".

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-08-14 13:06:54 +03:00
Eric Blake
e8ec0117b2 libqtest: Fix typo in comments
s/continuosly/continuously/

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-08-14 13:06:54 +03:00
Eduardo Otubo
0ac241bcf9 unicore32: abort when entering "x 0" on the monitor
Starting Qemu with "qemu-system-unicore32 -M puv3,accel=qtest -S -nographic"
and entering "x 0 " at the monitor prompt leads to abort():

  $ ./unicore32-softmmu/qemu-system-unicore32 -M puv3,accel=qtest -S -nographic
  QEMU 2.9.90 monitor - type 'help' for more information
  (qemu) x 0
  qemu: fatal: uc32_cpu_get_phys_page_debug not supported yet

  R00=00000000 R01=00000000 R02=00000000 R03=00000000
  R04=00000000 R05=00000000 R06=00000000 R07=00000000
  R08=00000000 R09=00000000 R10=00000000 R11=00000000
  R12=00000000 R13=00000000 R14=00000000 R15=00000000
  R16=00000000 R17=00000000 R18=00000000 R19=00000000
  R20=00000000 R21=00000000 R22=00000000 R23=00000000
  R24=00000000 R25=00000000 R26=00000000 R27=00000000
  R28=00000000 R29=00000000 R30=00000000 R31=03000000
  PSR=40000013 -Z-- PRIV
  Aborted (core dumped)

This happens because uc32_cpu_get_phys_page_debug() is not implemented
yet, this is a temporary workaround to avoid the crash.

Signed-off-by: Eduardo Otubo <otubo@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-08-14 13:06:54 +03:00
Peter Maydell
b968316069 Fix the boot-serial test to work with the new --disable-tcg.
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJZjbdDAAoJEN7Pa5PG8C+vEMYQAIPiwbs/poNslv250aWpRAsv
 B6S6koeJfKp7GNSKPAW/bPl/CzLviGfTy/4lwYKhMlEgChRBo/35fii9RpFKKBUq
 KP01G3lpIx99TaUODXwfnTSzXfuLu9psglgf2APzObrjYWJiQROPsvCn1gLMveVA
 NU4f1HWy9dIaNk4kMf9YABaMnkHo9v517R6eIhw6F5L1jhKYlH6MqySDTQmBjGcB
 tS4pjhdRdrSWbsD8nyzaLYGtXDURvXC8kT8K1AVbj3Qix+CXiSksexBNQPri02x6
 jJM0Sj4lhfnNrCiFx6QRphdcFpS9qmajh9qL9QUx95SZDlpYzaO8HD991aEv9qU0
 rLQ2G+pEQy9tqwjiqupmMgKznC9+jk8ZkuIuJ+LHA9B+vS/7C5sGb0IoiTTbBGls
 d08U6ZCDu5hidnyVFtjy1u15lW9+0UAd0jGtKSpIY3E1PRp1s3PK0s1wpB1m5Tqr
 H92qI2KqJjgAFus3U2jAh0QLA9lQDfIqBybqqNRN1lzihUP8cEhlg+HC66zQLc3U
 pbr2msAvhs4v5xQEqE1ZdcTi6xAY7PuEHKsbLt7JplRp6JjFpOv1AdIRLYSzTzPZ
 dp61ELcwObKBO5Yp2Rh6xu5smtcWoqKKAGgzrwZi0bm3egp2iuwgweVX8OgTI+Sz
 r2tIuVSYhzYkBKq55FMd
 =VWm0
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/cohuck/tags/boot-serial-no-tcg-20170811' into staging

Fix the boot-serial test to work with the new --disable-tcg.

# gpg: Signature made Fri 11 Aug 2017 14:55:15 BST
# gpg:                using RSA key 0xDECF6B93C6F02FAF
# gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>"
# gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>"
# gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>"
# gpg:                 aka "Cornelia Huck <cohuck@kernel.org>"
# gpg:                 aka "Cornelia Huck <cohuck@redhat.com>"
# Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF

* remotes/cohuck/tags/boot-serial-no-tcg-20170811:
  boot-serial-test: fallback to kvm accelerator

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-14 09:48:44 +01:00
Thomas Huth
6900191775 qemu-doc: Fix "-net van" typo
While Andrew S. Tanenbaum has a point by saying "Never underestimate the
bandwidth of a station wagon full of tapes hurtling down the highway",
we don't support that way of transportation in QEMU yet, so replace the
typo with the correct word "vlan".

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1502365466-19432-1-git-send-email-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-08-14 10:41:42 +02:00
Peter Maydell
9db6ffc766 Block layer patches for 2.10.0-rc3
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJZjbkSAAoJEH8JsnLIjy/W+ToP/joNaKOL3cC4oLWA6EkE7exi
 PftHRGxGv9W56YZrfKrQ2eKr1uxWXh9mcvshhkerTEoppdZeNru/8OSoo+huYRqA
 7arH+gGMNCTa9kelSreiUfUTqc05cCBWsSatDAEbiCn6MeZQvRjP5t2YNcjdqjdh
 n2d7CB1hBXdYUH51SG/5EBpIHckBSE4cnbB/Cdq59AYISyqLqytaNAr94q9gikqC
 xd4CWOL4xnd9uI4csiNdkuU2Z3IgewJZctfZZuFXYGL48s4S02ba3SQ+vrLNVQb6
 xplKMPCfXKeNIeJLO1LVeb6io7Egws3wq6rivCbzBEoRDMHvnlH3+0Dc+cagRu1A
 Tn04fXZNxAwHYQD47Q+RSw6iaSpTBlWeedeclDxNt2uUBkybQxvzYuCt77JFH6VO
 4Ju1puIwpDxA5+34i4a0C/SKtpqnltNi8ET1JBoeLeoun+gaNQRDOIEHoqqNX/mO
 tF/ytyklEntBCQhgP0ZOLqfwJxhGPqD41u45suKI0bFh7D2GBVOxKKTmu7R+khGj
 Uhs56kN9bz4RQe6LTWA4DSeo6oqMHzRSozQg0uCV3yWN1UypPAf+O/tJMCp5Szkk
 JbbX483SZP4AQtN47OPyzMufkbXy0WM0MYW+dI4/5kTEQx4GKuTMy1Wix7zTmRRt
 1siqBWvFW9Ct6BRMoTND
 =FH4q
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging

Block layer patches for 2.10.0-rc3

# gpg: Signature made Fri 11 Aug 2017 15:02:58 BST
# gpg:                using RSA key 0x7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* remotes/kevin/tags/for-upstream:
  qemu-iotests: fix 185
  file-posix: Do runtime check for ofd lock API
  osdep: Add runtime OFD lock detection
  qcow2: Check failure of bdrv_getlength()
  qcow2: Drop debugging dump_refcounts()
  vpc: Check failure of bdrv_getlength()
  tests/multiboot: Fix whitespace failure

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-11 15:11:50 +01:00
Cornelia Huck
480bc11e61 boot-serial-test: fallback to kvm accelerator
Currently, at least x86_64 and s390x support building with --disable-tcg.
Instead of forcing tcg (which causes the test to fail on such builds),
allow to use kvm as well.

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-08-11 15:44:05 +02:00
Vladimir Sementsov-Ogievskiy
8565c3ab53 qemu-iotests: fix 185
185 can sometimes produce wrong output like this:

    185 2s ... - output mismatch (see 185.out.bad)
    --- /work/src/qemu/master/tests/qemu-iotests/185.out    2017-07-14 \
        15:14:29.520343805 +0300
    +++ 185.out.bad 2017-08-07 16:51:02.231922900 +0300
    @@ -37,7 +37,7 @@
     {"return": {}}
     {"return": {}}
     {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, \
         "event": "SHUTDOWN", "data": {"guest": false}}
    -{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, \
        "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", \
            "len": 4194304, "offset": 4194304, "speed": 65536, "type": \
                "mirror"}}
    +{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, \
        "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", \
            "len": 0, "offset": 0, "speed": 65536, "type": "mirror"}}

     === Start backup job and exit qemu ===

    Failures: 185
    Failed 1 of 1 tests

This is because, under heavy load, the quit can happen before the first
iteration of the mirror request has occurred.  To make sure we've had
time to iterate, let's just add a sleep for 0.5 seconds before quitting.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-08-11 14:44:39 +02:00
Fam Zheng
2b218f5dbc file-posix: Do runtime check for ofd lock API
It is reported that on Windows Subsystem for Linux, ofd operations fail
with -EINVAL. In other words, QEMU binary built with system headers that
exports F_OFD_SETLK doesn't necessarily run in an environment that
actually supports it:

$ qemu-system-aarch64 ... -drive file=test.vhdx,if=none,id=hd0 \
    -device virtio-blk-pci,drive=hd0
qemu-system-aarch64: -drive file=test.vhdx,if=none,id=hd0: Failed to unlock byte 100
qemu-system-aarch64: -drive file=test.vhdx,if=none,id=hd0: Failed to unlock byte 100
qemu-system-aarch64: -drive file=test.vhdx,if=none,id=hd0: Failed to lock byte 100

As a matter of fact this is not WSL specific. It can happen when running
a QEMU compiled against a newer glibc on an older kernel, such as in
a containerized environment.

Let's do a runtime check to cope with that.

Reported-by: Andrew Baumann <Andrew.Baumann@microsoft.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-08-11 14:12:44 +02:00
Fam Zheng
ca749954b0 osdep: Add runtime OFD lock detection
Build time check of OFD lock is not sufficient and can cause image open
errors when the runtime environment doesn't support it.

Add a helper function to probe it at runtime, additionally. Also provide
a qemu_has_ofd_lock() for callers to check the status.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-08-11 14:12:44 +02:00
Eric Blake
d0d5d0e31a qcow2: Check failure of bdrv_getlength()
qcow2_co_pwritev_compressed() should not call bdrv_truncate()
if determining the size failed.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-08-11 13:23:47 +02:00
Eric Blake
c40fe9c06c qcow2: Drop debugging dump_refcounts()
It's been #if 0'd since its introduction in 2006, commit 585f8587.
We can revive dead code if we need it, but in the meantime, it has
bit-rotted (for example, not checking for failure in bdrv_getlength()).

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-08-11 13:23:45 +02:00
Eric Blake
81caa3cc3b vpc: Check failure of bdrv_getlength()
vpc_open() was checking for bdrv_getlength() failure in one, but
not the other, location.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-08-11 13:23:40 +02:00
Eric Blake
01a02ec4f6 tests/multiboot: Fix whitespace failure
Commit b43671f8 accidentally broke run_test.sh within tests/multiboot;
due to a subtle change in whitespace.

These two commands produce theh same output (at least, for sane $IFS
of space-tab-newline):

echo -e "...$@..."
echo -e "...$*..."

But that's only because echo inserts spaces between multiple arguments
(the $@ case), while the $* form gives a single argument to echo with
the spaces already present.

But when converting to printf %b, there are no automatic spaces between
multiple arguments, so we HAVE to use $*.

It doesn't help that run_test.sh isn't part of 'make check'.

Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-08-11 13:23:19 +02:00
Peter Maydell
95766c2cd0 -----BEGIN PGP SIGNATURE-----
iQEcBAABAgAGBQJZjJxdAAoJEJykq7OBq3PIIH0IALZoC3VFv9aEw9/lKBWN21bJ
 pB5OPuXvh8h8xgjQx9tGnNW9wyUQdwup9jSJncmRPJIF4+FxGouQRLTMD8bXrRPq
 61zv0CTxHRi6o++NVWB0z0sMjzT29lnSXJjPJ45RiORM2+ErM9QxlgD172oIo49x
 fbwixqXofdAc2in+AmKhpm9PWC3qJ4kwqaIdPHmHKZG73lhTUPv5aFhoxO/48Z9C
 xlBB9daQ60QwnpKn1rw0Ewl3r2MWjxFEfKifARQkga9YaNwVf5zlJc73SfvUQEU/
 J6QBUQfWO7l9et5U3AFM8rW4QbjCkO3fzAbWuPH3FHUukkA3K+kWGURR2jm8vsc=
 =Tn14
 -----END PGP SIGNATURE-----

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

# gpg: Signature made Thu 10 Aug 2017 18:48:13 BST
# gpg:                using RSA key 0x9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/block-pull-request:
  virtio-blk: handle blk_getlength() errors
  IDE: test flush on empty CDROM
  IDE: Do not flush empty CDROM drives

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-10 18:53:39 +01:00
Peter Maydell
473a321122 Just a single fix for an annoying regression introduced in 2.9 when fixing
CVE-2016-9602.
 -----BEGIN PGP SIGNATURE-----
 
 iEYEABECAAYFAlmMVDwACgkQAvw66wEB28KtPACglcqxxpYeK34F/Rhqx8EzgGJN
 OkMAn03uaoS1sQUmk0GuqpbSJAh4cWi5
 =gUqz
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging

Just a single fix for an annoying regression introduced in 2.9 when fixing
CVE-2016-9602.

# gpg: Signature made Thu 10 Aug 2017 13:40:28 BST
# gpg:                using DSA key 0x02FC3AEB0101DBC2
# gpg: Good signature from "Greg Kurz <groug@kaod.org>"
# gpg:                 aka "Greg Kurz <groug@free.fr>"
# gpg:                 aka "Greg Kurz <gkurz@linux.vnet.ibm.com>"
# gpg:                 aka "Gregory Kurz (Groug) <groug@free.fr>"
# gpg:                 aka "[jpeg image of size 3330]"
# 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: 2BD4 3B44 535E C0A7 9894  DBA2 02FC 3AEB 0101 DBC2

* remotes/gkurz/tags/for-upstream:
  9pfs: local: fix fchmodat_nofollow() limitations

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-10 17:50:55 +01:00
Stefan Hajnoczi
17d0bc01bf virtio-blk: handle blk_getlength() errors
If blk_getlength() fails in virtio_blk_update_config() consider the disk
image length to be 0 bytes.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 20170808122251.29815-1-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-08-10 14:33:43 +01:00
Kevin Wolf
ce317e8dea IDE: test flush on empty CDROM
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20170809160212.29976-3-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-08-10 14:33:43 +01:00
Stefan Hajnoczi
4da97120d5 IDE: Do not flush empty CDROM drives
The block backend changed in a way that flushing empty CDROM drives now
crashes.  Amend IDE to avoid doing so until the root problem can be
addressed for 2.11.

Original patch by John Snow <jsnow@redhat.com>.

Reported-by: Kieron Shorrock <kshorrock@paloaltonetworks.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20170809160212.29976-2-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-08-10 14:33:43 +01:00
Greg Kurz
4751fd5328 9pfs: local: fix fchmodat_nofollow() limitations
This function has to ensure it doesn't follow a symlink that could be used
to escape the virtfs directory. This could be easily achieved if fchmodat()
on linux honored the AT_SYMLINK_NOFOLLOW flag as described in POSIX, but
it doesn't. There was a tentative to implement a new fchmodat2() syscall
with the correct semantics:

https://patchwork.kernel.org/patch/9596301/

but it didn't gain much momentum. Also it was suggested to look at an O_PATH
based solution in the first place.

The current implementation covers most use-cases, but it notably fails if:
- the target path has access rights equal to 0000 (openat() returns EPERM),
  => once you've done chmod(0000) on a file, you can never chmod() again
- the target path is UNIX domain socket (openat() returns ENXIO)
  => bind() of UNIX domain sockets fails if the file is on 9pfs

The solution is to use O_PATH: openat() now succeeds in both cases, and we
can ensure the path isn't a symlink with fstat(). The associated entry in
"/proc/self/fd" can hence be safely passed to the regular chmod() syscall.

The previous behavior is kept for older systems that don't have O_PATH.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Tested-by: Zhi Yong Wu <zhiyong.wu@ucloud.cn>
Acked-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2017-08-10 14:36:11 +02:00
Peter Maydell
b38df311c1 ppc patch queue 2017-08-09
This series contains a number of bugfixes for ppc and related
 machines, for the qemu-2.10.release.  Some are true regressions,
 others are serious enough and non-invasive enough to fix that it's
 worth putting in 2.10 this late.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlmKrEUACgkQbDjKyiDZ
 s5IkMQ/+NGW30/N3siqDh3R7JUL9jpT7N4XRuYrGlWcJFh25NscEVw6M6iPJtkDZ
 qS7/OZDlfnELj/9Js8kcTYdzI+X3X9WSnftiZalJ0KYiE6sPDiWRa4bo9jiT+0OU
 MkIY1pVTpzrJnZl0XSlN/n+senjdBQWg/djmatX8+LPTz75lOlkujxo6LEDOtyv5
 RSx9jME4J/HZ0WQyoY8dOAORBQQHxtJel5RBfd+BloTfslA+VREJEOi8d+Xkc9oz
 H4UPEMp/Kb4fpBB7XsaACUC3HRs7kikG/eS6tOtwKor9jwpp2v/BP733jMHsebzw
 RiyJVnVVk8kfyC7DBsra3XhjBtDlQPbq/quL/O3qMcdc8EslkVECMBUbb2tWsnYD
 /H1H1sjdvDJV9nVs9Wbqmi/N/SE6gvubK35wBpWQ0U0ZDGcbSdmwXkbdjFT1plUg
 z5+oZWYmOP0ndsKrv4+rmeqbMszEBQv4EBSZJ1LswGdC7+7Ga95VmN+f6ZUFq2en
 OlSlgPAvXn0PkEYgn/CVIr+Oq6lR5SNRtvDkLNpa+IkQzBoGXCgIeiuyR6ZaswH5
 FywK+QaiVKqtwgF0Zb3JWf6L5fyKdOE6fTZvyL93esXVCBSfkMIvCeACDLInczUl
 xgZCryyBpdVT/mxz4M06QI43H8nb0WIbY6UeV2WuXIN4dJlSJqE=
 =43aW
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.10-20170809' into staging

ppc patch queue 2017-08-09

This series contains a number of bugfixes for ppc and related
machines, for the qemu-2.10.release.  Some are true regressions,
others are serious enough and non-invasive enough to fix that it's
worth putting in 2.10 this late.

# gpg: Signature made Wed 09 Aug 2017 07:31:33 BST
# gpg:                using RSA key 0x6C38CACA20D9B392
# gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
# gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>"
# gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
# gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>"
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392

* remotes/dgibson/tags/ppc-for-2.10-20170809:
  spapr: Fix bug in h_signal_sys_reset()
  spapr_drc: abort if object_property_add_child() fails
  target/ppc: Add stub implementation of the PSSCR
  target/ppc: Implement TIDR
  ppc: fix double-free in cpu_post_load()
  booke206: fix MAS update on tlb miss

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-10 11:12:36 +01:00
Peter Maydell
8a6be122e4 pc, vhost: fixes for rc3
Fix up bugs and warnings in tests. Revert an experimental commit that I
 put in by mistake: harmless but useless.
 
 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJZimQFAAoJECgfDbjSjVRp+lQIAKAb7hAJFDnnE9qeRE2fbuQ6
 7l1CkBD4i8r/KWsQ4dqpOlaMquQIfnzu2GXbg52tJdQQqajYuFVDSZx+1EO+OOEP
 ZUSCTbWJW1VWNeCNt2nmy5gfI8+f40uijpg2NBjMl5//t+EG9dXR29gH7+X+UWii
 TuJ7bT8njNbYWPCAOyWbDPP3Y2PHZMsbEDqoSbIlt+X/Hk/3fvynBGH1VpS4swlx
 VoUqTXqd070m5IciENio8ygwDLOjr6hrtsmuiPL1vq7YzKZhylQt2/IywaqOK6M5
 7AKWnm9E8v6zyizQSx1jPmRlcwf4VJ5gvw7fTboCMEEpwqu4WkQafObwSH857Ao=
 =8ZKa
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

pc, vhost: fixes for rc3

Fix up bugs and warnings in tests. Revert an experimental commit that I
put in by mistake: harmless but useless.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

# gpg: Signature made Wed 09 Aug 2017 02:23:17 BST
# gpg:                using RSA key 0x281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>"
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* remotes/mst/tags/for_upstream:
  libqtest: always set up signal handler for SIGABRT
  libvhost-user: quit when no more data received
  net: fix -netdev socket,fd= for UDP sockets
  Revert "cpu: add APIs to allocate/free CPU environment"
  acpi-test: update expected DSDT files

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-10 10:05:29 +01:00
Sam Bobroff
f57467e3b3 spapr: Fix bug in h_signal_sys_reset()
The unicast case in h_signal_sys_reset() seems to be broken:
rather than selecting the target CPU, it looks like it will pick
either the first CPU or fail to find one at all.

Fix it by using the search function rather than open coding the
search.

This was found by inspection; the code appears to be unused because
the Linux kernel only uses the broadcast target.

Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-08-09 14:04:28 +10:00
Greg Kurz
325837ca38 spapr_drc: abort if object_property_add_child() fails
object_property_add_child() can only fail in two cases:
- the child already has a parent, which shouldn't happen since the DRC was
  allocated a few lines above
- the parent already has a child with the same name, which would mean the
  caller tries to create a DRC that already exists

In both case, this is a QEMU bug and we should abort.

Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-08-09 11:46:44 +10:00
David Gibson
b8af5b2d5f target/ppc: Add stub implementation of the PSSCR
The PSSCR register added in POWER9 controls certain power saving mode
behaviours.  Mostly, it's not relevant to TCG, however because qemu
doesn't know about it yet, it doesn't synchronize the state with KVM,
and thus it doesn't get migrated.

To fix that, this adds a minimal stub implementation of the register.
This isn't complete, even to the extent that an implementation is
possible in TCG, just enough to get migration working.  We need to
come back later and at least properly filter the various fields in the
register based on privilege level.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
2017-08-09 11:46:44 +10:00