[Qemu-devel] [PATCH v2 0/2] AVX2 configure fixes

2016-06-01 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This pair of patches fixes a couple of issues that we found during test. The first is that the configure test is pessimistic when compiled with -O2, the second is that the explicit 4.9 gcc test is a bit coarse; I've removed that test but beefed up the ./config

[Qemu-devel] [PATCH v2 2/2] avx2 configure: Use primitives in test

2016-06-01 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Use the avx2 primitives during the test, thus making sure that the compiler and assembler could actually use avx2. This also detects the failure case on gcc 4.8.x with -save-temps and avoids the need for the gcc version check in cutils. Signed-off-by: Dr. David Al

[Qemu-devel] [PATCH v2 1/2] Make avx2 configure test work with -O2

2016-06-01 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When configured with --extra-cflags=-O2 gcc optimised out the test and the readelf failed the check leaving avx2 disabled. Signed-off-by: Dr. David Alan Gilbert --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configur

[Qemu-devel] [PATCH v5 1/6] Postcopy: Avoid 0 length discards

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The discard code in migration/ram.c would send request for zero length discards in the case where no discards were needed. It doesn't appear to have had any bad effect. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Denis V. Lunev --- migration/ram.c | 4 +++

[Qemu-devel] [PATCH v5 5/6] tests: fix libqtest socket timeouts

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: Andrea Arcangeli I kept getting timeouts and unix socket accept failures under high load, the patch fixes it. Signed-off-by: Andrea Arcangeli Reviewed-by: Marcel Apfelbaum --- tests/libqtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libqtest.c b/tests/l

[Qemu-devel] [PATCH v5 3/6] Postcopy: Add stats on page requests

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" On the source, add a count of page requests received from the destination. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Eric Blake Reviewed-by: Denis V. Lunev --- hmp.c | 4 include/migration/migration.h | 2 ++ migration/migr

[Qemu-devel] [PATCH v5 0/6] postcopy (& 1 test) patch for 2.7

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This is a small set of postcopy changes, the largest of which is an x86 test for postcopy. Andrea's libqtest change came about from running my test under very heavy load. The test includes a self contained migration workload that rapidly changes RAM in a pre

[Qemu-devel] [PATCH v5 2/6] Migration: Split out ram part of qmp_query_migrate

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The RAM section of qmp_query_migrate is reasonably complex and repeated 3 times. Split it out into a helper. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Eric Blake Reviwed-by: Denis V. Lunev --- migration/migration.c | 57 ---

[Qemu-devel] [PATCH v5 6/6] Postcopy: Check for support when setting the capability

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Knowing whether the destination host supports migration with postcopy can be tricky. The destination doesn't need the capability set, however if we set it then use the opportunity to do the test and tell the user/management layer early. Signed-off-by: Dr. David Ala

[Qemu-devel] [PATCH v5 4/6] test: Postcopy

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This is a postcopy test (x86 only) that actually runs the guest and checks the memory contents. The test runs from an x86 boot block with the hex embedded in the test; the source for this is: ... .code16 .org 0x7c00 .file "fill.s" .text

[Qemu-devel] [PATCH v3 1/2] Make avx2 configure test work with -O2

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When configured with --extra-cflags=-O2 gcc optimised out the test and the readelf failed the check leaving avx2 disabled. Signed-off-by: Dr. David Alan Gilbert --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configur

[Qemu-devel] [PATCH v3 0/2] AVX2 configure fixes

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This pair of patches fixes a couple of issues that we found during test. The first is that the configure test is pessimistic when compiled with -O2, the second is that the explicit 4.9 gcc test is a bit coarse; I've removed that test but beefed up the ./config

[Qemu-devel] [PATCH v3 2/2] avx2 configure: Use primitives in test

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Use the avx2 primitives during the test, thus making sure that the compiler and assembler could actually use avx2. This also detects the failure case on gcc 4.8.x with -save-temps and avoids the need for the gcc version check in cutils. Signed-off-by: Dr. David Al

[Qemu-devel] [PATCH v6 5/6] tests: fix libqtest socket timeouts

