[Qemu-devel] [PATCH] qga:windows os lost ip when network nic change pic order

2017-06-23 Thread indiffPig
From: "yin.zuowei" Signed-off-by: yin.zuowei bug description: In the windows virtual machine, if there are multiple network cards, the hypothesis is that A/B/C is equipped with a different IP address. Once you delete a B card in the middle and restart

Re: [Qemu-devel] [PATCH v3 3/3] migration: add bitmap for received page

2017-06-23 Thread Perevalov Alexey
On Fri, Jun 23, 2017 at 08:41:41PM +0100, Dr. David Alan Gilbert wrote: > * Perevalov Alexey (alexey.pereva...@hotmail.com) wrote: > > On Fri, Jun 23, 2017 at 11:29:42AM +0100, Dr. David Alan Gilbert wrote: > > > * Alexey Perevalov (a.pereva...@samsung.com) wrote: > > > > This patch adds ability

Re: [Qemu-devel] BUG: KASAN: use-after-free in free_old_xmit_skbs

2017-06-23 Thread Cong Wang
On Fri, Jun 23, 2017 at 1:43 AM, Jason Wang wrote: > > > On 2017年06月23日 02:53, Michael S. Tsirkin wrote: >> >> On Thu, Jun 22, 2017 at 08:15:58AM +0200, jean-philippe menil wrote: >>> >>> Hi Michael, >>> >>> from what i see, the race appear when we hit virtnet_reset in >>>

Re: [Qemu-devel] [PATCH 0/3] AHCI: re-privatize ahci headers

2017-06-23 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH 0/3] AHCI: re-privatize ahci headers Message-id: 20170623220926.11479-1-js...@redhat.com === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git

Re: [Qemu-devel] [PATCH v5 05/10] migration: move global_state.optional out

2017-06-23 Thread Eduardo Habkost
On Fri, Jun 23, 2017 at 12:46:41PM +0800, Peter Xu wrote: > Put it into MigrationState then we can use the properties to specify > whether to enable storing global state. > > Removing global_state_set_optional() since now we can use HW_COMPAT_2_3 > for x86/power, and AccelClass.global_props for

Re: [Qemu-devel] [RFC PATCH 1/2] arm/highbank: use defined type name instead of hard-coded string

2017-06-23 Thread John Snow
On 06/09/2017 11:05 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/arm/highbank.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c > index d209b97dee..dd809b404b 100644 > ---

Re: [Qemu-devel] [PATCH v5 04/10] migration: let MigrationState be a qdev

