Commit Graph

42707 Commits

Author SHA1 Message Date
Yuri Pudgorodskiy
44c6e00c3f qga: added another non-interactive gspawn() helper file.
With previous commit we added gspawn-win64-helper-console.exe,
required for gspawn() mingw implementation.
Unfortunatly when running as a service without interactive
desktop, gspawn() also requires another helper app.

Added gspawn-win64-helper.exe and gspawn-win32-helper.exe
for corresponding architectures.

Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>
* remove trailing whitespace
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2015-11-25 17:56:45 -06:00
Eric Blake
0a982b1bf3 qga: Better mapping of SEEK_* in guest-file-seek
Exposing OS-specific SEEK_ constants in our qapi was a mistake
(if the host has SEEK_CUR as 1, but the guest has it as 2, then
the semantics are unclear what should happen); if we had a time
machine, we would instead expose only a symbolic enum.  It's too
late to change the fact that we have an integer in qapi, but we
can at least document what mapping we want to enforce for all
qga clients (and luckily, it happens to be the mapping that both
Linux and Windows use); then fix the code to match that mapping.
It also helps us filter out unsupported SEEK_DATA and SEEK_HOLE.

In the future, we may wish to move our QGA_SEEK_* constants into
qga/qapi-schema.json, along with updating the schema to take an
alternate type (either the integer, or the string value of the
enum name) - but that's too much risk during hard freeze.

Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2015-11-25 17:56:45 -06:00
Marc-André Lureau
4eaab85cb1 tests: add file-write-read test
This test exhibits a POSIX behaviour regarding switching between write
and read. It's undefined result if the application doesn't ensure a
flush between the two operations (with glibc, the flush can be implicit
when the buffer size is relatively small). The previous commit fixes
this test.

Related to:
https://bugzilla.redhat.com/show_bug.cgi?id=1210246

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2015-11-25 17:56:45 -06:00
Marc-André Lureau
895b00f62a qga: flush explicitly when needed
According to the specification:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/fopen.html

"the application shall ensure that output is not directly followed by
input without an intervening call to fflush() or to a file positioning
function (fseek(), fsetpos(), or rewind()), and input is not directly
followed by output without an intervening call to a file positioning
function, unless the input operation encounters end-of-file."

Without this change, an fwrite() followed by an fread() may lose the
previously written content, as shown in the following test.

Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1210246

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
* don't confuse {write,read}() with f{write,read}() in
  commit msg (Laszlo)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2015-11-25 17:56:31 -06:00
John Snow
9c73517ca5 ide-test: fix timeouts
Use explicit timeouts instead of trying to approximate it by counting
the cumulative duration of nsleep calls.

In practice, the timeout if inb() dwarfed the nsleep delays, and as a
result the real timeout value became a lot larger than 5 seconds.

So: change the semantics from "Not sooner than 5 seconds" to "no more
than 5 seconds" to ensure we don't hang the tester for very long.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1448393771-15483-2-git-send-email-jsnow@redhat.com
2015-11-25 11:37:34 -05:00
Yuri Pudgorodskiy
f2b608ab80 qga: gspawn() console helper to Windows guest agent msi build
This helper, gspawn-win64-helper-console.exe for 64-bit and
gspawn-win32-helper-console.exe for 32-bit environment,
is needed for gspawn() mingw implementation, used by guest-exec command.

Without these files guest-exec command on Windows will not
work with "file not found" diagnostic message.

Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2015-11-25 10:21:55 -06:00
Michael Roth
68aa262ad0 makefile: fix qemu-ga make install for --disable-tools
ab59e3e introduced a fix for `make install` on w32 that involved
filtering out qemu-ga from $TOOLS install recipe so that we could
append $(EXESUF) to it before attempting to install the binary
via install-prog function.

install-prog takes a list of binaries to install to a particular
directory. If the list is empty it breaks. We guard against this
by ensuring $TOOLS is not empty prior to calling.

However, ab59e3e introduces extra filtering after this check which
can still result on us attempting to call install-prog with an
empty list of binaries. In particular, this occurs if we
build with the --disable-tools configure option, which results
in qemu-ga being the only member of $TOOLS.

Fix this by doing a simple s/qemu-ga/qemu-ga$(EXESUF)/ pass through
$TOOLS instead of filtering out qemu-ga to handle it seperately.

