- 23 9月, 2016 2 次提交
-
-
由 Daniel P. Berrange 提交于
Broken in previous commit: commit aaa4d20b Author: Kevin Wolf <kwolf@redhat.com> Date: Wed Jun 1 15:21:05 2016 +0200 qcow2: Make copy_sectors() byte based The copy_sectors() code was originally using the 'sector' parameter for encryption, which was passed in by the caller from the QCowL2Meta.offset field (aka the guest logical offset). After the change, the code is using 'cluster_offset' which was passed in from QCow2L2Meta.alloc_offset field (aka the host physical offset). This would cause the data to be encrypted using an incorrect initialization vector which will in turn cause later reads to return garbage. Although current qcow2 built-in encryption is blocked from usage in the emulator, one could still hit this if writing to the file via qemu-{img,io,nbd} commands. Cc: qemu-stable@nongnu.org Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Dmitry Osipenko 提交于
Ptimer is a generic countdown timer helper that is used by many timer device models as well as by the QEMU core. Add QTests for the ptimer. Signed-off-by: NDmitry Osipenko <digetx@gmail.com> Message-id: 1de89fe6e1ccaf6c8071ee3469e1a844df948359.1473252818.git.digetx@gmail.com Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 21 9月, 2016 3 次提交
-
-
Source disk is created and filled with test data before each test case. Instead initialize it once for the whole unit. Test disk filling patterns are merged into one pattern. Also TestSetSpeed used different image_len for source and target (by mistake) - this is automatically fixed here. Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 1470748523-13856-1-git-send-email-vsementsov@virtuozzo.com Reviewed-by: NPavel Butsykin <pbutsykin@virtuozzo.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
由 Reda Sallahi 提交于
This adds the skip option which allows qemu-img dd to skip a number of blocks before copying the input. A test case was added to test the skip option. Signed-off-by: NReda Sallahi <fullmanet@gmail.com> Message-id: 20160810141609.32727-1-fullmanet@gmail.com Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
由 Reda Sallahi 提交于
This patch adds a basic dd subcommand analogous to dd(1) to qemu-img. For the start, this implements the bs, if, of and count options and requires both if and of to be specified (no stdin/stdout if not specified) and doesn't support tty, pipes, etc. The image format must be specified with -O for the output if the raw format is not the intended one. Two tests are added to test qemu-img dd. Signed-off-by: NReda Sallahi <fullmanet@gmail.com> Message-id: 20160810024312.14544-1-fullmanet@gmail.com Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> [mreitz: Moved test 158 to 170] Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
- 19 9月, 2016 4 次提交
-
-
由 Marc-André Lureau 提交于
Check that invalid args on commands without arguments returns an error. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20160912091913.15831-15-marcandre.lureau@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
由 Marc-André Lureau 提交于
The generated marshal functions do not visit arguments from commands that take no arguments. Thus they fail to catch invalid members. Visit the arguments, if provided, to throw an error in case of invalid members. Currently, qmp_check_client_args() checks for invalid arguments and correctly catches this case. When switching to qmp_dispatch() we want to keep that behaviour. The commands using 'O' may have arbitrary arguments, and must have 'gen': false in the qapi schema to skip the generated checks. Old/new diff: void qmp_marshal_stop(QDict *args, QObject **ret, Error **errp) { Error *err = NULL; + Visitor *v = NULL; - (void)args; + if (args) { + v = qmp_input_visitor_new(QOBJECT(args), true); + visit_start_struct(v, NULL, NULL, 0, &err); + if (err) { + goto out; + } + + if (!err) { + visit_check_struct(v, &err); + } + visit_end_struct(v, NULL); + if (err) { + goto out; + } + } qmp_stop(&err); + +out: error_propagate(errp, err); + visit_free(v); + if (args) { + v = qapi_dealloc_visitor_new(); + visit_start_struct(v, NULL, NULL, 0, NULL); + + visit_end_struct(v, NULL); + visit_free(v); + } } The new code closely resembles code for a command with arguments. Differences: - the visit of the argument and its cleanup struct don't visit any members (because there are none). - the visit of the argument struct and its cleanup are conditional. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20160912091913.15831-14-marcandre.lureau@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently pbkdf is only supported with SHA1 and SHA256. Expand this to support all algorithms known to QEMU. Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently when timing the pbkdf algorithm a fixed key size of 32 bytes is used. This results in inaccurate timings for certain hashes depending on their digest size. For example when using sha1 with aes-256, this causes us to measure time for the master key digest doing 2 sha1 operations per iteration, instead of 1. Instead we should pass in the desired key size to the timing routine that matches the key size that will be used for real later. Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 16 9月, 2016 2 次提交
-
-
由 Greg Kurz 提交于
This adds PCI init code and a basic test that checks the device config matches what is passed on the command line. Signed-off-by: NGreg Kurz <groug@kaod.org> Acked-by: NCornelia Huck <cornelia.huck@de.ibm.com>
-
由 Greg Kurz 提交于
First step to be able to run several functional steps. Signed-off-by: NGreg Kurz <groug@kaod.org> Acked-by: NCornelia Huck <cornelia.huck@de.ibm.com>
-
- 14 9月, 2016 1 次提交
-
-
由 Richard Henderson 提交于
Signed-off-by: NRichard Henderson <rth@twiddle.net> Message-Id: <1472496380-19706-6-git-send-email-rth@twiddle.net> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 13 9月, 2016 2 次提交
-
-
由 Laurent Vivier 提交于
vq->avail.idx and vq->avail->ring[] are a 16bit values, so read and write them with readw()/writew() instead of readl()/writel(). To read/write a 16bit value with a 32bit accessor works fine on little-endian CPU but not on big endian CPU. [An equivalent patch for the writew() calls was also sent by Zhang Shuai <zhangshuai13@huawei.com>. --Stefan] Signed-off-by: NLaurent Vivier <lvivier@redhat.com> Message-id: 1472330054-22607-1-git-send-email-lvivier@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Changlong Xie 提交于
[Rename get_error test cases to get_error_all to avoid tripping up scripts that grep for "error:" in test output. It also reflects the actual replication API function name better. -Stefan] Signed-off-by: NWen Congyang <wency@cn.fujitsu.com> Signed-off-by: NChanglong Xie <xiecl.fnst@cn.fujitsu.com> Signed-off-by: NWang WeiWei <wangww.fnst@cn.fujitsu.com> Message-id: 1469602913-20979-11-git-send-email-xiecl.fnst@cn.fujitsu.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 12 9月, 2016 2 次提交
-
-
由 Gonglei 提交于
gnutls commit 846753877d renamed LIBGNUTLS_VERSION_NUMBER to GNUTLS_VERSION_NUMBER. If using gnutls before that verion, we'll get the below warning: crypto/tlscredsx509.c:618:5: warning: "GNUTLS_VERSION_NUMBER" is not defined Because gnutls 3.x still defines LIBGNUTLS_VERSION_NUMBER for back compat, Let's use LIBGNUTLS_VERSION_NUMBER instead of GNUTLS_VERSION_NUMBER to fix building complaint. Signed-off-by: NGonglei <arei.gonglei@huawei.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The XTS cipher mode needs to be used with a cipher which has a block size of 16 bytes. If a mis-matching block size is used, the code will either corrupt memory beyond the IV array, or not fully encrypt/decrypt the IV. This fixes a memory corruption crash when attempting to use cast5-128 with xts, since the former has an 8 byte block size. A test case is added to ensure the cipher creation fails with such an invalid combination. Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 10 9月, 2016 1 次提交
-
-
由 Marcel Apfelbaum 提交于
Use kvm acceleration if available. Disable kernel-irqchip and use qemu64 cpu for both kvm and tcg cases. Using kvm acceleration saves about a second and disabling kernel-irqchip has no visible performance impact. Acked-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMarcel Apfelbaum <marcel@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 08 9月, 2016 22 次提交
-
-
由 Marc-André Lureau 提交于
A few strings are allocated and never freed. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Marc-André Lureau 提交于
In all cases, even when the dict doesn't contain 'ram', the qmp response must be unref. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Marc-André Lureau 提交于
The path is allocated and should be freed. The qmp response should be unref, but then 'machine' must be duplicated. Use a destroy function for the PCTestData. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Marc-André Lureau 提交于
Allows one to specify a destroy function for the test data. Add a fallback using glib g_test_add_vtable() internal function, whose signature changed over time. Tested with glib 2.22, 2.26 and 2.48, which according to git log should be enough to cover all variations. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Marc-André Lureau 提交于
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Marc-André Lureau 提交于
Free the list returned by visit_type_intList(). Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Marc-André Lureau 提交于
Found thanks to ASAN. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Marc-André Lureau 提交于
Found thanks to ASAN. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Marc-André Lureau 提交于
Spotted thanks to ASAN. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Marc-André Lureau 提交于
Spotted thanks to ASAN. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Marc-André Lureau 提交于
Spotted thanks to ASAN. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Marc-André Lureau 提交于
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Sascha Silbe 提交于
If we silence docker when --quiet is given, we should also silence the .pre script (i.e. debootstrap). Only discards stdout, so some diagnostics (e.g. from git clone) are still printed. Most of the verbose output is gone however and this way we still have a chance to see error messages. Signed-off-by: NSascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1473192351-601-9-git-send-email-silbe@linux.vnet.ibm.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Sascha Silbe 提交于
When using the git version of debootstrap (because no usable version of debootstrap was installed on the host), we need to run 'make' so that devices.tar.gz gets built. Otherwise the first debootstrap stage will fail without printing any error message. Signed-off-by: NSascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1473192351-601-8-git-send-email-silbe@linux.vnet.ibm.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Sascha Silbe 提交于
debootstrap prior to 1.0.67 generated an empty sources.list during foreign bootstraps (Debian#732255 [1]). Fall back to the git checkout if the installed debootstrap version is too old. [1] https://bugs.debian.org/732255Signed-off-by: NSascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1473192351-601-7-git-send-email-silbe@linux.vnet.ibm.com> [Update 'sort -C' to 'sorc -c &>/dev/null' - Fam] Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Sascha Silbe 提交于
Building the debian-debootstrap image will usually fail if EXECUTABLE isn't set (when using the Makefile). Warn the user in this case so they know why it's failing. Signed-off-by: NSascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1473192351-601-6-git-send-email-silbe@linux.vnet.ibm.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Sascha Silbe 提交于
The debian-bootstrap image doesn't choose a default architecture and distribution version, instead the user has to set both DEB_ARCH and DEB_TYPE in the environment. Print a reasonably helpful message if either of them isn't set instead of complaining about "qemu-" being missing or erroring out because we cannot cd to the mirror URL. Signed-off-by: NSascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1473192351-601-5-git-send-email-silbe@linux.vnet.ibm.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Sascha Silbe 提交于
Send error messages where they belong so they're seen even if stdout is redirected to /dev/null. Signed-off-by: NSascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1473192351-601-4-git-send-email-silbe@linux.vnet.ibm.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Sascha Silbe 提交于
The 'realpath' executable is shipped in a separate package that isn't installed by default on some distros. We already use 'readlink -e' (provided by GNU coreutils) in some other part of the code, so let's settle for that instead. Signed-off-by: NSascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1473192351-601-3-git-send-email-silbe@linux.vnet.ibm.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Sascha Silbe 提交于
Unlike Popen.communicate(), subprocess.call() doesn't read from the stdout file descriptor. If the child process produces more output than fits into the pipe buffer, it will block indefinitely. If we don't intend to consume the output, just send it straight to /dev/null to avoid this issue. Signed-off-by: NSascha Silbe <silbe@linux.vnet.ibm.com> Reviewed-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1473192351-601-2-git-send-email-silbe@linux.vnet.ibm.com> Signed-off-by: NFam Zheng <famz@redhat.com>
-
由 Fam Zheng 提交于
It's a variation of our existing centos6, plus two more lines to downgrade glib2 to version 2.22 which we download from vault.centos.org. Suggested-by: NPaolo Bonzini <pbonzoni@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com> Message-Id: <1470708908-12885-1-git-send-email-famz@redhat.com>
-
由 Peter Maydell 提交于
The unlink() function doesn't accept a NULL pointer, so don't pass it one. Spotted by the clang sanitizer. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NJohn Snow <jsnow@redhat.com> Message-id: 1470391392-28274-1-git-send-email-peter.maydell@linaro.org
-
- 07 9月, 2016 1 次提交
-
-
由 Thomas Huth 提交于
Some of the machines that we have got a firmware image for write some output to the serial console while booting up. We can use this output to make sure that the machine is basically working, so this adds a test that checks the output of these machines for some well-known "magic" strings. Signed-off-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
-