2017-06-23 Thread Eduardo Habkost
On Fri, Jun 23, 2017 at 12:46:40PM +0800, Peter Xu wrote: > Let the old man "MigrationState" join the object family. Direct benefit > is that we can start to use all the property features derived from > current QDev, like: HW_COMPAT_* bits, command line setup for migration > parameters (so will

[Qemu-devel] [PATCH 3/3] ahci: split public and private interface

2017-06-23 Thread John Snow
Complete the split by renaming ahci_public.h --> ahci.h and moving the current ahci.h to hw/ide/ahci_internal.h. Adjust ahci_internal.h to now load ahci.h instead of ahci_public.h. Finalize the split by switching external users to the new header. Signed-off-by: John Snow ---

[Qemu-devel] [PATCH 1/3] ahci: add ahci_get_num_ports

2017-06-23 Thread John Snow
Instead of reaching into the PCI state, allow the AHCIDevice to respond with how many ports it has. Signed-off-by: John Snow --- hw/i386/pc_q35.c | 4 ++-- hw/ide/ahci.c | 8 hw/mips/boston.c | 4 ++-- include/hw/ide/ahci.h | 1 + 4 files changed, 13

[Qemu-devel] [PATCH 0/3] AHCI: re-privatize ahci headers

2017-06-23 Thread John Snow
As reported by Philippe Mathieu-Daudé, including AHCI headers can quickly pull in more dependencies than is sane. To remedy this, split the AHCI headers into public and private areas as best as we can and move the private information back into hw/ide/. The only code movement is performed in patch

[Qemu-devel] [PATCH 2/3] ahci: Isolate public AHCI interface

2017-06-23 Thread John Snow
Begin separating the public/private interface by removing the minimum set of information used by code outside of hw/ide/ and calling this a new ahci_public.h file, which will be renamed to ahci.h in a future patch. Signed-off-by: John Snow --- include/hw/ide/ahci.h| 57

Re: [Qemu-devel] MIPS little endian - Bug when decoding physaddr

2017-06-23 Thread Vinicius Maciel
2017-06-23 17:21 GMT-03:00 Philippe Mathieu-Daudé : > Hi Vinicius, > > Looking at the RT5350 datasheet: > http://www.mouser.com/ds/2/813/RT5350-1022839.pdf > > pp.19> > 3.2 Memory Map Summary > 1000. - 1000.00FF 256 MbpsSYSCTL > 1011. - 1011.7FFF 32 KbpsEthernet

Re: [Qemu-devel] [PATCH v5 03/10] vl: clean up global property registerations

2017-06-23 Thread Eduardo Habkost
On Fri, Jun 23, 2017 at 12:46:39PM +0800, Peter Xu wrote: > It's not that clear on how the global properties are registered to > global_props (and also its priority relationship). Let's provide a > single function to be called in main() for that, with comment to explain > it a bit. > >

Re: [Qemu-devel] [PATCH v5 02/10] accel: introduce AccelClass.global_props

2017-06-23 Thread Eduardo Habkost
On Fri, Jun 23, 2017 at 12:46:38PM +0800, Peter Xu wrote: > Introduce this new field for the accelerator classes so that each > specific accelerator in the future can register its own global > properties to be used further by the system. It works just like how the > old machine compatible

Re: [Qemu-devel] [PATCH v5 01/10] machine: export register_compat_prop()

2017-06-23 Thread Eduardo Habkost
On Fri, Jun 23, 2017 at 12:46:37PM +0800, Peter Xu wrote: > We have HW_COMPAT_*, however that's only bound to machines, not other > things (like accelerators). Behind it, it was register_compat_prop() > that played the trick. Let's export the function for further use > outside HW_COMPAT_* magic.

Re: [Qemu-devel] [PATCH v4 2/3] Add memfd based hostmem

2017-06-23 Thread Eduardo Habkost
On Wed, Jun 21, 2017 at 04:02:18PM +0200, Marc-André Lureau wrote: > Add a new memory backend, similar to hostmem-file, except that it > doesn't need to create files. It also enforces memory sealing. > > This backend is mainly useful for sharing the memory with other > processes. How exactly can

Re: [Qemu-devel] MIPS little endian - Bug when decoding physaddr

2017-06-23 Thread Philippe Mathieu-Daudé
Hi Vinicius, On 06/23/2017 04:22 PM, Aurelien Jarno wrote: On 2017-06-23 15:14, Vinicius Maciel wrote: Hi everyone, I'm having a problem similar to the reported in this email, but now I'm trying to emulate a MIPS 24KEc, ralink RT5350F. Assembly Code: 0x802006a0 : lui t5,0xb011

Re: [Qemu-devel] [PATCH 0/3] hw/core: minor fixups

2017-06-23 Thread Laszlo Ersek
On 06/23/17 18:45, Philippe Mathieu-Daudé wrote: > Sorry to spam so many people, there is no entries in MAINTAINERS for > hw/core/loader.c and hw/core/qdev.c, any volunters? > > Philippe Mathieu-Daudé (3): > elf-loader: warn about invalid endianess > hw/core: fix missing return value in

Re: [Qemu-devel] [PATCH] Improve Cocoa modifier key handling

2017-06-23 Thread Programmingkid
This patch is incompatible with anything below Mac OS 10.10. We support Mac OS 10.5 and up. I was able to make this patch work on Mac OS 10.6 by changing this line: NSEventModifierFlags modifiers = [event modifierFlags]; to this: NSUInteger modifiers = [event modifierFlags]; This wouldn't be

Re: [Qemu-devel] [PATCH v3 3/3] migration: add bitmap for received page

2017-06-23 Thread Dr. David Alan Gilbert
* Perevalov Alexey (alexey.pereva...@hotmail.com) wrote: > On Fri, Jun 23, 2017 at 11:29:42AM +0100, Dr. David Alan Gilbert wrote: > > * Alexey Perevalov (a.pereva...@samsung.com) wrote: > > > This patch adds ability to track down already received > > > pages, it's necessary for calculation vCPU

Re: [Qemu-devel] [PATCH v2 01/21] tests: add missing dependency to build QTEST_QEMU_BINARY

2017-06-23 Thread John Snow
On 06/21/2017 11:32 PM, Philippe Mathieu-Daudé wrote: > This allow a one liner from fresh repository clone, i.e.: > > ./configure && make -j check-qtest-aarch64 > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/Makefile.include | 2 +- > 1 file changed, 1

Re: [Qemu-devel] MIPS little endian - Bug when decoding physaddr

2017-06-23 Thread Aurelien Jarno
On 2017-06-23 15:14, Vinicius Maciel wrote: > Hi everyone, > > I'm having a problem similar to the reported in this email, but now I'm > trying to emulate a MIPS 24KEc, > ralink RT5350F. > > Assembly Code: > 0x802006a0 : lui t5,0xb011 > 0x802006a4 : ori t5,t5,0x168 >

Re: [Qemu-devel] [PATCH v3] live-block-ops.txt: Rename, rewrite, and improve it

2017-06-23 Thread John Snow
On 06/23/2017 04:15 AM, Kashyap Chamarthy wrote: > On Thu, Jun 22, 2017 at 10:13:03AM -0400, John Snow wrote: >> On 06/22/2017 04:56 AM, Kashyap Chamarthy wrote: >>> On Wed, Jun 21, 2017 at 06:49:02PM -0400, John Snow wrote: > > [...] > >>> Yes, I was thinking of this, too -- just link to the

Re: [Qemu-devel] [PATCHv6 3/5] fw_cfg: move assert() and linking of fw_cfg device to the machine into instance_init()

2017-06-23 Thread Eduardo Habkost
On Fri, Jun 23, 2017 at 06:48:40PM +0200, Laszlo Ersek wrote: > On 06/23/17 18:10, Eduardo Habkost wrote: > > On Fri, Jun 23, 2017 at 05:52:03PM +0200, Laszlo Ersek wrote: > >> On 06/23/17 13:50, Eduardo Habkost wrote: > >>> On Fri, Jun 23, 2017 at 09:12:01AM +0100, Mark Cave-Ayland wrote: >

Re: [Qemu-devel] [PATCH v2 01/21] tests: add missing dependency to build QTEST_QEMU_BINARY

2017-06-23 Thread Philippe Mathieu-Daudé
On 06/22/2017 06:55 AM, Alex Bennée wrote: Philippe Mathieu-Daudé writes: This allow a one liner from fresh repository clone, i.e.: ./configure && make -j check-qtest-aarch64 TIL -j doesn't need a number and GNU Make has a -l option ;-) Also since 2.8 (2016) git

Re: [Qemu-devel] [PATCH] xen/disk: don't leak stack data via response ring

2017-06-23 Thread Stefano Stabellini
On Fri, 23 Jun 2017, Jan Beulich wrote: > >>> On 22.06.17 at 20:52, wrote: > > On Thu, 22 Jun 2017, Jan Beulich wrote: > >> >>> On 21.06.17 at 20:46, wrote: > >> > On Wed, 21 Jun 2017, Jan Beulich wrote: > >> >> >>> On 20.06.17 at 23:48,

Re: [Qemu-devel] [PATCH 05/11] travis: build tests objects in parallel, then run tests sequentially

2017-06-23 Thread Philippe Mathieu-Daudé
On 06/19/2017 08:12 AM, Peter Maydell wrote: What is perhaps a problem is that I'm not sure our tests all support being run in parallel with each other without tripping each other up by using the same temporary file / TCP port / etc at once. To the extent that this doesn't work it's a bug, but

Re: [Qemu-devel] MIPS little endian - Bug when decoding physaddr

2017-06-23 Thread Vinicius Maciel
Hi everyone, I'm having a problem similar to the reported in this email, but now I'm trying to emulate a MIPS 24KEc, ralink RT5350F. Assembly Code: 0x802006a0 : lui t5,0xb011 0x802006a4 : ori t5,t5,0x168 0x802006a8 : li t6,23 0x802006ac : nop

Re: [Qemu-devel] [PATCH v4] Add manpage for QEMU Backup Tool

2017-06-23 Thread John Snow
On 06/22/2017 02:13 PM, Ishani Chugh wrote: > qemu-backup will be a command-line tool for performing full and incremental > disk backups on running VMs. It is intended as a reference implementation > for management stack and backup developers to see QEMU's backup features in > action. The

[Qemu-devel] [Bug 1169049] Re: do not stop on first gdb breakpoint with -enable-kvm

2017-06-23 Thread Thomas Huth
Ok, anyway, thanks for your reply! So let's close this ticket now... ** Changed in: qemu Status: Incomplete => Won't Fix -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1169049 Title: do not

Re: [Qemu-devel] [PATCHv6 3/5] fw_cfg: move assert() and linking of fw_cfg device to the machine into instance_init()

2017-06-23 Thread Laszlo Ersek
On 06/23/17 18:10, Eduardo Habkost wrote: > On Fri, Jun 23, 2017 at 05:52:03PM +0200, Laszlo Ersek wrote: >> On 06/23/17 13:50, Eduardo Habkost wrote: >>> On Fri, Jun 23, 2017 at 09:12:01AM +0100, Mark Cave-Ayland wrote: On 21/06/17 14:23, Eduardo Habkost wrote: > I now have a v7

[Qemu-devel] [PATCH 3/3] hw/core: report an error if invalid gpio is used

2017-06-23 Thread Philippe Mathieu-Daudé
then abort calling error_setg() Signed-off-by: Philippe Mathieu-Daudé --- hw/core/qdev.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 849952a8d4..05aaa67cb8 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@

[Qemu-devel] [PATCH v10 11/20] qcow2: convert QCow2 to use QCryptoBlock for encryption

2017-06-23 Thread Daniel P. Berrange
This converts the qcow2 driver to make use of the QCryptoBlock APIs for encrypting image content, using the legacy QCow2 AES scheme. With this change it is now required to use the QCryptoSecret object for providing passwords, instead of the current block password APIs / interactive prompting.

[Qemu-devel] [PATCH v10 12/20] qcow2: extend specification to cover LUKS encryption

2017-06-23 Thread Daniel P. Berrange
Update the qcow2 specification to describe how the LUKS header is placed inside a qcow2 file, when using LUKS encryption for the qcow2 payload instead of the legacy AES-CBC encryption Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz

[Qemu-devel] [PATCH 1/3] elf-loader: warn about invalid endianess

2017-06-23 Thread Philippe Mathieu-Daudé
fprintf(stderr) is how errors are reported in this file. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/loader.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/core/loader.c b/hw/core/loader.c index f72930ca4a..094f24627f 100644 --- a/hw/core/loader.c +++

[Qemu-devel] [PATCH v10 09/20] qcow: convert QCow to use QCryptoBlock for encryption

2017-06-23 Thread Daniel P. Berrange
This converts the qcow driver to make use of the QCryptoBlock APIs for encrypting image content. This is only wired up to permit use of the legacy QCow encryption format. Users who wish to have the strong LUKS format should switch to qcow2 instead. With this change it is now required to use the

[Qemu-devel] [PATCH v10 17/20] block: remove all encryption handling APIs

2017-06-23 Thread Daniel P. Berrange
Now that all encryption keys must be provided upfront via the QCryptoSecret API and associated block driver properties there is no need for any explicit encryption handling APIs in the block layer. Encryption can be handled transparently within the block driver. We only retain an API for querying

[Qemu-devel] [PATCH v10 08/20] qcow: make encrypt_sectors encrypt in place

2017-06-23 Thread Daniel P. Berrange
Instead of requiring separate input/output buffers for encrypting data, change encrypt_sectors() to assume use of a single buffer, encrypting in place. One current caller uses the same buffer for input/output already and the other two callers are easily converted to do so. Reviewed-by: Alberto

Re: [Qemu-devel] [PULL 00/01] seccomp branch queue

2017-06-23 Thread Peter Maydell
On 22 June 2017 at 09:33, Eduardo Otubo wrote: > The following changes since commit 8dfaf23ae1f2273a9730a9b309cc8471269bb524: > > tcg/tci: fix tcg-interpreter build (2017-06-20 18:39:15 +0100) > > are available in the git repository at: > > https://github.com/otubo/qemu.git

[Qemu-devel] [Bug 1169049] Re: do not stop on first gdb breakpoint with -enable-kvm

2017-06-23 Thread skovalev via Qemu-devel
Hello. I have forgot about this. I even unable to remember what I have done. Unfortunately I can't help you. Sorry. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1169049 Title: do not stop on

[Qemu-devel] [PATCH v10 16/20] block: rip out all traces of password prompting

2017-06-23 Thread Daniel P. Berrange
Now that qcow & qcow2 are wired up to get encryption keys via the QCryptoSecret object, nothing is relying on the interactive prompting for passwords. All the code related to password prompting can thus be ripped out. Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz

[Qemu-devel] [PATCH v10 02/20] block: add ability to set a prefix for opt names

2017-06-23 Thread Daniel P. Berrange
When integrating the crypto support with qcow/qcow2, we don't want to use the bare LUKS option names "hash-alg", "key-secret", etc. We need to namespace them to match the nested QAPI schema. e.g. "encrypt.hash-alg", "encrypt.key-secret" so that they don't clash with any general qcow options at a

[Qemu-devel] [PATCH 2/3] hw/core: fix missing return value in load_image_targphys_as()

2017-06-23 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/core/loader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/core/loader.c b/hw/core/loader.c index 094f24627f..e137e772ae 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -150,7 +150,9 @@ int

Re: [Qemu-devel] [PATCH 1/3] elf-loader: warn about invalid endianess

2017-06-23 Thread Peter Maydell
On 23 June 2017 at 17:45, Philippe Mathieu-Daudé wrote: > fprintf(stderr) is how errors are reported in this file. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/core/loader.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/core/loader.c

[Qemu-devel] [PATCH v10 15/20] iotests: enable tests 134 and 158 to work with qcow (v1)

2017-06-23 Thread Daniel P. Berrange
The 138 and 158 iotests exercise the legacy qcow2 aes encryption code path and they work fine with qcow v1 too. Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz Signed-off-by: Daniel P. Berrange --- tests/qemu-iotests/134 | 2 +-

[Qemu-devel] [PULL 58/61] blkdebug: Catch bs->exact_filename overflow

2017-06-23 Thread Kevin Wolf
From: Max Reitz The bs->exact_filename field may not be sufficient to store the full blkdebug node filename. In this case, we should not generate a filename at all instead of an unusable one. Cc: qemu-sta...@nongnu.org Reported-by: Qu Wenruo

[Qemu-devel] [PATCH 0/3] hw/core: minor fixups

2017-06-23 Thread Philippe Mathieu-Daudé
Sorry to spam so many people, there is no entries in MAINTAINERS for hw/core/loader.c and hw/core/qdev.c, any volunters? Philippe Mathieu-Daudé (3): elf-loader: warn about invalid endianess hw/core: fix missing return value in load_image_targphys_as() hw/core: report an error if invalid

[Qemu-devel] [PATCH v10 07/20] block: deprecate "encryption=on" in favor of "encrypt.format=aes"

2017-06-23 Thread Daniel P. Berrange
Historically the qcow & qcow2 image formats supported a property "encryption=on" to enable their built-in AES encryption. We'll soon be supporting LUKS for qcow2, so need a more general purpose way to enable encryption, with a choice of formats. This introduces an "encrypt.format" option, which

[Qemu-devel] [PULL 53/61] qed: Add coroutine_fn to I/O path functions

2017-06-23 Thread Kevin Wolf
Now that we stay in coroutine context for the whole request when doing reads or writes, we can add coroutine_fn annotations to many functions that can do I/O or yield directly. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed-cluster.c

Re: [Qemu-devel] [PATCH v2] blockdev: Print a warning for legacy drive options that belong to -device

2017-06-23 Thread Thomas Huth
On 12.05.2017 12:33, Thomas Huth wrote: > We likely do not want to carry these legacy -drive options along forever. > Let's emit a deprecation warning for the -drive options that have a > replacement with the -device option, so that the (hopefully few) remaining > users are aware of this and can

[Qemu-devel] [PATCH v10 10/20] qcow2: make qcow2_encrypt_sectors encrypt in place

2017-06-23 Thread Daniel P. Berrange
Instead of requiring separate input/output buffers for encrypting data, change qcow2_encrypt_sectors() to assume use of a single buffer, encrypting in place. The current callers all used the same buffer for input/output already. Signed-off-by: Daniel P. Berrange ---

[Qemu-devel] [PULL 51/61] qed: Simplify request handling

2017-06-23 Thread Kevin Wolf
Now that we process a request in the same coroutine from beginning to end and don't drop out of it any more, we can look like a proper coroutine-based driver and simply call qed_aio_next_io() and get a return value from it instead of spawning an additional coroutine that reenters the parent when

[Qemu-devel] [PATCH v10 20/20] docs: document encryption options for qcow, qcow2 and luks

2017-06-23 Thread Daniel P. Berrange
Expand the image format docs to cover the new options for the qcow, qcow2 and luks disk image formats Reviewed-by: Alberto Garcia Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- qemu-doc.texi | 123

[Qemu-devel] [PATCH v10 06/20] iotests: skip 048 with qcow which doesn't support resize

2017-06-23 Thread Daniel P. Berrange
Test 048 is designed to verify data preservation during an image resize. The qcow (v1) format impl has never supported resize so always fails. Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia Signed-off-by: Daniel P. Berrange ---

[Qemu-devel] [PATCH v10 18/20] block: pass option prefix down to crypto layer

2017-06-23 Thread Daniel P. Berrange
While the crypto layer uses a fixed option name "key-secret", the upper block layer may have a prefix on the options. e.g. "encrypt.key-secret", in order to avoid clashes between crypto option names & other block option names. To ensure the crypto layer can report accurate error messages, we must

[Qemu-devel] [PULL 50/61] qed: Use CoQueue for serialising allocations

2017-06-23 Thread Kevin Wolf
Now that we're running in coroutine context, the ad-hoc serialisation code (which drops a request that has to wait out of coroutine context) can be replaced by a CoQueue. This means that when we resume a serialised request, it is running in coroutine context again and its I/O isn't blocking any

[Qemu-devel] [PATCH v10 19/20] qcow2: report encryption specific image information

2017-06-23 Thread Daniel P. Berrange
Currently 'qemu-img info' reports a simple "encrypted: yes" field. This is not very useful now that qcow2 can support multiple encryption formats. Users want to know which format is in use and some data related to it. Wire up usage of the qcrypto_block_get_info() method so that 'qemu-img info'

[Qemu-devel] [PATCH v10 13/20] qcow2: add support for LUKS encryption format

2017-06-23 Thread Daniel P. Berrange
This adds support for using LUKS as an encryption format with the qcow2 file, using the new encrypt.format parameter to request "luks" format. e.g. # qemu-img create --object secret,data=123456,id=sec0 \ -f qcow2 -o encrypt.format=luks,encrypt.key-secret=sec0 \ test.qcow2 10G The

[Qemu-devel] [PATCH v10 05/20] iotests: skip 042 with qcow which dosn't support zero sized images

2017-06-23 Thread Daniel P. Berrange
Test 042 is designed to verify operation with zero sized images. Such images are not supported with qcow (v1), so this test has always failed. Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia Signed-off-by: Daniel P. Berrange ---

[Qemu-devel] [PULL 44/61] qed: Add return value to qed_aio_write_cow()

2017-06-23 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. While refactoring qed_aio_write_alloc() to accomodate the change, qed_aio_write_zero_cluster() ended up with a single line, so I chose to inline that line and remove the

[Qemu-devel] [PATCH v10 14/20] qcow2: add iotests to cover LUKS encryption support

2017-06-23 Thread Daniel P. Berrange
This extends the 087 iotest to cover LUKS encryption when doing blockdev-add. Two further tests are added to validate read/write of LUKS encrypted images with a single file and with a backing file. Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz

[Qemu-devel] [PATCH v10 04/20] qcow: require image size to be > 1 for new images

2017-06-23 Thread Daniel P. Berrange
The qcow driver refuses to open images which are less than 2 bytes in size, but will happily create such images. Add a check in the create path to avoid this discrepancy. Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia Reviewed-by: Eric Blake

[Qemu-devel] [PULL 45/61] qed: Add return value to qed_aio_write_inplace/alloc()

2017-06-23 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed.c | 43 --- 1 file

[Qemu-devel] [PULL 59/61] blkverify: Catch bs->exact_filename overflow

2017-06-23 Thread Kevin Wolf
From: Max Reitz The bs->exact_filename field may not be sufficient to store the full blkverify node filename. In this case, we should not generate a filename at all instead of an unusable one. Cc: qemu-sta...@nongnu.org Reported-by: Qu Wenruo

[Qemu-devel] [PATCH v10 00/20] Convert QCow[2] to QCryptoBlock & add LUKS support

2017-06-23 Thread Daniel P. Berrange
Previously posted: v1: https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg00201.html v2: https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg05147.html v3: https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg05671.html v4:

[Qemu-devel] [PULL 55/61] block: Remove bdrv_aio_readv/writev/flush()

2017-06-23 Thread Kevin Wolf
These functions are unused now. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/io.c| 171 -- block/trace-events| 3 - include/block/block.h | 8 --- 3 files changed, 182

[Qemu-devel] [PULL 09/15] target/s390x: Implement processor-assist insn

2017-06-23 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/insn-data.def | 3 +++ target/s390x/translate.c | 1 + 2 files changed, 4 insertions(+) diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def index

[Qemu-devel] [PATCH v10 03/20] qcow: document another weakness of qcow AES encryption

2017-06-23 Thread Daniel P. Berrange
Document that use of guest virtual sector numbers as the basis for the initialization vectors is a potential weakness, when combined with internal snapshots or multiple images using the same passphrase. This fixes the formatting of the itemized list too. Reviewed-by: Max Reitz

[Qemu-devel] [PULL 57/61] fix: avoid an infinite loop or a dangling pointer problem in img_commit

2017-06-23 Thread Kevin Wolf
From: "sochin.jiang" img_commit could fall into an infinite loop calling run_block_job() if its blockjob fails on any I/O error, fix this already known problem. Signed-off-by: sochin.jiang Message-id:

[Qemu-devel] [PULL 42/61] qed: Add return value to qed_aio_write_l2_update()

2017-06-23 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed.c | 43 ++- 1 file

[Qemu-devel] [PULL 60/61] block: Do not strcmp() with NULL uri->scheme

2017-06-23 Thread Kevin Wolf
From: Max Reitz uri_parse(...)->scheme may be NULL. In fact, probably every field may be NULL, and the callers do test this for all of the other fields but not for scheme (except for block/gluster.c; block/vxhs.c does not access that field at all). We can easily fix this by

[Qemu-devel] [PATCH v10 01/20] block: expose crypto option names / defs to other drivers

2017-06-23 Thread Daniel P. Berrange
The block/crypto.c defines a set of QemuOpts that provide parameters for encryption. This will also be needed by the qcow/qcow2 integration, so expose the relevant pieces in a new block/crypto.h header. Some helper methods taking QemuOpts are changed to take QDict to simplify usage in other

[Qemu-devel] [PULL 61/61] qemu-img: don't shadow opts variable in img_dd()

2017-06-23 Thread Kevin Wolf
From: Stefan Hajnoczi It's confusing when two different variables have the same name in one function. Cc: Reda Sallahi Signed-off-by: Stefan Hajnoczi Message-id: 20170619150002.3033-1-stefa...@redhat.com Signed-off-by: Max Reitz

[Qemu-devel] [PULL 52/61] qed: Use a coroutine for need_check_timer

2017-06-23 Thread Kevin Wolf
This fixes the last place where we degraded from AIO to actual blocking synchronous I/O requests. Putting it into a coroutine means that instead of blocking, the coroutine simply yields while doing I/O. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PULL 41/61] qed: Add return value to qed_aio_write_l1_update()