Reported-by: Steve Ellcey <sellcey@imgtec.com>
Cc: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2015-11-25 10:21:54 -06:00
Peter Maydell
c7933a80bc migration/next for 20151125
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJWVcWfAAoJEPSH7xhYctcjl5sQAJ8i6AlwAuYFw0ilMAvVHyIQ
 m981FKNcHdB0UoS7tn//eR5io+zXDphBRChbvxa7A/U6/liMMb6Hf71M0nitb3ix
 AaXz2hPXOQE7xHAuefkTiinM9K4/aSbGbAStqv+lwMWnBYvadJj2LQg1sTTdupQT
 oaKk59c4NEW0JZeVoxNwnngHPw5L19OpN8Wd3SnBW9UsBDGaVqsXpo/iLPSqx9FH
 8GVHck53r9GQPA/AaMm0a27KuX4OT/exLRJqS9rHRqAuAR+G/Q/Hsv1cXhF2Qs5z
 2/wymh8eEXwwKZcPik0z6BVdChJeyXvRMCQJ62sPnCm1xFh2ZiWMeYoUlDNzura4
 iu31dz8dz/8ZNOb9oIyAsQtYgnJ9n/42JIXRpL1uKvJ1nCYQPzejvPOWrVA7Mlv+
 zoTDyvT7f048DVSovnDQc1G48Yj2y8vZrV64zVOjsY7oyIhAJKuT20EBtaXWtfty
 VZ8mJN9+EK+yl9d3q2e1Ua9Sqj5t4hoi792jniziIAA9W5aPfFsZRFc5v4tYfxKx
 2jROWfxa8cS09d/ShTms5K8pCcq2QYzCANbEOgY2k+CSH+Odh9GtHDFAbWDuSddT
 xM6lFmWvUxiEH4fX9LLtLkVgvK3J66O3MWwrn1IkddIq5yZMnGfaLTW2qkBJv087
 nRS3UBSwEipkJthHiOpd
 =0Wy1
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20151125' into staging

migration/next for 20151125

# gpg: Signature made Wed 25 Nov 2015 14:28:47 GMT using RSA key ID 5872D723
# gpg: Good signature from "Juan Quintela <quintela@redhat.com>"
# gpg:                 aka "Juan Quintela <quintela@trasno.org>"

* remotes/juanquintela/tags/migration/20151125:
  block-migration: limit the memory usage
  Assume madvise for (no)hugepage works

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-25 16:20:58 +00:00
Peter Maydell
1a4dab849d Block layer patches
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJWVbiaAAoJEH8JsnLIjy/WTJAP/0YaV6dhDVmS9XiVl8qvzpoB
 S1wcVexLsuNVCb1dm2Yqhy+umFTR7e6gk77UGFXX7RRgvHaomx1UcvHrhut+fdF3
 teXRKj/G6un9AEnCDxXtWh//PgGO6XlZsWv0r41QB6yhMUY4sCR1zAoLWdlitGIu
 HzfW3xFya3HRT7c6X8PLSzBjYaqiTnLVxukm7vs8dlQuNRa7MY1E3ayu0bQf0PkE
 9T3xs2edUMh6PpQDx40CBgU8qQxsDJb7jdfGUfRo4tCf+QK5Os1Wnqba9uO0U4Db
 NJ4/uMcfJ6Q0a96/Fb1PqJBwUDhnPpsHsC5ZQ5jThtmLmKsTZWMLoHJfKCGi92fA
 pVEi43r+64oywgfoDumVKtwD9sq4Chqw82sDdkPKl905mvz0TMVTUac3/loHWKMx
 3Om3Eag7GJSDsjhSWhW2SDmJw1wK+csA9810OL32TPVmTWuYsdtEGbJ7i5jHnM21
 g2wMCpTytra14bYupj6IZyrRw/ac+PszJItULi3UvfRLZDtbX5FF33uUjMMLnQ6k
 GR9kXNB5Is/4AjXd8YNk7ARln0GunRE0Fg5Tfp3aF176mcUSZ0N8NsqSJci38uVE
 yMYaEBc/Nk5y6WBxv/wjqsrIoxRiX8TyE5P2sf6IoJyiwzw4+pxONp+lVBkPBHnv
 +ZZcNu5hR2NMwpmkyFPM
 =0en4
 -----END PGP SIGNATURE-----

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

Block layer patches

# gpg: Signature made Wed 25 Nov 2015 13:33:14 GMT using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"

* remotes/kevin/tags/for-upstream:
  qemu-iotests: Add -nographic when starting QEMU in 119 and 120
  block/qapi: Plug memory leak on query-block error path
  raw-posix.c: Make GetBSDPath() handle caching options
  nand: fix flash erase when oob is in memory
  test-aio: Fix event notifier cleanup
  tests/Makefile: Add more dependencies for test-timed-average

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-25 14:47:06 +00:00
Wen Congyang
f77dcdbc76 block-migration: limit the memory usage
If we set migration speed in a very large value, block-migration will try to read
all data to the memory. Because
    (block_mig_state.submitted + block_mig_state.read_done) * BLOCK_SIZE
will be overflow, and it will be always less than rate limit.