2016-06-13 Thread Dr. David Alan Gilbert (git)
From: Andrea Arcangeli I kept getting timeouts and unix socket accept failures under high load, the patch fixes it. Signed-off-by: Andrea Arcangeli Reviewed-by: Marcel Apfelbaum --- tests/libqtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libqtest.c b/tests/l

[Qemu-devel] [PATCH v6 2/6] Migration: Split out ram part of qmp_query_migrate

2016-06-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The RAM section of qmp_query_migrate is reasonably complex and repeated 3 times. Split it out into a helper. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Eric Blake Reviwed-by: Denis V. Lunev --- migration/migration.c | 57 ---

[Qemu-devel] [PATCH v6 3/6] Postcopy: Add stats on page requests

2016-06-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" On the source, add a count of page requests received from the destination. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Eric Blake Reviewed-by: Denis V. Lunev --- hmp.c | 4 include/migration/migration.h | 2 ++ migration/migr

[Qemu-devel] [PATCH v6 1/6] Postcopy: Avoid 0 length discards

2016-06-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The discard code in migration/ram.c would send request for zero length discards in the case where no discards were needed. It doesn't appear to have had any bad effect. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Denis V. Lunev --- migration/ram.c | 4 +++

[Qemu-devel] [PATCH v6 6/6] Postcopy: Check for support when setting the capability

2016-06-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Knowing whether the destination host supports migration with postcopy can be tricky. The destination doesn't need the capability set, however if we set it then use the opportunity to do the test and tell the user/management layer early. Signed-off-by: Dr. David Ala

[Qemu-devel] [PATCH v6 0/6] postcopy (& 1 test) patch for 2.7

2016-06-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This is a small set of postcopy changes, the largest of which is an x86 test for postcopy. Andrea's libqtest change came about from running my test under very heavy load. The test includes a self contained migration workload that rapidly changes RAM in a predict

[Qemu-devel] [PATCH v6 4/6] test: Postcopy

2016-06-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This is a postcopy test (x86 only) that actually runs the guest and checks the memory contents. The test runs from an x86 boot block with the hex embedded in the test; the source for this is: ... .code16 .org 0x7c00 .file "fill.s" .text

[Qemu-devel] [PATCH] migration: Trace improvements

2016-06-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" A couple of improvements to tracing that have come out of helping people with migration problems: * vmstate_n_elems trace the count/name - for when you have problems getting array counts right * vmstate_subsection_load_bad - add the idstr, for when you recei

[Qemu-devel] [PATCH 3/5] x86: fill high bits of mtrr mask

2016-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Fill the bits between 51..number-of-physical-address-bits in the MTRR_PHYSMASKn variable range mtrr masks so that they're consistent in the migration stream irrespective of the physical address space of the source VM in a migration. Signed-off-by: Dr. David Alan Gi

[Qemu-devel] [PATCH 4/5] x86: Allow physical address bits to be set

2016-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Currently QEMU sets the x86 number of physical address bits to the magic number 40. This is only correct on some small AMD systems; Intel systems tend to have 36, 39, 46 bits, and large AMD systems tend to have 48. Having the value different from your actual hardw

[Qemu-devel] [PATCH 5/5] x86: Set physical address bits based on host

2016-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" A special case based on the previous phys-bits property; if it's the magic value 0 then use the hosts capabilities. Signed-off-by: Dr. David Alan Gilbert --- target-i386/cpu.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ta

[Qemu-devel] [PATCH 2/5] x86: Mask mtrr mask based on CPU physical address limits

2016-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The CPU GPs if we try and set a bit in a variable MTRR mask above the limit of physical address bits on the host. We hit this when loading a migration from a host with a larger physical address limit than our destination (e.g. a Xeon->i7 of same generation) but pre

[Qemu-devel] [PATCH 0/5] x86: Physical address limit patches

2016-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" QEMU sets the guests physical address bits to 40; this is wrong on most hardware, and can theoretically be detected by the guest. It also stops you using really huge multi-TB VMs. Red Hat has had a patch, that Andrea wrote, downstream for a couple of years that rea

[Qemu-devel] [PATCH 1/5] BIT_RANGE convenience macro

