Hotplugging a scsi-disk may trigger the assertion in qemu_sgl_concat.
qemu-system-x86_64: qemu/hw/scsi/virtio-scsi.c:115: qemu_sgl_concat:
Assertion `skip == 0' failed.
This is introduced by commit 55783a55 (virtio-scsi: work around bug in
old BIOSes) which didn't check out_num when accessing out_sg[0].iov_len
(the same to in sg). For virtio_scsi_push_event, looking into out_sg
doesn't make sense because 0 req_size is intended.
Cc: qemu-stable@nongnu.org
[Cc'ing qemu-stable because 55783a55 did it too]
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <1426233354-525-1-git-send-email-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
The .d file name must match exactly what is used in the SUBDIR_DEVICES_MAK_DEP
variable. Instead of making assumptions in the make_device_config.sh script,
just pass it in.
Similarly, the makefile target may not match the output file name, because
Makefile uses a temporary file. Instead of making assumptions on what the
Makefile does, emit the config-devices.mak file to stdout, and use the
passed-in destination as the makefile target
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
In case qemu_co_sendv_recvv() fails without any data read, there is no
reason not to return the perfectly fine error number retrieved from
socket_error().
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <1424887718-10800-16-git-send-email-mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
When requesting the list of exports, no data should be sent. If data is
sent, the NBD server should not just inform the client of the invalid
request, but also drop the data.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <1424887718-10800-22-git-send-email-mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
The export flags are a 16 bit value, so be16_to_cpu() has to be used to
interpret them correctly. This makes discard and flush actually work
for named NBD exports (they did not work before, because the client
always assumed them to be unsupported because of the bug fixed by this
patch).
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <1424887718-10800-20-git-send-email-mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
The client flags are sent exactly once overall, not once per option.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <1424887718-10800-19-git-send-email-mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <1424887718-10800-13-git-send-email-mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <1424887718-10800-11-git-send-email-mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
It is very unlikely, but it is possible.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <1424887718-10800-10-git-send-email-mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <1424887718-10800-9-git-send-email-mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
While it does not make a difference in practice, nbd_receive_options()
generally returns -errno, so it should do that here as well; and the
easiest way to achieve this is by passing on the value returned by
nbd_handle_list().
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <1424887718-10800-7-git-send-email-mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
unix_connect_opts() and inet_connect_opts() do not necessarily set errno
(if at all); therefore, nbd_establish_connection() should not literally
return -errno on error.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <1424887718-10800-4-git-send-email-mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Unused partitions do not necessarily have a total sector count of 0
(although they should have), but they always do have the system field
set to 0, so use that for testing whether a partition is in use rather
than the sector count field alone.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <1424887718-10800-3-git-send-email-mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
And while at it, replace tabs by eight spaces in this function.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <1424887718-10800-2-git-send-email-mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
The value of reply.error should be the type unsigned int.
Signed-off-by: Yik Fang <eric.fangyi@huawei.com>
Message-Id: <1423722111-12902-1-git-send-email-eric.fangyi@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABCAAGBQJVCDhaAAoJEPSH7xhYctcjCmUP/2OdZOznik2BwE+RXYjj+TGn
YFaN7G7kwCmbxjrbZgq89QW+lmqUlf5K8L6t4v8oOt4NDGslgKiibYJRekRIbWKm
G2xiThCQJFLX+62EJ90nSjAERAGvMF5m/w80nUsXba7f5Ryx19qz/fOqrBcipo5w
y9pcJ1kGw/bPXB8Enedb6veREgHOOZHAirTVzsRoy7OD0kQsTYIxsjXlk0cYO7FK
vcmMr/E3ahzMge8XdLFYHVaMDCf8DTNjLPl0ZeuQt+IS6PP5uEPTQ8hVllT0FeSr
SzCXOrWU2GJB9SbSK6S0sg1DzZIc6+eXYV2djDKdj4AjHRvVuZ+L9L5OErNh3zsE
RY7ArWQpkrCfCB9xGT0Iud/cKbgiF23V6+Zy6lrzruoQcvw7Dtj90CwXdLEFsTP3
O0XMpkDCXnNjsuexj9DmyXcMs/1EJHUeYentoo3dj7YP2Dlxd2Zz5PEkE4BoYFa9
n7dOpW/Gf+53Axx7ob0+aWcRUAskAc2FTuc4G16YTmMsnx3Jxpn7fwDcZKinHBtE
WvgrEc9CCT+7tniXL9biRaETN1sr2fN5ZLgol2JymmXNvrXJNGiwQNUI3wWI/X4P
atJcXLfUmR7yTBG5FM6kzl8jSV78MuKqSnxO02eF3GRW90lV4w/jc873W6gbv5Qj
hAZtEkRB+5dgCl7iCAXk
=baFB
-----END PGP SIGNATURE-----
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20150317' into staging
migration/next for 20150317
# gpg: Signature made Tue Mar 17 14:21:14 2015 GMT using RSA key ID 5872D723
# gpg: Can't check signature: public key not found
* remotes/juanquintela/tags/migration/20150317:
migration: Expose 'cancelling' status to user
migration: Convert 'status' of MigrationInfo to use an enum type
hmp: Rename 'MigrationStatus' to 'HMPMigrationStatus'
migration: Rename abbreviated macro MIG_STATE_* to MIGRATION_STATUS_*
migration: Remove unused functions
arch_init: Count the total number of pages by using helper function
migrate_incoming: Cleanup/clarify error messages
Warn against the use of the string as uri parameter to migrate-incoming
migrate_incoming: use hmp_handle_error
migration: Fix remaining 32 bit compiler errors
migration: Fix some 32 bit compiler errors
migration/rdma: clean up qemu_rdma_dest_init a bit
migration: Avoid qerror_report_err() outside QMP command handlers
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* QTest for PC X86CPU
* Confinement of ICC bridge X86CPU parenting to PC code
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABAgAGBQJVCEbzAAoJEPou0S0+fgE/0CQQAK7LPJgLXD7tvbD7nhX+E+Vl
8OeawRKag367b1yqHGgdAd4JxTSSFDzjqif67OYAG5xRuA53tZ6BdccWlnLUYYbW
+v2931HR+E4KztVHato7qdq0lVmbv9N9kg44KQPPuX8cNvJIliT/ap3SKc9btSp3
I10QtM41+KqzJYa6TBzkpij12AbzOD153STrdmiasIIQc4SMKuAZRA/A14fLazj9
iraIRLQQ1gvKPuL/4eCGN65sxXHq93ga0LeU2L2slPxm8jJ1BzgzFTDJtcXSG4Sj
CQCmDCAn8BFoom3HP5REg6u0p/d1+UbBCl9S/YjUiA5lDSrJh+8xSZ4zcwAGHcXQ
LzRKxZ18TJnpg4qcohikl43NkDmCKpqbj1T5QRrFlUp5pcia7tqlREwOTJTu8YpX
gMvdMrshJ0nM2BrdTXpkeQRP4hTKJ4pbaT15FIbxAFAqwihHW07pYU1mE0enmFb+
cA4yJTT4D4qwUFGm3OJEk/jsQmEpAoD7lz2MSjBVZiX1Crprs7ETGKalVDxDYBga
CaTxJp5nZhgwEbgmKx5/AxnohMVEs40+sXieNHkFhOZ8DOJ+/kAClBmqHakR8ENg
G6B1/gN3Gr5fSTEdppXAbvDe7g8qpC9gWkV7kwFie/MykrmDWDnivvVKxt9PlRgC
DUhHfcNCISWNvaBZWc31
=fe5i
-----END PGP SIGNATURE-----
Merge remote-tracking branch 'remotes/afaerber/tags/qom-cpu-for-peter' into staging
QOM CPUState and X86CPU
* QTest for PC X86CPU
* Confinement of ICC bridge X86CPU parenting to PC code
# gpg: Signature made Tue Mar 17 15:23:31 2015 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-cpu-for-peter:
target-i386: Remove icc_bridge parameter from cpu_x86_create()
tests: Add PC CPU test
pc: Suppress APIC ID compatibility warning for QTest
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
'cancelling' status was introduced by commit 51cf4c1a, mainly to avoid a
possible start of a new migration process while the previous one still exists.
But we didn't expose this status to user, instead we returned the 'active' state.
Here, we expose it to the user (such as libvirt), 'cancelling' status only
occurs for a short window before the migration aborts, so for users,
if they cancel a migration process, it will observe 'cancelling' status
occasionally.
Testing revealed that with older libvirt (anything 1.2.13 or less) will
print an odd error message if the state is seen, but that the migration
is still properly cancelled. Newer libvirt will be patched to recognize
the new state without the odd error message.
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Cc: libvir-list@redhat.com
Signed-off-by: Juan Quintela <quintela@redhat.com>
The original 'status' is an open-coded 'str' type, convert it to use an
enum type.
This conversion is backwards compatible, better documented and
more convenient for future extensibility.
In addition, Fix a typo for qapi-schema.json (just remove the typo) :
s/'completed'. 'comppleted' (since 1.2)/'completed' (since 1.2)
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
We will use the typename 'MigrationStatus' for publicly exported typename,
So here we rename the internal-only 'MigrationStatus' to
'HMPMigrationStatus'.
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Rename all macro MIG_STATE_* to MIGRATION_STATUS_* except "MIG_STATE_ERROR",
we rename it to "MIGRATION_STATUS_FAILED" which will match the migration status
string 'failed'.
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migrate_rdma_pin_all() and qsb_clone() are completely unused and thus
can be deleted.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Cc: Juan Quintela <quintela@redhat.com>
Cc: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
There is already a helper function ram_bytes_total(), we can use it to
help counting the total number of pages used by ram blocks.
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Create a separate error for the case where migrate_incoming is
used after a succesful migrate_incoming.
Reword the error in the case where '-incoming defer' is missing
to omit the command name so it's right for both hmp and qmp.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Fix type casts between pointers and 64 bit integers.
Now 32 bit builds are possible again.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
The current code won't compile on 32 bit hosts because there are lots
of type casts between pointers and 64 bit integers.
Fix some of them.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Do not check for rdma->host being empty twice. This removes a large
"if" block, so code indentation is changed. While at it, remove an
ugly goto from the loop, replacing it with a cleaner if logic. And
finally, there's no need to initialize `ret' variable since is always
has a value.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Tested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
--
fixed space detected by Dave
Signed-off-by: Juan Quintela <quintela@redhat.com>
qerror_report_err() is a transitional interface to help with
converting existing monitor commands to QMP. It should not be used
elsewhere. Replace by error_report_err() in
process_incoming_migration_co().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Instead of passing icc_bridge from the PC initialization code to
cpu_x86_create(), make the PC initialization code attach the CPU to
icc_bridge.
The only difference here is that icc_bridge attachment will now be done
after x86_cpu_parse_featurestr() is called. But this shouldn't make any
difference, as property setters shouldn't depend on icc_bridge.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Test non-default -smp core and thread counts and a non-default CPU model
on all PC machines except for isapc. Note that not all historic versions
actually supported this particular configuration, ignored for simplicity.
For machines pc-*-1.5+ test QMP cpu-add with monotonically increasing ID,
and test for graceful failure otherwise.
Cc: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Move non-qdev-gpio[*] from /machine into /machine/unattached.
For the PC this moves 25 nodes from the stable namespace into the unstable.
Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
This cleans up the official /machine namespace. In particular
/machine/system[0] and /machine/io[0], as well as entries with
non-sanitized node names such as "/machine/qemu extended regs[0]".
The actual MemoryRegion names remain unchanged.
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
To complement qdev's bus-oriented info qtree, info qom-tree
prints a hierarchical view of the QOM composition tree.
By default, the machine composition tree is shown. This can be overriden
by supplying a path argument, such as "info qom-tree /".
Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Re-implemented based on qmp_qom_set() to facilitate argument parsing.
Warn about ambiguous path arguments.
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Implement it as a wrapper for QMP qom-list, but mimic the behavior of
scripts/qmp/qom-list in making the path argument optional and listing
the root if absent, to hint users what kind of path to pass.
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Functionally it is a recursive qom-list with qom-get per non-child<>
property. Some failures needed to be handled, such as trying to read a
pointer property, which is not representable in QMP. Those print a
literal "<EXCEPTION>".
Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Use DeviceClass::realize() and TypeInfo::instance_init() instead of
the deprecated SysBusDevice::init().
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Re-add the glx compile test to configure. We can't use pkg-config to
probe for glx, and as long as milkymist-tmu2 privately uses glx (due to
opengl infrastructure in qemu not being ready yet) we must continue to
test for glx to avoid build failures.
Reported-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCgAGBQJVBvzsAAoJEArSxjlracoU864QAMBAzk8SDV5Xxz5wF+iqfUUz
ZgDXDjsInQIgfmKo+Fe6xdCcWMD3FEpEqJ0zjn2znr89vO10r7c/BByLwf0Z9/V4
AoeCOntdtRXQfWxN+oVdxMxwbsQnGHXCzLyCzS/5tf4gweFcEM4yhRlOMoJeW879
xPt+F785+MxkgvP1nR+/twx4XwzpdnhxXmiWMiTweTkGORhveELM7S0aiF8YbC69
0GYy1ZPdJlZ8ozcLiorj1gE4ejZ0dhnpaOS1chAYRn6Zu5BwFNgGQeG9NLG5n9O9
S8oePDj7tCde8eiKU0oS4mCppByg3iZ0590YHlFOLGKqKfLJJiYX2HDJAfHO2oL8
qgsCxYjspgtkVVm3Kl3JQ2qOeJ+Ox4kzWLXXlYEt4TUdzB6423z0KRjtgUWUYMFU
Mvc59+0kyhVeUuye6R05UtAPF1bbFUxHPTf+/ComSCmmrbbC7K3gmkxXOyiNNeej
JktL71toAdEEEsE6XBtg8q1taDOySu/4oQMBzMNLpzSbOZw85o5eI5xv39VqbKWi
jp3L5zQlwTE+fYa7/mvs9dXGsl7vJ5i3YkGPe/7DMe8xeRiideOK5X6PRxSBTn+H
tA3sM6be3MRMeT9qmLJGrcy98U2gP/ZKBcNxI0LJs1FqnKCJcFZ7PEgaxcBW/9VV
/AWKoh7/pdslOgQY+ZA7
=HUhc
-----END PGP SIGNATURE-----
Merge remote-tracking branch 'remotes/bkoppelmann/tags/pull-tricore-20150316' into staging
TriCore RRR1, RRRR, RRRW, and SYS instructions
# gpg: Signature made Mon Mar 16 15:55:24 2015 GMT using RSA key ID 6B69CA14
# gpg: Good signature from "Bastian Koppelmann <kbastian@mail.uni-paderborn.de>"
* remotes/bkoppelmann/tags/pull-tricore-20150316:
target-tricore: Add instructions of SYS opcode format
target-tricore: Add instructions of RRRW opcode format
target-tricore: Add instructions of RRRR opcode format
target-tricore: Add instructions of RRR1 opcode format, which have 0xe3 as first opcode
target-tricore: Add instructions of RRR1 opcode format, which have 0x63 as first opcode
target-tricore: Add instructions of RRR1 opcode format, which have 0xa3 as first opcode
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>