[PATCH] hw/virtio: qmp: add RING_RESET to 'info virtio-status'

2023-07-21 Thread David Edmondson
Signed-off-by: David Edmondson --- hw/virtio/virtio-qmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/virtio/virtio-qmp.c b/hw/virtio/virtio-qmp.c index 3d32dbec8d..7515b0947b 100644 --- a/hw/virtio/virtio-qmp.c +++ b/hw/virtio/virtio-qmp.c @@ -79,6 +79,8 @@ static const

[PATCH 0/2] block/curl: Improve HTTP header parsing

2020-02-19 Thread David Edmondson
rary white space around the HTTP header field value, as required by the RFC. David Edmondson (2): block/curl: HTTP header fields allow whitespace around values block/curl: HTTP header field names are case insensitive block/curl.c | 31 +++ 1 file changed, 27 insert

[PATCH 2/2] block/curl: HTTP header field names are case insensitive

2020-02-19 Thread David Edmondson
RFC 7230 section 3.2 indicates that HTTP header field names are case insensitive. Signed-off-by: David Edmondson --- block/curl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/curl.c b/block/curl.c index 0cf99a4b31b8..4256659cd85b 100644 --- a/block/curl.c +++ b

[PATCH 1/2] block/curl: HTTP header fields allow whitespace around values

2020-02-19 Thread David Edmondson
RFC 7230 section 3.2 indicates that whitespace is permitted between the field name and field value and after the field value. Signed-off-by: David Edmondson --- block/curl.c | 31 +++ 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/block/curl.c b/block

Re: [PULL 06/18] qemu-img: Add --target-is-zero to convert

2020-02-20 Thread David Edmondson
On Thursday, 2020-02-20 at 10:36:04 -06, Eric Blake wrote: > On 2/20/20 10:06 AM, Max Reitz wrote: >> From: David Edmondson >> >> In many cases the target of a convert operation is a newly provisioned >> target that the user knows is blank (reads as zero). In th

[PATCH v3 0/1] qemu-img: Add --target-is-zero to indicate that a target is blank

2020-02-04 Thread David Edmondson
itz). - Add relevant documentation (Max Reitz). - @var -> @code for options in qemu-img.texi. David Edmondson (1): qemu-img: Add --target-is-zero to convert docs/interop/qemu-img.rst | 8 +++- qemu-img-cmds.hx | 4 ++-- qemu-img.c| 25 ++

Re: [PATCH v2 1/2] qemu-img: Add --target-is-zero to convert

2020-02-04 Thread David Edmondson
On Monday, 2020-02-03 at 21:20:16 +03, Vladimir Sementsov-Ogievskiy wrote: > 24.01.2020 13:34, David Edmondson wrote: >> In many cases the target of a convert operation is a newly provisioned >> target that the user knows is blank (filled with zeroes). In this >> situation th

[PATCH v3 1/1] qemu-img: Add --target-is-zero to convert

2020-02-04 Thread David Edmondson
an existing target device is already zero filled. Signed-off-by: David Edmondson --- docs/interop/qemu-img.rst | 8 +++- qemu-img-cmds.hx | 4 ++-- qemu-img.c| 25 ++--- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/docs/interop

Re: [PATCH v3 1/1] qemu-img: Add --target-is-zero to convert

2020-02-04 Thread David Edmondson
On Tuesday, 2020-02-04 at 07:31:52 -06, Eric Blake wrote: > On 2/4/20 3:52 AM, David Edmondson wrote: >> In many cases the target of a convert operation is a newly provisioned >> target that the user knows is blank (filled with zeroes). In this > > 'filled with

Re: [PATCH v3 1/1] qemu-img: Add --target-is-zero to convert

2020-02-04 Thread David Edmondson
On Tuesday, 2020-02-04 at 16:59:39 +03, Vladimir Sementsov-Ogievskiy wrote: > 04.02.2020 12:52, David Edmondson wrote: >> In many cases the target of a convert operation is a newly provisioned >> target that the user knows is blank (filled with zeroes). In this >>

[PATCH v4 1/1] qemu-img: Add --target-is-zero to convert

2020-02-05 Thread David Edmondson
existing target device will return zeros for all reads. Signed-off-by: David Edmondson --- docs/interop/qemu-img.rst | 9 - qemu-img-cmds.hx | 4 ++-- qemu-img.c| 26 +++--- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/docs

[PATCH v4 0/1] qemu-img: Add --target-is-zero to indicate that a target is blank

2020-02-05 Thread David Edmondson
ero in the presence of a backing file (Max Reitz). - Add relevant documentation (Max Reitz). - @var -> @code for options in qemu-img.texi. David Edmondson (1): qemu-img: Add --target-is-zero to convert docs/interop/qemu-img.rst | 9 - qemu-img-cmds.hx | 4 ++-- qemu

Re: [PATCH] virtio-net: clear guest_announce feature if no cvq backend

2023-01-25 Thread David Edmondson
re set, and the driver may refuse to start. This > happens in virtio-net Linux driver. Could you now simplify the tests in virtio_net_announce() and virtio_net_post_load_device() to look only for the presence of GUEST_ANNOUNCE, given that you can now presume that it implies CTRL_VQ? But anyway:

