All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 0/3] Misc patches for QEMU 7.1 freeze
@ 2022-07-19  9:34 Paolo Bonzini
  2022-07-19  9:34 ` [PULL 1/3] monitor: add support for boolean statistics Paolo Bonzini
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Paolo Bonzini @ 2022-07-19  9:34 UTC (permalink / raw)
  To: qemu-devel

The following changes since commit 0ebf76aae58324b8f7bf6af798696687f5f4c2a9:

  Merge tag 'nvme-next-pull-request' of git://git.infradead.org/qemu-nvme into staging (2022-07-15 15:38:13 +0100)

are available in the Git repository at:

  https://gitlab.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to 3746b8ca3e8bc216d03df5813080eeb06bdafabb:

  util: Fix broken build on Haiku (2022-07-19 11:32:21 +0200)

----------------------------------------------------------------
* Boolean statistics for KVM
* Fix build on Haiku

----------------------------------------------------------------
Paolo Bonzini (2):
      monitor: add support for boolean statistics
      kvm: add support for boolean statistics

Thomas Huth (1):
      util: Fix broken build on Haiku

 accel/kvm/kvm-all.c       | 10 +++++++++-
 linux-headers/linux/kvm.h |  1 +
 monitor/hmp-cmds.c        |  2 ++
 qapi/stats.json           |  4 +++-
 util/cutils.c             |  4 ++++
 util/oslib-posix.c        |  4 ----
 6 files changed, 19 insertions(+), 6 deletions(-)
-- 
2.36.1



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PULL 1/3] monitor: add support for boolean statistics
  2022-07-19  9:34 [PULL 0/3] Misc patches for QEMU 7.1 freeze Paolo Bonzini
@ 2022-07-19  9:34 ` Paolo Bonzini
  2022-07-19  9:34 ` [PULL 2/3] kvm: " Paolo Bonzini
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2022-07-19  9:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: Amneesh Singh

The next version of Linux will introduce boolean statistics, which
can only have 0 or 1 values.  Support them in the schema and in
the HMP command.

Suggested-by: Amneesh Singh <natto@weirdnatto.in>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 monitor/hmp-cmds.c | 2 ++
 qapi/stats.json    | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index ca98df0495..e8d6963722 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -2337,6 +2337,8 @@ static void print_stats_results(Monitor *mon, StatsTarget target,
 
         if (stats_value->type == QTYPE_QNUM) {
             monitor_printf(mon, ": %" PRId64 "\n", stats_value->u.scalar);
+        } else if (stats_value->type == QTYPE_QBOOL) {
+            monitor_printf(mon, ": %s\n", stats_value->u.boolean ? "yes" : "no");
         } else if (stats_value->type == QTYPE_QLIST) {
             uint64List *list;
             int i;
diff --git a/qapi/stats.json b/qapi/stats.json
index 2f8bfe8fdb..57db5b1c74 100644
--- a/qapi/stats.json
+++ b/qapi/stats.json
@@ -38,11 +38,12 @@
 # @bytes: stat reported in bytes.
 # @seconds: stat reported in seconds.
 # @cycles: stat reported in clock cycles.
+# @boolean: stat is a boolean value.
 #
 # Since: 7.1
 ##
 { 'enum' : 'StatsUnit',
-  'data' : [ 'bytes', 'seconds', 'cycles' ] }
+  'data' : [ 'bytes', 'seconds', 'cycles', 'boolean' ] }
 
 ##
 # @StatsProvider:
@@ -123,6 +124,7 @@
 ##
 { 'alternate': 'StatsValue',
   'data': { 'scalar': 'uint64',
+            'boolean': 'bool',
             'list': [ 'uint64' ] } }
 
 ##
-- 
2.36.1




^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PULL 2/3] kvm: add support for boolean statistics
  2022-07-19  9:34 [PULL 0/3] Misc patches for QEMU 7.1 freeze Paolo Bonzini
  2022-07-19  9:34 ` [PULL 1/3] monitor: add support for boolean statistics Paolo Bonzini
@ 2022-07-19  9:34 ` Paolo Bonzini
  2022-07-19  9:34 ` [PULL 3/3] util: Fix broken build on Haiku Paolo Bonzini
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2022-07-19  9:34 UTC (permalink / raw)
  To: qemu-devel