2017-06-23 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed.c | 19 +-- 1 file changed, 9 insertions(+),

[Qemu-devel] [PULL 56/61] block: change variable names in BlockDriverState

2017-06-23 Thread Kevin Wolf
From: Manos Pitsidianakis Change the 'int count' parameter in *pwrite_zeros, *pdiscard related functions (and some others) to 'int bytes', as they both refer to bytes. This helps with code legibility. Signed-off-by: Manos Pitsidianakis Message-id:

[Qemu-devel] [PULL 40/61] qed: Inline qed_commit_l2_update()

2017-06-23 Thread Kevin Wolf
qed_commit_l2_update() is unconditionally called at the end of qed_aio_write_l1_update(). Inline it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed.c | 36 ++-- 1 file changed, 14 insertions(+), 22

[Qemu-devel] [PULL 47/61] qed: Remove ret argument from qed_aio_next_io()

2017-06-23 Thread Kevin Wolf
All callers pass ret = 0, so we can just remove it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/block/qed.c b/block/qed.c index

[Qemu-devel] [PULL 54/61] qed: Use bdrv_co_* for coroutine_fns

2017-06-23 Thread Kevin Wolf
All functions that are marked coroutine_fn can directly call the bdrv_co_* version of functions instead of going through the wrapper. Signed-off-by: Kevin Wolf Reviewed-by: Manos Pitsidianakis Reviewed-by: Stefan Hajnoczi ---