Re: [PATCH v2 01/16] migration: Don't use INT64_MAX for unlimited rate

2023-05-16 Thread David Edmondson
Juan Quintela writes: > Define and use RATE_LIMIT_MAX instead. Suggest "RATE_LIMIT_MAX_NONE". > > Signed-off-by: Juan Quintela > --- > migration/migration-stats.h | 6 ++ > migration/migration.c | 4 ++-- > migration/qemu-file.c | 6 +- > 3 files changed, 13 insertions(+),

Re: [PATCH v2 02/16] migration: Correct transferred bytes value

2023-05-16 Thread David Edmondson
Juan Quintela writes: > We forget several places to add to trasferred amount of data. With "transferred". > this fixes I get: > >qemu_file_transferred() + multifd_bytes == transferred > > The only place whrer this is not true is during devices sending. But "where" > going all through th

Re: [PATCH v2 03/16] migration: Move setup_time to mig_stats

2023-05-16 Thread David Edmondson
Juan Quintela writes: > It is a time that needs to be cleaned each time cancel migration. > Once there create migration_time_since() to calculate how time since a > time in the past. > > Signed-off-by: Juan Quintela > > --- > > Rename to migration_time_since (cédric) > --- > migration/migration

Re: [PATCH v2 01/16] migration: Don't use INT64_MAX for unlimited rate

2023-05-16 Thread David Edmondson
Juan Quintela writes: > David Edmondson wrote: >> Juan Quintela writes: >> >>> Define and use RATE_LIMIT_MAX instead. >> >> Suggest "RATE_LIMIT_MAX_NONE". > > Then even better > > RATE_LIMIT_DISABLED? > RATE_LIMIT_NONE? RATE_LIMI

Re: [PATCH v2 03/16] migration: Move setup_time to mig_stats

2023-05-16 Thread David Edmondson
Juan Quintela writes: > David Edmondson wrote: >> Juan Quintela writes: >> >>> It is a time that needs to be cleaned each time cancel migration. >>> Once there create migration_time_since() to calculate how time since a >>> time in the

Re: [PATCH 2/2] migration: Put zero_pages in alphabetical order

2023-05-04 Thread David Edmondson
Juan Quintela writes: > I forgot to move it when I rename it from duplicated_pages. > > Signed-off-by: Juan Quintela Reviewed-by: David Edmondson > --- > migration/migration-stats.h | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/mig

Re: [PATCH 1/2] migration: Document all migration_stats

2023-05-04 Thread David Edmondson
Juan Quintela writes: > Signed-off-by: Juan Quintela Reviewed-by: David Edmondson > --- > migration/migration-stats.h | 43 + > 1 file changed, 43 insertions(+) > > diff --git a/migration/migration-stats.h b/migration/migration-stats.h

Re: [PATCH v7 1/6] memory: Reference as->current_map directly in memory commit

2023-03-14 Thread David Edmondson
Chuang Xu writes: > From: Peter Xu > > Calling RCU variance of address_space_get|to_flatview() during memory "variants" rather than "variance", perhaps? > commit (flatview updates, triggering memory listeners, or updating > ioeventfds, etc.) is not 100% accurate, because commit() requires BQL

Re: [PATCH v2 5/8] x86: Add AMX CPUIDs enumeration

2022-02-23 Thread David Edmondson
to provide the maximum > capability of TILE and TMUL. > > Signed-off-by: Jing Liu > Signed-off-by: Yang Zhong Reviewed-by: David Edmondson > --- > target/i386/cpu.c | 55 --- > target/i386/kvm/kvm.c | 4 +++- > 2 files changed, 55

Re: [RFC PATCH 1/1] i386: Remove features from Epyc-Milan cpu

2022-01-31 Thread David Edmondson
On Saturday, 2022-01-29 at 07:23:37 -03, Leonardo Bras wrote: > While trying to bring a VM with EPYC-Milan cpu on a host with > EPYC-Milan cpu (EPYC 7313), the following warning can be seen: > > qemu-system-x86_64: warning: host doesn't support requested feature: > CPUID.07H:EBX.erms [bit 9] > qe

Re: [PATCH v1 1/1] target/i386: Mask xstate_bv based on the cpu enabled features

2022-01-31 Thread David Edmondson
On Saturday, 2022-01-29 at 06:46:45 -03, Leonardo Bras wrote: > The following steps describe a migration bug: > 1 - Bring up a VM with -cpu EPYC on a host with EPYC-Milan cpu > 2 - Migrate to a host with EPYC-Naples cpu > > The guest kernel crashes shortly after the migration. > > The crash happen

Re: [PATCH v1 1/1] target/i386: Mask xstate_bv based on the cpu enabled features

2022-02-02 Thread David Edmondson
On Tuesday, 2022-02-01 at 16:09:57 -03, Leonardo Brás wrote: > Hello David, thanks for this feedback! > > On Mon, 2022-01-31 at 12:53 +0000, David Edmondson wrote: >> On Saturday, 2022-01-29 at 06:46:45 -03, Leonardo Bras wrote: >> >> > The following steps de