There is no need to read too many data into memory when the rate limit is very large.
So limit the memory usage can fix the overflow problem.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-25 15:27:28 +01:00
Dr. David Alan Gilbert
1d7414396f Assume madvise for (no)hugepage works
madvise() returns EINVAL in the case of many failures, but also
returns it in cases where the host kernel doesn't have THP enabled.
Postcopy only really cares that THP is off before it detects faults,
and turns it back on afterwards; so we're going to have
to assume that if the madvise fails then the host just doesn't do
THP and we can carry on with the postcopy.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Tested-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-25 15:27:28 +01:00
Kevin Wolf
8c34d891b1 One block patch for qemu 2.5-rc2.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQEcBAABCAAGBQJWVbgFAAoJEDuxQgLoOKytEoUIAILrb9wJ77ihJF2EjpRG/yBR
 lx3t7mzXlEANQlWx8fAraDRi7rZDohVtpRpKZSrnHgZ1/Hc03thMFW15gB4N2T5g
 vwgB2CjKjM+pkcobdhqUwjWhwjK6BidMMmi7dtHchGBmWd9AiPofThqP2zlxhwBa
 3WCYNjQgy5o/kXnMGV/5tlGzQmqM8hRigUusDUMQY6woWI6+R2fsBPWrYgZAis9W
 0H2oO8Uf/D0a8LdsqkAth4PDErE1A6DDGDCkECYpnLIuwXcmeQLMEKfpeNtSYATl
 pcLTru4jSZtoc6wTvejjMUeZUPkJNcrc3g6LbN3lX+pS5FObBZOTgTrw/CtkulQ=
 =++eW
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2015-11-25' into queue-block

One block patch for qemu 2.5-rc2.

# gpg: Signature made Wed Nov 25 14:30:45 2015 CET using RSA key ID E838ACAD
# gpg: Good signature from "Max Reitz <mreitz@redhat.com>"

* mreitz/tags/pull-block-for-kevin-2015-11-25:
  qemu-iotests: Add -nographic when starting QEMU in 119 and 120

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-25 14:33:01 +01:00
Fam Zheng
4d7f853ff0 qemu-iotests: Add -nographic when starting QEMU in 119 and 120
Otherwise, a window flashes on my desktop (built with SDL). Add this as
other cases have it.

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id: 1448245930-15031-1-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2015-11-25 14:29:39 +01:00
Markus Armbruster
903c341d57 block/qapi: Plug memory leak on query-block error path
Spotted by Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-25 14:27:43 +01:00
Programmingkid
98caa5bc00 raw-posix.c: Make GetBSDPath() handle caching options
Add support for caching options that can be specified from the command
line.

The CD-ROM raw char device bypasses the host page cache and therefore
has alignment requirements.  Alignment probing is necessary so only use
the raw char device if BDRV_O_NOCACHE is set.

This patch fixes -cdrom /dev/cdrom on Mac OS X hosts, where bdrv_read()
used to fail due to misaligned requests during image format probing.

Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-25 14:27:43 +01:00
Ricard Wanderlof
8e37ca6d0b nand: fix flash erase when oob is in memory
For the "main area on file, oob in memory" case, fix the shifts so that
we erase the correct number of pages.

Signed-off-by: Ricard Wanderlöf <ricardw@axis.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-25 14:27:43 +01:00
Kevin Wolf
7595ed7439 test-aio: Fix event notifier cleanup
One test case closed an event notifier (event_notifier_cleanup())
without first disabling it (set_event_notifier(..., NULL)). This
resulted in a leftover handle 0 that was added to each subsequent
WaitForMultipleObjects() call, causing the function to fail (invalid
handle).

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-11-25 14:27:43 +01:00
Kevin Wolf
5e41fbffa1 tests/Makefile: Add more dependencies for test-timed-average
'make check' failed to compile the test case for mingw because of
undefined references. Pull in a few more dependencies so that it builds.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-11-25 14:27:43 +01:00
Peter Maydell
e85dda8070 Xen 2015/11/25
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJWVZk+AAoJEIlPj0hw4a6Q7ikP/RxSZE79xDmsxdfD0tpJt+47
 /XCvn6m7MAxuR0nxDkATLnVDSTfWeDCPSaJ3LlhgqvhhmgnsX6f8/QlBEl2/oH7M
 rNcEdrmVWL/nX7j93HUvRrmXS7p7qK8KKI0tY7xckNynrvarb+ORUklqSAIAntvA
 rGAat+9gAQ8gXn3fw3OKu2MyPgV+cSxzZ7ImNIOvSt5pt/ksOeRHX2uAhnEiw9cQ
 mlLNxYhXPAiyTTGPVJBzjfkp90q7wkp6tukUhW2xTIw88HNaXYhDrUCEKO/NAawd
 r/8NAjiTn0ZcxPb7wLLRXoVsuqfZC1pD5jASt4s1CXv1OWMLGkUvhXydO8eFfY3L
 AA8C5zDucqNGRfX8unCblou58pCfIjVrUSPkft55IDZ9K1ocLAzjPENloY81IRnJ
 a+XDj+uYK8vTryHDyo8LTR5+aV4KbGSexQjk2dSi6XiOlyK8+RDJijNudiU8AXmM
 ygDAFtL6vDiZBXWncm5Jz5BHggWmrNp7Z4qdjrFjkQJdbFgYMPTc6eOtDOguoTZw
 YDXzoXvKup7Kk3Ynu9WwPkjnNbHV+sEYKPJL3FVJZ7CK52FnObpj1VSKIyIKz8eR
 HIvVsFicP3fvyrD0/OUgLBdOovJt+F0cp6EHZdDv49i5QLhjX004PJzAKKmtQaEQ
 5D0PxCw5WomoMIg+mRKf
 =BJJ/
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20151125' into staging