[Qemu-devel] [PULL 49/61] qed: Implement .bdrv_co_readv/writev

2017-06-23 Thread Kevin Wolf
Most of the qed code is now synchronous and matches the coroutine model. One notable exception is the serialisation between requests which can still schedule a callback. Before we can replace this with coroutine locks, let's convert the driver's external interfaces to the coroutine versions. We

[Qemu-devel] [PULL 05/15] target/s390x: Implement load-on-condition-2 insns

2017-06-23 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/insn-data.def | 9 + target/s390x/insn-format.def | 1 + target/s390x/translate.c | 18 +++--- 3 files changed, 25 insertions(+), 3 deletions(-)

[Qemu-devel] [PULL 11/15] target/s390x: Finish implementing ETF2-ENH

2017-06-23 Thread Richard Henderson
Missed the proper alignment in TRTO/TRTT, and ignoring the M3 field for all TRXX insns without ETF2-ENH. Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 11 ++- target/s390x/translate.c | 5 +++-- 2

[Qemu-devel] [PULL 15/15] target/s390x: Implement idte instruction

2017-06-23 Thread Richard Henderson
From: David Hildenbrand Let's keep it very simple for now and flush the complete tlb, we currently can't find the right entries in our tlb, we would have to store the used tables for each element. As we now fully implement the DAT-enhancement facility, we can allow to enable