Re: [PATCH] migration: Don't return for postcopy_send_discard_bm_ram()

2022-01-04 Thread David Edmondson
On Thursday, 2021-12-30 at 17:05:25 +01, Philippe Mathieu-Daudé wrote: > postcopy_send_discard_bm_ram() always return zero. Since it can't > fail, simplify and do not return anything. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Edmondson

Re: [PATCH RFCv2 3/4] i386/pc: warn if phys-bits is too low

2022-02-14 Thread David Edmondson
On Monday, 2022-02-07 at 20:24:21 GMT, Joao Martins wrote: > Default phys-bits on Qemu is TCG_PHYS_BITS (40) which is enough > to address 1Tb (0xff ). On AMD platforms, if a > ram-above-4g relocation happens and the CPU wasn't configured > with a big enough phys-bits, warn the user. There

Re: [PATCH v2 2/8] x86: Add AMX XTILECFG and XTILEDATA components

2022-02-21 Thread David Edmondson
d AMX feature bits to x86_ext_save_areas array to set > up AMX components. Add structs that define the layout of > AMX XSAVE areas and use QEMU_BUILD_BUG_ON to validate the > structs sizes. > > Signed-off-by: Jing Liu > Signed-off-by: Yang Zhong Reviewed-by: David Edmo

Re: [PATCH v2 1/8] x86: Fix the 64-byte boundary enumeration for extended state

2022-02-21 Thread David Edmondson
ing Liu > Signed-off-by: Yang Zhong Reviewed-by: David Edmondson > --- > target/i386/cpu.h | 6 ++ > target/i386/cpu.c | 1 + > target/i386/kvm/kvm-cpu.c | 1 + > 3 files changed, 8 insertions(+) > > diff --git a/target/i386/cpu.h b/target/i386/cpu.h >

Re: [PATCH v2 4/8] x86: Add XFD faulting bit for state components

2022-02-21 Thread David Edmondson
t for XFD faulting of this > state component. > > Signed-off-by: Jing Liu > Signed-off-by: Yang Zhong Small comment below... Reviewed-by: David Edmondson > --- > target/i386/cpu.h | 2 ++ > target/i386/cpu.c | 3 ++- > 2 files changed, 4 insertions(+), 1 deletion(-) >

Re: [PATCH v2 6/8] x86: add support for KVM_CAP_XSAVE2 and AMX state migration

2022-02-21 Thread David Edmondson
On Wednesday, 2022-02-16 at 22:04:32 -08, Yang Zhong wrote: > From: Jing Liu > > When dynamic xfeatures (e.g. AMX) are used by the guest, the xsave > area would be larger than 4KB. KVM_GET_XSAVE2 and KVM_SET_XSAVE > under KVM_CAP_XSAVE2 works with a xsave buffer larger than 4KB. > Always use the

Re: [PATCH v2 7/8] x86: Support XFD and AMX xsave data migration

2022-02-21 Thread David Edmondson
EAX[4] > enumerate to be valid. Likewise migrate the MSRs and > related xsave state necessarily. > > Signed-off-by: Zeng Guang > Signed-off-by: Wei Wang > Signed-off-by: Yang Zhong Reviewed-by: David Edmondson > --- > target/i386/cpu.h | 9 + > target/

[PATCH 1/2] scripts/qemu-gdb/mtree.py: Int128 are decimal rather than hex

2022-02-21 Thread David Edmondson
When parsing QEMU's native Int128 type, do not attempt to convert from hexadecimal. Fixes: 8037fa55ac ("scripts/qemugdb/mtree.py: fix up mtree dump") Signed-off-by: David Edmondson --- scripts/qemugdb/mtree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH 2/2] scripts/qemu-gdb/timers.py: the 'last' attribute is no more

2022-02-21 Thread David Edmondson
The 'last' member of QEMUClock was removed some time ago, but the python gdb helper did not notice. Fixes: 3c2d4c8aa6 ("timer: last, remove last bits of last") Signed-off-by: David Edmondson --- scripts/qemugdb/timers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deleti

[PATCH 0/2] Minor fixes for the Python GDB plugins

2022-02-21 Thread David Edmondson
In attempting to use the Python GDB plugins a couple of problems were encountered. David Edmondson (2): scripts/qemu-gdb/mtree.py: Int128 are decimal rather than hex scripts/qemu-gdb/timers.py: the 'last' attribute is no more scripts/qemugdb/mtree.py | 2 +- scripts/qemugdb/tim

Re: [PULL 15/22] x86: Grant AMX permission for guest

2022-03-16 Thread David Edmondson
On Wednesday, 2022-03-16 at 16:05:01 GMT, Daniel P. Berrangé wrote: > On Wed, Mar 16, 2022 at 04:57:39PM +0100, Peter Krempa wrote: >> On Tue, Mar 08, 2022 at 12:34:38 +0100, Paolo Bonzini wrote: >> > From: Yang Zhong >> > >> > Kernel allocates 4K xstate buffer by default. For XSAVE features >>