Xen 2015/11/25

# gpg: Signature made Wed 25 Nov 2015 11:19:26 GMT using RSA key ID 70E1AE90
# gpg: Good signature from "Stefano Stabellini <stefano.stabellini@eu.citrix.com>"

* remotes/sstabellini/tags/xen-20151125:
  xen_disk: Remove ioreq.postsync
  xen: fix usage of xc_domain_create in domain builder

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-25 12:09:34 +00:00
Paolo Bonzini
2b1641d0a2 MAINTAINERS: Update TCG CPU cores section
These are the people that I think have been touching it lately
or reviewing patches.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-25 12:50:20 +01:00
Victor Kaplansky
7cf32491ea tests/vhost-user-bridge: read command line arguments
Now some vhost-user-bridge parameters can be passed from the
command line:

Usage: prog [-u ud_socket_path] [-l lhost:lport] [-r rhost:rport]
        -u path to unix doman socket. default: /tmp/vubr.sock
        -l local host and port. default: 127.0.0.1:4444
        -r remote host and port. default: 127.0.0.1:5555

Signed-off-by: Victor Kaplansky <victork@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-11-25 13:42:38 +02:00
Victor Kaplansky
85ea9da5b8 tests/vhost-user-bridge: propose GUEST_ANNOUNCE feature
The backend has to know whether VIRTIO_NET_F_GUEST_ANNOUNCE was
negotiated, so, as a hack we propose the feature by
vhost-user-bridge during the feature negotiation.

Signed-off-by: Victor Kaplansky <victork@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-11-25 13:42:38 +02:00
Michael S. Tsirkin
c61f09ed85 vhost-user: clarify start and enable
It seems that we currently have some duplication between
started and enabled states.

The actual reason is that enable is not documented correctly:
what it does is connecting ring to the backend.

This is important for MQ, because a Linux guest expects TX
packets to be completed even if it disables some queues
temporarily.

Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: Victor Kaplansky <victork@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-11-25 13:42:38 +02:00
Wen Congyang
d39c87d707 vhost-user: set link down when the char device is closed
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2015-11-25 13:42:38 +02:00
Eduardo Habkost
463b52f285 pc: Don't set hw_version on pc-*-2.5
Now that qemu_hw_version() returns a fixed "2.5+" string instead
of QEMU_VERSION, we don't need to set hw_version on pc-*-2.5
explicitly.

Suggested-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-11-25 13:42:37 +02:00
Eduardo Habkost
fac862ffa6 osdep: Change default value of qemu_hw_version() to "2.5+"
There are two issues with qemu_hw_version() today:

1) If a machine has hw_version set, the value returned by it is
   not very useful, because it is not the actual QEMU version.
2) If a machine does't set hw_version, the return value of
   qemu_hw_version() is broken, because it will change when
   upgrading QEMU.

For those reasons, using qemu_hw_version() is strongly
discouraged, and should be used only in code that used
QEMU_VERSION in the past and needs to keep compatibility.

To fix (2), instead of making every machine broken by default
unless they set hw_version, make qemu_hw_version() simply return
"2.5+" if qemu_set_hw_version() is not called.

