[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

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 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: > 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) > --- >

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

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

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 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 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] 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

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 ++ > migration/

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 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 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

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

2023-01-25 Thread David Edmondson
ent feature 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 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 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: [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 v2 5/8] x86: Add AMX CPUIDs enumeration

2022-02-23 Thread David Edmondson
rovide 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 in

[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/timers.py | 5

[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 deletions(-)

[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/scrip

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

2022-02-21 Thread David Edmondson
.1.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/

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 4/8] x86: Add XFD faulting bit for state components

2022-02-21 Thread David Edmondson
port 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 1/8] x86: Fix the 64-byte boundary enumeration for extended state

2022-02-21 Thread David Edmondson
g 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 > inde

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

2022-02-21 Thread David Edmondson
Add 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 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.

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 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

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] >

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 v3 8/8] migration: Tracepoint change in postcopy-run bottom half

2021-12-24 Thread David Edmondson
iner 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/save

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 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 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 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

[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

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

2021-12-21 Thread David Edmondson
ationStats 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| 12

[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

[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): migration:

[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 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

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 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

[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 independently

[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

[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 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

Re: [PATCH v4 1/1] hw/pflash_cfi01: Allow backing devices to be smaller than memory region

2021-09-14 Thread David Edmondson
On Thursday, 2021-09-09 at 11:27:56 +02, Philippe Mathieu-Daudé wrote: > Hi David, Philippe, thank you for the careful and considered review. >> +static MemTxResult pflash_outer_write_with_attrs(void *opaque, hwaddr addr, >> + uint64_t value,

[PATCH v4 1/1] hw/pflash_cfi01: Allow backing devices to be smaller than memory region

2021-08-10 Thread David Edmondson
devices and discard them for writable devices. Signed-off-by: David Edmondson --- hw/block/pflash_cfi01.c | 105 hw/block/trace-events | 3 ++ 2 files changed, 87 insertions(+), 21 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block

[PATCH v4 0/1] hw/pflash_cfi01: Allow an administrator to reduce the memory consumption of flash devices

2021-08-10 Thread David Edmondson
ad_all(), given that we know how much we want to read. v4: - Remove changes already upstream. - Rebase. David Edmondson (1): hw/pflash_cfi01: Allow backing devices to be smaller than memory region hw/block/pflash_cfi01.c | 105 hw/block/trac

Re: [RFC PATCH 8/8] target/i386: Move X86XSaveArea into TCG

2021-07-08 Thread David Edmondson
On Thursday, 2021-07-08 at 08:22:02 -07, Richard Henderson wrote: > On 7/8/21 12:45 AM, David Edmondson wrote: >> Actually, that's nonsense. With KVM or HVF we have to use the offsets of >> the host CPU, as the hardware won't do anything else, irrespective of >> the gen

Re: [RFC PATCH 8/8] target/i386: Move X86XSaveArea into TCG

2021-07-08 Thread David Edmondson
On Wednesday, 2021-07-07 at 11:10:21 +01, David Edmondson wrote: > On Tuesday, 2021-07-06 at 18:09:42 -07, Richard Henderson wrote: > >> On 7/5/21 3:46 AM, David Edmondson wrote: >>> Given that TCG is now the only consumer of X86XSaveArea, move the >>> structure de

Re: [RFC PATCH 8/8] target/i386: Move X86XSaveArea into TCG

2021-07-07 Thread David Edmondson
On Tuesday, 2021-07-06 at 18:09:42 -07, Richard Henderson wrote: > On 7/5/21 3:46 AM, David Edmondson wrote: >> Given that TCG is now the only consumer of X86XSaveArea, move the >> structure definition and associated offset declarations and checks to a >> TCG specific head

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

2021-07-05 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 6590ad6391..92f9ca264c

[RFC PATCH 4/8] target/i386: Pass buffer and length to XSAVE helper

2021-07-05 Thread David Edmondson
In preparation for removing assumptions about XSAVE area offsets, pass a buffer pointer and buffer length to the XSAVE helper functions. Signed-off-by: David Edmondson --- target/i386/cpu.h | 5 +++-- target/i386/hvf/hvf.c | 3 ++- target/i386/hvf/x86hvf.c | 19

[RFC PATCH 2/8] target/i386: Consolidate the X86XSaveArea offset checks

2021-07-05 Thread David Edmondson
Rather than having similar but different checks in cpu.h and kvm.c, move them all to cpu.h. --- target/i386/cpu.h | 22 +++--- target/i386/kvm/kvm.c | 39 --- 2 files changed, 15 insertions(+), 46 deletions(-) diff --git a/target/i386/cpu.h

[RFC PATCH 6/8] target/i386: Observe XSAVE state area offsets

2021-07-05 Thread David Edmondson
in no functional change. Signed-off-by: David Edmondson --- target/i386/xsave_helper.c | 262 - 1 file changed, 200 insertions(+), 62 deletions(-) diff --git a/target/i386/xsave_helper.c b/target/i386/xsave_helper.c index b16c6ac0fe..ac61a96344 100644 --- a/target/i386

[RFC PATCH 7/8] target/i386: Populate x86_ext_save_areas offsets using cpuid where possible

2021-07-05 Thread David Edmondson
Rather than relying on the X86XSaveArea structure definition, determine the offset of XSAVE state areas using CPUID leaf 0xd where possible (KVM and HVF). Signed-off-by: David Edmondson --- target/i386/cpu.c | 13 + target/i386/cpu.h | 2 +- target/i386/hvf/hvf

[RFC PATCH 8/8] target/i386: Move X86XSaveArea into TCG

2021-07-05 Thread David Edmondson
Given that TCG is now the only consumer of X86XSaveArea, move the structure definition and associated offset declarations and checks to a TCG specific header. Signed-off-by: David Edmondson --- target/i386/cpu.h| 57 target/i386/tcg/fpu_helper.c

[RFC PATCH 5/8] target/i386: Make x86_ext_save_areas visible outside cpu.c

2021-07-05 Thread David Edmondson
Provide visibility of the x86_ext_save_areas array and associated type outside of cpu.c. Signed-off-by: David Edmondson --- target/i386/cpu.c | 7 +-- target/i386/cpu.h | 9 + 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index

[RFC PATCH 0/8] Derive XSAVE state component offsets from CPUID leaf 0xd where possible

2021-07-05 Thread David Edmondson
are accurate on an older Intel system). David Edmondson (8): target/i386: Declare constants for XSAVE offsets target/i386: Consolidate the X86XSaveArea offset checks target/i386: Clarify the padding requirements of X86XSaveArea target/i386: Pass buffer and length to XSAVE helper target/i386: Make

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

2021-07-05 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 f7fa5870b1..aedb8f2e01

Re: [PATCH] target/i386: Fix cpuid level for AMD

2021-07-02 Thread David Edmondson
On Thursday, 2021-07-01 at 15:35:49 -05, Michael Roth wrote: > Quoting Igor Mammedov (2021-07-01 03:43:13) >> On Wed, 30 Jun 2021 14:18:09 -0500 >> Michael Roth wrote: >> >> > Quoting Dr. David Alan Gilbert (2021-06-29 09:06:02) >> > > * zhenwei pi (pizhen...@bytedance.com) wrote: >> > > > A

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

2021-07-01 Thread David Edmondson
---- >> From: David Edmondson >> Sent: Tuesday, June 8, 2021 3:25 AM >> To: qemu-devel@nongnu.org >> Cc: k...@vger.kernel.org; Eduardo Habkost ; Paolo >> Bonzini ; Marcelo Tosatti ; >> Richard Henderson ; Moger, Babu >> >> Subject: Re: [RFC P

Re: [PATCH RFC 0/6] i386/pc: Fix creation of >= 1Tb guests on AMD systems with IOMMU

2021-06-23 Thread David Edmondson
On Tuesday, 2021-06-22 at 15:16:29 -06, Alex Williamson wrote: >> Additionally, an alternative to hardcoded ranges as we do today, >> VFIO could advertise the platform valid IOVA ranges without >> necessarily >> requiring to have a PCI device added in the vfio container.

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

2021-06-14 Thread David Edmondson
On Friday, 2021-06-11 at 18:01:55 +02, Paolo Bonzini wrote: > First of all, sorry for the delayed review. > > On 20/05/21 16:56, David Edmondson wrote: >> AMD EPYC-Milan CPUs introduced support for protection keys, previously >> available only with Intel CPUs. >> >

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

2021-06-08 Thread David Edmondson
On Thursday, 2021-05-20 at 15:56:40 +01, David Edmondson wrote: > AMD EPYC-Milan CPUs introduced support for protection keys, previously > available only with Intel CPUs. > > AMD chose to place the XSAVE state component for the protection keys > at a different offset in the XSAVE

[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

[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 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 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 0/7] Support protection keys in an AMD EPYC-Milan VM

2021-05-20 Thread David Edmondson
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 X86XSaveArea sub

[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 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 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

[PATCH] accel: kvm: clarify that extra exit data is hexadecimal

2021-04-28 Thread David Edmondson
When dumping the extra exit data provided by KVM, make it clear that the data is hexadecimal. At the same time, zero-pad the output. Signed-off-by: David Edmondson --- accel/kvm/kvm-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm

Re: [PATCH v1] migration/dirtyrate: make sample page count configurable

2021-04-20 Thread David Edmondson
On Thursday, 2021-04-15 at 01:23:54 +08, huangy wrote: > From: Hyman Huang(黄勇) > > introduce optional sample-pages argument in calc-dirty-rate, > making sample page count per GB configurable so that more > accurate dirtyrate can be calculated. > > Signed-off-by: Hyman Huang(黄勇) > --- >

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

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: 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

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

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 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
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 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/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 v2 07/12] hw/block/pflash_cfi02: Factor out pflash_reset_state_machine()

2021-03-10 Thread David Edmondson
On Wednesday, 2021-03-10 at 18:05:23 +01, Philippe Mathieu-Daudé wrote: > There is multiple places resetting the internal state machine. > Factor the code out in a new pflash_reset_state_machine() method. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Edmondson >

Re: [PATCH v2 08/12] hw/block/pflash_cfi02: Add DeviceReset method

2021-03-10 Thread David Edmondson
On Wednesday, 2021-03-10 at 18:05:24 +01, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Edmondson > --- > hw/block/pflash_cfi02.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/hw/block/pflash_cfi02.c b/hw/bl

Re: [PATCH v2 04/12] hw/block/pflash_cfi02: Set rom_mode to true in pflash_setup_mappings()

2021-03-10 Thread David Edmondson
audé Reviewed-by: David Edmondson > --- > v2: Convert to bool in pflash_register_memory (David) > --- > hw/block/pflash_cfi02.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c > index 845f50ed9

Re: [PATCH v2 05/12] hw/block/pflash_cfi02: Open-code pflash_register_memory(rom=false)

2021-03-10 Thread David Edmondson
false' case. > > Reviewed-by: Bin Meng > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Edmondson > --- > hw/block/pflash_cfi02.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c >

Re: [PATCH 9/9] hw/block/pflash_cfi01: Extract pflash_mode_read_array()

2021-03-10 Thread David Edmondson
egion_init_rom_device() call. > > Reviewed-by: Alistair Francis > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Edmondson > --- > hw/block/pflash_cfi01.c | 40 +--- > 1 file changed, 17 insertions(+), 23 deletions(-) > > diff

Re: [PATCH 8/9] hw/block/pflash_cfi01: Clarify trace events

2021-03-10 Thread David Edmondson
On Wednesday, 2021-03-10 at 00:50:27 +01, Philippe Mathieu-Daudé wrote: > Use the 'mode_read_array' event when we set the device in such > mode, and use the 'reset' event in DeviceReset handler. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Edmondson >

Re: [PATCH 7/9] hw/block/pflash_cfi02: Factor out DeviceReset method

2021-03-10 Thread David Edmondson
t the device is set in "read array" mode on > reset. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Edmondson > --- > hw/block/pflash_cfi02.c | 16 +++- > 1 file changed, 11 insertions(+), 5 deletions(-) > > diff --git a/hw/block/pf

Re: [PATCH 6/9] hw/block/pflash_cfi02: Rename register_memory(true) as mode_read_array

2021-03-10 Thread David Edmondson
. > > pflash_register_memory(rom_mode=true) already sets the ROM device > in "read array" mode (from I/O device to ROM one). Explicit that > by renaming the function as pflash_mode_read_array(), adding > a trace event and resetting wcycle. > > Signed-of

Re: [PATCH 4/9] hw/block/pflash_cfi02: Set rom_mode to true in pflash_setup_mappings()

2021-03-10 Thread David Edmondson
On Wednesday, 2021-03-10 at 00:50:23 +01, Philippe Mathieu-Daudé wrote: > There is only one call to pflash_setup_mappings(). Convert 'rom_mode' > to boolean and set it to true directly within pflash_setup_mappings(). > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/block/pflash_cfi02.c | 4

Re: [PATCH 3/9] hw/block/pflash_cfi02: Extract pflash_cfi02_fill_cfi_table()

2021-03-10 Thread David Edmondson
On Wednesday, 2021-03-10 at 00:50:22 +01, Philippe Mathieu-Daudé wrote: > Fill the CFI table in out of DeviceRealize() in a new function: > pflash_cfi02_fill_cfi_table(). > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Edmondson > --- > hw/block/pf

Re: [PATCH 2/9] hw/block/pflash_cfi01: Extract pflash_cfi01_fill_cfi_table()

2021-03-10 Thread David Edmondson
On Wednesday, 2021-03-10 at 00:50:21 +01, Philippe Mathieu-Daudé wrote: > Fill the CFI table in out of DeviceRealize() in a new function: > pflash_cfi01_fill_cfi_table(). > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Edmondson > --- > hw/block/pf

Re: [PATCH 1/9] hw/block/pflash_cfi: Fix code style for checkpatch.pl

2021-03-10 Thread David Edmondson
On Wednesday, 2021-03-10 at 00:50:20 +01, Philippe Mathieu-Daudé wrote: > We are going to move this code, fix its style first. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Edmondson > --- > hw/block/pflash_cfi01.c | 36 -

  1   2   3   >