From: Hyman Huang(黄勇)
Add a non-required argument 'CPUState' to kvm_dirty_ring_reap so
that it can cover single vcpu dirty-ring-reaping scenario.
Signed-off-by: Hyman Huang(黄勇)
Reviewed-by: Peter Xu
Message-Id:
Signed-off-by: Dr. David Alan Gilbert
---
accel/kvm/kvm-all.c | 23
From: Daniel P. Berrangé
This removes one further custom impl of QEMUFile, in favour of a
QIOChannel based impl.
Reviewed-by: Eric Blake
Signed-off-by: Daniel P. Berrangé
Reviewed-by: Juan Quintela
Signed-off-by: Juan Quintela
Signed-off-by: Dr. David Alan Gilbert
---
migration/ram.c | 7
e
been transferred on the wire yet if a flush hasn't taken place.
Reviewed-by: Dr. David Alan Gilbert
Signed-off-by: Daniel P. Berrangé
Reviewed-by: Juan Quintela
Signed-off-by: Juan Quintela
Signed-off-by: Dr. David Alan Gilbert
---
migration/qemu-file.c | 30 +++---
1 file c
From: Daniel P. Berrangé
This is for code which needs a portable equivalent to a QIOChannelFile
connected to /dev/null.
Signed-off-by: Daniel P. Berrangé
Reviewed-by: Juan Quintela
Signed-off-by: Juan Quintela
Signed-off-by: Dr. David Alan Gilbert
---
include/io/channel-null.h
in thue rate
limit calculations. The new name give better guidance on its usage.
Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
Reviewed-by: Juan Quintela
Signed-off-by: Juan Quintela
Signed-off-by: Dr. David Alan Gilbert
---
migration/multifd.c | 4 ++--
migration/qemu
From: "Dr. David Alan Gilbert"
The following changes since commit 2b049d2c8dc01de750410f8f1a4eac498c04c723:
Merge tag 'pull-aspeed-20220622' of https://github.com/legoater/qemu into
staging (2022-06-22 07:27:06 -0700)
are available in the Git repository at:
https://gitlab
Quintela
Signed-off-by: Dr. David Alan Gilbert
dgilbert: always define the capability, even on non-Linux but error if
set; avoids build problems with the capability
---
migration/migration.c | 58 +++
monitor/hmp-cmds.c| 6 -
qapi/migration.json | 33
that
reflects the intended usage.
Reviewed-by: Dr. David Alan Gilbert
Signed-off-by: Daniel P. Berrangé
Reviewed-by: Juan Quintela
Signed-off-by: Juan Quintela
Signed-off-by: Dr. David Alan Gilbert
dgilbert: Wrapped long line
---
migration/block.c | 10 +-
migration/migration.c | 3
ration code.
Signed-off-by: Daniel P. Berrangé
Reviewed-by: Juan Quintela
Signed-off-by: Juan Quintela
Signed-off-by: Dr. David Alan Gilbert
dgilbert: Fixed coding style in qio_channel_block_close
---
migration/channel-block.c | 195 ++
migration/channel-b
la
Signed-off-by: Juan Quintela
Signed-off-by: Dr. David Alan Gilbert
---
io/channel-socket.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/io/channel-socket.c b/io/channel-socket.c
index b8c13dba7c..4466bb1cd4 100644
--- a/io/channel-socket.c
+++ b/io/channel-socket.c
@@ -611,6 +61
From: Juan Quintela
Nobody has ever showed up to unregister individual pages, and another
set of patches written by Daniel P. Berrangé
just remove qemu_rdma_signal_unregister() function needed here.
Signed-off-by: Juan Quintela
Reviewed-by: Dr. David Alan Gilbert
Signed-off-by: Dr. David
on build.
Signed-off-by: Leonardo Bras
Reviewed-by: Daniel P. Berrangé
Reviewed-by: Juan Quintela
Reviewed-by: Peter Xu
Signed-off-by: Juan Quintela
Signed-off-by: Dr. David Alan Gilbert
dgilbert: Fixed up thinko'd g_assert_unreachable->g_assert_not_reached
---
io/channel-socket.c |
jobs/2622407862
> https://gitlab.com/qemu-project/qemu/-/jobs/2622407860
> https://gitlab.com/qemu-project/qemu/-/jobs/2622407811
>
> ../io/channel-socket.c:589:9: error: implicit declaration of function
> 'g_assert_unreachable' is invalid in C99
> [-Werror,-Wimplicit-function-declaration]
> g_assert_unreachable();
> ^
Again, non Linux; and should be g_assert_not_reached
I'll fix this up.
Dave
>
> r~
>
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> On Tue, Jun 21, 2022 at 11:31:36AM +0100, Dr. David Alan Gilbert wrote:
> > * Laurent Vivier (lviv...@redhat.com) wrote:
> > > On 20/06/2022 20:24, Dr. David Alan Gilbert wrote:
> > > > * Laurent Viv
* Laurent Vivier (lviv...@redhat.com) wrote:
> On 20/06/2022 20:24, Dr. David Alan Gilbert wrote:
> > * Laurent Vivier (lviv...@redhat.com) wrote:
> > > "-netdev socket" only supports inet sockets.
> > >
> > > It's not a complex task to add support
lude/qemu/sockets.h | 4 +-
> monitor/hmp-cmds.c | 23 +-
> net/clients.h | 6 +
> net/dgram.c| 706 +
> net/hub.c | 2 +
> net/meson.build| 2 +
> net/net.c | 149 ++---
>
ther(print_wrid(wr_id), wr_id, rdma->nb_sent);
> }
> @@ -2137,11 +2101,6 @@ retry:
>
> chunk_end = ram_chunk_end(block, chunk + chunks);
>
> -if (!rdma->pin_all) {
> -#ifdef RDMA_UNREGISTRATION_EXAMPLE
> -qemu_rdma_unregister_waiting(rdma);
> -#endif
> -}
>
> while (test_bit(chunk, block->transit_bitmap)) {
> (void)count;
> --
> 2.35.3
>
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
e the former is specifically for accounting in thue rate
> limit calculations. The new name give better guidance on its usage.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/multifd.c | 4 ++--
> migration/qemu-file.c | 2 +
visit_type_bool(v, param, >block_incremental, );
> break;
> -case MIGRATION_PARAMETER_MULTIFD_CHANNELS:
> -p->has_multifd_channels = true;
> -visit_type_uint8(v, param, >multifd_channels, );
> -break;
> case MIGRATION_PARAMETER_MULTIFD_COMPRESSION:
>
xen.h"
> -
> +#include "migration/migration.h"
> #include "qemu/error-report.h"
> #include "qemu/sockets.h"
> #include "qemu/accel.h"
> @@ -167,6 +167,7 @@ typedef struct DeviceOption {
> static const char *cpu_option;
> sta
us' member)
> #
> -# 2. All boolean arguments default to false
> +# 2. The uri argument should have the Uniform Resource Identifier of default
> +#destination VM. This connection will be bound to default network
> +#
> +# 3. All boolean arguments default to false
> #
> -# 3. The user Monitor's "detach" argument is invalid in QMP and should not
> +# 4. The user Monitor's "detach" argument is invalid in QMP and should not
> #be used
> #
> # Example:
> #
> -# -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
> +# -> { "execute": "migrate",
> +# "arguments": { "uri": "tcp:0:4446", "multi-fd-uri-list": [
> {
> +#"source-uri": "tcp::6900",
> "destination-uri": "tcp:0:4480",
> +#"multifd-channels": 4}, { "source-uri":
> "tcp:10.0.0.0: ",
> +#"destination-uri": "tcp:11.0.0.0:7789",
> "multifd-channels": 5} ] } }
> # <- { "return": {} }
> #
> ##
> { 'command': 'migrate',
> - 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
> - '*detach': 'bool', '*resume': 'bool' } }
> + 'data': {'uri': 'str', '*multi-fd-uri-list': ['MigrateUriParameter'],
> '*blk': 'bool',
> + '*inc': 'bool', '*detach': 'bool', '*resume': 'bool' } }
>
> ##
> # @migrate-incoming:
> --
> 2.22.3
>
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
network traffic. The target IP given will influence
> > which NIC is used based on routing table and I know this is already
> > done widely with OpenStack deployments.
>
> Actually I should clarify this is only practical if the two NICs are
> using different IP subnets, otherwise routing rules are not viable.
> So needing to set source IP would be needed to select between a pair
> of NICs on the same IP subnet.
Yeh so I think that's one reason that the idea in this series is OK
(together with the idea for the NUMA stuff) and I suspect there are
other cases as well.
Dave
> Previous usage I've seen has always setup fully distinct IP subnets
> for generic vs storage vs migration network traffic.
>
> With regards,
> Daniel
> --
> |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org -o-https://fstop138.berrange.com :|
> |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|
>
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
ate-incoming' qmp command:
> > > > { "execute": "migrate-incoming",
> > > > "arguments": {"uri": "tcp::6789",
> > > > "multi-fd-uri-list" : [ {"destination-uri" : "tcp::6900",
> > > > "multifd-channels": 4}, {"destination-uri" :
> > > > "tcp:11.0.0.0:7789",
> > > > "multifd-channels": 5} ] } }
> > > > --
> > > These examples pretty nicely illustrate my concern with this
> > > proposal. It is making QEMU configuration of migration
> > > massively more complicated, while duplicating functionality
> > > the kernel can provide via NIC teaming, but without having
> > > ability to balance it on the fly as the kernel would.
> >
> > Yes, agree Daniel this raises complexity but we will make sure that it does
> > not
> >
> > change/imapct anything existing and we provide new options as optional.
>
> The added code is certainly going to impact ongoing maint of QEMU I/O
> layer and migration in particular. I'm not convinced this complexity
> is compelling enough compared to leveraging kernel native bonding
> to justify the maint burden it will impose.
Dave
> With regards,
> Daniel
> --
> |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org -o-https://fstop138.berrange.com :|
> |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|
>
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
* Juan Quintela (quint...@redhat.com) wrote:
> Signed-off-by: Juan Quintela
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/ram.h | 2 ++
> migration/ram.c | 2 +-
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/migration/ram.h b/migration/ram
d the error disappeared.
>
> So when sendmsg returns -1 with errno ENOBUFS, should we distinguish between
> error ''socket exceeds optmem limit" and error "user exceeds ulimit on
> locked pages"? Or is there any better way to avoid this problem?
I don't think we can tell which one of them triggered the error; so the
only thing I can suggest is that we document the need for optmem_max
setting; I wonder how we get a better answer than 'a few 100KB'?
I guess it's something like the number of packets inflight *
sizeof(cmsghdr) ?
Dave
> Best Regards,
>
> chuang xu
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
From: "Dr. David Alan Gilbert"
I've sent the 3 char set last month, but have updated
it a little; I cleaned up a comment style that was already
broken so checkpatch is happy.
The 'namesapce' is a new patch; it's amazing how many places
make the same typo!
Dave
Dr. David Alan
From: "Dr. David Alan Gilbert"
'namespace' is misspelled in a bunch of places.
Signed-off-by: Dr. David Alan Gilbert
---
hw/9pfs/9p-xattr-user.c | 8
hw/acpi/nvdimm.c| 2 +-
hw/nvme/ctrl.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git
From: "Dr. David Alan Gilbert"
Inspired by Julia Lawall's fixing of Linux
kernel comments, I looked at qemu, although I did it manually.
Signed-off-by: Dr. David Alan Gilbert
---
hw/intc/openpic.c| 2 +-
hw/net/imx_fec.c | 2 +-
hw/pci/
* Peter Xu (pet...@redhat.com) wrote:
> On Thu, Jun 09, 2022 at 05:02:29PM -0400, Peter Xu wrote:
> > On Wed, Jun 08, 2022 at 06:05:28PM +0100, Dr. David Alan Gilbert wrote:
> > > > @@ -2005,7 +2005,17 @@ static void loadvm_postcopy_handle_run_bh(void
> > > >
ably belongs in an earlier patch.
Other than that,
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/channel.c | 4 +--
> migration/colo.c | 5 ++--
> migration/meson.build | 1 -
> migration/migration.c | 7 ++---
> migr
el_wait(ioc, G_IO_OUT);
> -}
> - continue;
I wondered where that code went, but it turns out it's already copied
into qio_channel_writev_full_all, so:
Reviewed-by: Dr. David Alan Gilbert
> -}
> -if (len < 0) {
> -done = -EIO;
> -
r(f->ioc, f->buf + pending, f->total_transferred,
> - IO_BUF_SIZE - pending, _error);
> +do {
> +len = qio_channel_read(f->ioc,
Yes, I think that's OK - not that 'len' is an int where 'ret'
was a ssize_t; but I think our buffer
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> On Thu, Jun 09, 2022 at 05:12:41PM +0100, Dr. David Alan Gilbert wrote:
> > * Daniel P. Berrangé (berra...@redhat.com) wrote:
> > > This directly implements the shutdown logic using QIOChannel APIs.
> > >
> > &g
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This directly implements the close logic using QIOChannel APIs.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/qemu-file-channel.c | 12
> migration/qemu-f
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/qemu-file.h | 4
> 1 file changed, 4 deletions(-)
>
> diff --git a/migration/qemu-file.h b/migration/qemu-file.h
> index 0
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This directly implements the get_return_path logic using QIOChannel APIs.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/qemu-file-channel.c | 16
> mig
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This directly implements the set_blocking logic using QIOChannel APIs.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/qemu-file-channel.c | 14 --
> migration/qemu-f
-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/qemu-file-channel.c | 4 ++--
> migration/qemu-file.c | 18 --
> migration/qemu-file.h | 3 ++-
> 3 files changed, 20 insertions(+), 5 deletions(-)
>
> diff -
NOSYS;
> }
> - ret = f->ops->shut_down(f->ioc, true, true, NULL);
> +
> +if (qio_channel_shutdown(f->ioc, QIO_CHANNEL_SHUTDOWN_BOTH, NULL) < 0) {
> +ret = -EIO;
> +}
OK, so this is following the code you're flattening; so:
Reviewed-
t; + *
> + * Returns: the ioc object
> */
> QIOChannel *qemu_file_get_ioc(QEMUFile *file)
> {
> -return file->has_ioc ? QIO_CHANNEL(file->opaque) : NULL;
> +return file->ioc;
> }
> diff --git a/migration/qemu-file.h b/migration/qemu-file.h
> index 6310071f90..0458b1d3b6 100644
> --- a/migration/qemu-file.h
> +++ b/migration/qemu-file.h
> @@ -118,7 +118,7 @@ typedef struct QEMUFileHooks {
> QEMURamSaveFunc *save_page;
> } QEMUFileHooks;
>
> -QEMUFile *qemu_fopen_ops(void *opaque, const QEMUFileOps *ops, bool has_ioc);
> +QEMUFile *qemu_fopen_ops(QIOChannel *ioc, const QEMUFileOps *ops);
> void qemu_file_set_hooks(QEMUFile *f, const QEMUFileHooks *hooks);
> int qemu_get_fd(QEMUFile *f);
> int qemu_fclose(QEMUFile *f);
> --
> 2.36.1
>
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> The only user of the hooks is RDMA which provides a QIOChannel backed
> impl of QEMUFile. It can thus use the qemu_file_get_ioc() method.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
&g
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> With this change, all QEMUFile usage is backed by QIOChannel at
> last.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/savevm.c | 42 --
t make any sense any more with these changes either)
Dave
> With regards,
> Daniel
> --
> |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org -o-https://fstop138.berrange.com :|
> |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|
>
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
ttps://libvirt.org -o-https://fstop138.berrange.com :|
> |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|
>
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
; What this method is actually used for is to report on the number of
> bytes that have been transferred out of band from the main I/O methods.
> This new name better reflects this purpose.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
>
es processed. This switches to a new name that
> reflects the intended usage.
>
> Signed-off-by: Daniel P. Berrangé
Mostly,
Reviewed-by: Dr. David Alan Gilbert
Two nits below:
> ---
> migration/block.c | 10 +-
> migration/migration.c | 2 +-
> migration/qemu-file.c |
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> On Thu, Jun 09, 2022 at 10:51:27AM +0100, Dr. David Alan Gilbert wrote:
> > * Daniel P. Berrangé (berra...@redhat.com) wrote:
> > > This makes the field name align with the newly introduced method
> > > names in the
s += size;
> +f->total_transferred += size;
> }
>
> /** Closes the file
> @@ -658,7 +659,7 @@ int qemu_get_byte(QEMUFile *f)
>
> int64_t qemu_ftell_fast(QEMUFile *f)
> {
> -int64_t ret = f->pos;
> +int64_t ret = f->total_transferred;
>
and applies to data queued, which need not have
> been transferred on the wire yet if a flush hasn't taken place.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/qemu-file.c | 30 +++---
> 1 file changed
ago.
>
> Signed-off-by: Daniel P. Berrangé
Ah good; less rdma code!
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/rdma.c | 120 +--
> 1 file changed, 21 insertions(+), 99 deletions(-)
>
> diff --git a/migration/rdma.c
0644
> --- a/softmmu/cpus.c
> +++ b/softmmu/cpus.c
> @@ -146,7 +146,7 @@ void cpu_synchronize_all_post_reset(void)
> }
> }
>
> -void cpu_synchronize_all_post_init(void)
> +void cpu_synchronize_all_post_init(Error **errp)
> {
> CPUState *cpu;
>
> --
> 2.32.0
>
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
* Peter Xu (pet...@redhat.com) wrote:
> Four tests are added for preempt mode:
>
> - Postcopy plain
> - Postcopy recovery
> - Postcopy tls
> - Postcopy tls+recovery
>
> Signed-off-by: Peter Xu
Reviewed-by: Dr. David Alan Gilbert
> ---
> tes
* Paolo Bonzini (pbonz...@redhat.com) wrote:
> On 6/8/22 18:01, Dr. David Alan Gilbert wrote:
> > 'Find descriptors for 'target', either that have already been read or
> > query 'stats_fd' to read them from kvm'
>
> /*
> * Return the descriptors for 'target', that
* Paolo Bonzini (pbonz...@redhat.com) wrote:
> On 6/8/22 16:52, Dr. David Alan Gilbert wrote:
> > > If you mean why not some other source, each source has a different file
> > > descriptor:
> > >
> > > +int stats_fd = kvm
* Paolo Bonzini (pbonz...@redhat.com) wrote:
> On 6/7/22 20:35, Dr. David Alan Gilbert wrote:
> > > +monitor_printf(mon, "%s", iec_binary_prefix(value->exponent));
> > OK that's better; but it's a shame the limits don't come from something
> > s
* Paolo Bonzini (pbonz...@redhat.com) wrote:
> On 6/7/22 19:44, Dr. David Alan Gilbert wrote:
>
> > > +return NULL;
> > > +}
> > > +descriptors->kvm_stats_header = kvm_stats_header;
> > > +descriptors->kvm_stats_desc = kvm_stat
by: Paolo Bonzini
I think that's OK, if you repost please fix up the commit message with
examples of the command with and without names.
Reviewed-by: Dr. David Alan Gilbert
Dave
> ---
> hmp-commands-info.hx | 8
> monitor/hmp-cmds.c | 35 ++--
uot;kvm",
> "stats": [ { "name": "l1d_flush", "value": 41213 },
>{ "name": "exits", "value": 74291 } ] } ] },
> { "path": "/machine/unattached/device[4]"
uot;kvm" } ] } }
>
> The QAPI is a bit more verbose than just a list of StatsProvider,
> so that it can be subsequently extended with filtering of statistics
> by name.
>
> If a provider is specified more than once in the filter, each request
> will be included sep
* Paolo Bonzini (pbonz...@redhat.com) wrote:
> Allow the user to request statistics for a single provider of interest.
> Extracted from a patch by Mark Kanda.
>
> Signed-off-by: Paolo Bonzini
Reviewed-by: Dr. David Alan Gilbert
> ---
> hmp-commands-info.hx | 7 ---
>
"s";
> +} else if (value->unit == STATS_UNIT_BYTES) {
> +unit = "B";
> +}
> +}
> +
> +if (unit && value->base == 10 &&
> +value->exponent >= -9 && value->exponent <= 0 &&
> +value->
gt; +}
> +
> +static void query_stats_cb(StatsResultList **result, StatsTarget target,
> Error **errp)
> +{
> +KVMState *s = kvm_state;
> +CPUState *cpu;
> +int stats_fd;
> +
> + switch (target) {
> +case STATS_TARGET_VM:
> +{
> +stats_fd = kvm_vm_ioctl(s, KVM_GET_STATS_FD, NULL);
> +if (stats_fd == -1) {
> +error_setg_errno(errp, errno, "KVM errno, stats: ioctl failed");
> +return;
> +}
> +query_stats(result, target, stats_fd, errp);
> +close(stats_fd);
> +break;
> +}
> +case STATS_TARGET_VCPU:
> +{
> +StatsArgs stats_args;
> +stats_args.result.stats = result;
> +stats_args.errp = errp;
> +CPU_FOREACH(cpu) {
> +run_on_cpu(cpu, query_stats_vcpu,
> RUN_ON_CPU_HOST_PTR(_args));
> +}
> +break;
> +}
> +default:
> +break;
> +}
> +}
> +
> +void query_stats_schemas_cb(StatsSchemaList **result, Error **errp)
> +{
> +StatsArgs stats_args;
> +KVMState *s = kvm_state;
> +int stats_fd;
> +
> +stats_fd = kvm_vm_ioctl(s, KVM_GET_STATS_FD, NULL);
> +if (stats_fd == -1) {
> +error_setg(errp, "KVM stats: ioctl failed");
missed an _errno
> +return;
> +}
> +query_stats_schema(result, STATS_TARGET_VM, stats_fd, errp);
> +close(stats_fd);
> +
> +stats_args.result.schema = result;
> +stats_args.errp = errp;
> +run_on_cpu(first_cpu, query_stats_schema_vcpu,
> RUN_ON_CPU_HOST_PTR(_args));
> +}
> diff --git a/qapi/stats.json b/qapi/stats.json
> index ada0fbf26f..df7c4d886c 100644
> --- a/qapi/stats.json
> +++ b/qapi/stats.json
> @@ -52,7 +52,7 @@
> # Since: 7.1
> ##
> { 'enum': 'StatsProvider',
> - 'data': [ ] }
> + 'data': [ 'kvm' ] }
>
> ##
> # @StatsTarget:
> --
> 2.36.1
>
>
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
./configure --disable-rdma --disable-pvrdma --prefix=/usr \
> --target-list="loongarch64-softmmu" \
> --disable-libiscsi --disable-libnfs --disable-libpmem \
> --disable-glusterfs --enable-libusb --enable-usb-redir \
> --disabl
* Peter Xu (pet...@redhat.com) wrote:
> It's easy to build this upon the postcopy tls test. Rename the old
> postcopy recovery test to postcopy/recovery/plain.
>
> Signed-off-by: Peter Xu
Reviewed-by: Dr. David Alan Gilbert
> ---
> tests/qtest/mig
filter = stats_filter(target, -1);
> +filter = stats_filter(target, -1, provider);
> break;
> case STATS_TARGET_VCPU: {}
> int cpu_index = monitor_get_cpu_index(mon);
> - filter = stats_filter(target, cpu_index);
> +filter = stats_filter(target, cpu_index, provider);
> break;
> default:
> abort();
> @@ -2410,7 +2437,7 @@ void hmp_info_stats(Monitor *mon, const QDict *qdict)
> goto exit;
> }
> for (entry = stats; entry; entry = entry->next) {
> -print_stats_results(mon, target, entry->value, schema);
> +print_stats_results(mon, target, provider_str == NULL, entry->value,
> schema);
> }
>
> exit:
> --
> 2.36.0
>
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
Signed-off-by: Paolo Bonzini
> ---
> hmp-commands-info.hx | 13 +++
> include/monitor/hmp.h | 1 +
> monitor/hmp-cmds.c| 187 ++
> 3 files changed, 201 insertions(+)
One minor comment below...
Reviewed-by: Dr. David Alan Gilbert
>
se(stats_fd);
> +}
> +
> +static void query_stats_cb(StatsResultList **result, StatsTarget target,
> Error **errp)
> +{
> +KVMState *s = kvm_state;
> + CPUState *cpu;
> +int stats_fd;
> +
> +switch (target) {
> +case STATS_TARGET_VM:
> +{
> +stats_fd = kvm_vm_ioctl(s, KVM_GET_STATS_FD, NULL);
> +if (stats_fd == -1) {
> +error_setg(errp, "KVM stats: ioctl failed");
> +return;
> +}
> +query_stats(result, target, stats_fd, errp);
> +close(stats_fd);
> +break;
> +}
> +case STATS_TARGET_VCPU:
> +{
> +StatsArgs stats_args;
> +stats_args.result.stats = result;
> +stats_args.errp = errp;
> +CPU_FOREACH(cpu) {
> +run_on_cpu(cpu, query_stats_vcpu,
> RUN_ON_CPU_HOST_PTR(_args));
> +}
> +break;
> +}
> +default:
> +break;
> +}
> +}
> +
> +void query_stats_schemas_cb(StatsSchemaList **result, Error **errp)
> +{
> +StatsArgs stats_args;
> +KVMState *s = kvm_state;
> +int stats_fd;
> +
> +stats_fd = kvm_vm_ioctl(s, KVM_GET_STATS_FD, NULL);
> +if (stats_fd == -1) {
> +error_setg(errp, "KVM stats: ioctl failed");
> +return;
> +}
> +query_stats_schema(result, STATS_TARGET_VM, stats_fd, errp);
> +close(stats_fd);
> +
> +stats_args.result.schema = result;
> +stats_args.errp = errp;
> +run_on_cpu(first_cpu, query_stats_schema_vcpu,
> RUN_ON_CPU_HOST_PTR(_args));
> +}
> diff --git a/qapi/stats.json b/qapi/stats.json
> index f0656a6435..382223e197 100644
> --- a/qapi/stats.json
> +++ b/qapi/stats.json
> @@ -51,7 +51,7 @@
> # Since: 7.1
> ##
> { 'enum': 'StatsProvider',
> - 'data': [ ] }
> + 'data': [ 'kvm' ] }
>
> ##
> # @StatsTarget:
> --
> 2.36.0
>
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
From: "Dr. David Alan Gilbert"
One less P needed.
Signed-off-by: Dr. David Alan Gilbert
---
target/s390x/cpu_features_def.h.inc | 2 +-
target/s390x/gen-features.c | 6 +++---
target/s390x/tcg/translate.c| 8
3 files changed, 8 insertions(+), 8 deletion
; the page faults just like how they're requested on dest.
>
> Alongside, I touched up find_dirty_block() to only set the postcopy fields
> in the pss section if we're going through a postcopy migration. That's a
> very light optimization and shouldn't affect much.
>
> Reported-
* Peter Maydell (peter.mayd...@linaro.org) wrote:
> On Mon, 23 May 2022 at 11:09, Dr. David Alan Gilbert (git)
> wrote:
> >
> > From: "Dr. David Alan Gilbert"
> >
> > Inspired by Julia Lawall's fixing of Linux
> > kernel comments, I looked at qemu,
From: "Dr. David Alan Gilbert"
Inspired by Julia Lawall's fixing of Linux
kernel comments, I looked at qemu, although I did it manually.
Signed-off-by: Dr. David Alan Gilbert
---
hw/intc/openpic.c| 2 +-
hw/net/imx_fec.c | 2 +-
hw/pci/
;
> Signed-off-by: Peter Xu
Reviewed-by: Dr. David Alan Gilbert
> ---
> tests/qtest/migration-test.c | 50 +++-
> 1 file changed, 43 insertions(+), 7 deletions(-)
>
> diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
>
* Peter Xu (pet...@redhat.com) wrote:
> It's easy to build this upon the postcopy tls test. Rename the old
> postcopy recovery test to postcopy/recovery/plain.
>
> Signed-off-by: Peter Xu
Reviewed-by: Dr. David Alan Gilbert
> ---
> tests/qtest/mig
* Peter Xu (pet...@redhat.com) wrote:
> Four tests are added for preempt mode:
>
> - Postcopy plain
> - Postcopy recovery
> - Postcopy tls
> - Postcopy tls+recovery
>
> Signed-off-by: Peter Xu
Reviewed-by: Dr. David Alan Gilbert
> ---
> tes
;
> > > > > Long-term testing says that it's pretty safe.
> > > > >
> > > > > Signed-off-by: Like Xu
> > > > > Signed-off-by: Zhang Chen
> > > >
> > > > I'd expect this to get ack from the relevant maintainers.
> > &
.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yrzEQNXe51mg-2FlKoEnRoarMq5nOxxfhqLUuo8HvG2S4Ew-3D-3DsJiM_-2BVwspb-2FvVsiDHi6TjJb1RCVMbxW4dUuL9sNVe8y5Hw33niByDzIZpGAOA5aYVSqv5jZRKaysoHO8HDAwcefdRpS6APFciD-2BwrlJOuA5BQE0BdpVQ-2F2N4H1eMXpy9YdBkXKlWx-2FEjNzp4PFxHatEl0DUHK-2BmMHOAPpvs5sC8wiJnoEK-2FOHDrJRemKeQ9jYmHtYSxFL21EDsvDKE-2FaIvXgh2BZ1DIuERrQlniBGfoVsYI-3D
>
> To manage Coverity Scan email notifications for "dgilb...@redhat.com",
> click
> https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yped04pjJnmXOsUBtKYNIXx81NaqhEuFta67QJjvrT4RaVMQaGq-2BvVMlKibSYlsRsVMlpoQjDNxxnuHxr4ePPs-2BGw9e2Rwvy7HI6fIypkgcFLOSiaVl1GR5WZgeKL5Lc28-3DX0rx_-2BVwspb-2FvVsiDHi6TjJb1RCVMbxW4dUuL9sNVe8y5Hw33niByDzIZpGAOA5aYVSqvTnKwL62mXPLveeP-2BWUfRx5fh6FkZ4ip8kt9FOWgTvKnwBEgRG9Hd6pRry4YHYry9Link-2B-2FJaxPuPjvtUPJC-2FjaH8m4iuyJBAq1vyM0bUUjuOwaUkIo9d-2F5qAkATC9CFkabYArjrgzBzYyi9I4oa04-2B1XLhr2wHE07h56XDN37Gw-3D
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
e:
From abc7da46736b18b6138868ccc0b11901169e1dfd Mon Sep 17 00:00:00 2001
From: "Dr. David Alan Gilbert"
Date: Mon, 16 May 2022 19:54:31 +0100
Subject: [PATCH] target-page: Maintain target_page variable even for
non-variable
Content-type: text/plain
On architectures that define TARGET_PAGE_BITS_VAR
-by: Juan Quintela
Reviewed-by: Peter Xu
Reviewed-by: Daniel P. Berrangé
Message-Id: <20220513062836.965425-6-leob...@redhat.com>
Signed-off-by: Dr. David Alan Gilbert
---
migration/channel.c | 3 +--
migration/migration.c | 9 +
migration/migration.h | 1 +
migration/multifd.c
/disable this feature.
On non-Linux builds this parameter is compiled-out.
Signed-off-by: Leonardo Bras
Reviewed-by: Peter Xu
Reviewed-by: Daniel P. Berrangé
Reviewed-by: Juan Quintela
Acked-by: Markus Armbruster
Message-Id: <20220513062836.965425-5-leob...@redhat.com>
Signed-off-by: Dr.
implementation on new flags.
Signed-off-by: Leonardo Bras
Reviewed-by: Daniel P. Berrangé
Reviewed-by: Peter Xu
Reviewed-by: Juan Quintela
Message-Id: <20220513062836.965425-3-leob...@redhat.com>
Signed-off-by: Dr. David Alan Gilbert
---
chardev/char-io.c | 2 +-
hw/remote/mpqemu-
in Alpine issue 13813 and liburing]
Signed-off-by: Leonardo Bras
Message-Id: <20220513062836.965425-2-leob...@redhat.com>
Reviewed-by: Dr. David Alan Gilbert
Signed-off-by: Dr. David Alan Gilbert
---
meson.build | 11 +++
1 file changed, 11 insertions(+)
diff --git a/meson.b
-multifd coverage applies to some extent.
Signed-off-by: Daniel P. Berrangé
Message-Id: <20220426160048.812266-9-berra...@redhat.com>
Reviewed-by: Eric Blake
Signed-off-by: Dr. David Alan Gilbert
---
tests/qtest/migration-test.c | 127 +++
1 file change
-by: Daniel P. Berrangé
Message-Id: <20220426160048.812266-7-berra...@redhat.com>
Signed-off-by: Dr. David Alan Gilbert
---
tests/qtest/migration-test.c | 77 +++-
1 file changed, 40 insertions(+), 37 deletions(-)
diff --git a/tests/qtest/migration-test.c b
hat.com>
Signed-off-by: Dr. David Alan Gilbert
---
migration/migration.c | 11 ++-
migration/multifd.c | 37 +++--
migration/multifd.h | 2 ++
migration/socket.c| 5 +++--
4 files changed, 50 insertions(+), 5 deletions(-)
diff --git a/migration/mig
From: Daniel P. Berrangé
This validates that we correctly handle migration success and failure
scenarios when using TLS with pre shared keys.
Signed-off-by: Daniel P. Berrangé
Message-Id: <20220426160048.812266-4-berra...@redhat.com>
Reviewed-by: Eric Blake
Signed-off-by: Dr. Davi
965425-8-leob...@redhat.com>
Signed-off-by: Dr. David Alan Gilbert
---
migration/multifd.c | 22 +++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/migration/multifd.c b/migration/multifd.c
index 15fb668e64..2541cd2322 100644
--- a/migration/multifd.c
+++ b/mig
com>
Signed-off-by: Dr. David Alan Gilbert
---
tests/qtest/migration-helpers.c | 13 +
tests/qtest/migration-helpers.h | 1 +
tests/qtest/migration-test.c| 6 +++---
3 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/mig
From: Daniel P. Berrangé
This validates that we correctly handle multifd migration success
and failure scenarios when using TLS with pre shared keys.
Signed-off-by: Daniel P. Berrangé
Message-Id: <20220426160048.812266-8-berra...@redhat.com>
Reviewed-by: Eric Blake
Signed-off-by: Dr.
Blake
Signed-off-by: Dr. David Alan Gilbert
---
tests/unit/crypto-tls-x509-helpers.h | 53
1 file changed, 53 insertions(+)
diff --git a/tests/unit/crypto-tls-x509-helpers.h
b/tests/unit/crypto-tls-x509-helpers.h
index cf6329e653..247e7160eb 100644
--- a/tests/unit/cryp
by: Dr. David Alan Gilbert
Signed-off-by: Dr. David Alan Gilbert
---
tests/unit/crypto-tls-x509-helpers.c | 16 +---
tests/unit/test-crypto-tlssession.c | 11 +--
2 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/tests/unit/crypto-tls-x509-helpers.c
b/tests/unit/
Signed-off-by: Dr. David Alan Gilbert
---
migration/multifd.c | 10 ++
migration/multifd.h | 2 +-
migration/ram.c | 29 ++---
3 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/migration/multifd.c b/migration/multifd.c
index 2a8c8570c3..15fb668e64
From: "Dr. David Alan Gilbert"
The following changes since commit 10c2a0c5e7d48e590d945c017b5b8af5b4c89a3c:
Merge tag 'or1k-pull-request-20220515' of https://github.com/stffrdhrn/qemu
into staging (2022-05-15 16:56:27 -0700)
are available in the Git repository at:
https://
: <20220426160048.812266-5-berra...@redhat.com>
Reviewed-by: Eric Blake
Signed-off-by: Dr. David Alan Gilbert
dgilbert: Manual merge due to ifdef change in 3
---
meson.build | 1 +
tests/qtest/meson.build | 5 +
tests/qtest/migration-test.c | 383
ed-off-by: Dr. David Alan Gilbert
---
tests/qtest/migration-test.c | 67 ++--
1 file changed, 25 insertions(+), 42 deletions(-)
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 5a3edf2da6..a1dc08a93e 100644
--- a/tests/qtest/migration-test.c
a mechanism to disable it, so it can still be accessible to less
privileged users.
Signed-off-by: Leonardo Bras
Reviewed-by: Peter Xu
Reviewed-by: Daniel P. Berrangé
Reviewed-by: Juan Quintela
Message-Id: <20220513062836.965425-4-leob...@redhat.com>
Signed-off-by: Dr. David Alan Gilbert
---
incl
thread local variables */
> -/* size of the next packet that contains pages */
> -uint32_t next_packet_size;
> -/* packets sent through this channel */
> -uint64_t num_packets;
> /* non zero pages recv through this channel */
> uint64_t total_normal_pages;
> -/* syncs main thread and channels */
> -QemuSemaphore sem_sync;
> /* buffers to recv */
> struct iovec *iov;
> /* Pages that are not zero */
> --
> 2.35.1
>
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> On Mon, May 16, 2022 at 12:30:15PM +0100, Dr. David Alan Gilbert wrote:
> > * Daniel P. Berrangé (berra...@redhat.com) wrote:
> > > On Mon, May 16, 2022 at 12:13:16PM +0100, Dr. David Alan Gilbert wrote:
> > &
* Leonardo Bras (leob...@redhat.com) wrote:
> A build error happens in alpine CI when linux/errqueue.h is included
> in io/channel-socket.c, due to redefining of 'struct __kernel_timespec':
OK, looks to be same mechanism as other meson tests.
Reviewed-by: Dr. David Alan Gilbert
> ==
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> On Mon, May 16, 2022 at 12:13:16PM +0100, Dr. David Alan Gilbert wrote:
> > * Leonardo Bras (leob...@redhat.com) wrote:
> > > A build error happens in alpine CI when linux/errqueue.h is included
> > > in io/channel-
* Leonardo Bras Soares Passos (leob...@redhat.com) wrote:
> On Wed, May 11, 2022 at 5:55 AM Dr. David Alan Gilbert
> wrote:
> >
> > * Leonardo Bras Soares Passos (leob...@redhat.com) wrote:
> > > From a previous thread:
> > >
> > > On Thu, A
501 - 600 of 11022 matches
Mail list logo