The next version of Linux will introduce boolean statistics, which
can only have 0 or 1 values.  Convert them to the new QAPI fields
added in the previous commit.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 accel/kvm/kvm-all.c       | 10 +++++++++-
 linux-headers/linux/kvm.h |  1 +
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index ed8b6b896e..3a2677d065 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -3743,6 +3743,7 @@ static StatsList *add_kvmstat_entry(struct kvm_stats_desc *pdesc,
     case KVM_STATS_UNIT_BYTES:
     case KVM_STATS_UNIT_CYCLES:
     case KVM_STATS_UNIT_SECONDS:
+    case KVM_STATS_UNIT_BOOLEAN:
         break;
     default:
         return stats_list;
@@ -3761,7 +3762,10 @@ static StatsList *add_kvmstat_entry(struct kvm_stats_desc *pdesc,
     stats->name = g_strdup(pdesc->name);
     stats->value = g_new0(StatsValue, 1);;
 
-    if (pdesc->size == 1) {
+    if ((pdesc->flags & KVM_STATS_UNIT_MASK) == KVM_STATS_UNIT_BOOLEAN) {
+        stats->value->u.boolean = *stats_data;
+        stats->value->type = QTYPE_QBOOL;
+    } else if (pdesc->size == 1) {
         stats->value->u.scalar = *stats_data;
         stats->value->type = QTYPE_QNUM;
     } else {
@@ -3809,6 +3813,10 @@ static StatsSchemaValueList *add_kvmschema_entry(struct kvm_stats_desc *pdesc,
     switch (pdesc->flags & KVM_STATS_UNIT_MASK) {
     case KVM_STATS_UNIT_NONE:
         break;
+    case KVM_STATS_UNIT_BOOLEAN:
+        schema_entry->value->has_unit = true;
+        schema_entry->value->unit = STATS_UNIT_BOOLEAN;
+        break;
     case KVM_STATS_UNIT_BYTES:
         schema_entry->value->has_unit = true;
         schema_entry->value->unit = STATS_UNIT_BYTES;
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index 0d05d02ee4..f089349149 100644
--- a/linux-headers/linux/kvm.h
+++ b/linux-headers/linux/kvm.h
@@ -2031,6 +2031,7 @@ struct kvm_stats_header {
 #define KVM_STATS_UNIT_BYTES		(0x1 << KVM_STATS_UNIT_SHIFT)
 #define KVM_STATS_UNIT_SECONDS		(0x2 << KVM_STATS_UNIT_SHIFT)
 #define KVM_STATS_UNIT_CYCLES		(0x3 << KVM_STATS_UNIT_SHIFT)
+#define KVM_STATS_UNIT_BOOLEAN		(0x4 << KVM_STATS_UNIT_SHIFT)
 #define KVM_STATS_UNIT_MAX		KVM_STATS_UNIT_CYCLES
 
 #define KVM_STATS_BASE_SHIFT		8
-- 
2.36.1




^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PULL 3/3] util: Fix broken build on Haiku
  2022-07-19  9:34 [PULL 0/3] Misc patches for QEMU 7.1 freeze Paolo Bonzini
  2022-07-19  9:34 ` [PULL 1/3] monitor: add support for boolean statistics Paolo Bonzini
  2022-07-19  9:34 ` [PULL 2/3] kvm: " Paolo Bonzini
@ 2022-07-19  9:34 ` Paolo Bonzini
  2022-07-19 12:35 ` [PULL 0/3] Misc patches for QEMU 7.1 freeze Jason A. Donenfeld
  2022-07-21 20:38 ` Peter Maydell
  4 siblings, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2022-07-19  9:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Huth, Marc-André Lureau

From: Thomas Huth <thuth@redhat.com>

A recent commit moved some Haiku-specific code parts from oslib-posix.c
to cutils.c, but failed to move the corresponding header #include
statement, too, so "make vm-build-haiku.x86_64" is currently broken.
Fix it by moving the header #include, too.

Fixes: 06680b15b4 ("include: move qemu_*_exec_dir() to cutils")
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220718172026.139004-1-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 util/cutils.c      | 4 ++++
 util/oslib-posix.c | 4 ----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/util/cutils.c b/util/cutils.c
index 8199dac598..cb43dda213 100644
--- a/util/cutils.c
+++ b/util/cutils.c
@@ -35,6 +35,10 @@
 #include <sys/sysctl.h>
 #endif
 
+#ifdef __HAIKU__
+#include <kernel/image.h>
+#endif
+
 #ifdef G_OS_WIN32
 #include <pathcch.h>
 #include <wchar.h>
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 7a34c1657c..bffec18869 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -62,10 +62,6 @@
 #include <mach-o/dyld.h>
 #endif
 
-#ifdef __HAIKU__
-#include <kernel/image.h>
-#endif
-
 #include "qemu/mmap-alloc.h"
 
 #ifdef CONFIG_DEBUG_STACK_USAGE
-- 
2.36.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PULL 0/3] Misc patches for QEMU 7.1 freeze
  2022-07-19  9:34 [PULL 0/3] Misc patches for QEMU 7.1 freeze Paolo Bonzini
                   ` (2 preceding siblings ...)
  2022-07-19  9:34 ` [PULL 3/3] util: Fix broken build on Haiku Paolo Bonzini
@ 2022-07-19 12:35 ` Jason A. Donenfeld
  2022-07-19 18:15   ` Paolo Bonzini
  2022-07-21 20:38 ` Peter Maydell
  4 siblings, 1 reply; 11+ messages in thread
From: Jason A. Donenfeld @ 2022-07-19 12:35 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

Hi Paolo,

On Tue, Jul 19, 2022 at 11:34:36AM +0200, Paolo Bonzini wrote:
> The following changes since commit 0ebf76aae58324b8f7bf6af798696687f5f4c2a9:
> 
>   Merge tag 'nvme-next-pull-request' of git://git.infradead.org/qemu-nvme into staging (2022-07-15 15:38:13 +0100)
> 
> are available in the Git repository at:
> 
>   https://gitlab.com/bonzini/qemu.git tags/for-upstream
> 
> for you to fetch changes up to 3746b8ca3e8bc216d03df5813080eeb06bdafabb:
> 
>   util: Fix broken build on Haiku (2022-07-19 11:32:21 +0200)
> 
> ----------------------------------------------------------------
> * Boolean statistics for KVM
> * Fix build on Haiku
> 
> ----------------------------------------------------------------
> Paolo Bonzini (2):
>       monitor: add support for boolean statistics
>       kvm: add support for boolean statistics
> 
> Thomas Huth (1):
>       util: Fix broken build on Haiku
> 
>  accel/kvm/kvm-all.c       | 10 +++++++++-
>  linux-headers/linux/kvm.h |  1 +
>  monitor/hmp-cmds.c        |  2 ++
>  qapi/stats.json           |  4 +++-
>  util/cutils.c             |  4 ++++
>  util/oslib-posix.c        |  4 ----
>  6 files changed, 19 insertions(+), 6 deletions(-)

Considering the subject line, I'm quite distressed that the i386
setup_data rng seed patch did not make it in. I just resent it to the
mailing list [1] in case you missed it before. Do you think you could
queue this up ASAP?

Thanks,
Jason

[1] https://lore.kernel.org/all/20220719115300.104095-1-Jason@zx2c4.com/


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PULL 0/3] Misc patches for QEMU 7.1 freeze
  2022-07-19 12:35 ` [PULL 0/3] Misc patches for QEMU 7.1 freeze Jason A. Donenfeld
@ 2022-07-19 18:15   ` Paolo Bonzini
  2022-07-19 18:15     ` Jason A. Donenfeld
  0 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2022-07-19 18:15 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: qemu-devel

On 7/19/22 14:35, Jason A. Donenfeld wrote:
>>   6 files changed, 19 insertions(+), 6 deletions(-)
> Considering the subject line, I'm quite distressed that the i386
> setup_data rng seed patch did not make it in. I just resent it to the
> mailing list [1] in case you missed it before. Do you think you could
> queue this up ASAP?

Sure, no problem.  Unfortunately I was on vacation around the time you 
sent it first.

Paolo


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PULL 0/3] Misc patches for QEMU 7.1 freeze
  2022-07-19 18:15   ` Paolo Bonzini
@ 2022-07-19 18:15     ` Jason A. Donenfeld
  2022-07-20 11:20       ` Jason A. Donenfeld
  0 siblings, 1 reply; 11+ messages in thread
From: Jason A. Donenfeld @ 2022-07-19 18:15 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU Developers

Hi Paolo,

On Tue, Jul 19, 2022 at 8:15 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 7/19/22 14:35, Jason A. Donenfeld wrote:
> >>   6 files changed, 19 insertions(+), 6 deletions(-)
> > Considering the subject line, I'm quite distressed that the i386
> > setup_data rng seed patch did not make it in. I just resent it to the
> > mailing list [1] in case you missed it before. Do you think you could
> > queue this up ASAP?
>
> Sure, no problem.  Unfortunately I was on vacation around the time you
> sent it first.

Excellent, thanks so much!

Jason


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PULL 0/3] Misc patches for QEMU 7.1 freeze
  2022-07-19 18:15     ` Jason A. Donenfeld
@ 2022-07-20 11:20       ` Jason A. Donenfeld
  2022-07-20 12:47         ` Paolo Bonzini
  0 siblings, 1 reply; 11+ messages in thread
From: Jason A. Donenfeld @ 2022-07-20 11:20 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU Developers

Hey again,

On Tue, Jul 19, 2022 at 08:15:54PM +0200, Jason A. Donenfeld wrote:
> Hi Paolo,
> 
> On Tue, Jul 19, 2022 at 8:15 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
> >
> > On 7/19/22 14:35, Jason A. Donenfeld wrote:
> > >>   6 files changed, 19 insertions(+), 6 deletions(-)
> > > Considering the subject line, I'm quite distressed that the i386
> > > setup_data rng seed patch did not make it in. I just resent it to the
> > > mailing list [1] in case you missed it before. Do you think you could
> > > queue this up ASAP?
> >
> > Sure, no problem.  Unfortunately I was on vacation around the time you
> > sent it first.
> 
> Excellent, thanks so much!

Just wondering one thing: which tree did you put the patch in? I didn't
see it on your gitlab, but it seems like QEMU development happens in
many different places at once.

Jason


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PULL 0/3] Misc patches for QEMU 7.1 freeze
  2022-07-20 11:20       ` Jason A. Donenfeld
@ 2022-07-20 12:47         ` Paolo Bonzini
  2022-07-20 12:52           ` Jason A. Donenfeld
  0 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2022-07-20 12:47 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: QEMU Developers

On 7/20/22 13:20, Jason A. Donenfeld wrote:
>>> Sure, no problem.  Unfortunately I was on vacation around the time you
>>> sent it first.
>> Excellent, thanks so much!
> Just wondering one thing: which tree did you put the patch in? I didn't
> see it on your gitlab, but it seems like QEMU development happens in
> many different places at once.

Well, I still had to review it (unless I screw up, you get a reply from 
me once a patch is queued).  I think there are some issues with 
migration compatibility of setup_data and they snowball a bit, so I'll 
reply there.

Paolo


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PULL 0/3] Misc patches for QEMU 7.1 freeze
  2022-07-20 12:47         ` Paolo Bonzini
@ 2022-07-20 12:52           ` Jason A. Donenfeld
  0 siblings, 0 replies; 11+ messages in thread
From: Jason A. Donenfeld @ 2022-07-20 12:52 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU Developers

Hi Paolo,

On Wed, Jul 20, 2022 at 02:47:48PM +0200, Paolo Bonzini wrote:
> On 7/20/22 13:20, Jason A. Donenfeld wrote:
> >>> Sure, no problem.  Unfortunately I was on vacation around the time you
> >>> sent it first.
> >> Excellent, thanks so much!
> > Just wondering one thing: which tree did you put the patch in? I didn't
> > see it on your gitlab, but it seems like QEMU development happens in
> > many different places at once.
> 
> Well, I still had to review it (unless I screw up, you get a reply from 
> me once a patch is queued).  I think there are some issues with 
> migration compatibility of setup_data and they snowball a bit, so I'll 
> reply there.

Hmm, okay. Looking forward greatly to your reply there...

Jason


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PULL 0/3] Misc patches for QEMU 7.1 freeze
  2022-07-19  9:34 [PULL 0/3] Misc patches for QEMU 7.1 freeze Paolo Bonzini
                   ` (3 preceding siblings ...)
  2022-07-19 12:35 ` [PULL 0/3] Misc patches for QEMU 7.1 freeze Jason A. Donenfeld
@ 2022-07-21 20:38 ` Peter Maydell
  4 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2022-07-21 20:38 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Tue, 19 Jul 2022 at 10:37, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The following changes since commit 0ebf76aae58324b8f7bf6af798696687f5f4c2a9:
>
>   Merge tag 'nvme-next-pull-request' of git://git.infradead.org/qemu-nvme into staging (2022-07-15 15:38:13 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to 3746b8ca3e8bc216d03df5813080eeb06bdafabb:
>
>   util: Fix broken build on Haiku (2022-07-19 11:32:21 +0200)
>
> ----------------------------------------------------------------
> * Boolean statistics for KVM
> * Fix build on Haiku
>


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/7.1
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-07-21 20:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19  9:34 [PULL 0/3] Misc patches for QEMU 7.1 freeze Paolo Bonzini
2022-07-19  9:34 ` [PULL 1/3] monitor: add support for boolean statistics Paolo Bonzini
2022-07-19  9:34 ` [PULL 2/3] kvm: " Paolo Bonzini
2022-07-19  9:34 ` [PULL 3/3] util: Fix broken build on Haiku Paolo Bonzini
2022-07-19 12:35 ` [PULL 0/3] Misc patches for QEMU 7.1 freeze Jason A. Donenfeld
2022-07-19 18:15   ` Paolo Bonzini
2022-07-19 18:15     ` Jason A. Donenfeld
2022-07-20 11:20       ` Jason A. Donenfeld
2022-07-20 12:47         ` Paolo Bonzini
2022-07-20 12:52           ` Jason A. Donenfeld
2022-07-21 20:38 ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.