[Qemu-devel] [PULL 03/15] target/s390x: implement mvcos instruction

2017-06-23 Thread Richard Henderson
From: David Hildenbrand This adds support for the MOVE WITH OPTIONAL SPECIFICATIONS (MVCOS) instruction. Allow to enable it for the qemu cpu model using qemu-system-s390x ... -cpu qemu,mvcos=on ... This allows to boot linux kernel that uses it for uacccess. We are missing

[Qemu-devel] [PULL 46/61] qed: Add return value to qed_aio_read/write_data()

2017-06-23 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed.c | 72

[Qemu-devel] [PULL 36/61] qed: Remove GenericCB

2017-06-23 Thread Kevin Wolf
The GenericCB infrastructure isn't used any more. Remove it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/Makefile.objs | 2 +- block/qed-gencb.c | 33 - block/qed.h | 11 --- 3 files

[Qemu-devel] [PULL 14/15] target/s390x: Improve heuristic for ipte

2017-06-23 Thread Richard Henderson
From: David Hildenbrand If only the page index is set, most likely we don't have a valid virtual address. Let's do a full tlb flush for that case. Signed-off-by: David Hildenbrand Message-Id: <20170622094151.28633-3-da...@redhat.com> Signed-off-by: Richard

[Qemu-devel] [PULL 00/15] Queued target/s390x patches