2016-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" e.g. BIT_RANGE(15, 0) gives 0xff00 Suggested by: Paolo Bonzini Signed-off-by: Dr. David Alan Gilbert --- include/qemu/bitops.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h index 755fdd1..e411688 100644 ---

[Qemu-devel] [PATCH 05/13] virtio-blk: Wrap in vmstate

2016-06-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Forcibly convert it to a vmstate wrapper; proper conversion comes later. Signed-off-by: Dr. David Alan Gilbert --- hw/block/virtio-blk.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio

[Qemu-devel] [PATCH 03/13] virtio: Migration helper function and macro

2016-06-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" To make conversion of virtio devices to VMState simple at first add a helper function for the simple virtio_save case and a helper macro that defines the VMState structure. These will probably go away or change as more of the virtio code gets converted. Signed-off-

[Qemu-devel] [PATCH 01/13] virtio-net: Remove old migration version support

2016-06-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" virtio-net has had version 11 since 0ce0e8f4 in 2009 (v0.11.0-rc0-1480-g0ce0e8f) - remove the code to support loading anything earlier. Signed-off-by: Dr. David Alan Gilbert --- hw/net/virtio-net.c | 87 + 1 fil

[Qemu-devel] [PATCH 00/13] virtio migration: Flip outer layer to vmstate

2016-06-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This series converts the outer most layer of virtio to use VMState macros; this is the easy bit, but I'm hoping that having done that, the next trick is to nibble away at the virtio_save/load functions and all of the zillions of device/bus helpers. I think t

[Qemu-devel] [PATCH 10/13] 9pfs: Wrap in vmstate

2016-06-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Forcibly convert it to a vmstate wrapper; proper conversion comes later. Signed-off-by: Dr. David Alan Gilbert --- hw/9pfs/virtio-9p-device.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/

[Qemu-devel] [PATCH 07/13] virtio-balloon: Wrap in vmstate

2016-06-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Forcibly convert it to a vmstate wrapper; proper conversion comes later. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/virtio-balloon.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/hw/virtio/virtio-balloon.c b/hw

[Qemu-devel] [PATCH 08/13] virtio-net: Wrap in vmstate

2016-06-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Forcibly convert it to a vmstate wrapper; proper conversion comes later. Signed-off-by: Dr. David Alan Gilbert --- hw/net/virtio-net.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.

[Qemu-devel] [PATCH 04/13] virtio-scsi: Wrap in vmstate

2016-06-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Forcibly convert it to a vmstate wrapper; proper conversion comes later. Signed-off-by: Dr. David Alan Gilbert --- hw/scsi/virtio-scsi.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/vi

[Qemu-devel] [PATCH 11/13] virtio-input: Wrap in vmstate

2016-06-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Forcibly convert it to a vmstate wrapper; proper conversion comes later. Signed-off-by: Dr. David Alan Gilbert --- hw/input/virtio-input.c | 26 ++ 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/hw/input/virtio-input.c b/h

[Qemu-devel] [PATCH 09/13] virtio-serial: Wrap in vmstate

2016-06-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Forcibly convert it to a vmstate wrapper; proper conversion comes later. Signed-off-by: Dr. David Alan Gilbert --- hw/char/virtio-serial-bus.c | 27 ++- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/hw/char/virtio-serial-

[Qemu-devel] [PATCH 06/13] virtio-rng: Wrap in vmstate

2016-06-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Forcibly convert it to a vmstate wrapper; proper conversion comes later. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/virtio-rng.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/hw/virtio/virtio-rng.c b/hw/virtio

[Qemu-devel] [PATCH 02/13] virtio-serial: Remove old migration version support

2016-06-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" virtio-serial-bus has had version 3 since 37f95bf3d0 in 0.13-rc0; it's time to clean it up a bit. Signed-off-by: Dr. David Alan Gilbert --- hw/char/virtio-serial-bus.c | 37 +++-- 1 file changed, 15 insertions(+), 22 deletions(-)

[Qemu-devel] [PATCH 12/13] virtio-gpu: Wrap in vmstate

2016-06-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Forcibly convert it to a vmstate wrapper; proper conversion comes later. Signed-off-by: Dr. David Alan Gilbert --- hw/display/virtio-gpu.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display