Re: [PATCH v5 1/8] migration: Export ram_transferred_ram()

2022-03-29 Thread David Edmondson
On Thursday, 2022-03-10 at 16:34:47 +01, Juan Quintela wrote: > Subject: Re: [PATCH v5 1/8] migration: Export ram_transferred_ram() The function is "ram_transferred_add()". > Signed-off-by: Juan Quintela Reviewed-by: David Edmondson > --- > migration/ram.h | 2 ++

Re: [PATCH 1/2] scripts/qemu-gdb/mtree.py: Int128 are decimal rather than hex

2022-03-29 Thread David Edmondson
Ping? On Monday, 2022-02-21 at 16:49:47 GMT, David Edmondson wrote: > When parsing QEMU's native Int128 type, do not attempt to convert from > hexadecimal. > > Fixes: 8037fa55ac ("scripts/qemugdb/mtree.py: fix up mtree dump") > Signed-off-by: David Edmondson >

Re: [PATCH v2] docs/specs/tpm: Clarify command line parameters for network migration

2021-10-14 Thread David Edmondson
On Wednesday, 2021-10-13 at 23:27:00 -04, Stefan Berger wrote: > Clarify the command line parameters for swtpm migration across the network > for the case of shared storage and non-shared storage. > > Signed-off-by: Stefan Berger > --- > docs/specs/tpm.rst | 3 ++- > 1 file changed, 2 insertions

[PATCH] migration: Report the error returned when save_live_iterate fails

2021-12-15 Thread David Edmondson
Should qemu_savevm_state_iterate() encounter a failure when calling a particular save_live_iterate function, report the error code returned by the function. Signed-off-by: David Edmondson --- migration/savevm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/migration

Re: [PATCH 1/3] migration: Merge ram_counters and ram_atomic_counters

2023-03-02 Thread David Edmondson
On Wednesday, 2023-03-01 at 13:40:24 +01, Juan Quintela wrote: > Using MgrationStats as type for ram_counters mean that we didn't have > to re-declare each value in another struct. The need of atomic > counters have make us to create MigrationAtomicStats for this atomic > counters. > > Create RAM

Re: [PATCH 2/3] migration: Update atomic stats out of the mutex

2023-03-02 Thread David Edmondson
On Wednesday, 2023-03-01 at 13:40:25 +01, Juan Quintela wrote: > Signed-off-by: Juan Quintela Reviewed-by: David Edmondson > --- > migration/multifd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/migration/multifd.c b/migration/multifd.c

Re: [PATCH 3/3] migration: Make multifd_bytes atomic

2023-03-02 Thread David Edmondson
igned-off-by: Juan Quintela Reviewed-by: David Edmondson > --- > migration/ram.h | 2 +- > migration/migration.c | 4 ++-- > migration/multifd.c | 4 ++-- > 3 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/migration/ram.h b/migration/ram.h > index ca

Re: [PATCH v2 1/3] migration: Merge ram_counters and ram_atomic_counters

2023-03-06 Thread David Edmondson
t; > Create RAMStats type which is a merge of MigrationStats and > MigrationAtomicStats removing unused members. > > Signed-off-by: Juan Quintela > > --- > > Fix typos found by David Edmondson > --- > migration/ram.h | 26 ++ > migra

Re: [PATCH] migration: move migration_global_dump() to migration-hmp-cmds.c

2023-03-06 Thread David Edmondson
Juan Quintela writes: > It is only used there, so we can make it static. > Once there, remove spice.h that it is not used. The removal of ui/qemu-spice.h seems like an unrelated change - should be a different changeset? > > Signed-off-by: Juan Quintela > --- > include/migration/misc.h |

[RFC 0/2] migration: Tally pre-copy, downtime and post-copy bytes independently

2021-12-16 Thread David Edmondson
"ram_transferred_add" doesn't seem great, and I'm unsure whether the tests to determine the phase in the second patch are the most appropriate. David Edmondson (2): migration: Introduce ram_transferred_add() migration: Tally pre-copy, downtime and post-copy bytes indep

[RFC 1/2] migration: Introduce ram_transferred_add()

2021-12-16 Thread David Edmondson
...and use it. Signed-off-by: David Edmondson --- migration/ram.c | 23 ++- migration/ram.h | 1 + 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 57efa67f20..48ef2819f6 100644 --- a/migration/ram.c +++ b/migration

[RFC 2/2] migration: Tally pre-copy, downtime and post-copy bytes independently

2021-12-16 Thread David Edmondson
Provide information on the number of bytes copied in the pre-copy, downtime and post-copy phases of migration. Signed-off-by: David Edmondson --- migration/migration.c | 3 +++ migration/ram.c | 7 +++ monitor/hmp-cmds.c| 12 qapi/migration.json | 4 +++- 4 files

Re: [RFC 1/2] migration: Introduce ram_transferred_add()