2017-06-23 Thread Richard Henderson
(2017-06-22 15:09:48 +0100) are available in the git repository at: git://github.com/rth7680/qemu.git tags/pull-s390-20170623 for you to fetch changes up to be7f28de5d7f635647d7991ace96c54d9f724be4: target/s390x: Implement idte instruction (2017-06-23 09:17:45 -0700

[Qemu-devel] [PULL 48/61] qed: Remove recursion in qed_aio_next_io()

2017-06-23 Thread Kevin Wolf
Instead of calling itself recursively as the last thing, just convert qed_aio_next_io() into a loop. This patch is best reviewed with 'git show -w' because most of it is just whitespace changes. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi ---

[Qemu-devel] [PULL 35/61] qed: Make qed_write_table() synchronous

2017-06-23 Thread Kevin Wolf
Note that this code is generally not running in coroutine context, so this is an actual blocking synchronous operation. We'll fix this in a moment. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed-table.c | 84

[Qemu-devel] [PULL 13/15] target/s390x: Indicate and check for local tlb clearing

2017-06-23 Thread Richard Henderson
From: David Hildenbrand Let's allow to enable it for the qemu cpu model and correctly emulate it. Signed-off-by: David Hildenbrand Message-Id: <20170622094151.28633-2-da...@redhat.com> Signed-off-by: Richard Henderson ---