[Qemu-devel] [PATCH 13/13] virtio: Update migration docs

2016-06-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Remove references to register_savevm. Signed-off-by: Dr. David Alan Gilbert --- docs/virtio-migration.txt | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/virtio-migration.txt b/docs/virtio-migration.txt index cf66458..98a6b0f 100644

[Qemu-devel] [PATCH v4 0/6] postcopy (& 1 test) patch for 2.7

2016-05-17 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This is a small set of postcopy changes, the largest of which is an x86 test for postcopy. Andrea's libqtest change came about from running my test under very heavy load. The test includes a self contained migration workload that rapidly changes RAM in a pre

[Qemu-devel] [PATCH v4 1/6] Postcopy: Avoid 0 length discards

2016-05-17 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The discard code in migration/ram.c would send request for zero length discards in the case where no discards were needed. It doesn't appear to have had any bad effect. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Denis V. Lunev --- migration/ram.c | 4 +++

[Qemu-devel] [PATCH v4 2/6] Migration: Split out ram part of qmp_query_migrate

2016-05-17 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The RAM section of qmp_query_migrate is reasonably complex and repeated 3 times. Split it out into a helper. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Eric Blake Reviwed-by: Denis V. Lunev --- migration/migration.c | 57 ---

[Qemu-devel] [PATCH v4 3/6] Postcopy: Add stats on page requests

2016-05-17 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" On the source, add a count of page requests received from the destination. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Eric Blake Reviewed-by: Denis V. Lunev --- hmp.c | 4 include/migration/migration.h | 2 ++ migration/migr

[Qemu-devel] [PATCH v4 6/6] Postcopy: Check for support when setting the capability

2016-05-17 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Knowing whether the destination host supports migration with postcopy can be tricky. The destination doesn't need the capability set, however if we set it then use the opportunity to do the test and tell the user/management layer early. Signed-off-by: Dr. David Ala

[Qemu-devel] [PATCH v4 4/6] test: Postcopy

2016-05-17 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This is a postcopy test (x86 only) that actually runs the guest and checks the memory contents. The test runs from an x86 boot block with the hex embedded in the test; the source for this is: ... .code16 .org 0x7c00 .file "fill.s" .text

[Qemu-devel] [PATCH v4 5/6] tests: fix libqtest socket timeouts

2016-05-17 Thread Dr. David Alan Gilbert (git)
From: Andrea Arcangeli I kept getting timeouts and unix socket accept failures under high load, the patch fixes it. Signed-off-by: Andrea Arcangeli Reviewed-by: Marcel Apfelbaum --- tests/libqtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libqtest.c b/tests/l

[PULL 0/5] migration queue

2022-08-02 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 0399521e53336bd2cdc15482bca0ffd3493fdff6: Merge tag 'for-upstream' of git://repo.or.cz/qemu/kevin into staging (2022-08-02 06:52:05 -0700) are available in the Git repository at: https://gitlab.com/dagrh/qemu.git tags/pull-

[PULL 3/5] migration: Assert that migrate_multifd_compression() returns an in-range value

2022-08-02 Thread Dr. David Alan Gilbert (git)
From: Peter Maydell Coverity complains that when we use the return value from migrate_multifd_compression() as an array index: multifd_recv_state->ops = multifd_ops[migrate_multifd_compression()]; that this might overrun the array (which is declared to have size MULTIFD_COMPRESSION__MAX). Thi

[PULL 2/5] Revert "migration: Simplify unqueue_page()"

2022-08-02 Thread Dr. David Alan Gilbert (git)
From: Thomas Huth This reverts commit cfd66f30fb0f735df06ff4220e5000290a43dad3. The simplification of unqueue_page() introduced a bug that sometimes breaks migration on s390x hosts. The problem is not fully understood yet, but since we are already in the freeze for QEMU 7.1 and we need somethin

[PULL 1/5] migration: add remaining params->has_* = true in migration_instance_init()