2021-12-20 Thread David Edmondson
On Friday, 2021-12-17 at 20:09:12 +01, Philippe Mathieu-Daudé wrote: > On 12/16/21 13:34, David Edmondson wrote: >> ...and use it. >> >> Signed-off-by: David Edmondson >> --- >> migration/ram.c | 23 ++- >> migration/ram.h | 1 + &

[RFC v2 1/2] migration: Introduce ram_transferred_add()

2021-12-20 Thread David Edmondson
...and use it. Signed-off-by: David Edmondson --- migration/ram.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 57efa67f20..bd53e50a7f 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -386,6 +386,11

[RFC v2 2/2] migration: Tally pre-copy, downtime and post-copy bytes independently

2021-12-20 Thread David Edmondson
Provide information on the number of bytes copied in the pre-copy, downtime and post-copy phases of migration. Signed-off-by: David Edmondson --- migration/migration.c | 3 +++ migration/ram.c | 7 +++ monitor/hmp-cmds.c| 12 qapi/migration.json | 13

[RFC v2 0/2] migration: Tally pre-copy, downtime and post-copy bytes independently

2021-12-20 Thread David Edmondson
"ram_transferred_add" doesn't seem great, and I'm unsure whether the tests to determine the phase in the second patch are the most appropriate. v2: - ram_transferred_add() should be static (Philippe) - Document the new MigrationStats fields (dme) David Edmondson (2):

[PATCH v3 1/2] migration: Introduce ram_transferred_add()

2021-12-21 Thread David Edmondson
Replace direct manipulation of ram_counters.transferred with a function. Signed-off-by: David Edmondson Reviewed-by: Philippe Mathieu-Daudé --- migration/ram.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index

[PATCH v3 0/2] migration: Tally pre-copy, downtime and post-copy bytes independently

2021-12-21 Thread David Edmondson
e new MigrationStats fields (dme) David Edmondson (2): migration: Introduce ram_transferred_add() migration: Tally pre-copy, downtime and post-copy bytes independently migration/migration.c | 3 +++ migration/ram.c | 30 +- monitor/hmp-cmds.c| 1

[PATCH v3 2/2] migration: Tally pre-copy, downtime and post-copy bytes independently

2021-12-21 Thread David Edmondson
Provide information on the number of bytes copied in the pre-copy, downtime and post-copy phases of migration. Signed-off-by: David Edmondson Reviewed-by: Philippe Mathieu-Daudé --- migration/migration.c | 3 +++ migration/ram.c | 7 +++ monitor/hmp-cmds.c| 12

Re: [PATCH v2 6/8] migration: Dump sub-cmd name in loadvm_process_command tp

2021-12-21 Thread David Edmondson
On Monday, 2021-12-20 at 16:53:53 +08, Peter Xu wrote: > It'll be easier to read the name rather than index of sub-cmd when debugging. > > Signed-off-by: Peter Xu > --- > migration/savevm.c | 3 ++- > migration/trace-events | 2 +- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff

Re: [PATCH v2 7/8] migration: Finer grained tracepoints for POSTCOPY_LISTEN

2021-12-21 Thread David Edmondson
On Monday, 2021-12-20 at 16:53:54 +08, Peter Xu wrote: > The enablement of postcopy listening has a few steps, add a few tracepoints to > be there ready for some basic measurements for them. > > Signed-off-by: Peter Xu > --- > migration/savevm.c | 9 - > migration/trace-events | 2 +-

Re: [PATCH v3 6/8] migration: Dump sub-cmd name in loadvm_process_command tp

2021-12-24 Thread David Edmondson
On Friday, 2021-12-24 at 14:49:58 +08, Peter Xu wrote: > It'll be easier to read the name rather than index of sub-cmd when debugging. > > Signed-off-by: Peter Xu Reviewed-by: David Edmondson > --- > migration/savevm.c | 3 ++- > migration/trace-events | 2 +

Re: [PATCH v3 7/8] migration: Finer grained tracepoints for POSTCOPY_LISTEN

2021-12-24 Thread David Edmondson
On Friday, 2021-12-24 at 14:49:59 +08, Peter Xu wrote: > The enablement of postcopy listening has a few steps, add a few tracepoints to > be there ready for some basic measurements for them. > > Signed-off-by: Peter Xu Reviewed-by: David Edmondson > --- > migratio

Re: [PATCH v3 8/8] migration: Tracepoint change in postcopy-run bottom half

2021-12-24 Thread David Edmondson
h a finer granule trace. > > Signed-off-by: Peter Xu Reviewed-by: David Edmondson > --- > migration/savevm.c | 12 +--- > migration/trace-events | 3 +-- > 2 files changed, 10 insertions(+), 5 deletions(-) > > diff --git a/migration/savevm.c b/migration

[RFC PATCH 4/9] block/curl: Perform IO in fixed size chunks

2020-08-18 Thread David Edmondson
Do all IO requests to the remote server in 256kB chunks. Signed-off-by: David Edmondson --- block/curl.c | 151 - block/trace-events | 2 + 2 files changed, 109 insertions(+), 44 deletions(-) diff --git a/block/curl.c b/block/curl.c index