Suggested-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-11-25 13:42:37 +02:00
Peter Maydell
1aae36df4b ivshmem patches for 2.5
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWVX6SAAoJEDhwtADrkYZTZyoP/jYDr+mK3PkimysF42/rE1cW
 IJBLd7MRJWSLdflmJjn/lDbmo11KNR49i2XerTVK2znKG53egObVmdkESazdz4wm
 J4XKFqpKPcOaeeicxjeNly8Hq5okk6gvOoP5+vJvvu8GZFGrwAg6DFMP3xEs5CVv
 NfySXBUYOIi8jvtzvwesjh7nOfTv9mKWIKA3m7Fli9TjMG8X8UjilKtWVDPLo4ev
 pzTFNSchi/AoYh4Fdl+E7guGW6SOiwjAPJCDTuHNra0Fadj5RsV4X4E7AsMXAP+T
 WZzTzn+GEtyGC7yjhCy448u7f1lPlXUFfYnIsNOtQ6azrEbaNo0i8IFFmpdFSVRe
 Medl71TQBGR9roLKhyZYVfH/KveVpqyIxkPa3azC2vTGiDtNmqJ0e0+uxDDMIT0R
 HnAZc+7rSdVpDItVibrExYA92q5m9qN8GqhS6dflbYu2cy54uPa33dR5xKUPNU5Q
 moYVl3E5uLz8Tdj3gbyc+rvyPiT7vYCvZlGP/e81ZSIRepiQKadI3Qkhx879336f
 gzuGHOtaTBTz36XGQsQBJC1rZ+3TjC+VylOUttPH0GqqlIfoUdvA/tdbiXmO6DpY
 N99H6RlBAD+Tw6Y7g6M1BwT9a7TBhkeeMdRWZSYeC4jw3T6AslBfBwcKbmTmE/NC
 hTZ7RNdZ7FeFa5ZH/LhE
 =/gHp
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/armbru/tags/pull-ivshmem-2015-11-25' into staging

ivshmem patches for 2.5

# gpg: Signature made Wed 25 Nov 2015 09:25:38 GMT using RSA key ID EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"

* remotes/armbru/tags/pull-ivshmem-2015-11-25:
  ivshmem: Rename property memdev to x-memdev for 2.5
  ivshmem: Mark questionable socket type test FIXME
  tests/ivshmem-test: Supply missing initializer in get_device()
  qemu-doc: Fix ivshmem usage example with shm=...
  qemu-doc: Fix ivshmem example markup

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-25 11:38:03 +00:00
Alberto Garcia
22037db38c xen_disk: Remove ioreq.postsync
This code has been dead for three years (since commit 7e7b7cba1).

Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2015-11-25 11:04:55 +00:00
Markus Armbruster
1d649244b3 ivshmem: Rename property memdev to x-memdev for 2.5
The device's guest interface and its QEMU user interface are
flawed^Whotly debated.  We'll resolve that in the next development
cycle, probably by deprecating the device in favour of a cleaned up,
but not quite compatible revision.

To avoid adding more baggage to the soon-to-be-deprecated interface,
mark property "memdev" as experimental, by renaming it to "x-memdev".
It's the only recent user interface change.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1448384789-14830-6-git-send-email-armbru@redhat.com>
[Update of qemu-doc.texi squashed in]
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2015-11-25 10:24:27 +01:00
Markus Armbruster
2825717c02 ivshmem: Mark questionable socket type test FIXME
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2015-11-25 10:24:15 +01:00
Markus Armbruster
1613094766 tests/ivshmem-test: Supply missing initializer in get_device()
If the device isn't found, the assertion uses dev without
initialization.  Fix that.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1448384789-14830-4-git-send-email-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2015-11-25 10:24:04 +01:00
Markus Armbruster
a9282c25a5 qemu-doc: Fix ivshmem usage example with shm=...
The example suggests you can omit "shm".  This isn't true; you must
specify exactly one of "shm", "chardev", "memdev".  Fix it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1448384789-14830-3-git-send-email-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2015-11-25 10:23:52 +01:00
Markus Armbruster
50d34c4e35 qemu-doc: Fix ivshmem example markup
Use @var{foo} like we do everywhere else, not <foo>.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1448384789-14830-2-git-send-email-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2015-11-25 10:23:33 +01:00
Alberto Garcia
73a27d9ac3 atapi: Fix code indentation
This was accidentally changed by commit 5f81724d

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 93fb43522e3b8dddb6c709d568919347d9a5ba3f.1448367341.git.berto@igalia.com
Signed-off-by: John Snow <jsnow@redhat.com>
2015-11-24 14:56:49 -05:00
Alberto Garcia
36be0929f5 atapi: Account for failed and invalid operations in cd_read_sector()
Commit 5f81724d made PIO read requests async but didn't add the
relevant block_acct_failed() and block_acct_invalid() calls.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 9b87e09d61019c128139b6c999ed0c07f0674170.1448367341.git.berto@igalia.com
Signed-off-by: John Snow <jsnow@redhat.com>
2015-11-24 14:56:48 -05:00
John Snow
a421f3c385 ide-test: cdrom_pio_impl fixup
Final tidying: move the interrupt wait into the loop,
document that the status read clears the IRQ, and move
the final interrupt check outside of the loop.