2022-08-02 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras Some of params->has_* = true are missing in migration_instance_init, this causes migrate_params_check() to skip some tests, allowing some unsupported scenarios. Fix this by adding all missing params->has_* = true in migration_instance_init(). Fixes: 69ef1f36b0 ("migration: d

[PULL 4/5] migration: Define BLK_MIG_BLOCK_SIZE as unsigned long long

2022-08-02 Thread Dr. David Alan Gilbert (git)
From: Peter Maydell When we use BLK_MIG_BLOCK_SIZE in expressions like block_mig_state.submitted * BLK_MIG_BLOCK_SIZE, this multiplication is done as 32 bits, because both operands are 32 bits. Coverity complains about possible overflows because we then accumulate that into a 64 bit variable. D

[PULL 5/5] virtiofsd: Disable killpriv_v2 by default

2022-08-02 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal We are having bunch of issues with killpriv_v2 enabled by default. First of all it relies on clearing suid/sgid bits as needed by dropping capability CAP_FSETID. This does not work for remote filesystems like NFS (and possibly others). Secondly, we are noticing other issues rel

[Qemu-devel] [PULL 2/2] hmp: gva2gpa debug command

2019-05-01 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a gva2gpa command purely for debug which performs address translation on the gva, the existing gpa2hva command can then also be used to find it in the qemu userspace; e.g. (qemu) info registers RSP=81c03e98 (qemu) gva2gpa 0x81c03e98 gp

[Qemu-devel] [PULL 0/2] hmp queue

2019-05-01 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit f75d15231e56cb0f2bafe19faf1229c459a60731: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2019-04-30 17:06:57 +0100) are available in the Git repository at: git://github.com/dagrh/qemu.git tags/

[Qemu-devel] [PULL 1/2] hmp: delvm: use hmp_handle_error

2019-05-01 Thread Dr. David Alan Gilbert (git)
From: Cole Robinson This gives us the consistent 'Error:' prefix added in 66363e9a43f, which helps users like libvirt who still need to scrape hmp error messages to detect failure. Reviewed-by: Eric Blake Signed-off-by: Cole Robinson Message-Id: <984634226fa14316641f31f84e7dd0bb770bd94c.15561

[Qemu-devel] [PATCH] monitor: Fix gva2gpa coverityism

2019-05-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Coverity is complaining that while I'm checking the return value of mon_get_cpu(), I'm not actually using the checked value, I'm calling it again and thus it's worried I might get null; I don't think that's actually possible since i'm under lock anyway. However, it'

[Qemu-devel] [PATCH v3 2/4] net/announce: Add HMP optional interface list

2019-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the optional interface list to the HMP command. i.e. All interfaces announce_self Just the named interfaces: announce_self vn1,vn2 Signed-off-by: Dr. David Alan Gilbert --- hmp-commands.hx | 6 -- hmp.c | 38 +++

[Qemu-devel] [PATCH v3 1/4] net/announce: Allow optional list of interfaces

2019-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow the caller to restrict the set of interfaces that announces are sent on. The default is still to send on all interfaces. e.g. { "execute": "announce-self", "arguments": { "initial": 50, "max": 550, "rounds": 5, "step": 50, "interfaces": ["vn2","vn1"] } }

[Qemu-devel] [PATCH v3 0/4] network announce; interface selection & IDs

2019-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Laine asked for some extra features on the network announce support; The first allows the announce timer to announce on a subset of the interfaces. The second allows there to be multiple timers, each with their own parameters (including the interface list). Signe

[Qemu-devel] [PATCH v3 3/4] net/announce: Add optional ID

2019-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Previously there was a single instance of the timer used by monitor triggered announces, that's OK, but when combined with the previous change that lets you have announces for subsets of interfaces it's a bit restrictive if you want to do different things to differe

[Qemu-devel] [PATCH v3 4/4] net/announce: Add HMP optional ID

2019-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the optional ID to the HMP command. e.g. # start an announce for a long time on eth1 migrate_set_parameter announce-rounds 1000 announce_self "eth1" e1 # start an announce on eth2 announce_self "eth2" e2 # Change e1 to be announcing on eth1

[Qemu-devel] [PATCH v4 1/5] net/announce: Allow optional list of interfaces