[RFC PATCH 1/9] block/curl: Add an 'offset' parameter, affecting all range requests

2020-08-18 Thread David Edmondson
A new 'offset' parameter affects all range requests that are sent to the remote server. The value, in bytes, is simply added to any byte offset values passed in to the driver. Signed-off-by: David Edmondson --- block/curl.c | 12 +++- docs/system/

[RFC PATCH 7/9] block/curl: Allow the user to control the number of cache blocks

2020-08-18 Thread David Edmondson
Rather than using a fixed number, allow the user to specify the number of cache blocks allocated. This cannot be less than the number of Curl states and defaults to that value. Signed-off-by: David Edmondson --- block/curl.c | 20 +--- docs/system/device

[RFC PATCH 5/9] block/curl: Allow the blocksize to be specified by the user

2020-08-18 Thread David Edmondson
Rather than a fixed 256kB blocksize, allow the user to specify the size used. It must be a non-zero power of two, defaulting to 256kB. Signed-off-by: David Edmondson --- block/curl.c | 73 +-- docs/system/device-url-syntax.rst.inc | 7 +++ qapi

[RFC PATCH 0/9] block/curl: Add caching of data downloaded from the remote server

2020-08-18 Thread David Edmondson
|00:00:34 | By way of comparison, aria2c (a dedicated HTTP download client) can retrieve the same image in 19 seconds. Obviously this is without any QCOW2 layer. David Edmondson (9): block/curl: Add an 'offset' parameter, affecting all range requests block/curl: Re

[RFC PATCH 6/9] block/curl: Cache downloaded blocks

2020-08-18 Thread David Edmondson
In the hope that they will be referred to multiple times, cache the blocks downloaded from the remote server. Signed-off-by: David Edmondson --- block/curl.c | 321 +++-- block/trace-events | 3 + 2 files changed, 287 insertions(+), 37 deletions

[RFC PATCH 8/9] block/curl: Allow 16 sockets/ACB

2020-08-18 Thread David Edmondson
qemu-img allows up to 16 coroutines when performing IO. Ensure that there is a Curl socket and ACB available to each of them. Signed-off-by: David Edmondson --- block/curl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/curl.c b/block/curl.c index 27fa77c351

[RFC PATCH 2/9] block/curl: Remove readahead support

2020-08-18 Thread David Edmondson
Block based caching and the current readahead support do not interact well, so remove readahead support before adding block caching. Readahead will be re-added later. Signed-off-by: David Edmondson --- block/curl.c | 23 --- docs/system/device-url

[RFC PATCH 3/9] block/curl: Tracing

2020-08-18 Thread David Edmondson
Add some more trace functions to the IO path. Signed-off-by: David Edmondson --- block/curl.c | 10 +- block/io.c | 4 block/linux-aio.c | 6 ++ block/trace-events | 13 - 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/block/curl.c

[RFC PATCH 9/9] block/curl: Add readahead support

2020-08-18 Thread David Edmondson
Re-add support for a readahead parameter, which is the number of bytes added to the request from the upper layer before breaking the request into blocks. The default is zero. The number of bytes specified has no alignment requirements. Signed-off-by: David Edmondson --- block/curl.c

Re: [RFC PATCH 0/9] block/curl: Add caching of data downloaded from the remote server

2020-08-19 Thread David Edmondson
On Wednesday, 2020-08-19 at 15:11:37 +01, Stefan Hajnoczi wrote: > On Tue, Aug 18, 2020 at 12:08:36PM +0100, David Edmondson wrote: >> When using qemu-img to convert an image that is hosted on an HTTP >> server to some faster local (or pseudo-local) storage, the overall >&g

Re: [PATCH 2/3] block: add logging facility for long standing IO requests