[Qemu-devel] [PULL 02/15] target/s390x: change PSW_SHIFT_KEY

2017-06-23 Thread Richard Henderson
From: David Hildenbrand Such shifts are usually used to easily extract the PSW KEY from the PSW mask, so let's avoid the confusing offset of 4. Reviewed-by: Aurelien Jarno Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand

[Qemu-devel] [PULL 34/61] qed: Remove callback from qed_write_header()

2017-06-23 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed.c | 32 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/block/qed.c b/block/qed.c index 2665efc..95f1050 100644 --- a/block/qed.c +++

[Qemu-devel] [PULL 43/61] qed: Add return value to qed_aio_write_main()

2017-06-23 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed.c | 55

[Qemu-devel] [PULL 29/61] qed: Remove callback from qed_find_cluster()

2017-06-23 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed-cluster.c | 39 ++- block/qed.c | 24 +++- block/qed.h | 4 ++-- 3 files changed, 35 insertions(+), 32

[Qemu-devel] [PULL 39/61] qed: Make qed_aio_write_main() synchronous

2017-06-23 Thread Kevin Wolf
Note that this code is generally not running in coroutine context, so this is an actual blocking synchronous operation. We'll fix this in a moment. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed.c | 61

[Qemu-devel] [PULL 32/61] qed: Remove callback from qed_copy_from_backing_file()

2017-06-23 Thread Kevin Wolf
With this change, qed_aio_write_prefill() and qed_aio_write_postfill() collapse into a single function. This is reflected by a rename of the combined function to qed_aio_write_cow(). Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan

[Qemu-devel] [PULL 12/15] target/s390x: Clean up TB flag bits

2017-06-23 Thread Richard Henderson
Most of the PSW bits that were being copied into TB->flags are not relevant to translation. Removing those that are unnecessary reduces the amount of translation required. Reviewed-by: Aurelien Jarno Reviewed-by: Philippe Mathieu-Daudé Signed-off-by:

[Qemu-devel] [PULL 37/61] qed: Remove callback from qed_write_table()

2017-06-23 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed-table.c | 47 --- block/qed.c | 12 +++- block/qed.h | 8 +++- 3 files changed, 22 insertions(+), 45 deletions(-)

[Qemu-devel] [PULL 23/61] qcow2: Merge the writing of the COW regions with the guest data

2017-06-23 Thread Kevin Wolf
From: Alberto Garcia If the guest tries to write data that results on the allocation of a new cluster, instead of writing the guest data first and then the data from the COW regions, write everything together using one single I/O operation. This can improve the write

  1   2   3   >