2019-06-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow the caller to restrict the set of interfaces that announces are sent on. The default is still to send on all interfaces. e.g. { "execute": "announce-self", "arguments": { "initial": 50, "max": 550, "rounds": 5, "step": 50, "interfaces": ["vn2", "vn1"] }

[Qemu-devel] [PATCH v4 0/5] network announce; interface selection & IDs

2019-06-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Laine asked for some extra features on the network announce support; The first allows the announce timer to announce on a subset of the interfaces. The second allows there to be multiple timers, each with their own parameters (including the interface list). Signe

[Qemu-devel] [PATCH v4 4/5] net/announce: Add HMP optional ID

2019-06-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the optional ID to the HMP command. e.g. # start an announce for a long time on eth1 migrate_set_parameter announce-rounds 1000 announce_self "eth1" e1 # start an announce on eth2 announce_self "eth2" e2 # Change e1 to be announcing on eth1

[Qemu-devel] [PATCH v4 3/5] net/announce: Add optional ID

2019-06-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Previously there was a single instance of the timer used by monitor triggered announces, that's OK, but when combined with the previous change that lets you have announces for subsets of interfaces it's a bit restrictive if you want to do different things to differe

[Qemu-devel] [PATCH v4 2/5] net/announce: Add HMP optional interface list

2019-06-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the optional interface list to the HMP command. i.e. All interfaces announce_self Just the named interfaces: announce_self vn1,vn2 Signed-off-by: Dr. David Alan Gilbert --- hmp-commands.hx | 6 -- hmp.c | 38 +++

[Qemu-devel] [PATCH v4 5/5] net/announce: Expand test for stopping self announce

2019-06-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Expand self-announce test to check we can stop an announce timer. We set it up to send 300 packets, but after we receive the first one we tell it to stop. We error if: a) We receive more than 30 of the packets b) We're still receiving packets after a lot long

[Qemu-devel] [PATCH] migration/postcopy: Update the bandwidth during postcopy

2019-03-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The recently added max-postcopy-bandwidth parameter is only read at the transition from precopy->postcopy where as the older max-bandwidth parameter updates the migration bandwidth when changed even if the migration is already running. Fix this discrepency so that:

[Qemu-devel] [PATCH] migration/rdma: Check qemu_rdma_init_one_block

2019-03-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Actually it can't fail at the moment, but Coverity moans that it's the only place it's not checked, and it's an easy check. Reported-by: Coverity (CID 1399413) Signed-off-by: Dr. David Alan Gilbert --- migration/rdma.c | 6 +- 1 file changed, 5 insertions(+),

[PATCH] virito: Use auto rcu_read macros

2019-10-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Use RCU_READ_LOCK_GUARD and WITH_RCU_READ_LOCK_GUARD to replace the manual rcu_read_(un)lock calls. I think the only change is virtio_load which was missing unlocks in error paths; those end up being fatal errors so it's not that important anyway. Signed-off-by: D

[PATCH 00/30] virtiofs daemon (base)

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This is the 1st set for the virtiofsd - a daemon that implements the user space side of virtiofs. The kernel and qemu device parts recently went in, so the daemon is the only thing missing to have a working set. This set is the absolute minimal base set

[PATCH 03/30] virtiofsd: Add auxiliary .c's

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add most of the non-main .c files we need from upstream a0d713619d4f21e8240ede38eefe6101ea580724 Signed-off-by: Dr. David Alan Gilbert --- contrib/virtiofsd/buffer.c | 321 ++ contrib/virtiofsd/fuse_log.c | 40 +++ contrib/virtiofs

[PATCH 07/30] virtiofsd: remove mountpoint dummy argument

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: Stefan Hajnoczi Classic FUSE file system daemons take a mountpoint argument but virtiofsd exposes a vhost-user UNIX domain socket instead. The mountpoint argument is not used by virtiofsd but the user is still required to pass a dummy argument on the command-line. Remove the mountpoint ar

[PATCH 15/30] virtiofsd: Open vhost connection instead of mounting

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When run with vhost-user options we conect to the QEMU instead via a socket. Start this off by creating the socket. Signed-off-by: Dr. David Alan Gilbert --- contrib/virtiofsd/fuse_i.h| 7 ++- contrib/virtiofsd/fuse_lowlevel.c | 53 +++--