This should be functionally equivalent to how it works
currently, but a little less ambiguous and slightly more
explicit about the state transitions.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1448060035-31973-3-git-send-email-jsnow@redhat.com
2015-11-24 14:51:43 -05:00
Peter Maydell
4b6eda626f MIPS patches 2015-11-24
Changes:
 * Fixes for enabling/disabling 64-bit addressing
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJWVHorAAoJEFIRjjwLKdprMyMH/00o4XJQAqKn3UDrbA5EygLH
 R1wQ1btykiDH/9841Coa+GLyT9DHBux65WQaKysHnF5rHX9fDAfu3Nirt9k03q+x
 2vwNNZVBPr2Z/ENL3mH4VwOWkYVxNf21Ell8j69hctqRgJQPwbVdAaJumDDEGfs/
 9/OcMYVu/Gx/3C5M2las+dFH6qv6QOOjt+mJa2+Lvtiq6MfTmZiifJEQZGkYI5Pd
 610DuJfuPkz2VaM4Q5YAHyfTGjPFpTqrw7Qw3NVBnRfPltVEK9GaH7MfhjXnVfVY
 Ec1pPdaZR/GHQyLPxAVCmTxMcvwXqNCsK4q5QtnZMKKLkXAhXg11qKJO5iVk6Qs=
 =h/7q
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/lalrae/tags/mips-20151124' into staging

MIPS patches 2015-11-24

Changes:
* Fixes for enabling/disabling 64-bit addressing

# gpg: Signature made Tue 24 Nov 2015 14:54:35 GMT using RSA key ID 0B29DA6B
# gpg: Good signature from "Leon Alrae <leon.alrae@imgtec.com>"

* remotes/lalrae/tags/mips-20151124:
  target-mips: flush QEMU TLB when disabling 64-bit addressing
  target-mips: Fix exceptions while UX=0

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-24 17:05:06 +00:00
Peter Maydell
d9636b6c2b target-arm queue:
* fix minimum RAM check warning on xlnx-ep108
  * remove unused define from aarch64-linux-user.mak config
  * don't mask out bits [47:40] in ARMv8 LPAE descriptors
  * correct unallocated instruction checks for ldst_excl
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJWVHFmAAoJEDwlJe0UNgze29AP+QELaOZcUxl8bAjG9PdkAcQX
 /xyD9YHUK4GK/bSJCgKIdwDOsiiQ+78pA/Rubmbhuph4Nl9ggcAzwzJZjaMWf8HX
 tOYeBdqg0ykq1EX1tJRzvaQRxwDMOLqZQa2+sSYYCgmZO8pBKeBhbQ0RkXQ7OYH0
 A2LijXqE0Swfyvr/k1mghafcGlKUeQ+8uI59WaBaDn4BsoBp/LHjQTkujrrSkgog
 FOHFBXT8KrxKs9Uhu/rfaQMXfWiykTBQLbzgKd9d3N4KlB1GzdwVarsY05RYy+jY
 d2PYfu48QlC2GaNm4a3qxewKDUgzBg9x/UB/rbPpO47mySlGhRxeoUkjWYsfr18+
 4qWDm3B8brHv72+iOP4Wiv+nElTrA5N74TnwJnn7Q9epoISnaDALbix9rV8kiLrk
 PrivIid/DuVyu0RG7tFXXjxvKKYNparHuIcOs2SiX1BRuA7wc+OW5irrb1gHAkv+
 3tLyf3RJzNRu/0BI1QoCWgtONam5f5N+GabnoLBe/k4J9yK3N7xRtvO+aGcL4ztH
 gVO/+HpEBun5TiGskRsmATG4QY4VC2GEEtbCp1uysAEsuZJY5oHzkX60MYd3y5Xj
 YGddCAkJvBuboNWn+8RzNkRHJI6TJS+POAy+o6pza/NVyt/wD7ozph1DKXtl1nDT
 NHCA4nO/6LY0t7eumMUT
 =oaU/
 -----END PGP SIGNATURE-----

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

target-arm queue:
 * fix minimum RAM check warning on xlnx-ep108
 * remove unused define from aarch64-linux-user.mak config
 * don't mask out bits [47:40] in ARMv8 LPAE descriptors
 * correct unallocated instruction checks for ldst_excl

# gpg: Signature made Tue 24 Nov 2015 14:17:10 GMT using RSA key ID 14360CDE
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>"
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>"

* remotes/pmaydell/tags/pull-target-arm-20151124:
  target-arm/translate-a64.c: Correct unallocated checks for ldst_excl
  target-arm: Don't mask out bits [47:40] in LPAE descriptors for v8
  default-configs/aarch64-linux-user.mak: Remove unused define
  xlnx-ep108: Fix minimum RAM check

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-24 14:22:38 +00:00
Peter Maydell
e14f0eb12f target-arm/translate-a64.c: Correct unallocated checks for ldst_excl
The checks for the unallocated encodings in the ldst_excl group
(exclusives and load-acquire/store-release) were not correct. This
error meant that in turn we ended up with code attempting to handle
the non-existent case of "non-exclusive load-acquire/store-release
pair". Delete that broken and now unreachable code.

Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Sergey Fedorov <serge.fdrv@gmail.com>
2015-11-24 14:12:15 +00:00
Peter Maydell
6109769a8b target-arm: Don't mask out bits [47:40] in LPAE descriptors for v8
In an LPAE format descriptor in ARMv8 the address field extends
up to bit 47, not just bit 39. Correct the masking so we don't
give incorrect results if the output address size is greater
than 40 bits, as it can be for AArch64.