2020-08-20 Thread David Edmondson
On Monday, 2020-08-10 at 13:14:46 +03, Denis V. Lunev wrote: > +strftime(buf, sizeof(buf), "%m-%d %H:%M:%S", "%F %T" would include the year, which can be useful. > + localtime_r(&start_time_host_s, &t)); > + > +bs = blk_bs(blk_stats2blk(stats)); > +qemu_log("long %s[%ld]

Re: Bug? qemu-img convert to preallocated image makes it sparse

2020-01-17 Thread David Edmondson
On Thursday, 2020-01-16 at 15:37:22 +01, Max Reitz wrote: > So I suppose the best idea I can come up with is indeed a > --target-is-zero flag for qemu-img convert -n. Would that work for you? I was looking at adding this for a slightly different reason (converting sparse images to newly provisio

[PATCH] qemu-img: Add --target-is-zero to convert

2020-01-17 Thread David Edmondson
In many cases the target of a convert operation is a newly provisioned target that the user knows is blank (filled with zeroes). In this situation there is no requirement for qemu-img to wastefully zero out the entire device. Add a new option, --target-is-zero, allowing the user to indicate that a

[PATCH] qemu-img: Add --target-is-zero to convert

2020-01-17 Thread David Edmondson
In many cases the target of a convert operation is a newly provisioned target that the user knows is blank (filled with zeroes). In this situation there is no requirement for qemu-img to wastefully zero out the entire device. Add a new option, --target-is-zero, allowing the user to indicate that a

Re: [PATCH] qemu-img: Add --target-is-zero to convert

2020-01-21 Thread David Edmondson
On Monday, 2020-01-20 at 19:33:43 -05, John Snow wrote: > CC qemu-block and block maintainers > > On 1/17/20 5:34 AM, David Edmondson wrote: >> In many cases the target of a convert operation is a newly provisioned >> target that the user knows is blank (filled with zeroes).

Re: [PATCH] qemu-img: Add --target-is-zero to convert

2020-01-23 Thread David Edmondson
On Tuesday, 2020-01-21 at 16:02:16 +01, Max Reitz wrote: > Hi, > > On 17.01.20 11:34, David Edmondson wrote: >> In many cases the target of a convert operation is a newly provisioned >> target that the user knows is blank (filled with zeroes). In this >> situation there

[PATCH v2 0/2] qemu-img: Add --target-is-zero to indicate that a target is blank

2020-01-24 Thread David Edmondson
for options in qemu-img.texi. David Edmondson (2): qemu-img: Add --target-is-zero to convert doc: Use @code rather than @var for options qemu-img-cmds.hx | 4 ++-- qemu-img.c | 25 ++--- qemu-img.texi| 20 3 files changed, 36 insertions(+),

[PATCH v2 1/2] qemu-img: Add --target-is-zero to convert

2020-01-24 Thread David Edmondson
an existing target device is already zero filled. Signed-off-by: David Edmondson --- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 25 ++--- qemu-img.texi| 4 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx index

[PATCH v2 2/2] doc: Use @code rather than @var for options

2020-01-24 Thread David Edmondson
ase option. Replace the use of @var for options with @code to avoid this. Signed-off-by: David Edmondson --- qemu-img.texi | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/qemu-img.texi b/qemu-img.texi index 3b6dfd8682..6b4a1ac961 100644 --- a/qemu-img.texi

Re: Ways to deal with broken machine types

2021-03-30 Thread David Edmondson
On Tuesday, 2021-03-23 at 15:40:24 -04, Michael S. Tsirkin wrote: > On Tue, Mar 23, 2021 at 05:40:36PM +, Daniel P. Berrangé wrote: >> On Tue, Mar 23, 2021 at 05:54:47PM +0100, Igor Mammedov wrote: >> > Let me hijack this thread for beyond this case scope. >> > >> > I agree that for this part

Re: [PATCH] i386: Make 'hv-reenlightenment' require explicit 'tsc-frequency' setting

2021-03-30 Thread David Edmondson
On Tuesday, 2021-03-30 at 14:36:03 +02, Vitaly Kuznetsov wrote: > Commit 561dbb41b1d7 "i386: Make migration fail when Hyper-V reenlightenment > was enabled but 'user_tsc_khz' is unset" forbade migrations with when guest > has opted for reenlightenment notifications but 'tsc-frequency' wasn't set >

Re: [PATCH] docs: Add a QEMU Code of Conduct and Conflict Resolution Policy document

2021-03-31 Thread David Edmondson
On Wednesday, 2021-03-31 at 17:05:27 +02, Paolo Bonzini wrote: > In an ideal world, we would all get along together very well, always be > polite and never end up in huge conflicts. And even if there are conflicts, > we would always handle each other fair and respectfully. Unfortunately, > this is

Re: [PATCH 4/5] coroutine-lock: reimplement CoRwLock to fix downgrade bug

2021-03-17 Thread David Edmondson
way, downgrade can look at the > first queued coroutines and wake it if it is a reader, causing > all other readers to be released in turn. > > Reported-by: David Edmondson > Signed-off-by: Paolo Bonzini > --- > include/qemu/coroutine.h | 10 ++- > util/qemu-coroutine-lock.

Re: [PATCH v4 1/2] migration/ram: Reduce unnecessary rate limiting

2021-03-17 Thread David Edmondson
t iteration, migration_rate_limit() should be executed. >>> If not, it can be omitted. >>> >>> Signed-off-by: Keqian Zhu >>> Signed-off-by: Kunkun Jiang >>> Reviewed-by: David Edmondson >>> --- >>> migration/ram.c | 9 +++-- >>>

Re: [PATCH 4/6] coroutine-lock: reimplement CoRwLock to fix downgrade bug

2021-03-17 Thread David Edmondson
Queue, and store for each whether it is a > potential reader or a writer. This way, downgrade can look at the > first queued coroutines and wake it only if it is a reader, causing > all other readers in line to be released in turn. > > Reported-by: David Edmondson > Signed-off-by

Re: [PATCH 5/6] test-coroutine: add rwlock upgrade test

2021-03-17 Thread David Edmondson
On Wednesday, 2021-03-17 at 13:16:40 +01, Paolo Bonzini wrote: > Test that rwlock upgrade is fair, and readers go back to sleep if a writer > is in line. > > Signed-off-by: Paolo Bonzini Reviewed-by: David Edmondson > --- > tests/unit/tes

Re: [PATCH 4/6] coroutine-lock: reimplement CoRwLock to fix downgrade bug

2021-03-17 Thread David Edmondson
On Wednesday, 2021-03-17 at 18:19:58 +01, Paolo Bonzini wrote: > On 17/03/21 16:17, David Edmondson wrote: >>> +if (tkt) { >>> +if (tkt->read) { >>> +if (lock->owners >= 0) { >>> +l

Re: [PATCH 5/6] test-coroutine: add rwlock upgrade test

2021-03-17 Thread David Edmondson
On Wednesday, 2021-03-17 at 19:00:12 +01, Paolo Bonzini wrote: > Test that rwlock upgrade is fair, and readers go back to sleep if a writer > is in line. > > Signed-off-by: Paolo Bonzini Reviewed-by: David Edmondson > --- > tests/unit/tes

[RFC PATCH 1/7] target/i386: Declare constants for XSAVE offsets

2021-05-20 Thread David Edmondson
Declare and use manifest constants for the XSAVE state component offsets. Signed-off-by: David Edmondson --- target/i386/cpu.h | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index e6836393f7..1fb732f366

[RFC PATCH 7/7] target/i386: Manipulate only AMD XSAVE state on AMD

2021-05-20 Thread David Edmondson
On AMD CPUs, ensure to save/load only the relevant XSAVE state. Signed-off-by: David Edmondson --- target/i386/tcg/fpu_helper.c | 12 +-- target/i386/xsave_helper.c | 70 ++-- 2 files changed, 54 insertions(+), 28 deletions(-) diff --git a/target/i386/tcg

[RFC PATCH 2/7] target/i386: Use constants for XSAVE offsets

2021-05-20 Thread David Edmondson
Where existing constants for XSAVE offsets exists, use them. Signed-off-by: David Edmondson --- target/i386/kvm/kvm.c | 56 ++- 1 file changed, 18 insertions(+), 38 deletions(-) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index d972eb4705

[RFC PATCH 0/7] Support protection keys in an AMD EPYC-Milan VM

2021-05-20 Thread David Edmondson
re it really belongs. David Edmondson (7): target/i386: Declare constants for XSAVE offsets target/i386: Use constants for XSAVE offsets target/i386: Clarify the padding requirements of X86XSaveArea target/i386: Prepare for per-vendor X86XSaveArea layout target/i386: Introduce AMD X86XSaveAre

[RFC PATCH 6/7] target/i386: Adjust AMD XSAVE PKRU area offset in CPUID leaf 0xd

2021-05-20 Thread David Edmondson
AMD stores the pkru_state at a different offset to Intel, so update the CPUID leaf which indicates such. Signed-off-by: David Edmondson --- target/i386/cpu.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 4f481691b4

[RFC PATCH 3/7] target/i386: Clarify the padding requirements of X86XSaveArea

2021-05-20 Thread David Edmondson
Replace the hard-coded size of offsets or structure elements with defined constants or sizeof(). Signed-off-by: David Edmondson --- target/i386/cpu.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 1fb732f366..0bb365bddf

[RFC PATCH 4/7] target/i386: Prepare for per-vendor X86XSaveArea layout

2021-05-20 Thread David Edmondson
Move Intel specific components of X86XSaveArea into a sub-union. Signed-off-by: David Edmondson --- target/i386/cpu.c| 12 target/i386/cpu.h| 55 +--- target/i386/kvm/kvm.c| 12 target/i386/tcg/fpu_helper.c | 12

[RFC PATCH 5/7] target/i386: Introduce AMD X86XSaveArea sub-union

2021-05-20 Thread David Edmondson
AMD stores the pkru_state at a different offset to Intel. Signed-off-by: David Edmondson --- target/i386/cpu.h | 17 +++-- target/i386/kvm/kvm.c | 3 ++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index f1ce4e3008

Re: [PATCH] hw/elf_ops: Fix a typo

2021-03-03 Thread David Edmondson
On Thursday, 2021-02-25 at 19:13:44 +01, Philippe Mathieu-Daudé wrote: > g_mapped_file_new_from_fd()'s parameter is named 'writable'. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Edmondson > --- > include/hw/elf_ops.h | 2 +- > 1 file ch

Re: [PATCH v2 1/3] migration/ram: Modify the code comment of ram_save_host_page()

2021-03-03 Thread David Edmondson
On Monday, 2021-03-01 at 16:21:30 +08, Kunkun Jiang wrote: > The ram_save_host_page() has been modified several times > since its birth. But the comment hasn't been modified as it should > be. It'd better to modify the comment to explain ram_save_host_page() > more clearly. I don't think that it'

Re: [PATCH v2 3/3] migration/ram: Optimize ram_save_host_page()

2021-03-03 Thread David Edmondson
On Monday, 2021-03-01 at 16:21:32 +08, Kunkun Jiang wrote: > Starting from pss->page, ram_save_host_page() will check every page > and send the dirty pages up to the end of the current host page or > the boundary of used_length of the block. If the host page size is > a huge page, the step "check"

  1   2   3   >