[PATCH 02/30] virtiofsd: Pull in kernel's fuse.h

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Pull in fuse.h from the kernel; version 97f9a3c4eee55b0178b518ae7114a6a53372913d Signed-off-by: Dr. David Alan Gilbert --- contrib/virtiofsd/fuse_kernel.h | 858 1 file changed, 858 insertions(+) create mode 100644 contrib/virtio

[PATCH 16/30] virtiofsd: Start wiring up vhost-user

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Listen on our unix socket for the connection from QEMU, when we get it initialise vhost-user and dive into our own loop variant (currently dummy). Signed-off-by: Dr. David Alan Gilbert --- contrib/virtiofsd/fuse_i.h | 4 ++ contrib/virtiofsd/fuse_loop_mt

[PATCH 08/30] virtiofsd: remove unused notify reply support

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: Stefan Hajnoczi Notify reply support is unused by virtiofsd. The code would need to be updated to validate input buffer sizes. Remove this unused code since changes to it are untestable. Signed-off-by: Stefan Hajnoczi --- contrib/virtiofsd/fuse_lowlevel.c | 142 +---

[PATCH 04/30] virtiofsd: Add fuse_lowlevel.c

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" fuse_lowlevel is one of the largest files from the library and does most of the work. Add it separately to keep the diff sizes small. Again this is from upstream a0d713619d4f21e8240ede38eefe6101ea580724 Signed-off-by: Dr. David Alan Gilbert --- contrib/virtiofsd

[PATCH 05/30] virtiofsd: Add passthrough_ll

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" passthrough_ll is one of the examples in the upstream fuse project and is the main part of our daemon here. It passes through requests from fuse to the underlying filesystem, using syscalls as directly as possible. >From libfuse a0d713619d4f21e8240ede38eefe6101ea5

[PATCH 13/30] virtiofsd: Add options for virtio

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add options to specify parameters for virtio-fs paths, i.e. ./virtiofsd -o vhost_user_socket=/tmp/vhostqemu Signed-off-by: Dr. David Alan Gilbert --- contrib/virtiofsd/fuse_i.h| 1 + contrib/virtiofsd/fuse_lowlevel.c | 10 +++--- contrib/virtiofs

[PATCH 21/30] virtiofsd: Start reading commands from queue

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Pop queue elements off queues, copy the data from them and pass that to fuse. Note: 'out' in a VuVirtqElement is from QEMU 'in' in libfuse is into the daemon So we read from the out iov's to get a fuse_in_header When we get a kick we've got to read al

[PATCH 10/30] virtiofsd: Fix common header and define for QEMU builds

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" All of the fuse files include config.h and define GNU_SOURCE where we don't have either under our build - remove them. Signed-off-by: Dr. David Alan Gilbert --- contrib/virtiofsd/buffer.c | 3 --- contrib/virtiofsd/fuse_i.h | 3 +++ contrib/virt

[PATCH 19/30] virtiofsd: Start queue threads

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Start a thread for each queue when we get notified it's been started. Signed-off-by: Dr. David Alan Gilbert fix by: Signed-off-by: Jun Piao Signed-off-by: Stefan Hajnoczi --- contrib/virtiofsd/fuse_virtio.c | 89 + 1 file changed

[PATCH 12/30] virtiofsd: Make fsync work even if only inode is passed in

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal If caller has not sent file handle in request, then using inode, retrieve the fd opened using O_PATH and use that to open file again and issue fsync. This will be needed when dax_flush() calls fsync. At that time we only have inode information (and not file). Signed-off-by: Viv

[PATCH 06/30] virtiofsd: Trim down imported files

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" There's a lot of the original fuse code we don't need; trim them down. Signed-off-by: Dr. David Alan Gilbert --- contrib/virtiofsd/fuse_i.h| 22 - contrib/virtiofsd/fuse_loop_mt.c | 308 -- contrib/virtiofsd/fuse_lowlevel.c | 653 +--

[PATCH 20/30] virtiofsd: Poll kick_fd for queue

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" In the queue thread poll the kick_fd we're passed. Signed-off-by: Dr. David Alan Gilbert --- contrib/virtiofsd/fuse_virtio.c | 40 - 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/contrib/virtiofsd/fuse_virtio.c b/co

