Re: [Qemu-devel] [PATCH v4 2/5] qcow2: Document some maximum size constraints

2018-02-28 Thread Alberto Garcia
On Wed 28 Feb 2018 03:01:33 PM CET, Eric Blake wrote: >>> The refcount table has implications on the maximum host file size; a >>> larger cluster size is required for the refcount table to cover >>> larger offsets. >> >> Why is this? Because of the refcount_table_clusters field ? >> >> I think t

Re: [Qemu-devel] [PATCH 1/2] block/file-posix: Fix fully preallocated truncate

2018-02-28 Thread Eric Blake
On 02/28/2018 07:53 AM, Daniel P. Berrangé wrote: @@ -1711,8 +1712,8 @@ static int raw_regular_truncate(int fd, int64_t offset, PreallocMode prealloc, buf = g_malloc0(65536); -result = lseek(fd, current_length, SEEK_SET); -if (result < 0) { +seek_result

Re: [Qemu-devel] [PATCH] fw_cfg: avoid unused function warning

2018-02-28 Thread Marc-André Lureau
Hi On Wed, Feb 28, 2018 at 2:33 PM, Arnd Bergmann wrote: > The newly introduced fw_cfg_dma_transfer() function is unused when > CONFIG_CRASH_CORE is disabled: > > drivers/firmware/qemu_fw_cfg.c:89:16: error: 'fw_cfg_dma_transfer' defined > but not used [-Werror=unused-function] > static ssize_t

Re: [Qemu-devel] [PATCH 0/2] block/file-posix: Fix fully preallocated truncate

2018-02-28 Thread Eric Blake
On 02/28/2018 07:13 AM, Max Reitz wrote: Fully preallocated truncation has a 50 % chance of working on images files over file-posix. It works if $SIZE % 4G < 2G, and it fails otherwise. To make things even more interesting, often you would not even notice because qemu reported success even thou

Re: [Qemu-devel] [PATCH v4 5/5] qcow2: Avoid memory over-allocation on compressed images

2018-02-28 Thread Alberto Garcia
On Tue 27 Feb 2018 05:29:44 PM CET, Eric Blake wrote: > So, it's time to cut back on the waste. A compressed cluster > written by qemu will NEVER occupy more than an uncompressed > cluster, but based on mid-sector alignment, we may still need > to read 1 cluster + 1 sector in order to recover enou

[Qemu-devel] [PATCH v2 00/10] generalize build_fadt()

2018-02-28 Thread Igor Mammedov
v2: * fix typo in "acpi: remove unused acpi-dsdt.aml" * split ACPI_PORT_SMI_CMD into separate cleanup patch * s/pm1_/pm1a_/, s/c2_latency/plvl2_lat/, s/c3_latency/plvl3_lat/ and fix conflicts in followup patches caused by renaming * conditional FIRMWARE_CTRL, DSDT patching is introduce

[Qemu-devel] [PATCH v2 08/10] acpi: move build_fadt() from i386 specific to generic ACPI source

2018-02-28 Thread Igor Mammedov
It will be extended and reused by follow up patch for ARM target. PS: Since it's generic function now, don't patch FIRMWARE_CTRL, DSDT fields if they don't point to tables since platform might not provide them and use X_ variants instead if applicable. Signed-off-by: Igor Mammedov Reviewed-by: E

[Qemu-devel] [PATCH v2 01/10] acpi: remove unused acpi-dsdt.aml

2018-02-28 Thread Igor Mammedov
SeaBIOS blob which is currently shipped with QEMU doesn't need acpi-dsdt.aml nor is able to use it and code that loaded it in QEMU was removed by (commit 9fb7aaaf4c "pc: drop external DSDT loading") in 2013. Signed-off-by: Igor Mammedov Reviewed-by: Gerd Hoffmann Reviewed-by: Eric Auger --- Ma

[Qemu-devel] [PATCH v2 06/10] pc: acpi: isolate FADT specific data into AcpiFadtData structure

2018-02-28 Thread Igor Mammedov
move FADT data initialization out of fadt_setup() into dedicated init_fadt_data() that will set common for pc/q35 values in AcpiFadtData structure and acpi_get_pm_info() will complement it with pc/q35 specific values initialization. That will allow to get rid of fadt_setup() and generalize build_f

[Qemu-devel] [PATCH v2 10/10] tests: acpi: don't read all fields in test_acpi_fadt_table()

2018-02-28 Thread Igor Mammedov
there is no point to read fields here but not actually checking them so drop it and read only header + dsdt/facs addresses since it's needed later to fetch that tables. With this cleanup we can get rid of AcpiFadtDescriptorRev3/ ACPI_FADT_COMMON_DEF which have no users left. Signed-off-by: Igor M

[Qemu-devel] [PATCH v2 05/10] acpi: move ACPI_PORT_SMI_CMD define to header it belongs to

2018-02-28 Thread Igor Mammedov
ACPI_PORT_SMI_CMD is alias for APM_CNT_IOPORT, so make it really one instead of duplicating its value. Signed-off-by: Igor Mammedov --- include/hw/isa/apm.h | 3 +++ hw/i386/acpi-build.c | 2 -- hw/isa/apm.c | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/hw

Re: [Qemu-devel] [PATCH v2 10/16] hbitmap: Add @advance param to hbitmap_iter_next()

2018-02-28 Thread Max Reitz
On 2018-02-27 09:59, Fam Zheng wrote: > On Mon, 01/22 23:08, Max Reitz wrote: >> diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c >> index 9091c639b3..2a2aa5bd43 100644 >> --- a/tests/test-hbitmap.c >> +++ b/tests/test-hbitmap.c >> @@ -46,7 +46,7 @@ static void hbitmap_test_check(TestHBitma

[Qemu-devel] [PATCH v2 07/10] pc: acpi: use build_append_foo() API to construct FADT

2018-02-28 Thread Igor Mammedov
build_append_foo() API doesn't need explicit endianness conversions which eliminates a source of errors and it makes build_fadt() look like declarative definition of FADT table in ACPI spec, which makes it easy to review. Also it allows easily extending FADT to support other revisions which will be

[Qemu-devel] [PATCH v2 03/10] acpi: reuse AcpiGenericAddress instead of Acpi20GenericAddress

2018-02-28 Thread Igor Mammedov
Drop duplicate in form of Acpi20GenericAddress and reuse AcpiGenericAddress. Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger --- include/hw/acpi/acpi-defs.h | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/

[Qemu-devel] [PATCH v2 04/10] acpi: add build_append_gas() helper for Generic Address Structure

2018-02-28 Thread Igor Mammedov
it will help to add Generic Address Structure to ACPI tables without using packed C structures and avoid endianness issues as API doesn't need an explicit conversion. Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger --- include/hw/acpi/aml-build.h | 20 hw/acpi/aml-buil

[Qemu-devel] [PATCH v2 09/10] virt_arm: acpi: reuse common build_fadt()

2018-02-28 Thread Igor Mammedov
Extend generic build_fadt() to support rev5.1 FADT and reuse it for 'virt' board, it would allow to phase out usage of AcpiFadtDescriptorRev5_1 and later ACPI_FADT_COMMON_DEF. Signed-off-by: Igor Mammedov --- v2: - update comment to mention that build_fadt() supports 5.1 revision --- include/h

[Qemu-devel] [PATCH v2 02/10] pc: replace pm object initialization with one-liner in acpi_get_pm_info()

2018-02-28 Thread Igor Mammedov
next patch will need it before it gets to piix4/lpc branches that initializes 'obj' now. Signed-off-by: Igor Mammedov Reviewed-by: Eric Auger Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/acpi-build.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/i386/acpi-build.c

Re: [Qemu-devel] [PATCH v2] vmgenid: allow VM Generation ID modification via QMP/HMP

2018-02-28 Thread Eric Blake
On 02/28/2018 07:39 AM, Or Idgar wrote: From: Or Idgar This patch allow changing the Virtual Machine Generation s/allow/allows/ ID through QMP/HMP while the vm guest is running. That's the description of "what" the patch is doing, but not the "why" - you want to give some justification w

Re: [Qemu-devel] [PATCH qemu v2] qmp: Add qom-list-properties to list QOM object properties

2018-02-28 Thread Andrea Bolognani
On Mon, 2018-02-26 at 19:22 +1100, Alexey Kardashevskiy wrote: > There is already 'device-list-properties' which does most of the job, > however it does not handle everything returned by qom-list-types such > as machines as they inherit directly from TYPE_OBJECT and not TYPE_DEVICE. > It does not h

Re: [Qemu-devel] [PATCH] crypto: ensure we use a predictable TLS priority setting

2018-02-28 Thread Eric Blake
On 02/28/2018 08:06 AM, Daniel P. Berrangé wrote: The TLS test cert generation relies on a fixed set of algorithms that are only usable under GNUTLS' default priority setting. When building QEMU with a custom distro specific priority setting, this can cause the TLS tests to fail. By forcing the t

[Qemu-devel] [PATCH v2] vmgenid: allow VM Generation ID modification via QMP/HMP

2018-02-28 Thread Or Idgar
From: Or Idgar This patch allow changing the Virtual Machine Generation ID through QMP/HMP while the vm guest is running. As the definition block of VMGENID in ACPI includes the "Notify" method, we can use it to notify the guest about ID changes. QMP command example: { "execute": "set-vm-gen

[Qemu-devel] [PATCH 1/2] vhost: avoid to start/stop virtqueue which is not ready

2018-02-28 Thread Jia He
In our Armv8a server, we try to configure the vhost scsi but fail to boot up the guest (-machine virt-2.10). The guest's boot failure is very early, even earlier than grub. There are 3 virtqueues (ctrl, event and cmd) for virtio scsi device, but ovmf and seabios will only set the physical address

[Qemu-devel] [PATCH 2/2] vhost: fix incorrect check in vhost_verify_ring_mappings

2018-02-28 Thread Jia He
In commit 0ca1fd2d6878 ("vhost: Simplify ring verification checks"), it checks the virtqueue desc mapping for 3 times. Fixed: commit 0ca1fd2d6878 ("vhost: Simplify ring verification checks") Signed-off-by: Jia He --- hw/virtio/vhost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) di

[Qemu-devel] [PATCH] vmgenid: allow VM Generation ID modification via QMP/HMP

2018-02-28 Thread Or Idgar
From: Or Idgar This patch allow changing the Virtual Machine Generation ID through QMP/HMP while the vm guest is running. As the definition block of VMGENID in ACPI includes the "Notify" method, we can use it to notify the guest about ID changes. QMP command example: { "execute": "set-vm-gen

Re: [Qemu-devel] [RFC v4 08/21] blockjobs: add ABORTING state

2018-02-28 Thread Kevin Wolf
Am 24.02.2018 um 00:51 hat John Snow geschrieben: > Add a new state ABORTING. > > This makes transitions from normative states to error states explicit > in the STM, and serves as a disambiguation for which states may complete > normally when normal end-states (CONCLUDED) are added in future commi

Re: [Qemu-devel] [PATCH v2 11/16] block/dirty-bitmap: Add bdrv_dirty_iter_next_area

2018-02-28 Thread Max Reitz
On 2018-02-27 10:06, Fam Zheng wrote: > On Mon, 01/22 23:08, Max Reitz wrote: >> This new function allows to look for a consecutively dirty area in a >> dirty bitmap. >> >> Signed-off-by: Max Reitz >> --- >> include/block/dirty-bitmap.h | 2 ++ >> block/dirty-bitmap.c | 51 >> ++

Re: [Qemu-devel] [Qemu-arm] [PATCH v4 00/31] Add ARMv8.2 half-precision functions

2018-02-28 Thread Peter Maydell
On 28 February 2018 at 13:32, Alex Bennée wrote: > Peter Maydell writes: >> (3) Is this complete fp16 support or are there still more pieces to come? >> I'm assuming it's all done... > > All AArch64 is done. I'm not sure how much AArch32 is needed for SVE > support. The ARM ARM says "When this fe

Re: [Qemu-devel] [PATCH v2 12/16] block/mirror: Distinguish active from passive ops

2018-02-28 Thread Max Reitz
On 2018-02-27 10:12, Fam Zheng wrote: > On Mon, 01/22 23:08, Max Reitz wrote: >> Currently, the mirror block job only knows passive operations. But once >> we introduce active writes, we need to distinguish between the two; for >> example, mirror_wait_for_free_in_flight_slot() should wait for a pa

Re: [Qemu-devel] [PATCH] vmgenid: allow VM Generation ID modification via QMP/HMP

2018-02-28 Thread Benjamin Warren via Qemu-devel
On Wed, Feb 28, 2018 at 5:36 AM, Or Idgar wrote: > From: Or Idgar > > This patch allow changing the Virtual Machine Generation > ID through QMP/HMP while the vm guest is running. > As the definition block of VMGENID in ACPI includes the > "Notify" method, we can use it to notify the guest about

Re: [Qemu-devel] [PATCH v2 14/16] block/mirror: Add active mirroring

2018-02-28 Thread Max Reitz
On 2018-02-27 10:34, Fam Zheng wrote: > On Mon, 01/22 23:08, Max Reitz wrote: >> @@ -1151,7 +1285,48 @@ static int coroutine_fn >> bdrv_mirror_top_preadv(BlockDriverState *bs, >> static int coroutine_fn bdrv_mirror_top_pwritev(BlockDriverState *bs, >> uint64_t offset, uint64_t bytes, QEMUIOV

Re: [Qemu-devel] [PATCH v2] target-i386: add KVM_HINTS_DEDICATED performance hint

2018-02-28 Thread Paolo Bonzini
On 28/02/2018 13:31, Wanpeng Li wrote: > Ping, > 2018-02-09 22:15 GMT+08:00 Wanpeng Li : >> From: Wanpeng Li >> >> Add KVM_HINTS_DEDICATED performance hint, guest checks this feature bit >> to determine if they run on dedicated vCPUs, allowing optimizations such >> as usage of qspinlocks. Eduardo

Re: [Qemu-devel] [PATCH v2] vmgenid: allow VM Generation ID modification via QMP/HMP

2018-02-28 Thread no-reply
Hi, This series failed docker-quick@centos6 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180228133912.21496-1-id...@virtualoco.com Subject: [Qemu-devel] [PATCH v2] vmgenid: all

Re: [Qemu-devel] [PATCH v2] vmgenid: allow VM Generation ID modification via QMP/HMP

2018-02-28 Thread no-reply
Hi, This series failed docker-build@min-glib build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180228133912.21496-1-id...@virtualoco.com Subject: [Qemu-devel] [PATCH v2] vmgenid: al

Re: [Qemu-devel] [PATCH v2] vmgenid: allow VM Generation ID modification via QMP/HMP

2018-02-28 Thread Igor Mammedov
On Wed, 28 Feb 2018 15:39:12 +0200 Or Idgar wrote: > From: Or Idgar > > This patch allow changing the Virtual Machine Generation > ID through QMP/HMP while the vm guest is running. > As the definition block of VMGENID in ACPI includes the > "Notify" method, we can use it to notify the guest abo

[Qemu-devel] [Bug 1673976] Re: linux-user clone() can't handle glibc posix_spawn() (causes locale-gen to assert)

2018-02-28 Thread Éric Hoffman
Ok, thank you for clearing that up. I'm noticing in 4b4d4056bb154 this comment: "...we just make explicit use of the fact the the child and parent run in the same VM, so the child can write an error code to a field of the posix_spawn_args struct instead of sending it through a pipe. To ensure th

Re: [Qemu-devel] [RFC v4 09/21] blockjobs: add CONCLUDED state

2018-02-28 Thread Kevin Wolf
Am 24.02.2018 um 00:51 hat John Snow geschrieben: > add a new state "CONCLUDED" that identifies a job that has ceased all > operations. The wording was chosen to avoid any phrasing that might > imply success, error, or cancellation. The task has simply ceased all > operation and can never again per

Re: [Qemu-devel] [RFC] exec: eliminate ram naming issue as migration

2018-02-28 Thread Igor Mammedov
On Tue, 27 Feb 2018 04:36:45 + "Tan, Jianfeng" wrote: > > -Original Message- > > From: Igor Mammedov [mailto:imamm...@redhat.com] > > Sent: Monday, February 26, 2018 8:56 PM > > To: Tan, Jianfeng > > Cc: Paolo Bonzini; Jason Wang; Maxime Coquelin; qemu-devel@nongnu.org; > > Michael S

Re: [Qemu-devel] [RFC v4 10/21] blockjobs: add NULL state

2018-02-28 Thread Kevin Wolf
Am 24.02.2018 um 00:51 hat John Snow geschrieben: > Add a new state that specifically demarcates when we begin to permanently > demolish a job after it has performed all work. This makes the transition > explicit in the STM table and highlights conditions under which a job may > be demolished. > >

Re: [Qemu-devel] [PATCH v2] vmgenid: allow VM Generation ID modification via QMP/HMP

2018-02-28 Thread no-reply
Hi, This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180228133912.21496-1-id...@virtualoco.com Subject: [Qemu-devel] [PATCH v2] vmgenid: allo

Re: [Qemu-devel] [PATCH v3 0/5] block: fix blk_aio_*() segfault when blk->root == NULL

2018-02-28 Thread Stefan Hajnoczi
On Fri, Feb 16, 2018 at 04:50:10PM +, Stefan Hajnoczi wrote: > v3: > * Add Patch 1 to rename aio_context_in_iothread() to >in_aio_context_home_thread() [Eric] > v2: > * Introduce AIO_WAIT_WHILE() since aio_poll(ctx, true) is not allowed [Paolo] > > Using bdrv_inc_in_flight(blk_bs(blk)) d

[Qemu-devel] [Bug 1673976] Re: linux-user clone() can't handle glibc posix_spawn() (causes locale-gen to assert)

2018-02-28 Thread Peter Maydell
Commit fe05e1cb6d64db changed that, so args.err is initialized to zero. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1673976 Title: linux-user clone() can't handle glibc posix_spawn() (causes loca

Re: [Qemu-devel] [PATCH v3 0/5] block: fix blk_aio_*() segfault when blk->root == NULL

2018-02-28 Thread Paolo Bonzini
On 28/02/2018 16:48, Stefan Hajnoczi wrote: > On Fri, Feb 16, 2018 at 04:50:10PM +, Stefan Hajnoczi wrote: >> v3: >> * Add Patch 1 to rename aio_context_in_iothread() to >>in_aio_context_home_thread() [Eric] >> v2: >> * Introduce AIO_WAIT_WHILE() since aio_poll(ctx, true) is not allowed

Re: [Qemu-devel] [RFC v4 11/21] blockjobs: add block_job_dismiss

2018-02-28 Thread Kevin Wolf
Am 24.02.2018 um 00:51 hat John Snow geschrieben: > For jobs that have reached their CONCLUDED state, prior to having their > last reference put down (meaning jobs that have completed successfully, > unsuccessfully, or have been canceled), allow the user to dismiss the > job's lingering status repo

Re: [Qemu-devel] [PATCH v3 3/9] CLI: add -preconfig option

2018-02-28 Thread Igor Mammedov
On Tue, 27 Feb 2018 14:39:22 -0600 Eric Blake wrote: > On 02/16/2018 06:37 AM, Igor Mammedov wrote: > > Option allows to pause QEMU at new RUN_STATE_PRECONFIG time, > > which would allow to configure QEMU from QMP before machine > > jumps into board initialization code machine_run_board_init().

Re: [Qemu-devel] [PATCH v2 15/16] block/mirror: Add copy mode QAPI interface

2018-02-28 Thread Max Reitz
On 2018-02-27 10:38, Fam Zheng wrote: > On Mon, 01/22 23:08, Max Reitz wrote: >> This patch allows the user to specify whether to use active or only >> passive mode for mirror block jobs. Currently, this setting will remain > > I think you want s/passive/background/ in the whole patch. Errr, yes

[Qemu-devel] [PATCH] docs/vmcoreinfo: detail unsupported host format behaviour

2018-02-28 Thread Marc-André Lureau
Suggested-by: Michael S. Tsirkin Signed-off-by: Marc-André Lureau --- docs/specs/vmcoreinfo.txt | 4 1 file changed, 4 insertions(+) diff --git a/docs/specs/vmcoreinfo.txt b/docs/specs/vmcoreinfo.txt index 821261067f..bcbca6fe47 100644 --- a/docs/specs/vmcoreinfo.txt +++ b/docs/specs/vmcor

Re: [Qemu-devel] [RFC v4 12/21] blockjobs: ensure abort is called for cancelled jobs

2018-02-28 Thread Kevin Wolf
Am 24.02.2018 um 00:51 hat John Snow geschrieben: > Presently, even if a job is canceled post-completion as a result of > a failing peer in a transaction, it will still call .commit because > nothing has updated or changed its return code. > > The reason why this does not cause problems currently

Re: [Qemu-devel] [RFC v4 13/21] blockjobs: add commit, abort, clean helpers

2018-02-28 Thread Kevin Wolf
Am 24.02.2018 um 00:51 hat John Snow geschrieben: > The completed_single function is getting a little mucked up with > checking to see which callbacks exist, so let's factor them out. > > Signed-off-by: John Snow Reviewed-by: Kevin Wolf

Re: [Qemu-devel] [PATCH v3 5/9] QAPI: allow to specify valid runstates per command

2018-02-28 Thread Igor Mammedov
On Tue, 27 Feb 2018 16:10:31 -0600 Eric Blake wrote: > On 02/16/2018 06:37 AM, Igor Mammedov wrote: > > Add optional 'runstates' parameter in QAPI command definition, > > which will permit to specify RunState variations in which > > a command could be exectuted via QMP monitor. > > s/exectuted

Re: [Qemu-devel] [RFC v4 14/21] blockjobs: add block_job_txn_apply function

2018-02-28 Thread Kevin Wolf
Am 24.02.2018 um 00:51 hat John Snow geschrieben: > Simply apply a function transaction-wide. > A few more uses of this in forthcoming patches. > > Signed-off-by: John Snow > --- > blockjob.c | 24 +++- > 1 file changed, 15 insertions(+), 9 deletions(-) > > diff --git a/bloc

[Qemu-devel] [RISU 2/3] Add aa64 fcadd + fcmla

2018-02-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- aarch64.risu | 13 + 1 file changed, 13 insertions(+) diff --git a/aarch64.risu b/aarch64.risu index c1a29f6..a5c92e9 100644 --- a/aarch64.risu +++ b/aarch64.risu @@ -2956,6 +2956,19 @@ SQRDMLSHse A64_V81 0111 size:2 l:1 m:1 rm:4 h:1 0

[Qemu-devel] [RISU 3/3] Add arm and thumb vqrdml[as]h, vcadd, vcmla

2018-02-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- arm.risu | 25 + thumb.risu | 25 + 2 files changed, 50 insertions(+) diff --git a/arm.risu b/arm.risu index 13ea019..af73345 100644 --- a/arm.risu +++ b/arm.risu @@ -831,3 +831,28 @@ VCVT_rm_neon A1 0011

[Qemu-devel] [RISU 0/3] ARM additions for v8.1-simd and v8.3-compnum

2018-02-28 Thread Richard Henderson
I've rebased these onto master. There don't seem to be any consistent examples of how extensions are to be named in this new group-enabled world, but it's my opinion that the bike shed should be green. Since fp16 support is not yet present on the AArch32 side, I have disabled generation of those

[Qemu-devel] [RISU 1/3] Add aa64 sqrdml[as]h

2018-02-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- aarch64.risu | 24 1 file changed, 24 insertions(+) diff --git a/aarch64.risu b/aarch64.risu index 02e9183..c1a29f6 100644 --- a/aarch64.risu +++ b/aarch64.risu @@ -2932,6 +2932,30 @@ FCVTZUsi A64_V sf:1 000 type:2 1 11 001 00

[Qemu-devel] [PATCH] migration: Fix block failure cases

2018-02-28 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This fixes a couple of cases where the block migration capability doesn't get cleared when a migration failed. 1) When block migration is compiled out: (qemu) migrate -d -b "exec:cat > /dev/null" QEMU compiled without old-style (blk/-b, inc/-i) block migration

[Qemu-devel] [PATCH] decodetree: Propagate return value from translate subroutines

2018-02-28 Thread Richard Henderson
Allow the translate subroutines to return false for invalid insns. At present we can of course invoke an invalid insn exception from within the translate subroutine, but in the short term this consolidates code. In the long term it would allow the decodetree language to support overlapping pattern

[Qemu-devel] [Bug 1681404] Re: hw/ppc: Aborted (core dumped)

2018-02-28 Thread Fabiano Rosas
This is addressed by commit: "f7d6bfc spapr_pci: fail gracefully with non-pseries machine types" $ ./v2.11.0-1421-g7d84845/bin/qemu-system-ppc64 -S -machine ppce500,accel=tcg -device spapr-pci-host-bridge qemu-system-ppc64: -device spapr-pci-host-bridge: spapr-pci-host-bridge needs a pseries m

Re: [Qemu-devel] [Qemu-arm] [PATCH v4 00/31] Add ARMv8.2 half-precision functions

2018-02-28 Thread Richard Henderson
On 02/28/2018 07:02 AM, Peter Maydell wrote: > Do you have a feel for how much work the AArch32 side is? Based on my experience adding fcmla support to aa32, probably less than a week. r~

Re: [Qemu-devel] [RFC v4 15/21] blockjobs: add prepare callback

2018-02-28 Thread Kevin Wolf
Am 24.02.2018 um 00:51 hat John Snow geschrieben: > Some jobs upon finalization may need to perform some work that can > still fail. If these jobs are part of a transaction, it's important > that these callbacks fail the entire transaction. > > We allow for a new callback in addition to commit/abo

Re: [Qemu-devel] [PATCH v2 05/16] block/mirror: Convert to coroutines

2018-02-28 Thread Max Reitz
On 2018-02-28 15:13, Max Reitz wrote: > On 2018-02-27 08:44, Fam Zheng wrote: >> On Mon, 01/22 23:07, Max Reitz wrote: >>> @@ -101,7 +105,7 @@ static BlockErrorAction >>> mirror_error_action(MirrorBlockJob *s, bool read, >>> } >>> } >>> >>> -static void mirror_iteration_done(MirrorOp *op,

[Qemu-devel] [Bug 1751494] Re: tag-target.inc.c:3495:no such instruction: `xgetbv'

2018-02-28 Thread John Arbuckle
The exact commit that causes this problem is this: commit 770c2fc7bb70804ae9869995fd02dadd6d7656ac tcg/i386: Add vector operations -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1751494 Title: tag-

Re: [Qemu-devel] [PATCH v2 1/5] target/i386: Fix a minor typo found while reviwing

2018-02-28 Thread Radim Krčmář
2018-02-23 21:30-0500, Babu Moger: > Changed KVM_CPUID_FLAG_SIGNIFCANT_INDEX to KVM_CPUID_FLAG_SIGNIFICANT_INDEX > > Signed-off-by: Babu Moger > --- > linux-headers/asm-x86/kvm.h | 2 +- > target/i386/kvm.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/li

Re: [Qemu-devel] [PATCH 04/14] migration: let incoming side use thread context

2018-02-28 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > The old incoming migration is running in main thread and default > gcontext. With the new qio_channel_add_watch_full() we can now let it > run in the thread's own gcontext (if there is one). > > Currently this patch does nothing alone. But when any of the

Re: [Qemu-devel] [RFC v4 16/21] blockjobs: add waiting status

2018-02-28 Thread Kevin Wolf
Am 27.02.2018 um 21:50 hat John Snow geschrieben: > > > On 02/27/2018 03:00 PM, Eric Blake wrote: > > On 02/23/2018 05:51 PM, John Snow wrote: > >> For jobs that are stuck waiting on others in a transaction, it would > >> be nice to know that they are no longer "running" in that sense, but > >> i

Re: [Qemu-devel] [PATCH v3] iotests: Fix CID for VMDK afl image

2018-02-28 Thread Max Reitz
On 2018-02-02 06:23, Fam Zheng wrote: > This reverts commit 76bf133c4 which updated the reference output, and > fixed the reference image, because the code path we want to exercise is > actually the invalid image size. > > The descriptor block in the image, which includes the CID to verify, has be

Re: [Qemu-devel] [RFC v4 17/21] blockjobs: add PENDING status and event

2018-02-28 Thread Kevin Wolf
Am 24.02.2018 um 00:51 hat John Snow geschrieben: > For jobs utilizing the new manual workflow, we intend to prohibit > them from modifying the block graph until the management layer provides > an explicit ACK via block-job-finalize to move the process forward. > > To distinguish this runstate fro

[Qemu-devel] [PATCH V7 1/4] rules: Move cross compilation auto detection functions to rules.mak

2018-02-28 Thread Wei Huang
This patch moves the auto detection functions for cross compilation from roms/Makefile to rules.mak. So the functions can be shared among Makefiles in QEMU. Signed-off-by: Wei Huang Reviewed-by: Andrew Jones --- roms/Makefile | 24 +++- rules.mak | 15 +++ 2

[Qemu-devel] [PATCH V7 2/4] tests/migration: Convert the boot block compilation script into Makefile

2018-02-28 Thread Wei Huang
The x86 boot block header currently is generated with a shell script. To better support other CPUs (e.g. aarch64), we convert the script into Makefile. This allows us to 1) support cross-compilation easily, and 2) avoid creating a script file for every architecture. Signed-off-by: Wei Huang Revie

[Qemu-devel] [PATCH V7 0/4] tests: Add migration test for aarch64

2018-02-28 Thread Wei Huang
This patchset adds a migration test for aarch64. It leverages Dave Gilbert's recent patch "tests/migration: Add source to PC boot block" to create a new test case for aarch64. V6->V7: * Define test memory start/end addresses for all architectures * Check aarch64 kernel binary size, limit under 5

[Qemu-devel] [PATCH V7 3/4] tests/migration: Add migration-test header file

2018-02-28 Thread Wei Huang
This patch moves the settings related migration-test from the migration-test.c file to a seperate header file. It also renames the x86-a-b-bootblock.s file extension from .s to .S, allowing gcc pre-processor to include the C-style header file correctly. Signed-off-by: Wei Huang --- tests/migrati

[Qemu-devel] [PATCH v3 02/16] block: BDS deletion in bdrv_do_drained_begin()

2018-02-28 Thread Max Reitz
Draining a BDS (in the main loop) may cause it to go be deleted. That is rather suboptimal if we still plan to access it afterwards, so let us enclose the main body of the function with a bdrv_ref()/bdrv_unref() pair. Signed-off-by: Max Reitz --- block/io.c | 19 +++ 1 file chan

[Qemu-devel] [PATCH v3 09/16] block: Generalize should_update_child() rule

2018-02-28 Thread Max Reitz
Currently, bdrv_replace_node() refuses to create loops from one BDS to itself if the BDS to be replaced is the backing node of the BDS to replace it: Say there is a node A and a node B. Replacing B by A means making all references to B point to A. If B is a child of A (i.e. A has a reference to B

[Qemu-devel] [PATCH V7 4/4] tests: Add migration test for aarch64

2018-02-28 Thread Wei Huang
This patch adds migration test support for aarch64. The test code, which implements the same functionality as x86, is booted as a kernel in qemu. Here are the design choices we make for aarch64: * We choose this -kernel approach because aarch64 QEMU doesn't provide a built-in fw like x86 does.

[Qemu-devel] [PATCH v3 01/16] block: BDS deletion during bdrv_drain_recurse

2018-02-28 Thread Max Reitz
Draining a BDS child may lead to other children of the same parent being detached and/or deleted. We should prepare for the former case (by copying the children list before iterating through it) and prevent the latter (by bdrv_ref()'ing all nodes if we are in the main loop). Signed-off-by: Max Re

[Qemu-devel] [PATCH v3 00/16] block/mirror: Add active-sync mirroring

2018-02-28 Thread Max Reitz
This series implements an active and synchronous mirroring mode. Currently, the mirror block job is passive an asynchronous: Depending on your start conditions, some part of the source disk starts as "dirty". Then, the block job will (as a background operation) continuously copy dirty parts to the

[Qemu-devel] [PATCH v3 06/16] block/mirror: Use CoQueue to wait on in-flight ops

2018-02-28 Thread Max Reitz
Attach a CoQueue to each in-flight operation so if we need to wait for any we can use it to wait instead of just blindly yielding and hoping for some operation to wake us. A later patch will use this infrastructure to allow requests accessing the same area of the virtual disk to specifically wait

[Qemu-devel] [PATCH v3 03/16] tests: Add bdrv-drain test for node deletion

2018-02-28 Thread Max Reitz
This patch adds two bdrv-drain tests for what happens if some BDS goes away during the drainage. The basic idea is that you have a parent BDS with some child nodes. Then, you drain one of the children. Because of that, the party who actually owns the parent decides to (A) delete it, or (B) detach

[Qemu-devel] [PATCH v3 07/16] block/mirror: Wait for in-flight op conflicts

2018-02-28 Thread Max Reitz
This patch makes the mirror code differentiate between simply waiting for any operation to complete (mirror_wait_for_free_in_flight_slot()) and specifically waiting for all operations touching a certain range of the virtual disk to complete (mirror_wait_on_conflicts()). Signed-off-by: Max Reitz -

[Qemu-devel] [PATCH v3 08/16] block/mirror: Use source as a BdrvChild

2018-02-28 Thread Max Reitz
With this, the mirror_top_bs is no longer just a technically required node in the BDS graph but actually represents the block job operation. Also, drop MirrorBlockJob.source, as we can reach it through mirror_top_bs->backing. Signed-off-by: Max Reitz --- block/mirror.c | 14 ++ 1 fi

[Qemu-devel] [PATCH v3 04/16] block/mirror: Pull out mirror_perform()

2018-02-28 Thread Max Reitz
When converting mirror's I/O to coroutines, we are going to need a point where these coroutines are created. mirror_perform() is going to be that point. Signed-off-by: Max Reitz Reviewed-by: Fam Zheng Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/mirror.c | 51 ++

[Qemu-devel] [PATCH v3 12/16] block/dirty-bitmap: Add bdrv_dirty_iter_next_area

2018-02-28 Thread Max Reitz
This new function allows to look for a consecutively dirty area in a dirty bitmap. Signed-off-by: Max Reitz --- include/block/dirty-bitmap.h | 2 ++ block/dirty-bitmap.c | 55 2 files changed, 57 insertions(+) diff --git a/include/block/dirt

[Qemu-devel] [PATCH v3 05/16] block/mirror: Convert to coroutines

2018-02-28 Thread Max Reitz
In order to talk to the source BDS (and maybe in the future to the target BDS as well) directly, we need to convert our existing AIO requests into coroutine I/O requests. Signed-off-by: Max Reitz --- block/mirror.c | 152 ++--- 1 file changed,

Re: [Qemu-devel] [RFC v4 18/21] blockjobs: add block-job-finalize

2018-02-28 Thread Kevin Wolf
Am 24.02.2018 um 00:51 hat John Snow geschrieben: > Instead of automatically transitioning from PENDING to CONCLUDED, gate > the .prepare() and .commit() phases behind an explicit acknowledgement > provided by the QMP monitor if manual completion mode has been requested. > > This allows us to perf

[Qemu-devel] [PATCH v3 13/16] block/mirror: Add MirrorBDSOpaque

2018-02-28 Thread Max Reitz
This will allow us to access the block job data when the mirror block driver becomes more complex. Signed-off-by: Max Reitz --- block/mirror.c | 12 1 file changed, 12 insertions(+) diff --git a/block/mirror.c b/block/mirror.c index addfdff4dd..d7bd1d3195 100644 --- a/block/mirror.

[Qemu-devel] [PATCH v3 10/16] hbitmap: Add @advance param to hbitmap_iter_next()

2018-02-28 Thread Max Reitz
This new parameter allows the caller to just query the next dirty position without moving the iterator. Signed-off-by: Max Reitz --- include/qemu/hbitmap.h | 5 - block/backup.c | 2 +- block/dirty-bitmap.c | 2 +- tests/test-hbitmap.c | 26 +- util/hbi

[Qemu-devel] [PATCH v2 3/4] virtio-scsi: fix race between .ioeventfd_stop() and vq handler

2018-02-28 Thread Stefan Hajnoczi
If the main loop thread invokes .ioeventfd_stop() just as the vq handler function begins in the IOThread then the handler may lose the race for the AioContext lock. By the time the vq handler is able to acquire the AioContext lock the ioeventfd has already been removed and the handler isn't suppos

[Qemu-devel] tcg/i386: Add vector operations patch does not compile on Mac OS 10.6

2018-02-28 Thread Programmingkid
https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg04321.html This patch causes problems with Mac OS 10.6. It stops compilation. This is the error I see when I try to compile the code: tcg/i386/tcg-target.inc.c:3495:no such instruction: `xgetbv` This is the code that causes the problem:

[Qemu-devel] [PATCH v3 16/16] iotests: Add test for active mirroring

2018-02-28 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/151 | 120 + tests/qemu-iotests/151.out | 5 ++ tests/qemu-iotests/group | 1 + 3 files changed, 126 insertions(+) create mode 100755 tests/qemu-iotests/151 create mode 100644 tests/qemu-iotest

[Qemu-devel] [PATCH v3 11/16] test-hbitmap: Add non-advancing iter_next tests

2018-02-28 Thread Max Reitz
Add a function that wraps hbitmap_iter_next() and always calls it in non-advancing mode first, and in advancing mode next. The result should always be the same. By using this function everywhere we called hbitmap_iter_next() before, we should get good test coverage for non-advancing hbitmap_iter_

[Qemu-devel] [PATCH v2 4/4] vl: introduce vm_shutdown()

2018-02-28 Thread Stefan Hajnoczi
Commit 00d09fdbbae5f7864ce754913efc84c12fdf9f1a ("vl: pause vcpus before stopping iothreads") and commit dce8921b2baaf95974af8176406881872067adfa ("iothread: Stop threads before main() quits") tried to work around the fact that emulation was still active during termination by stopping iothreads. T

Re: [Qemu-devel] [RFC] qemu-img: Drop BLK_ZERO from convert

2018-02-28 Thread Max Reitz
On 2018-02-27 17:17, Stefan Hajnoczi wrote: > On Mon, Feb 26, 2018 at 06:03:13PM +0100, Max Reitz wrote: >> There are filesystems (among which is tmpfs) that have a hard time >> reporting allocation status. That is definitely a bug in them. >> >> However, there is no good reason why qemu-img conve

[Qemu-devel] [PATCH v2 1/4] block: add aio_wait_bh_oneshot()

2018-02-28 Thread Stefan Hajnoczi
Sometimes it's necessary for the main loop thread to run a BH in an IOThread and wait for its completion. This primitive is useful during startup/shutdown to synchronize and avoid race conditions. Signed-off-by: Stefan Hajnoczi --- include/block/aio-wait.h | 13 + util/aio-wait.c

[Qemu-devel] [PATCH v3 15/16] block/mirror: Add copy mode QAPI interface

2018-02-28 Thread Max Reitz
This patch allows the user to specify whether to use active or only background mode for mirror block jobs. Currently, this setting will remain constant for the duration of the entire block job. Signed-off-by: Max Reitz --- qapi/block-core.json | 11 +-- include/block/block_int.h |

[Qemu-devel] [PATCH v2 2/4] virtio-blk: fix race between .ioeventfd_stop() and vq handler

2018-02-28 Thread Stefan Hajnoczi
If the main loop thread invokes .ioeventfd_stop() just as the vq handler function begins in the IOThread then the handler may lose the race for the AioContext lock. By the time the vq handler is able to acquire the AioContext lock the ioeventfd has already been removed and the handler isn't suppos

Re: [Qemu-devel] [PATCH v2 3/5] target/i386: Add support for CPUID_8000_001E for AMD

2018-02-28 Thread Radim Krčmář
2018-02-23 21:30-0500, Babu Moger: > From: Stanislav Lanci > > Populate threads/core_id/apic_ids/socket_id when CPUID_EXT3_TOPOEXT > feature is supported. This is required to support hyperthreading > feature on AMD CPUS. These are supported via CPUID_8000_001E extended > functions. > > Signed-of

[Qemu-devel] [PATCH v3 14/16] block/mirror: Add active mirroring

2018-02-28 Thread Max Reitz
This patch implements active synchronous mirroring. In active mode, the passive mechanism will still be in place and is used to copy all initially dirty clusters off the source disk; but every write request will write data both to the source and the target disk, so the source cannot be dirtied fas

Re: [Qemu-devel] [RFC v4 19/21] blockjobs: Expose manual property

2018-02-28 Thread Kevin Wolf
Am 24.02.2018 um 00:51 hat John Snow geschrieben: > Expose the "manual" property via QAPI for the backup-related jobs. > As of this commit, this allows the management API to request the > "concluded" and "dismiss" semantics for backup jobs. > > Signed-off-by: John Snow > --- > blockdev.c

[Qemu-devel] [Bug 1751494] Re: tcg-target.inc.c:3495:no such instruction: `xgetbv'

2018-02-28 Thread John Arbuckle
** Summary changed: - tag-target.inc.c:3495:no such instruction: `xgetbv' + tcg-target.inc.c:3495:no such instruction: `xgetbv' -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1751494 Title: tcg-tar

Re: [Qemu-devel] [PATCH v3 15/29] vhost+postcopy: Send address back to qemu

2018-02-28 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Tue, Feb 27, 2018 at 07:54:18PM +, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > On Fri, Feb 16, 2018 at 01:16:11PM +, Dr. David Alan Gilbert (git) > > > wrote: > > > > From: "Dr. David Alan Gilbert"

Re: [Qemu-devel] [PATCH v3 3/7] qapi: Replace qobject_to_X(o) by qobject_to(o, X)

2018-02-28 Thread Max Reitz
On 2018-02-27 15:47, Eric Blake wrote: > On 02/26/2018 06:01 AM, Max Reitz wrote: > +++ b/block.c @@ -1457,7 +1457,7 @@ static QDict *parse_json_filename(const char *filename, Error **errp)    return NULL;    }    -    options = qobject_to_qdict(options_ob

<    1   2   3   4   >