(Note that we don't yet support the new-in-v8 Address Size fault which
should be generated if any translation table entry or TTBR contains
an address with non-zero bits above the most significant bit of the
maximum output address size.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1448029971-9875-1-git-send-email-peter.maydell@linaro.org
2015-11-24 14:12:15 +00:00
Peter Maydell
f72c0a79f7 default-configs/aarch64-linux-user.mak: Remove unused define
The uses of the CONFIG_GDBSTUB_XML define were removed in commit
b77abd95a9, but the define in aarch64-linux-user.mak somehow
escaped the cull (the patchset probably crossed in the mail with
the patches adding aarch64 support). Remove the stray define.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Message-id: 1447690178-4560-1-git-send-email-peter.maydell@linaro.org
2015-11-24 14:12:15 +00:00
Alistair Francis
5b4a047fbe xlnx-ep108: Fix minimum RAM check
The minimum RAM check logic for the Xiilnx EP108 was off by one,
which caused a false positive. Correct the logic to only print
warnings when the RAM is below 0x8000000.

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: fba8112ca7b01efd72553332b8045ecf107b7662.1448021100.git.alistair.francis@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-24 14:12:15 +00:00
Leon Alrae
f93c3a8d0c target-mips: flush QEMU TLB when disabling 64-bit addressing
CP0.Status.KX/SX/UX bits are responsible for enabling access to 64-bit
Kernel/Supervisor/User Segments. If bit is cleared an access to
corresponding segment should generate Address Error Exception.

However, the guest may still be able to access some pages belonging to
the disabled 64-bit segment because we forget to flush QEMU TLB.

This patch fixes it.

Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
2015-11-24 11:01:03 +00:00
James Hogan
7871abb94c target-mips: Fix exceptions while UX=0
Commit 01f7288579 ("target-mips: Status.UX/SX/KX enable 32-bit address
wrapping") added a new hflag MIPS_HFLAG_AWRAP, which indicates that
64-bit addressing is disallowed in the current mode, so hflag users
don't need to worry about the complexities of working that out, for
example checking both MIPS_HFLAG_KSU and MIPS_HFLAG_UX.

However when exceptions are taken outside of exception level,
mips_cpu_do_interrupt() manipulates the env->hflags directly rather than
using compute_hflags() to update them, and this code wasn't updated
accordingly. As a result, when UX is cleared, MIPS_HFLAG_AWRAP is set,
but it doesn't get cleared on entry back into kernel mode due to an
exception. Kernel mode then cannot access the 64-bit segments resulting
in a nested exception loop. The same applies to errors and debug
exceptions.

Fix by updating mips_cpu_do_interrupt() to clear the MIPS_HFLAG_WRAP
flag when necessary, according to compute_hflags().

Fixes: 01f7288579 ("target-mips: Status.UX/SX/KX enable 32-bit...")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Leon Alrae <leon.alrae@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Leon Alrae <leon.alrae@imgtec.com>
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
2015-11-24 11:01:03 +00:00
Peter Maydell
229c0372cf -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
 
 iQEcBAABAgAGBQJWVBn3AAoJEJykq7OBq3PIphAIALLVgtvJ3zc/guRIf2QzM4Zv
 GPmk2DDze0N1DhKOtxpWi7nZLI1Fkb/msCr/wSVmNbwxJWyDSt7qrVG5HLlAR+wC
 R0gBvsuS/Y/MXyK+5z8wRU0IgjV/ihvVkKva6jAliZ1fnzRK3Z7iR7g/wcJuuLBG
 gELOuYqydrwEr3dj39v16m0JwbVbLBay4iEaVT31LTjfxmxbsRXJP+fWrfsD/tIA
 XfMqe1sucvQuVVUuktjh08vY91/ETCYGYRHYHKHw4h40dZYVlvB/jfWGgJ8kwVTr
 JH0LLHMuF6FHosk/aFvNcvGxyeY+8K6uS8ulJRSJj0nRzJYCrlF4pRe+0QGPvns=
 =bSVJ
 -----END PGP SIGNATURE-----

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

# gpg: Signature made Tue 24 Nov 2015 08:04:07 GMT using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"

* remotes/stefanha/tags/block-pull-request:
  virtio-blk: Move resetting of req->mr_next to virtio_blk_handle_rw_error
  parallels: dirty BAT properly for continuous allocations

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-24 10:27:19 +00:00
Fam Zheng
466138dc68 virtio-blk: Move resetting of req->mr_next to virtio_blk_handle_rw_error
"werror=report" would free the req in virtio_blk_handle_rw_error, we
mustn't write to it in that case.

Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id: 1448239280-15025-1-git-send-email-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-11-24 09:27:49 +08:00
Vladimir Sementsov-Ogievskiy
c9f6856ded parallels: dirty BAT properly for continuous allocations
This patch marks part of the BAT dirty properly. There is a possibility that
multy-block allocation could have one block allocated on one BAT page and
next block on the next page. The code without the patch could not save
updated position to the file.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Message-id: 1447779778-26062-1-git-send-email-den@openvz.org
CC: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-11-24 09:25:36 +08:00
Peter Maydell
5522a841ca NUMA fix for -rc2
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJWUwpuAAoJECgHk2+YTcWmuPsP/jJGg3Z50bVjazW3yNJhIKzO
 AclvKbzvkV6BtvJcaPXsswa95GjH3zc0+C0IxtbHcvMtJWhMGMfyY+jhNOfy5+ma
 h0RkN3BJkQ/knnLfDzu5Rp0NSrS9Q/p79qSzJm6fkmNv34HykucUVkoKSRTdvsRq
 tIyTgza3iEdRT6v9yXRUNcxUDGXoJfYSYrKKPwPq8X/L4H/QWjaFTex9acFaBrJe
 PkUMHHP+++tOVKVX7WEidQxVj/7PtW3nIFX4RoxbdOfdHSslMTcuwQr406AWZy7X
 TQNI5ymMuKHsgOMJHSE9gG4TK0jOb4csmfKm4/wO+oTdWS6C5NtSSqFjkzF79b1h
 PlnTqsa6xh90jSFctei8098jhnQy90Bt4rP/dG/7NwgouzTWPxj+GQhKNMkf0OHt
 ssVnHCKiE9UfRLhicnxGO0XOWMWR2xVZr2w78b8carIdYyY81jXoHpB3IFt4/mk2
 zN0ZretSvWALzVbS7DNB753+s1OiLxHevByhsycvUJSQXi71UecY6UEqg14vygZX
 x2pFmTjeyEh/6W4JnZSZUkGbpwXrcB35uAsIvOE8pPHjo0YHn4qiCRvT8SXMsuxM
 EPxa+KPWJEp+z4X1BS9hBgr6u0YCdQPOmtIyT7hj0XLcDvX6dlybwFiYG2L+WdGN
 JOuJEteYsdJn/o0phc2E
 =UACw
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/ehabkost/tags/numa-pull-request' into staging

NUMA fix for -rc2

# gpg: Signature made Mon 23 Nov 2015 12:45:34 GMT using RSA key ID 984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"

* remotes/ehabkost/tags/numa-pull-request:
  hostmem: Ignore ENOSYS while setting MPOL_DEFAULT

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-23 16:07:49 +00:00
Peter Maydell
68c61282fe Last minute fix.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWUwPWAAoJEK0ScMxN0CebaxQH/0bYARUKEC9xwXesG50Mf2qE
 ennSljcuf3S7poBmoqgcoeBe5nngEX37G4ccC5z1gSsByLnOdSxF1eNBG0VmEtlj
 jF5KqPb8a7LDAKqU/h69fvXkrrvDS/VtCPUcNG5cLe6f93mCvp16hdndMNaepGm2
 upELH3yOg5KQtMr7JhW7Pa6nv/7+nDYQanUqwyi3rtsObZkaF4lL/+lLfFxmPjUQ
 GZiCkcdGquUQMDLp7MwcNPcUcv1L3tLK2AYVs9RaDNBsLmzfD6hgYxs9CQ0IHwqy
 LUILsig9U7edzMaT+cSWM2CgTdI6en7zcYc9oRuEEnIt3QtA7lWGG0zlng7ZcwQ=
 =vPkH
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20151123' into staging

Last minute fix.

# gpg: Signature made Mon 23 Nov 2015 12:17:26 GMT using RSA key ID 4DD0279B
# gpg: Good signature from "Richard Henderson <rth7680@gmail.com>"
# gpg:                 aka "Richard Henderson <rth@redhat.com>"
# gpg:                 aka "Richard Henderson <rth@twiddle.net>"

* remotes/rth/tags/pull-tcg-20151123:
  tcg: Fix highwater check

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-23 13:54:41 +00:00
Pavel Fedin
a3567ba1e6 hostmem: Ignore ENOSYS while setting MPOL_DEFAULT
Currently hostmem backend fails if CONFIG_NUMA is enabled in QEMU
(the default) but NUMA is not supported by the kernel. This makes
it impossible to use ivshmem in such configurations.

This patch fixes the problem by ignoring ENOSYS error if policy is set to
MPOL_DEFAULT. This way the code behaves in the same way as if CONFIG_NUMA
was not defined. qemu will still fail if the user specifies some other
policy, so that the user knows it.

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-11-23 10:43:38 -02:00