[PATCH 14/30] virtiofsd: add -o source=PATH to help output

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: Stefan Hajnoczi The -o source=PATH option will be used by most command-line invocations. Let's document it! Signed-off-by: Stefan Hajnoczi --- contrib/virtiofsd/passthrough_ll.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/virtiofsd/passthrough_ll.c b/contrib/virtiofsd/pa

[PATCH 18/30] virtiofsd: get/set features callbacks

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the get/set features callbacks. Signed-off-by: Dr. David Alan Gilbert --- contrib/virtiofsd/fuse_virtio.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/contrib/virtiofsd/fuse_virtio.c b/contrib/virtiofsd/fuse_virtio.c ind

[PATCH 22/30] virtiofsd: Send replies to messages

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Route fuse out messages back through the same queue elements that had the command that triggered the request. Signed-off-by: Dr. David Alan Gilbert --- contrib/virtiofsd/fuse_lowlevel.c | 4 ++ contrib/virtiofsd/fuse_virtio.c | 107 +++

[PATCH 09/30] virtiofsd: Fix fuse_daemonize ignored return values

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" QEMU's compiler enables warnings/errors for ignored values and the (void) trick used in the fuse code isn't enough. Turn all the return values into a return value on the function. Signed-off-by: Dr. David Alan Gilbert --- contrib/virtiofsd/helper.c | 25 +

[PATCH 23/30] virtiofsd: Keep track of replies

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Keep track of whether we sent a reply to a request; this is a bit paranoid but it means: a) We should always recycle an element even if there was an error in the request b) Never try and send two replies on one queue element Signed-off-by: Dr. David Alan G

[PATCH 27/30] virtiofsd: make -f (foreground) the default

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: Stefan Hajnoczi According to vhost-user.rst "Backend program conventions", backend programs should run in the foregound by default. Follow the conventions so libvirt and other management tools can control virtiofsd in a standard way. Signed-off-by: Stefan Hajnoczi --- contrib/virtiofsd/

[PATCH 11/30] virtiofsd: fuse: Make iov_length usable outside fuse_lowlevel.c

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert --- contrib/virtiofsd/fuse_lowlevel.c | 2 +- contrib/virtiofsd/fuse_lowlevel.h | 9 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/contrib/virtiofsd/fuse_lowlevel.c b/contrib/virtiofsd/fuse_lowlevel

[PATCH 26/30] virtiofsd: add --fd=FDNUM fd passing option

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: Stefan Hajnoczi Although --socket-path=PATH is useful for manual invocations, management tools typically create the UNIX domain socket themselves and pass it to the vhost-user device backend. This way QEMU can be launched immediately with a valid socket. No waiting for the vhost-user devi

[PATCH 17/30] virtiofsd: Add main virtio loop

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Processes incoming requests on the vhost-user fd. Signed-off-by: Dr. David Alan Gilbert --- contrib/virtiofsd/fuse_virtio.c | 42 ++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/contrib/virtiofsd/fuse_virtio.c b/co

[PATCH 25/30] virtiofsd: Fast path for virtio read

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Readv the data straight into the guests buffer. Signed-off-by: Dr. David Alan Gilbert With fix by: Signed-off-by: Eryu Guan --- contrib/virtiofsd/fuse_lowlevel.c | 6 ++ contrib/virtiofsd/fuse_virtio.c | 159 ++ contrib/virtiofsd/

[PATCH 24/30] virtiofsd: Add Makefile wiring for virtiofsd contrib

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Wire up the building of the virtiofsd in contrib. virtiofsd relies on Linux-specific system calls and seccomp. Anyone wishing to port it to other host operating systems should do so carefully and without reducing security. Only allow building on Linux hosts. Sig

[PATCH 29/30] virtiofsd: add --print-capabilities option

2019-10-21 Thread Dr. David Alan Gilbert (git)
From: Stefan Hajnoczi Add the --print-capabilities option as per vhost-user.rst "Backend programs conventions". Currently there are no advertised features. Signed-off-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau --- contrib/virtiofsd/fuse_lowlevel.h | 1 + contrib/virtiofsd/helper.c

<    3   4   5   6   7   8   9   10   11   12   >