All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/8] user-mode: Prune build dependencies (part 2)
@ 2020-03-16  0:03 Philippe Mathieu-Daudé
  2020-03-16  0:03 ` [PATCH v2 1/8] target/i386: Restrict X86CPUFeatureWord to X86 targets Philippe Mathieu-Daudé
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-16  0:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin, Ronnie Sahlberg,
	Philippe Mathieu-Daudé,
	Peter Lieven, Dr. David Alan Gilbert, Max Reitz, Paolo Bonzini,
	Igor Mammedov, qemu-block, Markus Armbruster, Richard Henderson

This is the second part of a series reducing user-mode
dependencies. By stripping out unused code, the build
and testing time is reduced (as is space used by objects).

Part 2:
- Extract code not related to user-mode from qapi/misc.json

Since v1:
- Do not extract the 'add_client' command (elmarco)

v1: https://www.mail-archive.com/qemu-block@nongnu.org/msg63284.html

Based-on: <i20200315235716.28448-1-philmd@redhat.com>

Philippe Mathieu-Daudé (8):
  target/i386: Restrict X86CPUFeatureWord to X86 targets
  qapi/misc: Restrict LostTickPolicy enum to machine code
  qapi/misc: Restrict balloon-related commands to machine code
  qapi/misc: Move query-uuid command with block code
  qapi/misc: Restrict query-vm-generation-id command to machine code
  qapi/misc: Restrict ACPI commands to machine code
  qapi/misc: Restrict PCI commands to machine code
  qapi/misc: Restrict device memory commands to machine code

 qapi/block-core.json                 |  30 ++
 qapi/machine-target.json             |  45 ++
 qapi/machine.json                    | 766 +++++++++++++++++++++++++--
 qapi/misc.json                       | 756 --------------------------
 include/hw/acpi/acpi_dev_interface.h |   2 +-
 include/hw/mem/memory-device.h       |   1 +
 include/hw/rtc/mc146818rtc.h         |   2 +-
 include/hw/virtio/virtio-pmem.h      |   2 +-
 include/sysemu/balloon.h             |   2 +-
 balloon.c                            |   2 +-
 block/iscsi.c                        |   2 +-
 hw/acpi/core.c                       |   2 +-
 hw/acpi/cpu.c                        |   2 +-
 hw/acpi/memory_hotplug.c             |   2 +-
 hw/acpi/vmgenid.c                    |   2 +-
 hw/core/qdev-properties.c            |   1 +
 hw/i386/kvm/i8254.c                  |   2 +-
 hw/pci/pci-stub.c                    |   2 +-
 hw/pci/pci.c                         |   2 +-
 hw/virtio/virtio-balloon.c           |   2 +-
 monitor/hmp-cmds.c                   |   1 +
 stubs/uuid.c                         |   2 +-
 stubs/vmgenid.c                      |   2 +-
 target/i386/cpu.c                    |   2 +-
 target/i386/machine-stub.c           |  22 +
 target/i386/Makefile.objs            |   3 +-
 26 files changed, 843 insertions(+), 816 deletions(-)
 create mode 100644 target/i386/machine-stub.c

-- 
2.21.1



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

* [PATCH v2 1/8] target/i386: Restrict X86CPUFeatureWord to X86 targets
  2020-03-16  0:03 [PATCH v2 0/8] user-mode: Prune build dependencies (part 2) Philippe Mathieu-Daudé
@ 2020-03-16  0:03 ` Philippe Mathieu-Daudé
  2020-03-16  0:29   ` Aleksandar Markovic
  2020-03-18  8:25   ` Philippe Mathieu-Daudé
  2020-03-16  0:03 ` [PATCH v2 2/8] qapi/misc: Restrict LostTickPolicy enum to machine code Philippe Mathieu-Daudé
                   ` (6 subsequent siblings)
  7 siblings, 2 replies; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-16  0:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin, Ronnie Sahlberg,
	Philippe Mathieu-Daudé,
	Peter Lieven, Dr. David Alan Gilbert, Max Reitz,
	Richard Henderson, Paolo Bonzini, Igor Mammedov, qemu-block,
	Markus Armbruster, Richard Henderson

Move out x86-specific structures from generic machine code.

Acked-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 qapi/machine-target.json   | 45 ++++++++++++++++++++++++++++++++++++++
 qapi/machine.json          | 42 -----------------------------------
 target/i386/cpu.c          |  2 +-
 target/i386/machine-stub.c | 22 +++++++++++++++++++
 target/i386/Makefile.objs  |  3 ++-
 5 files changed, 70 insertions(+), 44 deletions(-)
 create mode 100644 target/i386/machine-stub.c

diff --git a/qapi/machine-target.json b/qapi/machine-target.json
index f2c82949d8..fb7a4b7850 100644
--- a/qapi/machine-target.json
+++ b/qapi/machine-target.json
@@ -3,6 +3,51 @@
 # This work is licensed under the terms of the GNU GPL, version 2 or later.
 # See the COPYING file in the top-level directory.
 
+##
+# @X86CPURegister32:
+#
+# A X86 32-bit register
+#
+# Since: 1.5
+##
+{ 'enum': 'X86CPURegister32',
+  'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ],
+  'if': 'defined(TARGET_I386)' }
+
+##
+# @X86CPUFeatureWordInfo:
+#
+# Information about a X86 CPU feature word
+#
+# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
+#
+# @cpuid-input-ecx: Input ECX value for CPUID instruction for that
+#                   feature word
+#
+# @cpuid-register: Output register containing the feature bits
+#
+# @features: value of output register, containing the feature bits
+#
+# Since: 1.5
+##
+{ 'struct': 'X86CPUFeatureWordInfo',
+  'data': { 'cpuid-input-eax': 'int',
+            '*cpuid-input-ecx': 'int',
+            'cpuid-register': 'X86CPURegister32',
+            'features': 'int' },
+  'if': 'defined(TARGET_I386)' }
+
+##
+# @DummyForceArrays:
+#
+# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
+#
+# Since: 2.5
+##
+{ 'struct': 'DummyForceArrays',
+  'data': { 'unused': ['X86CPUFeatureWordInfo'] },
+  'if': 'defined(TARGET_I386)' }
+
 ##
 # @CpuModelInfo:
 #
diff --git a/qapi/machine.json b/qapi/machine.json
index 6c11e3cf3a..de05730704 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -505,48 +505,6 @@
    'dst': 'uint16',
    'val': 'uint8' }}
 
-##
-# @X86CPURegister32:
-#
-# A X86 32-bit register
-#
-# Since: 1.5
-##
-{ 'enum': 'X86CPURegister32',
-  'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
-
-##
-# @X86CPUFeatureWordInfo:
-#
-# Information about a X86 CPU feature word
-#
-# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
-#
-# @cpuid-input-ecx: Input ECX value for CPUID instruction for that
-#                   feature word
-#
-# @cpuid-register: Output register containing the feature bits
-#
-# @features: value of output register, containing the feature bits
-#
-# Since: 1.5
-##
-{ 'struct': 'X86CPUFeatureWordInfo',
-  'data': { 'cpuid-input-eax': 'int',
-            '*cpuid-input-ecx': 'int',
-            'cpuid-register': 'X86CPURegister32',
-            'features': 'int' } }
-
-##
-# @DummyForceArrays:
-#
-# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
-#
-# Since: 2.5
-##
-{ 'struct': 'DummyForceArrays',
-  'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
-
 ##
 # @NumaCpuOptions:
 #
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index a84553e50c..0753fe4935 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -37,7 +37,7 @@
 #include "qemu/option.h"
 #include "qemu/config-file.h"
 #include "qapi/error.h"
-#include "qapi/qapi-visit-machine.h"
+#include "qapi/qapi-visit-machine-target.h"
 #include "qapi/qapi-visit-run-state.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qerror.h"
diff --git a/target/i386/machine-stub.c b/target/i386/machine-stub.c
new file mode 100644
index 0000000000..cb301af057
--- /dev/null
+++ b/target/i386/machine-stub.c
@@ -0,0 +1,22 @@
+/*
+ * QAPI x86 CPU features stub
+ *
+ * Copyright (c) 2020 Red Hat, Inc.
+ *
+ * Author:
+ *   Philippe Mathieu-Daudé <philmd@redhat.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "qapi/error.h"
+#include "qapi/qapi-visit-machine-target.h"
+
+void visit_type_X86CPUFeatureWordInfoList(Visitor *v, const char *name,
+                                      X86CPUFeatureWordInfoList **obj,
+                                      Error **errp)
+{
+}
diff --git a/target/i386/Makefile.objs b/target/i386/Makefile.objs
index 48e0c28434..1cdfc9f50c 100644
--- a/target/i386/Makefile.objs
+++ b/target/i386/Makefile.objs
@@ -17,6 +17,7 @@ obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-posix.o
 endif
 obj-$(CONFIG_HVF) += hvf/
 obj-$(CONFIG_WHPX) += whpx-all.o
-endif
+endif # CONFIG_SOFTMMU
 obj-$(CONFIG_SEV) += sev.o
 obj-$(call lnot,$(CONFIG_SEV)) += sev-stub.o
+obj-$(call lnot,$(CONFIG_SOFTMMU)) += machine-stub.o
-- 
2.21.1



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

* [PATCH v2 2/8] qapi/misc: Restrict LostTickPolicy enum to machine code
  2020-03-16  0:03 [PATCH v2 0/8] user-mode: Prune build dependencies (part 2) Philippe Mathieu-Daudé
  2020-03-16  0:03 ` [PATCH v2 1/8] target/i386: Restrict X86CPUFeatureWord to X86 targets Philippe Mathieu-Daudé
@ 2020-03-16  0:03 ` Philippe Mathieu-Daudé
  2020-05-25 14:12   ` Philippe Mathieu-Daudé
  2020-05-26 15:00   ` Igor Mammedov
  2020-03-16  0:03 ` [PATCH v2 3/8] qapi/misc: Restrict balloon-related commands " Philippe Mathieu-Daudé
                   ` (5 subsequent siblings)
  7 siblings, 2 replies; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-16  0:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin, Ronnie Sahlberg,
	Philippe Mathieu-Daudé,
	Peter Lieven, Dr. David Alan Gilbert, Max Reitz, Paolo Bonzini,
	Igor Mammedov, qemu-block, Markus Armbruster, Richard Henderson

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 qapi/machine.json            | 32 ++++++++++++++++++++++++++++++++
 qapi/misc.json               | 32 --------------------------------
 include/hw/rtc/mc146818rtc.h |  2 +-
 hw/core/qdev-properties.c    |  1 +
 hw/i386/kvm/i8254.c          |  2 +-
 5 files changed, 35 insertions(+), 34 deletions(-)

diff --git a/qapi/machine.json b/qapi/machine.json
index de05730704..07ffc07ba2 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -415,6 +415,38 @@
 ##
 { 'command': 'query-target', 'returns': 'TargetInfo' }
 
+##
+# @LostTickPolicy:
+#
+# Policy for handling lost ticks in timer devices.  Ticks end up getting
+# lost when, for example, the guest is paused.
+#
+# @discard: throw away the missed ticks and continue with future injection
+#           normally.  The guest OS will see the timer jump ahead by a
+#           potentially quite significant amount all at once, as if the
+#           intervening chunk of time had simply not existed; needless to
+#           say, such a sudden jump can easily confuse a guest OS which is
+#           not specifically prepared to deal with it.  Assuming the guest
+#           OS can deal correctly with the time jump, the time in the guest
+#           and in the host should now match.
+#
+# @delay: continue to deliver ticks at the normal rate.  The guest OS will
+#         not notice anything is amiss, as from its point of view time will
+#         have continued to flow normally.  The time in the guest should now
+#         be behind the time in the host by exactly the amount of time during
+#         which ticks have been missed.
+#
+# @slew: deliver ticks at a higher rate to catch up with the missed ticks.
+#        The guest OS will not notice anything is amiss, as from its point
+#        of view time will have continued to flow normally.  Once the timer
+#        has managed to catch up with all the missing ticks, the time in
+#        the guest and in the host should match.
+#
+# Since: 2.0
+##
+{ 'enum': 'LostTickPolicy',
+  'data': ['discard', 'delay', 'slew' ] }
+
 ##
 # @NumaOptionsType:
 #
diff --git a/qapi/misc.json b/qapi/misc.json
index c18fe681fb..2725d835ad 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -7,38 +7,6 @@
 
 { 'include': 'common.json' }
 
-##
-# @LostTickPolicy:
-#
-# Policy for handling lost ticks in timer devices.  Ticks end up getting
-# lost when, for example, the guest is paused.
-#
-# @discard: throw away the missed ticks and continue with future injection
-#           normally.  The guest OS will see the timer jump ahead by a
-#           potentially quite significant amount all at once, as if the
-#           intervening chunk of time had simply not existed; needless to
-#           say, such a sudden jump can easily confuse a guest OS which is
-#           not specifically prepared to deal with it.  Assuming the guest
-#           OS can deal correctly with the time jump, the time in the guest
-#           and in the host should now match.
-#
-# @delay: continue to deliver ticks at the normal rate.  The guest OS will
-#         not notice anything is amiss, as from its point of view time will
-#         have continued to flow normally.  The time in the guest should now
-#         be behind the time in the host by exactly the amount of time during
-#         which ticks have been missed.
-#
-# @slew: deliver ticks at a higher rate to catch up with the missed ticks.
-#        The guest OS will not notice anything is amiss, as from its point
-#        of view time will have continued to flow normally.  Once the timer
-#        has managed to catch up with all the missing ticks, the time in
-#        the guest and in the host should match.
-#
-# Since: 2.0
-##
-{ 'enum': 'LostTickPolicy',
-  'data': ['discard', 'delay', 'slew' ] }
-
 ##
 # @add_client:
 #
diff --git a/include/hw/rtc/mc146818rtc.h b/include/hw/rtc/mc146818rtc.h
index 10c93a096a..58a7748c66 100644
--- a/include/hw/rtc/mc146818rtc.h
+++ b/include/hw/rtc/mc146818rtc.h
@@ -9,7 +9,7 @@
 #ifndef HW_RTC_MC146818RTC_H
 #define HW_RTC_MC146818RTC_H
 
-#include "qapi/qapi-types-misc.h"
+#include "qapi/qapi-types-machine.h"
 #include "qemu/queue.h"
 #include "qemu/timer.h"
 #include "hw/isa/isa.h"
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 2047114fca..59380ed761 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -4,6 +4,7 @@
 #include "qapi/error.h"
 #include "hw/pci/pci.h"
 #include "qapi/qapi-types-block.h"
+#include "qapi/qapi-types-machine.h"
 #include "qapi/qapi-types-misc.h"
 #include "qapi/qmp/qerror.h"
 #include "qemu/ctype.h"
diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c
index 876f5aa6fa..22ba6149b5 100644
--- a/hw/i386/kvm/i8254.c
+++ b/hw/i386/kvm/i8254.c
@@ -25,7 +25,7 @@
 
 #include "qemu/osdep.h"
 #include <linux/kvm.h>
-#include "qapi/qapi-types-misc.h"
+#include "qapi/qapi-types-machine.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
 #include "qemu/timer.h"
-- 
2.21.1



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

* [PATCH v2 3/8] qapi/misc: Restrict balloon-related commands to machine code
  2020-03-16  0:03 [PATCH v2 0/8] user-mode: Prune build dependencies (part 2) Philippe Mathieu-Daudé
  2020-03-16  0:03 ` [PATCH v2 1/8] target/i386: Restrict X86CPUFeatureWord to X86 targets Philippe Mathieu-Daudé
  2020-03-16  0:03 ` [PATCH v2 2/8] qapi/misc: Restrict LostTickPolicy enum to machine code Philippe Mathieu-Daudé
@ 2020-03-16  0:03 ` Philippe Mathieu-Daudé
  2020-03-16  9:05   ` David Hildenbrand
  2020-03-16  0:03 ` [PATCH v2 4/8] qapi/misc: Move query-uuid command with block code Philippe Mathieu-Daudé
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-16  0:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin, Ronnie Sahlberg,
	Philippe Mathieu-Daudé,
	Peter Lieven, Dr. David Alan Gilbert, Max Reitz, Paolo Bonzini,
	Igor Mammedov, qemu-block, Markus Armbruster, Richard Henderson

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 qapi/machine.json          | 83 ++++++++++++++++++++++++++++++++++++++
 qapi/misc.json             | 83 --------------------------------------
 include/sysemu/balloon.h   |  2 +-
 balloon.c                  |  2 +-
 hw/virtio/virtio-balloon.c |  2 +-
 monitor/hmp-cmds.c         |  1 +
 6 files changed, 87 insertions(+), 86 deletions(-)

diff --git a/qapi/machine.json b/qapi/machine.json
index 07ffc07ba2..c096efbea3 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -915,3 +915,86 @@
   'data': 'NumaOptions',
   'allow-preconfig': true
 }
+
+##
+# @balloon:
+#
+# Request the balloon driver to change its balloon size.
+#
+# @value: the target size of the balloon in bytes
+#
+# Returns: - Nothing on success
+#          - If the balloon driver is enabled but not functional because the KVM
+#            kernel module cannot support it, KvmMissingCap
+#          - If no balloon device is present, DeviceNotActive
+#
+# Notes: This command just issues a request to the guest.  When it returns,
+#        the balloon size may not have changed.  A guest can change the balloon
+#        size independent of this command.
+#
+# Since: 0.14.0
+#
+# Example:
+#
+# -> { "execute": "balloon", "arguments": { "value": 536870912 } }
+# <- { "return": {} }
+#
+##
+{ 'command': 'balloon', 'data': {'value': 'int'} }
+
+##
+# @BalloonInfo:
+#
+# Information about the guest balloon device.
+#
+# @actual: the number of bytes the balloon currently contains
+#
+# Since: 0.14.0
+#
+##
+{ 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
+
+##
+# @query-balloon:
+#
+# Return information about the balloon device.
+#
+# Returns: - @BalloonInfo on success
+#          - If the balloon driver is enabled but not functional because the KVM
+#            kernel module cannot support it, KvmMissingCap
+#          - If no balloon device is present, DeviceNotActive
+#
+# Since: 0.14.0
+#
+# Example:
+#
+# -> { "execute": "query-balloon" }
+# <- { "return": {
+#          "actual": 1073741824,
+#       }
+#    }
+#
+##
+{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
+
+##
+# @BALLOON_CHANGE:
+#
+# Emitted when the guest changes the actual BALLOON level. This value is
+# equivalent to the @actual field return by the 'query-balloon' command
+#
+# @actual: actual level of the guest memory balloon in bytes
+#
+# Note: this event is rate-limited.
+#
+# Since: 1.2
+#
+# Example:
+#
+# <- { "event": "BALLOON_CHANGE",
+#      "data": { "actual": 944766976 },
+#      "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
+#
+##
+{ 'event': 'BALLOON_CHANGE',
+  'data': { 'actual': 'int' } }
diff --git a/qapi/misc.json b/qapi/misc.json
index 2725d835ad..ed28e41229 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -186,63 +186,6 @@
 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
   'allow-preconfig': true }
 
-##
-# @BalloonInfo:
-#
-# Information about the guest balloon device.
-#
-# @actual: the number of bytes the balloon currently contains
-#
-# Since: 0.14.0
-#
-##
-{ 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
-
-##
-# @query-balloon:
-#
-# Return information about the balloon device.
-#
-# Returns: - @BalloonInfo on success
-#          - If the balloon driver is enabled but not functional because the KVM
-#            kernel module cannot support it, KvmMissingCap
-#          - If no balloon device is present, DeviceNotActive
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# -> { "execute": "query-balloon" }
-# <- { "return": {
-#          "actual": 1073741824,
-#       }
-#    }
-#
-##
-{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
-
-##
-# @BALLOON_CHANGE:
-#
-# Emitted when the guest changes the actual BALLOON level. This value is
-# equivalent to the @actual field return by the 'query-balloon' command
-#
-# @actual: actual level of the guest memory balloon in bytes
-#
-# Note: this event is rate-limited.
-#
-# Since: 1.2
-#
-# Example:
-#
-# <- { "event": "BALLOON_CHANGE",
-#      "data": { "actual": 944766976 },
-#      "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
-#
-##
-{ 'event': 'BALLOON_CHANGE',
-  'data': { 'actual': 'int' } }
-
 ##
 # @PciMemoryRange:
 #
@@ -751,32 +694,6 @@
 ##
 { 'command': 'inject-nmi' }
 
-##
-# @balloon:
-#
-# Request the balloon driver to change its balloon size.
-#
-# @value: the target size of the balloon in bytes
-#
-# Returns: - Nothing on success
-#          - If the balloon driver is enabled but not functional because the KVM
-#            kernel module cannot support it, KvmMissingCap
-#          - If no balloon device is present, DeviceNotActive
-#
-# Notes: This command just issues a request to the guest.  When it returns,
-#        the balloon size may not have changed.  A guest can change the balloon
-#        size independent of this command.
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# -> { "execute": "balloon", "arguments": { "value": 536870912 } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'balloon', 'data': {'value': 'int'} }
-
 ##
 # @human-monitor-command:
 #
diff --git a/include/sysemu/balloon.h b/include/sysemu/balloon.h
index aea0c44985..b3de4b92b9 100644
--- a/include/sysemu/balloon.h
+++ b/include/sysemu/balloon.h
@@ -15,7 +15,7 @@
 #define QEMU_BALLOON_H
 
 #include "exec/cpu-common.h"
-#include "qapi/qapi-types-misc.h"
+#include "qapi/qapi-types-machine.h"
 
 typedef void (QEMUBalloonEvent)(void *opaque, ram_addr_t target);
 typedef void (QEMUBalloonStatus)(void *opaque, BalloonInfo *info);
diff --git a/balloon.c b/balloon.c
index f104b42961..ee9c59252d 100644
--- a/balloon.c
+++ b/balloon.c
@@ -30,7 +30,7 @@
 #include "sysemu/balloon.h"
 #include "trace-root.h"
 #include "qapi/error.h"
-#include "qapi/qapi-commands-misc.h"
+#include "qapi/qapi-commands-machine.h"
 #include "qapi/qmp/qerror.h"
 
 static QEMUBalloonEvent *balloon_event_fn;
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index a4729f7fc9..07ad36b143 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -24,7 +24,7 @@
 #include "hw/virtio/virtio-balloon.h"
 #include "exec/address-spaces.h"
 #include "qapi/error.h"
-#include "qapi/qapi-events-misc.h"
+#include "qapi/qapi-events-machine.h"
 #include "qapi/visitor.h"
 #include "trace.h"
 #include "qemu/error-report.h"
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index 58724031ea..97cd340b2e 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -32,6 +32,7 @@
 #include "qapi/qapi-commands-block.h"
 #include "qapi/qapi-commands-char.h"
 #include "qapi/qapi-commands-control.h"
+#include "qapi/qapi-commands-machine.h"
 #include "qapi/qapi-commands-migration.h"
 #include "qapi/qapi-commands-misc.h"
 #include "qapi/qapi-commands-net.h"
-- 
2.21.1



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

* [PATCH v2 4/8] qapi/misc: Move query-uuid command with block code
  2020-03-16  0:03 [PATCH v2 0/8] user-mode: Prune build dependencies (part 2) Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2020-03-16  0:03 ` [PATCH v2 3/8] qapi/misc: Restrict balloon-related commands " Philippe Mathieu-Daudé
@ 2020-03-16  0:03 ` Philippe Mathieu-Daudé
  2020-03-16 13:09   ` Igor Mammedov
  2020-03-16  0:03 ` [PATCH v2 5/8] qapi/misc: Restrict query-vm-generation-id command to machine code Philippe Mathieu-Daudé
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-16  0:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin, Ronnie Sahlberg,
	Philippe Mathieu-Daudé,
	Peter Lieven, Dr. David Alan Gilbert, Max Reitz, Paolo Bonzini,
	Igor Mammedov, qemu-block, Markus Armbruster, Richard Henderson

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 qapi/block-core.json | 30 ++++++++++++++++++++++++++++++
 qapi/misc.json       | 30 ------------------------------
 block/iscsi.c        |  2 +-
 stubs/uuid.c         |  2 +-
 4 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/qapi/block-core.json b/qapi/block-core.json
index 91586fb1fb..5c3fa6c5d0 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -5415,3 +5415,33 @@
 { 'command': 'blockdev-snapshot-delete-internal-sync',
   'data': { 'device': 'str', '*id': 'str', '*name': 'str'},
   'returns': 'SnapshotInfo' }
+
+##
+# @UuidInfo:
+#
+# Guest UUID information (Universally Unique Identifier).
+#
+# @UUID: the UUID of the guest
+#
+# Since: 0.14.0
+#
+# Notes: If no UUID was specified for the guest, a null UUID is returned.
+##
+{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
+
+##
+# @query-uuid:
+#
+# Query the guest UUID information.
+#
+# Returns: The @UuidInfo for the guest
+#
+# Since: 0.14.0
+#
+# Example:
+#
+# -> { "execute": "query-uuid" }
+# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
+#
+##
+{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
diff --git a/qapi/misc.json b/qapi/misc.json
index ed28e41229..f70025f34c 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -97,36 +97,6 @@
 ##
 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
 
-##
-# @UuidInfo:
-#
-# Guest UUID information (Universally Unique Identifier).
-#
-# @UUID: the UUID of the guest
-#
-# Since: 0.14.0
-#
-# Notes: If no UUID was specified for the guest, a null UUID is returned.
-##
-{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
-
-##
-# @query-uuid:
-#
-# Query the guest UUID information.
-#
-# Returns: The @UuidInfo for the guest
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# -> { "execute": "query-uuid" }
-# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
-#
-##
-{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
-
 ##
 # @IOThreadInfo:
 #
diff --git a/block/iscsi.c b/block/iscsi.c
index 682abd8e09..68ed5cf3f8 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -42,7 +42,7 @@
 #include "qemu/uuid.h"
 #include "sysemu/replay.h"
 #include "qapi/error.h"
-#include "qapi/qapi-commands-misc.h"
+#include "qapi/qapi-commands-block-core.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qstring.h"
 #include "crypto/secret.h"
diff --git a/stubs/uuid.c b/stubs/uuid.c
index 67f182fa3a..9ef75fdae4 100644
--- a/stubs/uuid.c
+++ b/stubs/uuid.c
@@ -1,5 +1,5 @@
 #include "qemu/osdep.h"
-#include "qapi/qapi-commands-misc.h"
+#include "qapi/qapi-commands-block-core.h"
 #include "qemu/uuid.h"
 
 UuidInfo *qmp_query_uuid(Error **errp)
-- 
2.21.1



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

* [PATCH v2 5/8] qapi/misc: Restrict query-vm-generation-id command to machine code
  2020-03-16  0:03 [PATCH v2 0/8] user-mode: Prune build dependencies (part 2) Philippe Mathieu-Daudé
                   ` (3 preceding siblings ...)
  2020-03-16  0:03 ` [PATCH v2 4/8] qapi/misc: Move query-uuid command with block code Philippe Mathieu-Daudé
@ 2020-03-16  0:03 ` Philippe Mathieu-Daudé
  2020-03-16 12:45   ` Igor Mammedov
  2020-03-16  0:03 ` [PATCH v2 6/8] qapi/misc: Restrict ACPI commands " Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-16  0:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin, Ronnie Sahlberg,
	Philippe Mathieu-Daudé,
	Peter Lieven, Dr. David Alan Gilbert, Max Reitz, Paolo Bonzini,
	Igor Mammedov, qemu-block, Markus Armbruster, Richard Henderson

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 qapi/machine.json | 20 ++++++++++++++++++++
 qapi/misc.json    | 21 ---------------------
 hw/acpi/vmgenid.c |  2 +-
 stubs/vmgenid.c   |  2 +-
 4 files changed, 22 insertions(+), 23 deletions(-)

diff --git a/qapi/machine.json b/qapi/machine.json
index c096efbea3..1a2a4b0d48 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -415,6 +415,26 @@
 ##
 { 'command': 'query-target', 'returns': 'TargetInfo' }
 
+##
+# @GuidInfo:
+#
+# GUID information.
+#
+# @guid: the globally unique identifier
+#
+# Since: 2.9
+##
+{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
+
+##
+# @query-vm-generation-id:
+#
+# Show Virtual Machine Generation ID
+#
+# Since: 2.9
+##
+{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
+
 ##
 # @LostTickPolicy:
 #
diff --git a/qapi/misc.json b/qapi/misc.json
index f70025f34c..8c02870227 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -1383,24 +1383,3 @@
 #
 ##
 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
-
-##
-# @GuidInfo:
-#
-# GUID information.
-#
-# @guid: the globally unique identifier
-#
-# Since: 2.9
-##
-{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
-
-##
-# @query-vm-generation-id:
-#
-# Show Virtual Machine Generation ID
-#
-# Since: 2.9
-##
-{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
-
diff --git a/hw/acpi/vmgenid.c b/hw/acpi/vmgenid.c
index 2df7623d74..2b26bacaf8 100644
--- a/hw/acpi/vmgenid.c
+++ b/hw/acpi/vmgenid.c
@@ -12,7 +12,7 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "qapi/qapi-commands-misc.h"
+#include "qapi/qapi-commands-machine.h"
 #include "qemu/module.h"
 #include "hw/acpi/acpi.h"
 #include "hw/acpi/aml-build.h"
diff --git a/stubs/vmgenid.c b/stubs/vmgenid.c
index 568e42b064..bfad656c6c 100644
--- a/stubs/vmgenid.c
+++ b/stubs/vmgenid.c
@@ -1,6 +1,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "qapi/qapi-commands-misc.h"
+#include "qapi/qapi-commands-machine.h"
 #include "qapi/qmp/qerror.h"
 
 GuidInfo *qmp_query_vm_generation_id(Error **errp)
-- 
2.21.1



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

* [PATCH v2 6/8] qapi/misc: Restrict ACPI commands to machine code
  2020-03-16  0:03 [PATCH v2 0/8] user-mode: Prune build dependencies (part 2) Philippe Mathieu-Daudé
                   ` (4 preceding siblings ...)
  2020-03-16  0:03 ` [PATCH v2 5/8] qapi/misc: Restrict query-vm-generation-id command to machine code Philippe Mathieu-Daudé
@ 2020-03-16  0:03 ` Philippe Mathieu-Daudé
  2020-03-16 12:47   ` Igor Mammedov
  2020-03-16  0:03 ` [PATCH v2 7/8] qapi/misc: Restrict PCI " Philippe Mathieu-Daudé
  2020-03-16  0:03 ` [PATCH v2 8/8] qapi/misc: Restrict device memory " Philippe Mathieu-Daudé
  7 siblings, 1 reply; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-16  0:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin, Ronnie Sahlberg,
	Philippe Mathieu-Daudé,
	Peter Lieven, Dr. David Alan Gilbert, Max Reitz, Paolo Bonzini,
	Igor Mammedov, qemu-block, Markus Armbruster, Richard Henderson

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 qapi/machine.json                    | 154 +++++++++++++++++++++++++++
 qapi/misc.json                       | 154 ---------------------------
 include/hw/acpi/acpi_dev_interface.h |   2 +-
 hw/acpi/core.c                       |   2 +-
 hw/acpi/cpu.c                        |   2 +-
 hw/acpi/memory_hotplug.c             |   2 +-
 6 files changed, 158 insertions(+), 158 deletions(-)

diff --git a/qapi/machine.json b/qapi/machine.json
index 1a2a4b0d48..f77ee63730 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -1018,3 +1018,157 @@
 ##
 { 'event': 'BALLOON_CHANGE',
   'data': { 'actual': 'int' } }
+
+##
+# @AcpiTableOptions:
+#
+# Specify an ACPI table on the command line to load.
+#
+# At most one of @file and @data can be specified. The list of files specified
+# by any one of them is loaded and concatenated in order. If both are omitted,
+# @data is implied.
+#
+# Other fields / optargs can be used to override fields of the generic ACPI
+# table header; refer to the ACPI specification 5.0, section 5.2.6 System
+# Description Table Header. If a header field is not overridden, then the
+# corresponding value from the concatenated blob is used (in case of @file), or
+# it is filled in with a hard-coded value (in case of @data).
+#
+# String fields are copied into the matching ACPI member from lowest address
+# upwards, and silently truncated / NUL-padded to length.
+#
+# @sig: table signature / identifier (4 bytes)
+#
+# @rev: table revision number (dependent on signature, 1 byte)
+#
+# @oem_id: OEM identifier (6 bytes)
+#
+# @oem_table_id: OEM table identifier (8 bytes)
+#
+# @oem_rev: OEM-supplied revision number (4 bytes)
+#
+# @asl_compiler_id: identifier of the utility that created the table
+#                   (4 bytes)
+#
+# @asl_compiler_rev: revision number of the utility that created the
+#                    table (4 bytes)
+#
+# @file: colon (:) separated list of pathnames to load and
+#        concatenate as table data. The resultant binary blob is expected to
+#        have an ACPI table header. At least one file is required. This field
+#        excludes @data.
+#
+# @data: colon (:) separated list of pathnames to load and
+#        concatenate as table data. The resultant binary blob must not have an
+#        ACPI table header. At least one file is required. This field excludes
+#        @file.
+#
+# Since: 1.5
+##
+{ 'struct': 'AcpiTableOptions',
+  'data': {
+    '*sig':               'str',
+    '*rev':               'uint8',
+    '*oem_id':            'str',
+    '*oem_table_id':      'str',
+    '*oem_rev':           'uint32',
+    '*asl_compiler_id':   'str',
+    '*asl_compiler_rev':  'uint32',
+    '*file':              'str',
+    '*data':              'str' }}
+
+##
+# @MEM_UNPLUG_ERROR:
+#
+# Emitted when memory hot unplug error occurs.
+#
+# @device: device name
+#
+# @msg: Informative message
+#
+# Since: 2.4
+#
+# Example:
+#
+# <- { "event": "MEM_UNPLUG_ERROR"
+#      "data": { "device": "dimm1",
+#                "msg": "acpi: device unplug for unsupported device"
+#      },
+#      "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
+#
+##
+{ 'event': 'MEM_UNPLUG_ERROR',
+  'data': { 'device': 'str', 'msg': 'str' } }
+
+##
+# @ACPISlotType:
+#
+# @DIMM: memory slot
+# @CPU: logical CPU slot (since 2.7)
+##
+{ 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
+
+##
+# @ACPIOSTInfo:
+#
+# OSPM Status Indication for a device
+# For description of possible values of @source and @status fields
+# see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
+#
+# @device: device ID associated with slot
+#
+# @slot: slot ID, unique per slot of a given @slot-type
+#
+# @slot-type: type of the slot
+#
+# @source: an integer containing the source event
+#
+# @status: an integer containing the status code
+#
+# Since: 2.1
+##
+{ 'struct': 'ACPIOSTInfo',
+  'data'  : { '*device': 'str',
+              'slot': 'str',
+              'slot-type': 'ACPISlotType',
+              'source': 'int',
+              'status': 'int' } }
+
+##
+# @query-acpi-ospm-status:
+#
+# Return a list of ACPIOSTInfo for devices that support status
+# reporting via ACPI _OST method.
+#
+# Since: 2.1
+#
+# Example:
+#
+# -> { "execute": "query-acpi-ospm-status" }
+# <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
+#                  { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
+#                  { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
+#                  { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
+#    ]}
+#
+##
+{ 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
+
+##
+# @ACPI_DEVICE_OST:
+#
+# Emitted when guest executes ACPI _OST method.
+#
+# @info: OSPM Status Indication
+#
+# Since: 2.1
+#
+# Example:
+#
+# <- { "event": "ACPI_DEVICE_OST",
+#      "data": { "device": "d1", "slot": "0",
+#                "slot-type": "DIMM", "source": 1, "status": 0 } }
+#
+##
+{ 'event': 'ACPI_DEVICE_OST',
+     'data': { 'info': 'ACPIOSTInfo' } }
diff --git a/qapi/misc.json b/qapi/misc.json
index 8c02870227..3d9d7327fe 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -999,64 +999,6 @@
 ##
 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
 
-##
-# @AcpiTableOptions:
-#
-# Specify an ACPI table on the command line to load.
-#
-# At most one of @file and @data can be specified. The list of files specified
-# by any one of them is loaded and concatenated in order. If both are omitted,
-# @data is implied.
-#
-# Other fields / optargs can be used to override fields of the generic ACPI
-# table header; refer to the ACPI specification 5.0, section 5.2.6 System
-# Description Table Header. If a header field is not overridden, then the
-# corresponding value from the concatenated blob is used (in case of @file), or
-# it is filled in with a hard-coded value (in case of @data).
-#
-# String fields are copied into the matching ACPI member from lowest address
-# upwards, and silently truncated / NUL-padded to length.
-#
-# @sig: table signature / identifier (4 bytes)
-#
-# @rev: table revision number (dependent on signature, 1 byte)
-#
-# @oem_id: OEM identifier (6 bytes)
-#
-# @oem_table_id: OEM table identifier (8 bytes)
-#
-# @oem_rev: OEM-supplied revision number (4 bytes)
-#
-# @asl_compiler_id: identifier of the utility that created the table
-#                   (4 bytes)
-#
-# @asl_compiler_rev: revision number of the utility that created the
-#                    table (4 bytes)
-#
-# @file: colon (:) separated list of pathnames to load and
-#        concatenate as table data. The resultant binary blob is expected to
-#        have an ACPI table header. At least one file is required. This field
-#        excludes @data.
-#
-# @data: colon (:) separated list of pathnames to load and
-#        concatenate as table data. The resultant binary blob must not have an
-#        ACPI table header. At least one file is required. This field excludes
-#        @file.
-#
-# Since: 1.5
-##
-{ 'struct': 'AcpiTableOptions',
-  'data': {
-    '*sig':               'str',
-    '*rev':               'uint8',
-    '*oem_id':            'str',
-    '*oem_table_id':      'str',
-    '*oem_rev':           'uint32',
-    '*asl_compiler_id':   'str',
-    '*asl_compiler_rev':  'uint32',
-    '*file':              'str',
-    '*data':              'str' }}
-
 ##
 # @CommandLineParameterType:
 #
@@ -1249,102 +1191,6 @@
 ##
 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
 
-##
-# @MEM_UNPLUG_ERROR:
-#
-# Emitted when memory hot unplug error occurs.
-#
-# @device: device name
-#
-# @msg: Informative message
-#
-# Since: 2.4
-#
-# Example:
-#
-# <- { "event": "MEM_UNPLUG_ERROR"
-#      "data": { "device": "dimm1",
-#                "msg": "acpi: device unplug for unsupported device"
-#      },
-#      "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
-#
-##
-{ 'event': 'MEM_UNPLUG_ERROR',
-  'data': { 'device': 'str', 'msg': 'str' } }
-
-##
-# @ACPISlotType:
-#
-# @DIMM: memory slot
-# @CPU: logical CPU slot (since 2.7)
-##
-{ 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
-
-##
-# @ACPIOSTInfo:
-#
-# OSPM Status Indication for a device
-# For description of possible values of @source and @status fields
-# see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
-#
-# @device: device ID associated with slot
-#
-# @slot: slot ID, unique per slot of a given @slot-type
-#
-# @slot-type: type of the slot
-#
-# @source: an integer containing the source event
-#
-# @status: an integer containing the status code
-#
-# Since: 2.1
-##
-{ 'struct': 'ACPIOSTInfo',
-  'data'  : { '*device': 'str',
-              'slot': 'str',
-              'slot-type': 'ACPISlotType',
-              'source': 'int',
-              'status': 'int' } }
-
-##
-# @query-acpi-ospm-status:
-#
-# Return a list of ACPIOSTInfo for devices that support status
-# reporting via ACPI _OST method.
-#
-# Since: 2.1
-#
-# Example:
-#
-# -> { "execute": "query-acpi-ospm-status" }
-# <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
-#                  { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
-#                  { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
-#                  { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
-#    ]}
-#
-##
-{ 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
-
-##
-# @ACPI_DEVICE_OST:
-#
-# Emitted when guest executes ACPI _OST method.
-#
-# @info: OSPM Status Indication
-#
-# Since: 2.1
-#
-# Example:
-#
-# <- { "event": "ACPI_DEVICE_OST",
-#      "data": { "device": "d1", "slot": "0",
-#                "slot-type": "DIMM", "source": 1, "status": 0 } }
-#
-##
-{ 'event': 'ACPI_DEVICE_OST',
-     'data': { 'info': 'ACPIOSTInfo' } }
-
 ##
 # @ReplayMode:
 #
diff --git a/include/hw/acpi/acpi_dev_interface.h b/include/hw/acpi/acpi_dev_interface.h
index a2a12af9b9..a1b63d51db 100644
--- a/include/hw/acpi/acpi_dev_interface.h
+++ b/include/hw/acpi/acpi_dev_interface.h
@@ -1,7 +1,7 @@
 #ifndef ACPI_DEV_INTERFACE_H
 #define ACPI_DEV_INTERFACE_H
 
-#include "qapi/qapi-types-misc.h"
+#include "qapi/qapi-types-machine.h"
 #include "qom/object.h"
 #include "hw/boards.h"
 #include "hw/qdev-core.h"
diff --git a/hw/acpi/core.c b/hw/acpi/core.c
index 45cbed49ab..4f8d90f50b 100644
--- a/hw/acpi/core.c
+++ b/hw/acpi/core.c
@@ -27,7 +27,7 @@
 #include "qapi/error.h"
 #include "qapi/opts-visitor.h"
 #include "qapi/qapi-events-run-state.h"
-#include "qapi/qapi-visit-misc.h"
+#include "qapi/qapi-visit-machine.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "qemu/option.h"
diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c
index e2c957ce00..8be15db96d 100644
--- a/hw/acpi/cpu.c
+++ b/hw/acpi/cpu.c
@@ -3,7 +3,7 @@
 #include "migration/vmstate.h"
 #include "hw/acpi/cpu.h"
 #include "qapi/error.h"
-#include "qapi/qapi-events-misc.h"
+#include "qapi/qapi-events-machine.h"
 #include "trace.h"
 #include "sysemu/numa.h"
 
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index 8d2e82240f..aa454f5cb2 100644
--- a/hw/acpi/memory_hotplug.c
+++ b/hw/acpi/memory_hotplug.c
@@ -7,7 +7,7 @@
 #include "migration/vmstate.h"
 #include "trace.h"
 #include "qapi/error.h"
-#include "qapi/qapi-events-misc.h"
+#include "qapi/qapi-events-machine.h"
 
 #define MEMORY_SLOTS_NUMBER          "MDNR"
 #define MEMORY_HOTPLUG_IO_REGION     "HPMR"
-- 
2.21.1



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

* [PATCH v2 7/8] qapi/misc: Restrict PCI commands to machine code
  2020-03-16  0:03 [PATCH v2 0/8] user-mode: Prune build dependencies (part 2) Philippe Mathieu-Daudé
                   ` (5 preceding siblings ...)
  2020-03-16  0:03 ` [PATCH v2 6/8] qapi/misc: Restrict ACPI commands " Philippe Mathieu-Daudé
@ 2020-03-16  0:03 ` Philippe Mathieu-Daudé
  2020-05-25 14:12   ` Philippe Mathieu-Daudé
  2020-03-16  0:03 ` [PATCH v2 8/8] qapi/misc: Restrict device memory " Philippe Mathieu-Daudé
  7 siblings, 1 reply; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-16  0:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin, Ronnie Sahlberg,
	Philippe Mathieu-Daudé,
	Peter Lieven, Dr. David Alan Gilbert, Max Reitz, Paolo Bonzini,
	Igor Mammedov, qemu-block, Markus Armbruster, Richard Henderson

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 qapi/machine.json | 304 ++++++++++++++++++++++++++++++++++++++++++++++
 qapi/misc.json    | 304 ----------------------------------------------
 hw/pci/pci-stub.c |   2 +-
 hw/pci/pci.c      |   2 +-
 4 files changed, 306 insertions(+), 306 deletions(-)

diff --git a/qapi/machine.json b/qapi/machine.json
index f77ee63730..33b259dbd0 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -1172,3 +1172,307 @@
 ##
 { 'event': 'ACPI_DEVICE_OST',
      'data': { 'info': 'ACPIOSTInfo' } }
+
+##
+# @PciMemoryRange:
+#
+# A PCI device memory region
+#
+# @base: the starting address (guest physical)
+#
+# @limit: the ending address (guest physical)
+#
+# Since: 0.14.0
+##
+{ 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
+
+##
+# @PciMemoryRegion:
+#
+# Information about a PCI device I/O region.
+#
+# @bar: the index of the Base Address Register for this region
+#
+# @type: - 'io' if the region is a PIO region
+#        - 'memory' if the region is a MMIO region
+#
+# @size: memory size
+#
+# @prefetch: if @type is 'memory', true if the memory is prefetchable
+#
+# @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
+#
+# Since: 0.14.0
+##
+{ 'struct': 'PciMemoryRegion',
+  'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
+           '*prefetch': 'bool', '*mem_type_64': 'bool' } }
+
+##
+# @PciBusInfo:
+#
+# Information about a bus of a PCI Bridge device
+#
+# @number: primary bus interface number.  This should be the number of the
+#          bus the device resides on.
+#
+# @secondary: secondary bus interface number.  This is the number of the
+#             main bus for the bridge
+#
+# @subordinate: This is the highest number bus that resides below the
+#               bridge.
+#
+# @io_range: The PIO range for all devices on this bridge
+#
+# @memory_range: The MMIO range for all devices on this bridge
+#
+# @prefetchable_range: The range of prefetchable MMIO for all devices on
+#                      this bridge
+#
+# Since: 2.4
+##
+{ 'struct': 'PciBusInfo',
+  'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
+           'io_range': 'PciMemoryRange',
+           'memory_range': 'PciMemoryRange',
+           'prefetchable_range': 'PciMemoryRange' } }
+
+##
+# @PciBridgeInfo:
+#
+# Information about a PCI Bridge device
+#
+# @bus: information about the bus the device resides on
+#
+# @devices: a list of @PciDeviceInfo for each device on this bridge
+#
+# Since: 0.14.0
+##
+{ 'struct': 'PciBridgeInfo',
+  'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
+
+##
+# @PciDeviceClass:
+#
+# Information about the Class of a PCI device
+#
+# @desc: a string description of the device's class
+#
+# @class: the class code of the device
+#
+# Since: 2.4
+##
+{ 'struct': 'PciDeviceClass',
+  'data': {'*desc': 'str', 'class': 'int'} }
+
+##
+# @PciDeviceId:
+#
+# Information about the Id of a PCI device
+#
+# @device: the PCI device id
+#
+# @vendor: the PCI vendor id
+#
+# @subsystem: the PCI subsystem id (since 3.1)
+#
+# @subsystem-vendor: the PCI subsystem vendor id (since 3.1)
+#
+# Since: 2.4
+##
+{ 'struct': 'PciDeviceId',
+  'data': {'device': 'int', 'vendor': 'int', '*subsystem': 'int',
+            '*subsystem-vendor': 'int'} }
+
+##
+# @PciDeviceInfo:
+#
+# Information about a PCI device
+#
+# @bus: the bus number of the device
+#
+# @slot: the slot the device is located in
+#
+# @function: the function of the slot used by the device
+#
+# @class_info: the class of the device
+#
+# @id: the PCI device id
+#
+# @irq: if an IRQ is assigned to the device, the IRQ number
+#
+# @qdev_id: the device name of the PCI device
+#
+# @pci_bridge: if the device is a PCI bridge, the bridge information
+#
+# @regions: a list of the PCI I/O regions associated with the device
+#
+# Notes: the contents of @class_info.desc are not stable and should only be
+#        treated as informational.
+#
+# Since: 0.14.0
+##
+{ 'struct': 'PciDeviceInfo',
+  'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
+           'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
+           '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
+           'regions': ['PciMemoryRegion']} }
+
+##
+# @PciInfo:
+#
+# Information about a PCI bus
+#
+# @bus: the bus index
+#
+# @devices: a list of devices on this bus
+#
+# Since: 0.14.0
+##
+{ 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
+
+##
+# @query-pci:
+#
+# Return information about the PCI bus topology of the guest.
+#
+# Returns: a list of @PciInfo for each PCI bus. Each bus is
+#          represented by a json-object, which has a key with a json-array of
+#          all PCI devices attached to it. Each device is represented by a
+#          json-object.
+#
+# Since: 0.14.0
+#
+# Example:
+#
+# -> { "execute": "query-pci" }
+# <- { "return": [
+#          {
+#             "bus": 0,
+#             "devices": [
+#                {
+#                   "bus": 0,
+#                   "qdev_id": "",
+#                   "slot": 0,
+#                   "class_info": {
+#                      "class": 1536,
+#                      "desc": "Host bridge"
+#                   },
+#                   "id": {
+#                      "device": 32902,
+#                      "vendor": 4663
+#                   },
+#                   "function": 0,
+#                   "regions": [
+#                   ]
+#                },
+#                {
+#                   "bus": 0,
+#                   "qdev_id": "",
+#                   "slot": 1,
+#                   "class_info": {
+#                      "class": 1537,
+#                      "desc": "ISA bridge"
+#                   },
+#                   "id": {
+#                      "device": 32902,
+#                      "vendor": 28672
+#                   },
+#                   "function": 0,
+#                   "regions": [
+#                   ]
+#                },
+#                {
+#                   "bus": 0,
+#                   "qdev_id": "",
+#                   "slot": 1,
+#                   "class_info": {
+#                      "class": 257,
+#                      "desc": "IDE controller"
+#                   },
+#                   "id": {
+#                      "device": 32902,
+#                      "vendor": 28688
+#                   },
+#                   "function": 1,
+#                   "regions": [
+#                      {
+#                         "bar": 4,
+#                         "size": 16,
+#                         "address": 49152,
+#                         "type": "io"
+#                      }
+#                   ]
+#                },
+#                {
+#                   "bus": 0,
+#                   "qdev_id": "",
+#                   "slot": 2,
+#                   "class_info": {
+#                      "class": 768,
+#                      "desc": "VGA controller"
+#                   },
+#                   "id": {
+#                      "device": 4115,
+#                      "vendor": 184
+#                   },
+#                   "function": 0,
+#                   "regions": [
+#                      {
+#                         "prefetch": true,
+#                         "mem_type_64": false,
+#                         "bar": 0,
+#                         "size": 33554432,
+#                         "address": 4026531840,
+#                         "type": "memory"
+#                      },
+#                      {
+#                         "prefetch": false,
+#                         "mem_type_64": false,
+#                         "bar": 1,
+#                         "size": 4096,
+#                         "address": 4060086272,
+#                         "type": "memory"
+#                      },
+#                      {
+#                         "prefetch": false,
+#                         "mem_type_64": false,
+#                         "bar": 6,
+#                         "size": 65536,
+#                         "address": -1,
+#                         "type": "memory"
+#                      }
+#                   ]
+#                },
+#                {
+#                   "bus": 0,
+#                   "qdev_id": "",
+#                   "irq": 11,
+#                   "slot": 4,
+#                   "class_info": {
+#                      "class": 1280,
+#                      "desc": "RAM controller"
+#                   },
+#                   "id": {
+#                      "device": 6900,
+#                      "vendor": 4098
+#                   },
+#                   "function": 0,
+#                   "regions": [
+#                      {
+#                         "bar": 0,
+#                         "size": 32,
+#                         "address": 49280,
+#                         "type": "io"
+#                      }
+#                   ]
+#                }
+#             ]
+#          }
+#       ]
+#    }
+#
+# Note: This example has been shortened as the real response is too long.
+#
+##
+{ 'command': 'query-pci', 'returns': ['PciInfo'] }
diff --git a/qapi/misc.json b/qapi/misc.json
index 3d9d7327fe..92b3926c6b 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -156,310 +156,6 @@
 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
   'allow-preconfig': true }
 
-##
-# @PciMemoryRange:
-#
-# A PCI device memory region
-#
-# @base: the starting address (guest physical)
-#
-# @limit: the ending address (guest physical)
-#
-# Since: 0.14.0
-##
-{ 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
-
-##
-# @PciMemoryRegion:
-#
-# Information about a PCI device I/O region.
-#
-# @bar: the index of the Base Address Register for this region
-#
-# @type: - 'io' if the region is a PIO region
-#        - 'memory' if the region is a MMIO region
-#
-# @size: memory size
-#
-# @prefetch: if @type is 'memory', true if the memory is prefetchable
-#
-# @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
-#
-# Since: 0.14.0
-##
-{ 'struct': 'PciMemoryRegion',
-  'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
-           '*prefetch': 'bool', '*mem_type_64': 'bool' } }
-
-##
-# @PciBusInfo:
-#
-# Information about a bus of a PCI Bridge device
-#
-# @number: primary bus interface number.  This should be the number of the
-#          bus the device resides on.
-#
-# @secondary: secondary bus interface number.  This is the number of the
-#             main bus for the bridge
-#
-# @subordinate: This is the highest number bus that resides below the
-#               bridge.
-#
-# @io_range: The PIO range for all devices on this bridge
-#
-# @memory_range: The MMIO range for all devices on this bridge
-#
-# @prefetchable_range: The range of prefetchable MMIO for all devices on
-#                      this bridge
-#
-# Since: 2.4
-##
-{ 'struct': 'PciBusInfo',
-  'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
-           'io_range': 'PciMemoryRange',
-           'memory_range': 'PciMemoryRange',
-           'prefetchable_range': 'PciMemoryRange' } }
-
-##
-# @PciBridgeInfo:
-#
-# Information about a PCI Bridge device
-#
-# @bus: information about the bus the device resides on
-#
-# @devices: a list of @PciDeviceInfo for each device on this bridge
-#
-# Since: 0.14.0
-##
-{ 'struct': 'PciBridgeInfo',
-  'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
-
-##
-# @PciDeviceClass:
-#
-# Information about the Class of a PCI device
-#
-# @desc: a string description of the device's class
-#
-# @class: the class code of the device
-#
-# Since: 2.4
-##
-{ 'struct': 'PciDeviceClass',
-  'data': {'*desc': 'str', 'class': 'int'} }
-
-##
-# @PciDeviceId:
-#
-# Information about the Id of a PCI device
-#
-# @device: the PCI device id
-#
-# @vendor: the PCI vendor id
-#
-# @subsystem: the PCI subsystem id (since 3.1)
-#
-# @subsystem-vendor: the PCI subsystem vendor id (since 3.1)
-#
-# Since: 2.4
-##
-{ 'struct': 'PciDeviceId',
-  'data': {'device': 'int', 'vendor': 'int', '*subsystem': 'int',
-            '*subsystem-vendor': 'int'} }
-
-##
-# @PciDeviceInfo:
-#
-# Information about a PCI device
-#
-# @bus: the bus number of the device
-#
-# @slot: the slot the device is located in
-#
-# @function: the function of the slot used by the device
-#
-# @class_info: the class of the device
-#
-# @id: the PCI device id
-#
-# @irq: if an IRQ is assigned to the device, the IRQ number
-#
-# @qdev_id: the device name of the PCI device
-#
-# @pci_bridge: if the device is a PCI bridge, the bridge information
-#
-# @regions: a list of the PCI I/O regions associated with the device
-#
-# Notes: the contents of @class_info.desc are not stable and should only be
-#        treated as informational.
-#
-# Since: 0.14.0
-##
-{ 'struct': 'PciDeviceInfo',
-  'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
-           'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
-           '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
-           'regions': ['PciMemoryRegion']} }
-
-##
-# @PciInfo:
-#
-# Information about a PCI bus
-#
-# @bus: the bus index
-#
-# @devices: a list of devices on this bus
-#
-# Since: 0.14.0
-##
-{ 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
-
-##
-# @query-pci:
-#
-# Return information about the PCI bus topology of the guest.
-#
-# Returns: a list of @PciInfo for each PCI bus. Each bus is
-#          represented by a json-object, which has a key with a json-array of
-#          all PCI devices attached to it. Each device is represented by a
-#          json-object.
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# -> { "execute": "query-pci" }
-# <- { "return": [
-#          {
-#             "bus": 0,
-#             "devices": [
-#                {
-#                   "bus": 0,
-#                   "qdev_id": "",
-#                   "slot": 0,
-#                   "class_info": {
-#                      "class": 1536,
-#                      "desc": "Host bridge"
-#                   },
-#                   "id": {
-#                      "device": 32902,
-#                      "vendor": 4663
-#                   },
-#                   "function": 0,
-#                   "regions": [
-#                   ]
-#                },
-#                {
-#                   "bus": 0,
-#                   "qdev_id": "",
-#                   "slot": 1,
-#                   "class_info": {
-#                      "class": 1537,
-#                      "desc": "ISA bridge"
-#                   },
-#                   "id": {
-#                      "device": 32902,
-#                      "vendor": 28672
-#                   },
-#                   "function": 0,
-#                   "regions": [
-#                   ]
-#                },
-#                {
-#                   "bus": 0,
-#                   "qdev_id": "",
-#                   "slot": 1,
-#                   "class_info": {
-#                      "class": 257,
-#                      "desc": "IDE controller"
-#                   },
-#                   "id": {
-#                      "device": 32902,
-#                      "vendor": 28688
-#                   },
-#                   "function": 1,
-#                   "regions": [
-#                      {
-#                         "bar": 4,
-#                         "size": 16,
-#                         "address": 49152,
-#                         "type": "io"
-#                      }
-#                   ]
-#                },
-#                {
-#                   "bus": 0,
-#                   "qdev_id": "",
-#                   "slot": 2,
-#                   "class_info": {
-#                      "class": 768,
-#                      "desc": "VGA controller"
-#                   },
-#                   "id": {
-#                      "device": 4115,
-#                      "vendor": 184
-#                   },
-#                   "function": 0,
-#                   "regions": [
-#                      {
-#                         "prefetch": true,
-#                         "mem_type_64": false,
-#                         "bar": 0,
-#                         "size": 33554432,
-#                         "address": 4026531840,
-#                         "type": "memory"
-#                      },
-#                      {
-#                         "prefetch": false,
-#                         "mem_type_64": false,
-#                         "bar": 1,
-#                         "size": 4096,
-#                         "address": 4060086272,
-#                         "type": "memory"
-#                      },
-#                      {
-#                         "prefetch": false,
-#                         "mem_type_64": false,
-#                         "bar": 6,
-#                         "size": 65536,
-#                         "address": -1,
-#                         "type": "memory"
-#                      }
-#                   ]
-#                },
-#                {
-#                   "bus": 0,
-#                   "qdev_id": "",
-#                   "irq": 11,
-#                   "slot": 4,
-#                   "class_info": {
-#                      "class": 1280,
-#                      "desc": "RAM controller"
-#                   },
-#                   "id": {
-#                      "device": 6900,
-#                      "vendor": 4098
-#                   },
-#                   "function": 0,
-#                   "regions": [
-#                      {
-#                         "bar": 0,
-#                         "size": 32,
-#                         "address": 49280,
-#                         "type": "io"
-#                      }
-#                   ]
-#                }
-#             ]
-#          }
-#       ]
-#    }
-#
-# Note: This example has been shortened as the real response is too long.
-#
-##
-{ 'command': 'query-pci', 'returns': ['PciInfo'] }
-
 ##
 # @stop:
 #
diff --git a/hw/pci/pci-stub.c b/hw/pci/pci-stub.c
index cc2a2e1f73..b50c7ca590 100644
--- a/hw/pci/pci-stub.c
+++ b/hw/pci/pci-stub.c
@@ -22,7 +22,7 @@
 #include "sysemu/sysemu.h"
 #include "monitor/monitor.h"
 #include "qapi/error.h"
-#include "qapi/qapi-commands-misc.h"
+#include "qapi/qapi-commands-machine.h"
 #include "qapi/qmp/qerror.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/msi.h"
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index e1ed6677e1..5ebc783d57 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -46,7 +46,7 @@
 #include "hw/hotplug.h"
 #include "hw/boards.h"
 #include "qapi/error.h"
-#include "qapi/qapi-commands-misc.h"
+#include "qapi/qapi-commands-machine.h"
 #include "qemu/cutils.h"
 
 //#define DEBUG_PCI
-- 
2.21.1



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

* [PATCH v2 8/8] qapi/misc: Restrict device memory commands to machine code
  2020-03-16  0:03 [PATCH v2 0/8] user-mode: Prune build dependencies (part 2) Philippe Mathieu-Daudé
                   ` (6 preceding siblings ...)
  2020-03-16  0:03 ` [PATCH v2 7/8] qapi/misc: Restrict PCI " Philippe Mathieu-Daudé
@ 2020-03-16  0:03 ` Philippe Mathieu-Daudé
  2020-03-16 12:49   ` Igor Mammedov
  7 siblings, 1 reply; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-16  0:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin, Ronnie Sahlberg,
	Philippe Mathieu-Daudé,
	Peter Lieven, Dr. David Alan Gilbert, Max Reitz, Paolo Bonzini,
	Igor Mammedov, qemu-block, Markus Armbruster, Richard Henderson

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 qapi/machine.json               | 131 +++++++++++++++++++++++++++++++
 qapi/misc.json                  | 132 --------------------------------
 include/hw/mem/memory-device.h  |   1 +
 include/hw/virtio/virtio-pmem.h |   2 +-
 4 files changed, 133 insertions(+), 133 deletions(-)

diff --git a/qapi/machine.json b/qapi/machine.json
index 33b259dbd0..17ccebda14 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -1476,3 +1476,134 @@
 #
 ##
 { 'command': 'query-pci', 'returns': ['PciInfo'] }
+
+##
+# @MemoryInfo:
+#
+# Actual memory information in bytes.
+#
+# @base-memory: size of "base" memory specified with command line
+#               option -m.
+#
+# @plugged-memory: size of memory that can be hot-unplugged. This field
+#                  is omitted if target doesn't support memory hotplug
+#                  (i.e. CONFIG_MEM_DEVICE not defined at build time).
+#
+# Since: 2.11.0
+##
+{ 'struct': 'MemoryInfo',
+  'data'  : { 'base-memory': 'size', '*plugged-memory': 'size' } }
+
+##
+# @query-memory-size-summary:
+#
+# Return the amount of initially allocated and present hotpluggable (if
+# enabled) memory in bytes.
+#
+# Example:
+#
+# -> { "execute": "query-memory-size-summary" }
+# <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
+#
+# Since: 2.11.0
+##
+{ 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
+
+##
+# @PCDIMMDeviceInfo:
+#
+# PCDIMMDevice state information
+#
+# @id: device's ID
+#
+# @addr: physical address, where device is mapped
+#
+# @size: size of memory that the device provides
+#
+# @slot: slot number at which device is plugged in
+#
+# @node: NUMA node number where device is plugged in
+#
+# @memdev: memory backend linked with device
+#
+# @hotplugged: true if device was hotplugged
+#
+# @hotpluggable: true if device if could be added/removed while machine is running
+#
+# Since: 2.1
+##
+{ 'struct': 'PCDIMMDeviceInfo',
+  'data': { '*id': 'str',
+            'addr': 'int',
+            'size': 'int',
+            'slot': 'int',
+            'node': 'int',
+            'memdev': 'str',
+            'hotplugged': 'bool',
+            'hotpluggable': 'bool'
+          }
+}
+
+##
+# @VirtioPMEMDeviceInfo:
+#
+# VirtioPMEM state information
+#
+# @id: device's ID
+#
+# @memaddr: physical address in memory, where device is mapped
+#
+# @size: size of memory that the device provides
+#
+# @memdev: memory backend linked with device
+#
+# Since: 4.1
+##
+{ 'struct': 'VirtioPMEMDeviceInfo',
+  'data': { '*id': 'str',
+            'memaddr': 'size',
+            'size': 'size',
+            'memdev': 'str'
+          }
+}
+
+##
+# @MemoryDeviceInfo:
+#
+# Union containing information about a memory device
+#
+# nvdimm is included since 2.12. virtio-pmem is included since 4.1.
+#
+# Since: 2.1
+##
+{ 'union': 'MemoryDeviceInfo',
+  'data': { 'dimm': 'PCDIMMDeviceInfo',
+            'nvdimm': 'PCDIMMDeviceInfo',
+            'virtio-pmem': 'VirtioPMEMDeviceInfo'
+          }
+}
+
+##
+# @query-memory-devices:
+#
+# Lists available memory devices and their state
+#
+# Since: 2.1
+#
+# Example:
+#
+# -> { "execute": "query-memory-devices" }
+# <- { "return": [ { "data":
+#                       { "addr": 5368709120,
+#                         "hotpluggable": true,
+#                         "hotplugged": true,
+#                         "id": "d1",
+#                         "memdev": "/objects/memX",
+#                         "node": 0,
+#                         "size": 1073741824,
+#                         "slot": 0},
+#                    "type": "dimm"
+#                  } ] }
+#
+##
+{ 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
diff --git a/qapi/misc.json b/qapi/misc.json
index 92b3926c6b..670b902999 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -518,39 +518,6 @@
 ##
 { 'command': 'closefd', 'data': {'fdname': 'str'} }
 
-##
-# @MemoryInfo:
-#
-# Actual memory information in bytes.
-#
-# @base-memory: size of "base" memory specified with command line
-#               option -m.
-#
-# @plugged-memory: size of memory that can be hot-unplugged. This field
-#                  is omitted if target doesn't support memory hotplug
-#                  (i.e. CONFIG_MEM_DEVICE not defined at build time).
-#
-# Since: 2.11.0
-##
-{ 'struct': 'MemoryInfo',
-  'data'  : { 'base-memory': 'size', '*plugged-memory': 'size' } }
-
-##
-# @query-memory-size-summary:
-#
-# Return the amount of initially allocated and present hotpluggable (if
-# enabled) memory in bytes.
-#
-# Example:
-#
-# -> { "execute": "query-memory-size-summary" }
-# <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
-#
-# Since: 2.11.0
-##
-{ 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
-
-
 ##
 # @AddfdInfo:
 #
@@ -788,105 +755,6 @@
  'returns': ['CommandLineOptionInfo'],
  'allow-preconfig': true }
 
-##
-# @PCDIMMDeviceInfo:
-#
-# PCDIMMDevice state information
-#
-# @id: device's ID
-#
-# @addr: physical address, where device is mapped
-#
-# @size: size of memory that the device provides
-#
-# @slot: slot number at which device is plugged in
-#
-# @node: NUMA node number where device is plugged in
-#
-# @memdev: memory backend linked with device
-#
-# @hotplugged: true if device was hotplugged
-#
-# @hotpluggable: true if device if could be added/removed while machine is running
-#
-# Since: 2.1
-##
-{ 'struct': 'PCDIMMDeviceInfo',
-  'data': { '*id': 'str',
-            'addr': 'int',
-            'size': 'int',
-            'slot': 'int',
-            'node': 'int',
-            'memdev': 'str',
-            'hotplugged': 'bool',
-            'hotpluggable': 'bool'
-          }
-}
-
-##
-# @VirtioPMEMDeviceInfo:
-#
-# VirtioPMEM state information
-#
-# @id: device's ID
-#
-# @memaddr: physical address in memory, where device is mapped
-#
-# @size: size of memory that the device provides
-#
-# @memdev: memory backend linked with device
-#
-# Since: 4.1
-##
-{ 'struct': 'VirtioPMEMDeviceInfo',
-  'data': { '*id': 'str',
-            'memaddr': 'size',
-            'size': 'size',
-            'memdev': 'str'
-          }
-}
-
-##
-# @MemoryDeviceInfo:
-#
-# Union containing information about a memory device
-#
-# nvdimm is included since 2.12. virtio-pmem is included since 4.1.
-#
-# Since: 2.1
-##
-{ 'union': 'MemoryDeviceInfo',
-  'data': { 'dimm': 'PCDIMMDeviceInfo',
-            'nvdimm': 'PCDIMMDeviceInfo',
-            'virtio-pmem': 'VirtioPMEMDeviceInfo'
-          }
-}
-
-##
-# @query-memory-devices:
-#
-# Lists available memory devices and their state
-#
-# Since: 2.1
-#
-# Example:
-#
-# -> { "execute": "query-memory-devices" }
-# <- { "return": [ { "data":
-#                       { "addr": 5368709120,
-#                         "hotpluggable": true,
-#                         "hotplugged": true,
-#                         "id": "d1",
-#                         "memdev": "/objects/memX",
-#                         "node": 0,
-#                         "size": 1073741824,
-#                         "slot": 0},
-#                    "type": "dimm"
-#                  } ] }
-#
-##
-{ 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
-
 ##
 # @ReplayMode:
 #
diff --git a/include/hw/mem/memory-device.h b/include/hw/mem/memory-device.h
index 04476acb8f..76f3de0f7e 100644
--- a/include/hw/mem/memory-device.h
+++ b/include/hw/mem/memory-device.h
@@ -14,6 +14,7 @@
 #define MEMORY_DEVICE_H
 
 #include "hw/qdev-core.h"
+#include "qapi/qapi-types-machine.h"
 #include "qapi/qapi-types-misc.h"
 #include "qom/object.h"
 
diff --git a/include/hw/virtio/virtio-pmem.h b/include/hw/virtio/virtio-pmem.h
index 33f1999320..72863412b2 100644
--- a/include/hw/virtio/virtio-pmem.h
+++ b/include/hw/virtio/virtio-pmem.h
@@ -15,7 +15,7 @@
 #define HW_VIRTIO_PMEM_H
 
 #include "hw/virtio/virtio.h"
-#include "qapi/qapi-types-misc.h"
+#include "qapi/qapi-types-machine.h"
 
 #define TYPE_VIRTIO_PMEM "virtio-pmem"
 
-- 
2.21.1



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

* Re: [PATCH v2 1/8] target/i386: Restrict X86CPUFeatureWord to X86 targets
  2020-03-16  0:03 ` [PATCH v2 1/8] target/i386: Restrict X86CPUFeatureWord to X86 targets Philippe Mathieu-Daudé
@ 2020-03-16  0:29   ` Aleksandar Markovic
  2020-03-16  0:31     ` Aleksandar Markovic
  2020-03-16  7:30     ` Philippe Mathieu-Daudé
  2020-03-18  8:25   ` Philippe Mathieu-Daudé
  1 sibling, 2 replies; 26+ messages in thread
From: Aleksandar Markovic @ 2020-03-16  0:29 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Kevin Wolf, qemu-block, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin,
	Richard Henderson, Peter Lieven, qemu-devel,
	Dr. David Alan Gilbert, Ronnie Sahlberg, Igor Mammedov,
	Paolo Bonzini, Max Reitz, Markus Armbruster, Richard Henderson

[-- Attachment #1: Type: text/plain, Size: 5952 bytes --]

On Monday, March 16, 2020, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:

> Move out x86-specific structures from generic machine code.
>
>
Philippe,

I a kind of have hard time understanding what is achieved with this patch.
Is this pure code moving/reorganization? What is the logical connection
between this patch and the whole series (that is about removing unneeded
building for user mode)? How does this patch affect build time for user
mode?

Sincerely,
Aleksandar




> Acked-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  qapi/machine-target.json   | 45 ++++++++++++++++++++++++++++++++++++++
>  qapi/machine.json          | 42 -----------------------------------
>  target/i386/cpu.c          |  2 +-
>  target/i386/machine-stub.c | 22 +++++++++++++++++++
>  target/i386/Makefile.objs  |  3 ++-
>  5 files changed, 70 insertions(+), 44 deletions(-)
>  create mode 100644 target/i386/machine-stub.c
>
> diff --git a/qapi/machine-target.json b/qapi/machine-target.json
> index f2c82949d8..fb7a4b7850 100644
> --- a/qapi/machine-target.json
> +++ b/qapi/machine-target.json
> @@ -3,6 +3,51 @@
>  # This work is licensed under the terms of the GNU GPL, version 2 or
> later.
>  # See the COPYING file in the top-level directory.
>
> +##
> +# @X86CPURegister32:
> +#
> +# A X86 32-bit register
> +#
> +# Since: 1.5
> +##
> +{ 'enum': 'X86CPURegister32',
> +  'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ],
> +  'if': 'defined(TARGET_I386)' }
> +
> +##
> +# @X86CPUFeatureWordInfo:
> +#
> +# Information about a X86 CPU feature word
> +#
> +# @cpuid-input-eax: Input EAX value for CPUID instruction for that
> feature word
> +#
> +# @cpuid-input-ecx: Input ECX value for CPUID instruction for that
> +#                   feature word
> +#
> +# @cpuid-register: Output register containing the feature bits
> +#
> +# @features: value of output register, containing the feature bits
> +#
> +# Since: 1.5
> +##
> +{ 'struct': 'X86CPUFeatureWordInfo',
> +  'data': { 'cpuid-input-eax': 'int',
> +            '*cpuid-input-ecx': 'int',
> +            'cpuid-register': 'X86CPURegister32',
> +            'features': 'int' },
> +  'if': 'defined(TARGET_I386)' }
> +
> +##
> +# @DummyForceArrays:
> +#
> +# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
> +#
> +# Since: 2.5
> +##
> +{ 'struct': 'DummyForceArrays',
> +  'data': { 'unused': ['X86CPUFeatureWordInfo'] },
> +  'if': 'defined(TARGET_I386)' }
> +
>  ##
>  # @CpuModelInfo:
>  #
> diff --git a/qapi/machine.json b/qapi/machine.json
> index 6c11e3cf3a..de05730704 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -505,48 +505,6 @@
>     'dst': 'uint16',
>     'val': 'uint8' }}
>
> -##
> -# @X86CPURegister32:
> -#
> -# A X86 32-bit register
> -#
> -# Since: 1.5
> -##
> -{ 'enum': 'X86CPURegister32',
> -  'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
> -
> -##
> -# @X86CPUFeatureWordInfo:
> -#
> -# Information about a X86 CPU feature word
> -#
> -# @cpuid-input-eax: Input EAX value for CPUID instruction for that
> feature word
> -#
> -# @cpuid-input-ecx: Input ECX value for CPUID instruction for that
> -#                   feature word
> -#
> -# @cpuid-register: Output register containing the feature bits
> -#
> -# @features: value of output register, containing the feature bits
> -#
> -# Since: 1.5
> -##
> -{ 'struct': 'X86CPUFeatureWordInfo',
> -  'data': { 'cpuid-input-eax': 'int',
> -            '*cpuid-input-ecx': 'int',
> -            'cpuid-register': 'X86CPURegister32',
> -            'features': 'int' } }
> -
> -##
> -# @DummyForceArrays:
> -#
> -# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
> -#
> -# Since: 2.5
> -##
> -{ 'struct': 'DummyForceArrays',
> -  'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
> -
>  ##
>  # @NumaCpuOptions:
>  #
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index a84553e50c..0753fe4935 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -37,7 +37,7 @@
>  #include "qemu/option.h"
>  #include "qemu/config-file.h"
>  #include "qapi/error.h"
> -#include "qapi/qapi-visit-machine.h"
> +#include "qapi/qapi-visit-machine-target.h"
>  #include "qapi/qapi-visit-run-state.h"
>  #include "qapi/qmp/qdict.h"
>  #include "qapi/qmp/qerror.h"
> diff --git a/target/i386/machine-stub.c b/target/i386/machine-stub.c
> new file mode 100644
> index 0000000000..cb301af057
> --- /dev/null
> +++ b/target/i386/machine-stub.c
> @@ -0,0 +1,22 @@
> +/*
> + * QAPI x86 CPU features stub
> + *
> + * Copyright (c) 2020 Red Hat, Inc.
> + *
> + * Author:
> + *   Philippe Mathieu-Daudé <philmd@redhat.com>
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2 or
> later.
> + * See the COPYING file in the top-level directory.
> + * SPDX-License-Identifier: GPL-2.0-or-later
> + */
> +
> +#include "qemu/osdep.h"
> +#include "qapi/error.h"
> +#include "qapi/qapi-visit-machine-target.h"
> +
> +void visit_type_X86CPUFeatureWordInfoList(Visitor *v, const char *name,
> +                                      X86CPUFeatureWordInfoList **obj,
> +                                      Error **errp)
> +{
> +}
> diff --git a/target/i386/Makefile.objs b/target/i386/Makefile.objs
> index 48e0c28434..1cdfc9f50c 100644
> --- a/target/i386/Makefile.objs
> +++ b/target/i386/Makefile.objs
> @@ -17,6 +17,7 @@ obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-posix.o
>  endif
>  obj-$(CONFIG_HVF) += hvf/
>  obj-$(CONFIG_WHPX) += whpx-all.o
> -endif
> +endif # CONFIG_SOFTMMU
>  obj-$(CONFIG_SEV) += sev.o
>  obj-$(call lnot,$(CONFIG_SEV)) += sev-stub.o
> +obj-$(call lnot,$(CONFIG_SOFTMMU)) += machine-stub.o
> --
> 2.21.1
>
>
>

[-- Attachment #2: Type: text/html, Size: 7642 bytes --]

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

* Re: [PATCH v2 1/8] target/i386: Restrict X86CPUFeatureWord to X86 targets
  2020-03-16  0:29   ` Aleksandar Markovic
@ 2020-03-16  0:31     ` Aleksandar Markovic
  2020-03-16  7:30     ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 26+ messages in thread
From: Aleksandar Markovic @ 2020-03-16  0:31 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Kevin Wolf, qemu-block, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin,
	Richard Henderson, Peter Lieven, qemu-devel,
	Dr. David Alan Gilbert, Ronnie Sahlberg, Igor Mammedov,
	Paolo Bonzini, Max Reitz, Markus Armbruster, Richard Henderson

[-- Attachment #1: Type: text/plain, Size: 6345 bytes --]

On Monday, March 16, 2020, Aleksandar Markovic <aleksandar.m.mail@gmail.com>
wrote:

>
>
> On Monday, March 16, 2020, Philippe Mathieu-Daudé <philmd@redhat.com>
> wrote:
>
>> Move out x86-specific structures from generic machine code.
>>
>>
> Philippe,
>
> I a kind of have hard time understanding what is achieved with this patch.
> Is this pure code moving/reorganization? What is the logical connection
> between this patch and the whole series (that is about removing unneeded
> building for user mode)? How does this patch affect build time for user
> mode?
>
> Sincerely,
> Aleksandar
>
>
Ugh, I think I mixed up your two series. You write too much code. :) ;)


>
>
>> Acked-by: Richard Henderson <richard.henderson@linaro.org>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>  qapi/machine-target.json   | 45 ++++++++++++++++++++++++++++++++++++++
>>  qapi/machine.json          | 42 -----------------------------------
>>  target/i386/cpu.c          |  2 +-
>>  target/i386/machine-stub.c | 22 +++++++++++++++++++
>>  target/i386/Makefile.objs  |  3 ++-
>>  5 files changed, 70 insertions(+), 44 deletions(-)
>>  create mode 100644 target/i386/machine-stub.c
>>
>> diff --git a/qapi/machine-target.json b/qapi/machine-target.json
>> index f2c82949d8..fb7a4b7850 100644
>> --- a/qapi/machine-target.json
>> +++ b/qapi/machine-target.json
>> @@ -3,6 +3,51 @@
>>  # This work is licensed under the terms of the GNU GPL, version 2 or
>> later.
>>  # See the COPYING file in the top-level directory.
>>
>> +##
>> +# @X86CPURegister32:
>> +#
>> +# A X86 32-bit register
>> +#
>> +# Since: 1.5
>> +##
>> +{ 'enum': 'X86CPURegister32',
>> +  'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ],
>> +  'if': 'defined(TARGET_I386)' }
>> +
>> +##
>> +# @X86CPUFeatureWordInfo:
>> +#
>> +# Information about a X86 CPU feature word
>> +#
>> +# @cpuid-input-eax: Input EAX value for CPUID instruction for that
>> feature word
>> +#
>> +# @cpuid-input-ecx: Input ECX value for CPUID instruction for that
>> +#                   feature word
>> +#
>> +# @cpuid-register: Output register containing the feature bits
>> +#
>> +# @features: value of output register, containing the feature bits
>> +#
>> +# Since: 1.5
>> +##
>> +{ 'struct': 'X86CPUFeatureWordInfo',
>> +  'data': { 'cpuid-input-eax': 'int',
>> +            '*cpuid-input-ecx': 'int',
>> +            'cpuid-register': 'X86CPURegister32',
>> +            'features': 'int' },
>> +  'if': 'defined(TARGET_I386)' }
>> +
>> +##
>> +# @DummyForceArrays:
>> +#
>> +# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList
>> internally
>> +#
>> +# Since: 2.5
>> +##
>> +{ 'struct': 'DummyForceArrays',
>> +  'data': { 'unused': ['X86CPUFeatureWordInfo'] },
>> +  'if': 'defined(TARGET_I386)' }
>> +
>>  ##
>>  # @CpuModelInfo:
>>  #
>> diff --git a/qapi/machine.json b/qapi/machine.json
>> index 6c11e3cf3a..de05730704 100644
>> --- a/qapi/machine.json
>> +++ b/qapi/machine.json
>> @@ -505,48 +505,6 @@
>>     'dst': 'uint16',
>>     'val': 'uint8' }}
>>
>> -##
>> -# @X86CPURegister32:
>> -#
>> -# A X86 32-bit register
>> -#
>> -# Since: 1.5
>> -##
>> -{ 'enum': 'X86CPURegister32',
>> -  'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
>> -
>> -##
>> -# @X86CPUFeatureWordInfo:
>> -#
>> -# Information about a X86 CPU feature word
>> -#
>> -# @cpuid-input-eax: Input EAX value for CPUID instruction for that
>> feature word
>> -#
>> -# @cpuid-input-ecx: Input ECX value for CPUID instruction for that
>> -#                   feature word
>> -#
>> -# @cpuid-register: Output register containing the feature bits
>> -#
>> -# @features: value of output register, containing the feature bits
>> -#
>> -# Since: 1.5
>> -##
>> -{ 'struct': 'X86CPUFeatureWordInfo',
>> -  'data': { 'cpuid-input-eax': 'int',
>> -            '*cpuid-input-ecx': 'int',
>> -            'cpuid-register': 'X86CPURegister32',
>> -            'features': 'int' } }
>> -
>> -##
>> -# @DummyForceArrays:
>> -#
>> -# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList
>> internally
>> -#
>> -# Since: 2.5
>> -##
>> -{ 'struct': 'DummyForceArrays',
>> -  'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
>> -
>>  ##
>>  # @NumaCpuOptions:
>>  #
>> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
>> index a84553e50c..0753fe4935 100644
>> --- a/target/i386/cpu.c
>> +++ b/target/i386/cpu.c
>> @@ -37,7 +37,7 @@
>>  #include "qemu/option.h"
>>  #include "qemu/config-file.h"
>>  #include "qapi/error.h"
>> -#include "qapi/qapi-visit-machine.h"
>> +#include "qapi/qapi-visit-machine-target.h"
>>  #include "qapi/qapi-visit-run-state.h"
>>  #include "qapi/qmp/qdict.h"
>>  #include "qapi/qmp/qerror.h"
>> diff --git a/target/i386/machine-stub.c b/target/i386/machine-stub.c
>> new file mode 100644
>> index 0000000000..cb301af057
>> --- /dev/null
>> +++ b/target/i386/machine-stub.c
>> @@ -0,0 +1,22 @@
>> +/*
>> + * QAPI x86 CPU features stub
>> + *
>> + * Copyright (c) 2020 Red Hat, Inc.
>> + *
>> + * Author:
>> + *   Philippe Mathieu-Daudé <philmd@redhat.com>
>> + *
>> + * This work is licensed under the terms of the GNU GPL, version 2 or
>> later.
>> + * See the COPYING file in the top-level directory.
>> + * SPDX-License-Identifier: GPL-2.0-or-later
>> + */
>> +
>> +#include "qemu/osdep.h"
>> +#include "qapi/error.h"
>> +#include "qapi/qapi-visit-machine-target.h"
>> +
>> +void visit_type_X86CPUFeatureWordInfoList(Visitor *v, const char *name,
>> +                                      X86CPUFeatureWordInfoList **obj,
>> +                                      Error **errp)
>> +{
>> +}
>> diff --git a/target/i386/Makefile.objs b/target/i386/Makefile.objs
>> index 48e0c28434..1cdfc9f50c 100644
>> --- a/target/i386/Makefile.objs
>> +++ b/target/i386/Makefile.objs
>> @@ -17,6 +17,7 @@ obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-posix.o
>>  endif
>>  obj-$(CONFIG_HVF) += hvf/
>>  obj-$(CONFIG_WHPX) += whpx-all.o
>> -endif
>> +endif # CONFIG_SOFTMMU
>>  obj-$(CONFIG_SEV) += sev.o
>>  obj-$(call lnot,$(CONFIG_SEV)) += sev-stub.o
>> +obj-$(call lnot,$(CONFIG_SOFTMMU)) += machine-stub.o
>> --
>> 2.21.1
>>
>>
>>

[-- Attachment #2: Type: text/html, Size: 8195 bytes --]

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

* Re: [PATCH v2 1/8] target/i386: Restrict X86CPUFeatureWord to X86 targets
  2020-03-16  0:29   ` Aleksandar Markovic
  2020-03-16  0:31     ` Aleksandar Markovic
@ 2020-03-16  7:30     ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-16  7:30 UTC (permalink / raw)
  To: Aleksandar Markovic
  Cc: Kevin Wolf, qemu-block, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin,
	Richard Henderson, Peter Lieven, qemu-devel,
	Dr. David Alan Gilbert, Ronnie Sahlberg, Igor Mammedov,
	Paolo Bonzini, Max Reitz, Markus Armbruster, Richard Henderson

On 3/16/20 1:29 AM, Aleksandar Markovic wrote:
> 
> 
> On Monday, March 16, 2020, Philippe Mathieu-Daudé <philmd@redhat.com 
> <mailto:philmd@redhat.com>> wrote:
> 
>     Move out x86-specific structures from generic machine code.
> 
> 
> Philippe,
> 
> I a kind of have hard time understanding what is achieved with this 
> patch. Is this pure code moving/reorganization? What is the logical 
> connection between this patch and the whole series (that is about 
> removing unneeded building for user mode)? How does this patch affect 
> build time for user mode?

This code ends up in all linux-user binaries:

$ make clean mipsel-linux-user/all
$ fgrep -r X86CPURegister32
Binary file qapi/qapi-visit-machine.o matches
qapi/qapi-visit-machine.h:void visit_type_X86CPURegister32(Visitor *v, 
const char *name, X86CPURegister32 *obj, Error **errp);
qapi/qapi-types-machine.c:const QEnumLookup X86CPURegister32_lookup = {
qapi/qapi-types-machine.h:typedef enum X86CPURegister32 {
qapi/qapi-types-machine.h:} X86CPURegister32;
qapi/qapi-types-machine.h:#define X86CPURegister32_str(val) \
qapi/qapi-types-machine.h:    qapi_enum_lookup(&X86CPURegister32_lookup, 
(val))
qapi/qapi-types-machine.h:extern const QEnumLookup X86CPURegister32_lookup;
qapi/qapi-types-machine.h:    X86CPURegister32 cpuid_register;
Binary file qapi/qapi-events-machine.o matches
Binary file qapi/qapi-types-machine.o matches
qapi/qapi-doc.texi:@deftp {Enum} X86CPURegister32
qapi/qapi-doc.texi:@item @code{cpuid-register: X86CPURegister32}
qapi/qapi-visit-machine.c:void visit_type_X86CPURegister32(Visitor *v, 
const char *name, X86CPURegister32 *obj, Error **errp)
qapi/qapi-visit-machine.c:    visit_type_enum(v, name, &value, 
&X86CPURegister32_lookup, errp);
qapi/qapi-visit-machine.c:    visit_type_X86CPURegister32(v, 
"cpuid-register", &obj->cpuid_register, &err);
Binary file hw/core/qdev.o matches
Binary file hw/core/cpu.o matches
Binary file libqemuutil.a matches
Binary file mipsel-linux-user/qemu-mipsel matches
             \-----------------------------------/

By restricting this structure on the x86 architecture, this is less time 
compiling unused code on others archs, and resulting binary is smaller too.

> 
> Sincerely,
> Aleksandar
> 
> 
>     Acked-by: Richard Henderson <richard.henderson@linaro.org
>     <mailto:richard.henderson@linaro.org>>
>     Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com
>     <mailto:philmd@redhat.com>>
>     ---
>       qapi/machine-target.json   | 45 ++++++++++++++++++++++++++++++++++++++
>       qapi/machine.json          | 42 -----------------------------------
>       target/i386/cpu.c          |  2 +-
>       target/i386/machine-stub.c | 22 +++++++++++++++++++
>       target/i386/Makefile.objs  |  3 ++-
>       5 files changed, 70 insertions(+), 44 deletions(-)
>       create mode 100644 target/i386/machine-stub.c
> 
>     diff --git a/qapi/machine-target.json b/qapi/machine-target.json
>     index f2c82949d8..fb7a4b7850 100644
>     --- a/qapi/machine-target.json
>     +++ b/qapi/machine-target.json
>     @@ -3,6 +3,51 @@
>       # This work is licensed under the terms of the GNU GPL, version 2
>     or later.
>       # See the COPYING file in the top-level directory.
> 
>     +##
>     +# @X86CPURegister32:
>     +#
>     +# A X86 32-bit register
>     +#
>     +# Since: 1.5
>     +##
>     +{ 'enum': 'X86CPURegister32',
>     +  'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ],
>     +  'if': 'defined(TARGET_I386)' }
>     +
>     +##
>     +# @X86CPUFeatureWordInfo:
>     +#
>     +# Information about a X86 CPU feature word
>     +#
>     +# @cpuid-input-eax: Input EAX value for CPUID instruction for that
>     feature word
>     +#
>     +# @cpuid-input-ecx: Input ECX value for CPUID instruction for that
>     +#                   feature word
>     +#
>     +# @cpuid-register: Output register containing the feature bits
>     +#
>     +# @features: value of output register, containing the feature bits
>     +#
>     +# Since: 1.5
>     +##
>     +{ 'struct': 'X86CPUFeatureWordInfo',
>     +  'data': { 'cpuid-input-eax': 'int',
>     +            '*cpuid-input-ecx': 'int',
>     +            'cpuid-register': 'X86CPURegister32',
>     +            'features': 'int' },
>     +  'if': 'defined(TARGET_I386)' }
>     +
>     +##
>     +# @DummyForceArrays:
>     +#
>     +# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList
>     internally
>     +#
>     +# Since: 2.5
>     +##
>     +{ 'struct': 'DummyForceArrays',
>     +  'data': { 'unused': ['X86CPUFeatureWordInfo'] },
>     +  'if': 'defined(TARGET_I386)' }
>     +
>       ##
>       # @CpuModelInfo:
>       #
>     diff --git a/qapi/machine.json b/qapi/machine.json
>     index 6c11e3cf3a..de05730704 100644
>     --- a/qapi/machine.json
>     +++ b/qapi/machine.json
>     @@ -505,48 +505,6 @@
>          'dst': 'uint16',
>          'val': 'uint8' }}
> 
>     -##
>     -# @X86CPURegister32:
>     -#
>     -# A X86 32-bit register
>     -#
>     -# Since: 1.5
>     -##
>     -{ 'enum': 'X86CPURegister32',
>     -  'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
>     -
>     -##
>     -# @X86CPUFeatureWordInfo:
>     -#
>     -# Information about a X86 CPU feature word
>     -#
>     -# @cpuid-input-eax: Input EAX value for CPUID instruction for that
>     feature word
>     -#
>     -# @cpuid-input-ecx: Input ECX value for CPUID instruction for that
>     -#                   feature word
>     -#
>     -# @cpuid-register: Output register containing the feature bits
>     -#
>     -# @features: value of output register, containing the feature bits
>     -#
>     -# Since: 1.5
>     -##
>     -{ 'struct': 'X86CPUFeatureWordInfo',
>     -  'data': { 'cpuid-input-eax': 'int',
>     -            '*cpuid-input-ecx': 'int',
>     -            'cpuid-register': 'X86CPURegister32',
>     -            'features': 'int' } }
>     -
>     -##
>     -# @DummyForceArrays:
>     -#
>     -# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList
>     internally
>     -#
>     -# Since: 2.5
>     -##
>     -{ 'struct': 'DummyForceArrays',
>     -  'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
>     -
>       ##
>       # @NumaCpuOptions:
>       #
>     diff --git a/target/i386/cpu.c b/target/i386/cpu.c
>     index a84553e50c..0753fe4935 100644
>     --- a/target/i386/cpu.c
>     +++ b/target/i386/cpu.c
>     @@ -37,7 +37,7 @@
>       #include "qemu/option.h"
>       #include "qemu/config-file.h"
>       #include "qapi/error.h"
>     -#include "qapi/qapi-visit-machine.h"
>     +#include "qapi/qapi-visit-machine-target.h"
>       #include "qapi/qapi-visit-run-state.h"
>       #include "qapi/qmp/qdict.h"
>       #include "qapi/qmp/qerror.h"
>     diff --git a/target/i386/machine-stub.c b/target/i386/machine-stub.c
>     new file mode 100644
>     index 0000000000..cb301af057
>     --- /dev/null
>     +++ b/target/i386/machine-stub.c
>     @@ -0,0 +1,22 @@
>     +/*
>     + * QAPI x86 CPU features stub
>     + *
>     + * Copyright (c) 2020 Red Hat, Inc.
>     + *
>     + * Author:
>     + *   Philippe Mathieu-Daudé <philmd@redhat.com
>     <mailto:philmd@redhat.com>>
>     + *
>     + * This work is licensed under the terms of the GNU GPL, version 2
>     or later.
>     + * See the COPYING file in the top-level directory.
>     + * SPDX-License-Identifier: GPL-2.0-or-later
>     + */
>     +
>     +#include "qemu/osdep.h"
>     +#include "qapi/error.h"
>     +#include "qapi/qapi-visit-machine-target.h"
>     +
>     +void visit_type_X86CPUFeatureWordInfoList(Visitor *v, const char *name,
>     +                                      X86CPUFeatureWordInfoList **obj,
>     +                                      Error **errp)
>     +{
>     +}
>     diff --git a/target/i386/Makefile.objs b/target/i386/Makefile.objs
>     index 48e0c28434..1cdfc9f50c 100644
>     --- a/target/i386/Makefile.objs
>     +++ b/target/i386/Makefile.objs
>     @@ -17,6 +17,7 @@ obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-posix.o
>       endif
>       obj-$(CONFIG_HVF) += hvf/
>       obj-$(CONFIG_WHPX) += whpx-all.o
>     -endif
>     +endif # CONFIG_SOFTMMU
>       obj-$(CONFIG_SEV) += sev.o
>       obj-$(call lnot,$(CONFIG_SEV)) += sev-stub.o
>     +obj-$(call lnot,$(CONFIG_SOFTMMU)) += machine-stub.o
>     -- 
>     2.21.1
> 
> 



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

* Re: [PATCH v2 3/8] qapi/misc: Restrict balloon-related commands to machine code
  2020-03-16  0:03 ` [PATCH v2 3/8] qapi/misc: Restrict balloon-related commands " Philippe Mathieu-Daudé
@ 2020-03-16  9:05   ` David Hildenbrand
  2020-03-17 11:03     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 26+ messages in thread
From: David Hildenbrand @ 2020-03-16  9:05 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Kevin Wolf, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin,
	Markus Armbruster, Peter Lieven, Dr. David Alan Gilbert,
	Max Reitz, Ronnie Sahlberg, Igor Mammedov, Paolo Bonzini,
	qemu-block, Richard Henderson

On 16.03.20 01:03, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  qapi/machine.json          | 83 ++++++++++++++++++++++++++++++++++++++
>  qapi/misc.json             | 83 --------------------------------------
>  include/sysemu/balloon.h   |  2 +-
>  balloon.c                  |  2 +-
>  hw/virtio/virtio-balloon.c |  2 +-
>  monitor/hmp-cmds.c         |  1 +
>  6 files changed, 87 insertions(+), 86 deletions(-)
> 
> diff --git a/qapi/machine.json b/qapi/machine.json
> index 07ffc07ba2..c096efbea3 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -915,3 +915,86 @@
>    'data': 'NumaOptions',
>    'allow-preconfig': true
>  }
> +
> +##
> +# @balloon:
> +#
> +# Request the balloon driver to change its balloon size.
> +#
> +# @value: the target size of the balloon in bytes

Not related to your patch. The description of most of this stuff is wrong.

It's not the target size of the balloon, it's the target logical size of
the VM (logical_vm_size = vm_ram_size - balloon_size)

-> balloon_size = vm_ram_size - @value

E.g., "balloon 1024" with a 3G guest means "please inflate the balloon
to 2048"

> +#
> +# Returns: - Nothing on success
> +#          - If the balloon driver is enabled but not functional because the KVM
> +#            kernel module cannot support it, KvmMissingCap
> +#          - If no balloon device is present, DeviceNotActive
> +#
> +# Notes: This command just issues a request to the guest.  When it returns,
> +#        the balloon size may not have changed.  A guest can change the balloon
> +#        size independent of this command.
> +#
> +# Since: 0.14.0
> +#
> +# Example:
> +#
> +# -> { "execute": "balloon", "arguments": { "value": 536870912 } }
> +# <- { "return": {} }
> +#
> +##
> +{ 'command': 'balloon', 'data': {'value': 'int'} }
> +
> +##
> +# @BalloonInfo:
> +#
> +# Information about the guest balloon device.
> +#
> +# @actual: the number of bytes the balloon currently contains

Dito

@actual is the logical size of the VM (logical_vm_size = vm_ram_size -
balloon_size)

> +#
> +# Since: 0.14.0
> +#
> +##
> +{ 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
> +
> +##
> +# @query-balloon:
> +#
> +# Return information about the balloon device.
> +#
> +# Returns: - @BalloonInfo on success
> +#          - If the balloon driver is enabled but not functional because the KVM
> +#            kernel module cannot support it, KvmMissingCap
> +#          - If no balloon device is present, DeviceNotActive
> +#
> +# Since: 0.14.0
> +#
> +# Example:
> +#
> +# -> { "execute": "query-balloon" }
> +# <- { "return": {
> +#          "actual": 1073741824,
> +#       }
> +#    }
> +#
> +##
> +{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
> +
> +##
> +# @BALLOON_CHANGE:
> +#
> +# Emitted when the guest changes the actual BALLOON level. This value is
> +# equivalent to the @actual field return by the 'query-balloon' command
> +#
> +# @actual: actual level of the guest memory balloon in bytes

Dito

@actual is the logical size of the VM (vm_ram_size - balloon_size)


Most probably we want to pull this description fix out. #badinterface

-- 
Thanks,

David / dhildenb



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

* Re: [PATCH v2 5/8] qapi/misc: Restrict query-vm-generation-id command to machine code
  2020-03-16  0:03 ` [PATCH v2 5/8] qapi/misc: Restrict query-vm-generation-id command to machine code Philippe Mathieu-Daudé
@ 2020-03-16 12:45   ` Igor Mammedov
  2020-03-17  9:44     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 26+ messages in thread
From: Igor Mammedov @ 2020-03-16 12:45 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Kevin Wolf, qemu-block, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin,
	Markus Armbruster, Peter Lieven, qemu-devel,
	Dr. David Alan Gilbert, Ronnie Sahlberg, Paolo Bonzini,
	Max Reitz, Richard Henderson

On Mon, 16 Mar 2020 01:03:45 +0100
Philippe Mathieu-Daudé <philmd@redhat.com> wrote:

> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Acked-by: Igor Mammedov <imammedo@redhat.com>
> ---
>  qapi/machine.json | 20 ++++++++++++++++++++
>  qapi/misc.json    | 21 ---------------------
>  hw/acpi/vmgenid.c |  2 +-
>  stubs/vmgenid.c   |  2 +-
>  4 files changed, 22 insertions(+), 23 deletions(-)
> 
> diff --git a/qapi/machine.json b/qapi/machine.json
> index c096efbea3..1a2a4b0d48 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -415,6 +415,26 @@
>  ##
>  { 'command': 'query-target', 'returns': 'TargetInfo' }
>  
> +##
> +# @GuidInfo:
> +#
> +# GUID information.
> +#
> +# @guid: the globally unique identifier
> +#
> +# Since: 2.9
> +##
> +{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
> +
> +##
> +# @query-vm-generation-id:
> +#
> +# Show Virtual Machine Generation ID
> +#
> +# Since: 2.9
> +##
> +{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
> +
>  ##
>  # @LostTickPolicy:
>  #
> diff --git a/qapi/misc.json b/qapi/misc.json
> index f70025f34c..8c02870227 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -1383,24 +1383,3 @@
>  #
>  ##
>  { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
> -
> -##
> -# @GuidInfo:
> -#
> -# GUID information.
> -#
> -# @guid: the globally unique identifier
> -#
> -# Since: 2.9
> -##
> -{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
> -
> -##
> -# @query-vm-generation-id:
> -#
> -# Show Virtual Machine Generation ID
> -#
> -# Since: 2.9
> -##
> -{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
> -
> diff --git a/hw/acpi/vmgenid.c b/hw/acpi/vmgenid.c
> index 2df7623d74..2b26bacaf8 100644
> --- a/hw/acpi/vmgenid.c
> +++ b/hw/acpi/vmgenid.c
> @@ -12,7 +12,7 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "qapi/qapi-commands-misc.h"
> +#include "qapi/qapi-commands-machine.h"
>  #include "qemu/module.h"
>  #include "hw/acpi/acpi.h"
>  #include "hw/acpi/aml-build.h"
> diff --git a/stubs/vmgenid.c b/stubs/vmgenid.c
> index 568e42b064..bfad656c6c 100644
> --- a/stubs/vmgenid.c
> +++ b/stubs/vmgenid.c
> @@ -1,6 +1,6 @@
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "qapi/qapi-commands-misc.h"
> +#include "qapi/qapi-commands-machine.h"
>  #include "qapi/qmp/qerror.h"
>  
>  GuidInfo *qmp_query_vm_generation_id(Error **errp)



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

* Re: [PATCH v2 6/8] qapi/misc: Restrict ACPI commands to machine code
  2020-03-16  0:03 ` [PATCH v2 6/8] qapi/misc: Restrict ACPI commands " Philippe Mathieu-Daudé
@ 2020-03-16 12:47   ` Igor Mammedov
  0 siblings, 0 replies; 26+ messages in thread
From: Igor Mammedov @ 2020-03-16 12:47 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Kevin Wolf, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin, qemu-devel,
	Ronnie Sahlberg, Peter Lieven, Dr. David Alan Gilbert, Max Reitz,
	Paolo Bonzini, qemu-block, Markus Armbruster, Richard Henderson

On Mon, 16 Mar 2020 01:03:46 +0100
Philippe Mathieu-Daudé <philmd@redhat.com> wrote:

> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Acked-by: Igor Mammedov <imammedo@redhat.com>

> ---
>  qapi/machine.json                    | 154 +++++++++++++++++++++++++++
>  qapi/misc.json                       | 154 ---------------------------
>  include/hw/acpi/acpi_dev_interface.h |   2 +-
>  hw/acpi/core.c                       |   2 +-
>  hw/acpi/cpu.c                        |   2 +-
>  hw/acpi/memory_hotplug.c             |   2 +-
>  6 files changed, 158 insertions(+), 158 deletions(-)
> 
> diff --git a/qapi/machine.json b/qapi/machine.json
> index 1a2a4b0d48..f77ee63730 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -1018,3 +1018,157 @@
>  ##
>  { 'event': 'BALLOON_CHANGE',
>    'data': { 'actual': 'int' } }
> +
> +##
> +# @AcpiTableOptions:
> +#
> +# Specify an ACPI table on the command line to load.
> +#
> +# At most one of @file and @data can be specified. The list of files specified
> +# by any one of them is loaded and concatenated in order. If both are omitted,
> +# @data is implied.
> +#
> +# Other fields / optargs can be used to override fields of the generic ACPI
> +# table header; refer to the ACPI specification 5.0, section 5.2.6 System
> +# Description Table Header. If a header field is not overridden, then the
> +# corresponding value from the concatenated blob is used (in case of @file), or
> +# it is filled in with a hard-coded value (in case of @data).
> +#
> +# String fields are copied into the matching ACPI member from lowest address
> +# upwards, and silently truncated / NUL-padded to length.
> +#
> +# @sig: table signature / identifier (4 bytes)
> +#
> +# @rev: table revision number (dependent on signature, 1 byte)
> +#
> +# @oem_id: OEM identifier (6 bytes)
> +#
> +# @oem_table_id: OEM table identifier (8 bytes)
> +#
> +# @oem_rev: OEM-supplied revision number (4 bytes)
> +#
> +# @asl_compiler_id: identifier of the utility that created the table
> +#                   (4 bytes)
> +#
> +# @asl_compiler_rev: revision number of the utility that created the
> +#                    table (4 bytes)
> +#
> +# @file: colon (:) separated list of pathnames to load and
> +#        concatenate as table data. The resultant binary blob is expected to
> +#        have an ACPI table header. At least one file is required. This field
> +#        excludes @data.
> +#
> +# @data: colon (:) separated list of pathnames to load and
> +#        concatenate as table data. The resultant binary blob must not have an
> +#        ACPI table header. At least one file is required. This field excludes
> +#        @file.
> +#
> +# Since: 1.5
> +##
> +{ 'struct': 'AcpiTableOptions',
> +  'data': {
> +    '*sig':               'str',
> +    '*rev':               'uint8',
> +    '*oem_id':            'str',
> +    '*oem_table_id':      'str',
> +    '*oem_rev':           'uint32',
> +    '*asl_compiler_id':   'str',
> +    '*asl_compiler_rev':  'uint32',
> +    '*file':              'str',
> +    '*data':              'str' }}
> +
> +##
> +# @MEM_UNPLUG_ERROR:
> +#
> +# Emitted when memory hot unplug error occurs.
> +#
> +# @device: device name
> +#
> +# @msg: Informative message
> +#
> +# Since: 2.4
> +#
> +# Example:
> +#
> +# <- { "event": "MEM_UNPLUG_ERROR"
> +#      "data": { "device": "dimm1",
> +#                "msg": "acpi: device unplug for unsupported device"
> +#      },
> +#      "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
> +#
> +##
> +{ 'event': 'MEM_UNPLUG_ERROR',
> +  'data': { 'device': 'str', 'msg': 'str' } }
> +
> +##
> +# @ACPISlotType:
> +#
> +# @DIMM: memory slot
> +# @CPU: logical CPU slot (since 2.7)
> +##
> +{ 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
> +
> +##
> +# @ACPIOSTInfo:
> +#
> +# OSPM Status Indication for a device
> +# For description of possible values of @source and @status fields
> +# see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
> +#
> +# @device: device ID associated with slot
> +#
> +# @slot: slot ID, unique per slot of a given @slot-type
> +#
> +# @slot-type: type of the slot
> +#
> +# @source: an integer containing the source event
> +#
> +# @status: an integer containing the status code
> +#
> +# Since: 2.1
> +##
> +{ 'struct': 'ACPIOSTInfo',
> +  'data'  : { '*device': 'str',
> +              'slot': 'str',
> +              'slot-type': 'ACPISlotType',
> +              'source': 'int',
> +              'status': 'int' } }
> +
> +##
> +# @query-acpi-ospm-status:
> +#
> +# Return a list of ACPIOSTInfo for devices that support status
> +# reporting via ACPI _OST method.
> +#
> +# Since: 2.1
> +#
> +# Example:
> +#
> +# -> { "execute": "query-acpi-ospm-status" }
> +# <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
> +#                  { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
> +#                  { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
> +#                  { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
> +#    ]}
> +#
> +##
> +{ 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
> +
> +##
> +# @ACPI_DEVICE_OST:
> +#
> +# Emitted when guest executes ACPI _OST method.
> +#
> +# @info: OSPM Status Indication
> +#
> +# Since: 2.1
> +#
> +# Example:
> +#
> +# <- { "event": "ACPI_DEVICE_OST",
> +#      "data": { "device": "d1", "slot": "0",
> +#                "slot-type": "DIMM", "source": 1, "status": 0 } }
> +#
> +##
> +{ 'event': 'ACPI_DEVICE_OST',
> +     'data': { 'info': 'ACPIOSTInfo' } }
> diff --git a/qapi/misc.json b/qapi/misc.json
> index 8c02870227..3d9d7327fe 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -999,64 +999,6 @@
>  ##
>  { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
>  
> -##
> -# @AcpiTableOptions:
> -#
> -# Specify an ACPI table on the command line to load.
> -#
> -# At most one of @file and @data can be specified. The list of files specified
> -# by any one of them is loaded and concatenated in order. If both are omitted,
> -# @data is implied.
> -#
> -# Other fields / optargs can be used to override fields of the generic ACPI
> -# table header; refer to the ACPI specification 5.0, section 5.2.6 System
> -# Description Table Header. If a header field is not overridden, then the
> -# corresponding value from the concatenated blob is used (in case of @file), or
> -# it is filled in with a hard-coded value (in case of @data).
> -#
> -# String fields are copied into the matching ACPI member from lowest address
> -# upwards, and silently truncated / NUL-padded to length.
> -#
> -# @sig: table signature / identifier (4 bytes)
> -#
> -# @rev: table revision number (dependent on signature, 1 byte)
> -#
> -# @oem_id: OEM identifier (6 bytes)
> -#
> -# @oem_table_id: OEM table identifier (8 bytes)
> -#
> -# @oem_rev: OEM-supplied revision number (4 bytes)
> -#
> -# @asl_compiler_id: identifier of the utility that created the table
> -#                   (4 bytes)
> -#
> -# @asl_compiler_rev: revision number of the utility that created the
> -#                    table (4 bytes)
> -#
> -# @file: colon (:) separated list of pathnames to load and
> -#        concatenate as table data. The resultant binary blob is expected to
> -#        have an ACPI table header. At least one file is required. This field
> -#        excludes @data.
> -#
> -# @data: colon (:) separated list of pathnames to load and
> -#        concatenate as table data. The resultant binary blob must not have an
> -#        ACPI table header. At least one file is required. This field excludes
> -#        @file.
> -#
> -# Since: 1.5
> -##
> -{ 'struct': 'AcpiTableOptions',
> -  'data': {
> -    '*sig':               'str',
> -    '*rev':               'uint8',
> -    '*oem_id':            'str',
> -    '*oem_table_id':      'str',
> -    '*oem_rev':           'uint32',
> -    '*asl_compiler_id':   'str',
> -    '*asl_compiler_rev':  'uint32',
> -    '*file':              'str',
> -    '*data':              'str' }}
> -
>  ##
>  # @CommandLineParameterType:
>  #
> @@ -1249,102 +1191,6 @@
>  ##
>  { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
>  
> -##
> -# @MEM_UNPLUG_ERROR:
> -#
> -# Emitted when memory hot unplug error occurs.
> -#
> -# @device: device name
> -#
> -# @msg: Informative message
> -#
> -# Since: 2.4
> -#
> -# Example:
> -#
> -# <- { "event": "MEM_UNPLUG_ERROR"
> -#      "data": { "device": "dimm1",
> -#                "msg": "acpi: device unplug for unsupported device"
> -#      },
> -#      "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
> -#
> -##
> -{ 'event': 'MEM_UNPLUG_ERROR',
> -  'data': { 'device': 'str', 'msg': 'str' } }
> -
> -##
> -# @ACPISlotType:
> -#
> -# @DIMM: memory slot
> -# @CPU: logical CPU slot (since 2.7)
> -##
> -{ 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
> -
> -##
> -# @ACPIOSTInfo:
> -#
> -# OSPM Status Indication for a device
> -# For description of possible values of @source and @status fields
> -# see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
> -#
> -# @device: device ID associated with slot
> -#
> -# @slot: slot ID, unique per slot of a given @slot-type
> -#
> -# @slot-type: type of the slot
> -#
> -# @source: an integer containing the source event
> -#
> -# @status: an integer containing the status code
> -#
> -# Since: 2.1
> -##
> -{ 'struct': 'ACPIOSTInfo',
> -  'data'  : { '*device': 'str',
> -              'slot': 'str',
> -              'slot-type': 'ACPISlotType',
> -              'source': 'int',
> -              'status': 'int' } }
> -
> -##
> -# @query-acpi-ospm-status:
> -#
> -# Return a list of ACPIOSTInfo for devices that support status
> -# reporting via ACPI _OST method.
> -#
> -# Since: 2.1
> -#
> -# Example:
> -#
> -# -> { "execute": "query-acpi-ospm-status" }
> -# <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
> -#                  { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
> -#                  { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
> -#                  { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
> -#    ]}
> -#
> -##
> -{ 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
> -
> -##
> -# @ACPI_DEVICE_OST:
> -#
> -# Emitted when guest executes ACPI _OST method.
> -#
> -# @info: OSPM Status Indication
> -#
> -# Since: 2.1
> -#
> -# Example:
> -#
> -# <- { "event": "ACPI_DEVICE_OST",
> -#      "data": { "device": "d1", "slot": "0",
> -#                "slot-type": "DIMM", "source": 1, "status": 0 } }
> -#
> -##
> -{ 'event': 'ACPI_DEVICE_OST',
> -     'data': { 'info': 'ACPIOSTInfo' } }
> -
>  ##
>  # @ReplayMode:
>  #
> diff --git a/include/hw/acpi/acpi_dev_interface.h b/include/hw/acpi/acpi_dev_interface.h
> index a2a12af9b9..a1b63d51db 100644
> --- a/include/hw/acpi/acpi_dev_interface.h
> +++ b/include/hw/acpi/acpi_dev_interface.h
> @@ -1,7 +1,7 @@
>  #ifndef ACPI_DEV_INTERFACE_H
>  #define ACPI_DEV_INTERFACE_H
>  
> -#include "qapi/qapi-types-misc.h"
> +#include "qapi/qapi-types-machine.h"
>  #include "qom/object.h"
>  #include "hw/boards.h"
>  #include "hw/qdev-core.h"
> diff --git a/hw/acpi/core.c b/hw/acpi/core.c
> index 45cbed49ab..4f8d90f50b 100644
> --- a/hw/acpi/core.c
> +++ b/hw/acpi/core.c
> @@ -27,7 +27,7 @@
>  #include "qapi/error.h"
>  #include "qapi/opts-visitor.h"
>  #include "qapi/qapi-events-run-state.h"
> -#include "qapi/qapi-visit-misc.h"
> +#include "qapi/qapi-visit-machine.h"
>  #include "qemu/error-report.h"
>  #include "qemu/module.h"
>  #include "qemu/option.h"
> diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c
> index e2c957ce00..8be15db96d 100644
> --- a/hw/acpi/cpu.c
> +++ b/hw/acpi/cpu.c
> @@ -3,7 +3,7 @@
>  #include "migration/vmstate.h"
>  #include "hw/acpi/cpu.h"
>  #include "qapi/error.h"
> -#include "qapi/qapi-events-misc.h"
> +#include "qapi/qapi-events-machine.h"
>  #include "trace.h"
>  #include "sysemu/numa.h"
>  
> diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
> index 8d2e82240f..aa454f5cb2 100644
> --- a/hw/acpi/memory_hotplug.c
> +++ b/hw/acpi/memory_hotplug.c
> @@ -7,7 +7,7 @@
>  #include "migration/vmstate.h"
>  #include "trace.h"
>  #include "qapi/error.h"
> -#include "qapi/qapi-events-misc.h"
> +#include "qapi/qapi-events-machine.h"
>  
>  #define MEMORY_SLOTS_NUMBER          "MDNR"
>  #define MEMORY_HOTPLUG_IO_REGION     "HPMR"



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

* Re: [PATCH v2 8/8] qapi/misc: Restrict device memory commands to machine code
  2020-03-16  0:03 ` [PATCH v2 8/8] qapi/misc: Restrict device memory " Philippe Mathieu-Daudé
@ 2020-03-16 12:49   ` Igor Mammedov
  0 siblings, 0 replies; 26+ messages in thread
From: Igor Mammedov @ 2020-03-16 12:49 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Kevin Wolf, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin, qemu-devel,
	Ronnie Sahlberg, Peter Lieven, Dr. David Alan Gilbert, Max Reitz,
	Paolo Bonzini, qemu-block, Markus Armbruster, Richard Henderson

On Mon, 16 Mar 2020 01:03:48 +0100
Philippe Mathieu-Daudé <philmd@redhat.com> wrote:

> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Acked-by: Igor Mammedov <imammedo@redhat.com>

> ---
>  qapi/machine.json               | 131 +++++++++++++++++++++++++++++++
>  qapi/misc.json                  | 132 --------------------------------
>  include/hw/mem/memory-device.h  |   1 +
>  include/hw/virtio/virtio-pmem.h |   2 +-
>  4 files changed, 133 insertions(+), 133 deletions(-)
> 
> diff --git a/qapi/machine.json b/qapi/machine.json
> index 33b259dbd0..17ccebda14 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -1476,3 +1476,134 @@
>  #
>  ##
>  { 'command': 'query-pci', 'returns': ['PciInfo'] }
> +
> +##
> +# @MemoryInfo:
> +#
> +# Actual memory information in bytes.
> +#
> +# @base-memory: size of "base" memory specified with command line
> +#               option -m.
> +#
> +# @plugged-memory: size of memory that can be hot-unplugged. This field
> +#                  is omitted if target doesn't support memory hotplug
> +#                  (i.e. CONFIG_MEM_DEVICE not defined at build time).
> +#
> +# Since: 2.11.0
> +##
> +{ 'struct': 'MemoryInfo',
> +  'data'  : { 'base-memory': 'size', '*plugged-memory': 'size' } }
> +
> +##
> +# @query-memory-size-summary:
> +#
> +# Return the amount of initially allocated and present hotpluggable (if
> +# enabled) memory in bytes.
> +#
> +# Example:
> +#
> +# -> { "execute": "query-memory-size-summary" }
> +# <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
> +#
> +# Since: 2.11.0
> +##
> +{ 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
> +
> +##
> +# @PCDIMMDeviceInfo:
> +#
> +# PCDIMMDevice state information
> +#
> +# @id: device's ID
> +#
> +# @addr: physical address, where device is mapped
> +#
> +# @size: size of memory that the device provides
> +#
> +# @slot: slot number at which device is plugged in
> +#
> +# @node: NUMA node number where device is plugged in
> +#
> +# @memdev: memory backend linked with device
> +#
> +# @hotplugged: true if device was hotplugged
> +#
> +# @hotpluggable: true if device if could be added/removed while machine is running
> +#
> +# Since: 2.1
> +##
> +{ 'struct': 'PCDIMMDeviceInfo',
> +  'data': { '*id': 'str',
> +            'addr': 'int',
> +            'size': 'int',
> +            'slot': 'int',
> +            'node': 'int',
> +            'memdev': 'str',
> +            'hotplugged': 'bool',
> +            'hotpluggable': 'bool'
> +          }
> +}
> +
> +##
> +# @VirtioPMEMDeviceInfo:
> +#
> +# VirtioPMEM state information
> +#
> +# @id: device's ID
> +#
> +# @memaddr: physical address in memory, where device is mapped
> +#
> +# @size: size of memory that the device provides
> +#
> +# @memdev: memory backend linked with device
> +#
> +# Since: 4.1
> +##
> +{ 'struct': 'VirtioPMEMDeviceInfo',
> +  'data': { '*id': 'str',
> +            'memaddr': 'size',
> +            'size': 'size',
> +            'memdev': 'str'
> +          }
> +}
> +
> +##
> +# @MemoryDeviceInfo:
> +#
> +# Union containing information about a memory device
> +#
> +# nvdimm is included since 2.12. virtio-pmem is included since 4.1.
> +#
> +# Since: 2.1
> +##
> +{ 'union': 'MemoryDeviceInfo',
> +  'data': { 'dimm': 'PCDIMMDeviceInfo',
> +            'nvdimm': 'PCDIMMDeviceInfo',
> +            'virtio-pmem': 'VirtioPMEMDeviceInfo'
> +          }
> +}
> +
> +##
> +# @query-memory-devices:
> +#
> +# Lists available memory devices and their state
> +#
> +# Since: 2.1
> +#
> +# Example:
> +#
> +# -> { "execute": "query-memory-devices" }
> +# <- { "return": [ { "data":
> +#                       { "addr": 5368709120,
> +#                         "hotpluggable": true,
> +#                         "hotplugged": true,
> +#                         "id": "d1",
> +#                         "memdev": "/objects/memX",
> +#                         "node": 0,
> +#                         "size": 1073741824,
> +#                         "slot": 0},
> +#                    "type": "dimm"
> +#                  } ] }
> +#
> +##
> +{ 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
> diff --git a/qapi/misc.json b/qapi/misc.json
> index 92b3926c6b..670b902999 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -518,39 +518,6 @@
>  ##
>  { 'command': 'closefd', 'data': {'fdname': 'str'} }
>  
> -##
> -# @MemoryInfo:
> -#
> -# Actual memory information in bytes.
> -#
> -# @base-memory: size of "base" memory specified with command line
> -#               option -m.
> -#
> -# @plugged-memory: size of memory that can be hot-unplugged. This field
> -#                  is omitted if target doesn't support memory hotplug
> -#                  (i.e. CONFIG_MEM_DEVICE not defined at build time).
> -#
> -# Since: 2.11.0
> -##
> -{ 'struct': 'MemoryInfo',
> -  'data'  : { 'base-memory': 'size', '*plugged-memory': 'size' } }
> -
> -##
> -# @query-memory-size-summary:
> -#
> -# Return the amount of initially allocated and present hotpluggable (if
> -# enabled) memory in bytes.
> -#
> -# Example:
> -#
> -# -> { "execute": "query-memory-size-summary" }
> -# <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
> -#
> -# Since: 2.11.0
> -##
> -{ 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
> -
> -
>  ##
>  # @AddfdInfo:
>  #
> @@ -788,105 +755,6 @@
>   'returns': ['CommandLineOptionInfo'],
>   'allow-preconfig': true }
>  
> -##
> -# @PCDIMMDeviceInfo:
> -#
> -# PCDIMMDevice state information
> -#
> -# @id: device's ID
> -#
> -# @addr: physical address, where device is mapped
> -#
> -# @size: size of memory that the device provides
> -#
> -# @slot: slot number at which device is plugged in
> -#
> -# @node: NUMA node number where device is plugged in
> -#
> -# @memdev: memory backend linked with device
> -#
> -# @hotplugged: true if device was hotplugged
> -#
> -# @hotpluggable: true if device if could be added/removed while machine is running
> -#
> -# Since: 2.1
> -##
> -{ 'struct': 'PCDIMMDeviceInfo',
> -  'data': { '*id': 'str',
> -            'addr': 'int',
> -            'size': 'int',
> -            'slot': 'int',
> -            'node': 'int',
> -            'memdev': 'str',
> -            'hotplugged': 'bool',
> -            'hotpluggable': 'bool'
> -          }
> -}
> -
> -##
> -# @VirtioPMEMDeviceInfo:
> -#
> -# VirtioPMEM state information
> -#
> -# @id: device's ID
> -#
> -# @memaddr: physical address in memory, where device is mapped
> -#
> -# @size: size of memory that the device provides
> -#
> -# @memdev: memory backend linked with device
> -#
> -# Since: 4.1
> -##
> -{ 'struct': 'VirtioPMEMDeviceInfo',
> -  'data': { '*id': 'str',
> -            'memaddr': 'size',
> -            'size': 'size',
> -            'memdev': 'str'
> -          }
> -}
> -
> -##
> -# @MemoryDeviceInfo:
> -#
> -# Union containing information about a memory device
> -#
> -# nvdimm is included since 2.12. virtio-pmem is included since 4.1.
> -#
> -# Since: 2.1
> -##
> -{ 'union': 'MemoryDeviceInfo',
> -  'data': { 'dimm': 'PCDIMMDeviceInfo',
> -            'nvdimm': 'PCDIMMDeviceInfo',
> -            'virtio-pmem': 'VirtioPMEMDeviceInfo'
> -          }
> -}
> -
> -##
> -# @query-memory-devices:
> -#
> -# Lists available memory devices and their state
> -#
> -# Since: 2.1
> -#
> -# Example:
> -#
> -# -> { "execute": "query-memory-devices" }
> -# <- { "return": [ { "data":
> -#                       { "addr": 5368709120,
> -#                         "hotpluggable": true,
> -#                         "hotplugged": true,
> -#                         "id": "d1",
> -#                         "memdev": "/objects/memX",
> -#                         "node": 0,
> -#                         "size": 1073741824,
> -#                         "slot": 0},
> -#                    "type": "dimm"
> -#                  } ] }
> -#
> -##
> -{ 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
> -
>  ##
>  # @ReplayMode:
>  #
> diff --git a/include/hw/mem/memory-device.h b/include/hw/mem/memory-device.h
> index 04476acb8f..76f3de0f7e 100644
> --- a/include/hw/mem/memory-device.h
> +++ b/include/hw/mem/memory-device.h
> @@ -14,6 +14,7 @@
>  #define MEMORY_DEVICE_H
>  
>  #include "hw/qdev-core.h"
> +#include "qapi/qapi-types-machine.h"
>  #include "qapi/qapi-types-misc.h"
>  #include "qom/object.h"
>  
> diff --git a/include/hw/virtio/virtio-pmem.h b/include/hw/virtio/virtio-pmem.h
> index 33f1999320..72863412b2 100644
> --- a/include/hw/virtio/virtio-pmem.h
> +++ b/include/hw/virtio/virtio-pmem.h
> @@ -15,7 +15,7 @@
>  #define HW_VIRTIO_PMEM_H
>  
>  #include "hw/virtio/virtio.h"
> -#include "qapi/qapi-types-misc.h"
> +#include "qapi/qapi-types-machine.h"
>  
>  #define TYPE_VIRTIO_PMEM "virtio-pmem"
>  



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

* Re: [PATCH v2 4/8] qapi/misc: Move query-uuid command with block code
  2020-03-16  0:03 ` [PATCH v2 4/8] qapi/misc: Move query-uuid command with block code Philippe Mathieu-Daudé
@ 2020-03-16 13:09   ` Igor Mammedov
  2020-03-16 13:57     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 26+ messages in thread
From: Igor Mammedov @ 2020-03-16 13:09 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Kevin Wolf, qemu-block, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin,
	Markus Armbruster, Peter Lieven, qemu-devel,
	Dr. David Alan Gilbert, Ronnie Sahlberg, Paolo Bonzini,
	Max Reitz, Richard Henderson

On Mon, 16 Mar 2020 01:03:44 +0100
Philippe Mathieu-Daudé <philmd@redhat.com> wrote:

here should be why

PS:
 I don't see a reason to move it to block code at all
if this command is moved then it should be machine code

> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  qapi/block-core.json | 30 ++++++++++++++++++++++++++++++
>  qapi/misc.json       | 30 ------------------------------
>  block/iscsi.c        |  2 +-
>  stubs/uuid.c         |  2 +-
>  4 files changed, 32 insertions(+), 32 deletions(-)
> 
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 91586fb1fb..5c3fa6c5d0 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -5415,3 +5415,33 @@
>  { 'command': 'blockdev-snapshot-delete-internal-sync',
>    'data': { 'device': 'str', '*id': 'str', '*name': 'str'},
>    'returns': 'SnapshotInfo' }
> +
> +##
> +# @UuidInfo:
> +#
> +# Guest UUID information (Universally Unique Identifier).
> +#
> +# @UUID: the UUID of the guest
> +#
> +# Since: 0.14.0
> +#
> +# Notes: If no UUID was specified for the guest, a null UUID is returned.
> +##
> +{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
> +
> +##
> +# @query-uuid:
> +#
> +# Query the guest UUID information.
> +#
> +# Returns: The @UuidInfo for the guest
> +#
> +# Since: 0.14.0
> +#
> +# Example:
> +#
> +# -> { "execute": "query-uuid" }
> +# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
> +#
> +##
> +{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
> diff --git a/qapi/misc.json b/qapi/misc.json
> index ed28e41229..f70025f34c 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -97,36 +97,6 @@
>  ##
>  { 'command': 'query-kvm', 'returns': 'KvmInfo' }
>  
> -##
> -# @UuidInfo:
> -#
> -# Guest UUID information (Universally Unique Identifier).
> -#
> -# @UUID: the UUID of the guest
> -#
> -# Since: 0.14.0
> -#
> -# Notes: If no UUID was specified for the guest, a null UUID is returned.
> -##
> -{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
> -
> -##
> -# @query-uuid:
> -#
> -# Query the guest UUID information.
> -#
> -# Returns: The @UuidInfo for the guest
> -#
> -# Since: 0.14.0
> -#
> -# Example:
> -#
> -# -> { "execute": "query-uuid" }
> -# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
> -#
> -##
> -{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
> -
>  ##
>  # @IOThreadInfo:
>  #
> diff --git a/block/iscsi.c b/block/iscsi.c
> index 682abd8e09..68ed5cf3f8 100644
> --- a/block/iscsi.c
> +++ b/block/iscsi.c
> @@ -42,7 +42,7 @@
>  #include "qemu/uuid.h"
>  #include "sysemu/replay.h"
>  #include "qapi/error.h"
> -#include "qapi/qapi-commands-misc.h"
> +#include "qapi/qapi-commands-block-core.h"
>  #include "qapi/qmp/qdict.h"
>  #include "qapi/qmp/qstring.h"
>  #include "crypto/secret.h"
> diff --git a/stubs/uuid.c b/stubs/uuid.c
> index 67f182fa3a..9ef75fdae4 100644
> --- a/stubs/uuid.c
> +++ b/stubs/uuid.c
> @@ -1,5 +1,5 @@
>  #include "qemu/osdep.h"
> -#include "qapi/qapi-commands-misc.h"
> +#include "qapi/qapi-commands-block-core.h"
>  #include "qemu/uuid.h"
>  
>  UuidInfo *qmp_query_uuid(Error **errp)



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

* Re: [PATCH v2 4/8] qapi/misc: Move query-uuid command with block code
  2020-03-16 13:09   ` Igor Mammedov
@ 2020-03-16 13:57     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-16 13:57 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: Kevin Wolf, qemu-block, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin,
	Markus Armbruster, Peter Lieven, qemu-devel,
	Dr. David Alan Gilbert, Ronnie Sahlberg, Paolo Bonzini,
	Max Reitz, Richard Henderson

On 3/16/20 2:09 PM, Igor Mammedov wrote:
> On Mon, 16 Mar 2020 01:03:44 +0100
> Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> 
> here should be why

Indeed.

Daniel explained on IRC the GUID structure is "standardized by microsoft 
as a way to detect when a guest has certain operations applied" to a 
saved snapshot.
https://docs.microsoft.com/en-us/windows/win32/hyperv_v2/virtual-machine-generation-identifier

> 
> PS:
>   I don't see a reason to move it to block code at all
> if this command is moved then it should be machine code
I guess I mixed GUID with UUID (classic identifier shown in SMBIOS)...

The one I wanted to move to qapi/block-core.json is:

##
# @GuidInfo:
#
# GUID information.
#
# @guid: the globally unique identifier
#
# Since: 2.9
##
{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} }

##
# @query-vm-generation-id:
#
# Show Virtual Machine Generation ID
#
# Since: 2.9
##
{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }

So this one goes to qapi/machine.json... Thanks Igor!

> 
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>   qapi/block-core.json | 30 ++++++++++++++++++++++++++++++
>>   qapi/misc.json       | 30 ------------------------------
>>   block/iscsi.c        |  2 +-
>>   stubs/uuid.c         |  2 +-
>>   4 files changed, 32 insertions(+), 32 deletions(-)
>>
>> diff --git a/qapi/block-core.json b/qapi/block-core.json
>> index 91586fb1fb..5c3fa6c5d0 100644
>> --- a/qapi/block-core.json
>> +++ b/qapi/block-core.json
>> @@ -5415,3 +5415,33 @@
>>   { 'command': 'blockdev-snapshot-delete-internal-sync',
>>     'data': { 'device': 'str', '*id': 'str', '*name': 'str'},
>>     'returns': 'SnapshotInfo' }
>> +
>> +##
>> +# @UuidInfo:
>> +#
>> +# Guest UUID information (Universally Unique Identifier).
>> +#
>> +# @UUID: the UUID of the guest
>> +#
>> +# Since: 0.14.0
>> +#
>> +# Notes: If no UUID was specified for the guest, a null UUID is returned.
>> +##
>> +{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
>> +
>> +##
>> +# @query-uuid:
>> +#
>> +# Query the guest UUID information.
>> +#
>> +# Returns: The @UuidInfo for the guest
>> +#
>> +# Since: 0.14.0
>> +#
>> +# Example:
>> +#
>> +# -> { "execute": "query-uuid" }
>> +# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
>> +#
>> +##
>> +{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
>> diff --git a/qapi/misc.json b/qapi/misc.json
>> index ed28e41229..f70025f34c 100644
>> --- a/qapi/misc.json
>> +++ b/qapi/misc.json
>> @@ -97,36 +97,6 @@
>>   ##
>>   { 'command': 'query-kvm', 'returns': 'KvmInfo' }
>>   
>> -##
>> -# @UuidInfo:
>> -#
>> -# Guest UUID information (Universally Unique Identifier).
>> -#
>> -# @UUID: the UUID of the guest
>> -#
>> -# Since: 0.14.0
>> -#
>> -# Notes: If no UUID was specified for the guest, a null UUID is returned.
>> -##
>> -{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
>> -
>> -##
>> -# @query-uuid:
>> -#
>> -# Query the guest UUID information.
>> -#
>> -# Returns: The @UuidInfo for the guest
>> -#
>> -# Since: 0.14.0
>> -#
>> -# Example:
>> -#
>> -# -> { "execute": "query-uuid" }
>> -# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
>> -#
>> -##
>> -{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
>> -
>>   ##
>>   # @IOThreadInfo:
>>   #
>> diff --git a/block/iscsi.c b/block/iscsi.c
>> index 682abd8e09..68ed5cf3f8 100644
>> --- a/block/iscsi.c
>> +++ b/block/iscsi.c
>> @@ -42,7 +42,7 @@
>>   #include "qemu/uuid.h"
>>   #include "sysemu/replay.h"
>>   #include "qapi/error.h"
>> -#include "qapi/qapi-commands-misc.h"
>> +#include "qapi/qapi-commands-block-core.h"
>>   #include "qapi/qmp/qdict.h"
>>   #include "qapi/qmp/qstring.h"
>>   #include "crypto/secret.h"
>> diff --git a/stubs/uuid.c b/stubs/uuid.c
>> index 67f182fa3a..9ef75fdae4 100644
>> --- a/stubs/uuid.c
>> +++ b/stubs/uuid.c
>> @@ -1,5 +1,5 @@
>>   #include "qemu/osdep.h"
>> -#include "qapi/qapi-commands-misc.h"
>> +#include "qapi/qapi-commands-block-core.h"
>>   #include "qemu/uuid.h"
>>   
>>   UuidInfo *qmp_query_uuid(Error **errp)
> 



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

* Re: [PATCH v2 5/8] qapi/misc: Restrict query-vm-generation-id command to machine code
  2020-03-16 12:45   ` Igor Mammedov
@ 2020-03-17  9:44     ` Philippe Mathieu-Daudé
  2020-03-17 11:07       ` Igor Mammedov
  0 siblings, 1 reply; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-17  9:44 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: Kevin Wolf, qemu-block, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin,
	Markus Armbruster, Peter Lieven, qemu-devel,
	Dr. David Alan Gilbert, Ronnie Sahlberg, Paolo Bonzini,
	Max Reitz, Richard Henderson

On 3/16/20 1:45 PM, Igor Mammedov wrote:
> On Mon, 16 Mar 2020 01:03:45 +0100
> Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> 
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> Acked-by: Igor Mammedov <imammedo@redhat.com>
>> ---
>>   qapi/machine.json | 20 ++++++++++++++++++++
>>   qapi/misc.json    | 21 ---------------------
>>   hw/acpi/vmgenid.c |  2 +-
>>   stubs/vmgenid.c   |  2 +-
>>   4 files changed, 22 insertions(+), 23 deletions(-)
>>
>> diff --git a/qapi/machine.json b/qapi/machine.json
>> index c096efbea3..1a2a4b0d48 100644
>> --- a/qapi/machine.json
>> +++ b/qapi/machine.json
>> @@ -415,6 +415,26 @@
>>   ##
>>   { 'command': 'query-target', 'returns': 'TargetInfo' }
>>   
>> +##
>> +# @GuidInfo:
>> +#
>> +# GUID information.
>> +#
>> +# @guid: the globally unique identifier
>> +#
>> +# Since: 2.9
>> +##
>> +{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
>> +
>> +##
>> +# @query-vm-generation-id:
>> +#
>> +# Show Virtual Machine Generation ID
>> +#
>> +# Since: 2.9
>> +##
>> +{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
>> +
>>   ##
>>   # @LostTickPolicy:
>>   #
>> diff --git a/qapi/misc.json b/qapi/misc.json
>> index f70025f34c..8c02870227 100644
>> --- a/qapi/misc.json
>> +++ b/qapi/misc.json
>> @@ -1383,24 +1383,3 @@
>>   #
>>   ##
>>   { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
>> -
>> -##
>> -# @GuidInfo:
>> -#
>> -# GUID information.
>> -#
>> -# @guid: the globally unique identifier
>> -#
>> -# Since: 2.9
>> -##
>> -{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
>> -
>> -##
>> -# @query-vm-generation-id:
>> -#
>> -# Show Virtual Machine Generation ID
>> -#
>> -# Since: 2.9
>> -##
>> -{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }

Daniel explained on IRC the GUID structure is "standardized by microsoft 
as a way to detect when a guest has certain operations applied" to a 
saved snapshot.

https://docs.microsoft.com/en-us/windows/win32/hyperv_v2/virtual-machine-generation-identifier 


So this one goes to qapi/block-core.json, right?

>> -
>> diff --git a/hw/acpi/vmgenid.c b/hw/acpi/vmgenid.c
>> index 2df7623d74..2b26bacaf8 100644
>> --- a/hw/acpi/vmgenid.c
>> +++ b/hw/acpi/vmgenid.c
>> @@ -12,7 +12,7 @@
>>   
>>   #include "qemu/osdep.h"
>>   #include "qapi/error.h"
>> -#include "qapi/qapi-commands-misc.h"
>> +#include "qapi/qapi-commands-machine.h"
>>   #include "qemu/module.h"
>>   #include "hw/acpi/acpi.h"
>>   #include "hw/acpi/aml-build.h"
>> diff --git a/stubs/vmgenid.c b/stubs/vmgenid.c
>> index 568e42b064..bfad656c6c 100644
>> --- a/stubs/vmgenid.c
>> +++ b/stubs/vmgenid.c
>> @@ -1,6 +1,6 @@
>>   #include "qemu/osdep.h"
>>   #include "qapi/error.h"
>> -#include "qapi/qapi-commands-misc.h"
>> +#include "qapi/qapi-commands-machine.h"
>>   #include "qapi/qmp/qerror.h"
>>   
>>   GuidInfo *qmp_query_vm_generation_id(Error **errp)
> 



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

* Re: [PATCH v2 3/8] qapi/misc: Restrict balloon-related commands to machine code
  2020-03-16  9:05   ` David Hildenbrand
@ 2020-03-17 11:03     ` Philippe Mathieu-Daudé
  2020-03-17 11:04       ` David Hildenbrand
  0 siblings, 1 reply; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-17 11:03 UTC (permalink / raw)
  To: David Hildenbrand, qemu-devel
  Cc: Kevin Wolf, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin,
	Markus Armbruster, Peter Lieven, Dr. David Alan Gilbert,
	Max Reitz, Ronnie Sahlberg, Igor Mammedov, Paolo Bonzini,
	qemu-block, Richard Henderson

Hi David,

On 3/16/20 10:05 AM, David Hildenbrand wrote:
> On 16.03.20 01:03, Philippe Mathieu-Daudé wrote:
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>   qapi/machine.json          | 83 ++++++++++++++++++++++++++++++++++++++
>>   qapi/misc.json             | 83 --------------------------------------
>>   include/sysemu/balloon.h   |  2 +-
>>   balloon.c                  |  2 +-
>>   hw/virtio/virtio-balloon.c |  2 +-
>>   monitor/hmp-cmds.c         |  1 +
>>   6 files changed, 87 insertions(+), 86 deletions(-)
>>
>> diff --git a/qapi/machine.json b/qapi/machine.json
>> index 07ffc07ba2..c096efbea3 100644
>> --- a/qapi/machine.json
>> +++ b/qapi/machine.json
>> @@ -915,3 +915,86 @@
>>     'data': 'NumaOptions',
>>     'allow-preconfig': true
>>   }
>> +
>> +##
>> +# @balloon:
>> +#
>> +# Request the balloon driver to change its balloon size.
>> +#
>> +# @value: the target size of the balloon in bytes
> 
> Not related to your patch. The description of most of this stuff is wrong.
> 
> It's not the target size of the balloon, it's the target logical size of
> the VM (logical_vm_size = vm_ram_size - balloon_size)
> 
> -> balloon_size = vm_ram_size - @value
> 
> E.g., "balloon 1024" with a 3G guest means "please inflate the balloon
> to 2048"
> 
>> +#
>> +# Returns: - Nothing on success
>> +#          - If the balloon driver is enabled but not functional because the KVM
>> +#            kernel module cannot support it, KvmMissingCap
>> +#          - If no balloon device is present, DeviceNotActive
>> +#
>> +# Notes: This command just issues a request to the guest.  When it returns,
>> +#        the balloon size may not have changed.  A guest can change the balloon
>> +#        size independent of this command.
>> +#
>> +# Since: 0.14.0
>> +#
>> +# Example:
>> +#
>> +# -> { "execute": "balloon", "arguments": { "value": 536870912 } }
>> +# <- { "return": {} }
>> +#
>> +##
>> +{ 'command': 'balloon', 'data': {'value': 'int'} }
>> +
>> +##
>> +# @BalloonInfo:
>> +#
>> +# Information about the guest balloon device.
>> +#
>> +# @actual: the number of bytes the balloon currently contains
> 
> Dito
> 
> @actual is the logical size of the VM (logical_vm_size = vm_ram_size -
> balloon_size)
> 
>> +#
>> +# Since: 0.14.0
>> +#
>> +##
>> +{ 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
>> +
>> +##
>> +# @query-balloon:
>> +#
>> +# Return information about the balloon device.
>> +#
>> +# Returns: - @BalloonInfo on success
>> +#          - If the balloon driver is enabled but not functional because the KVM
>> +#            kernel module cannot support it, KvmMissingCap
>> +#          - If no balloon device is present, DeviceNotActive
>> +#
>> +# Since: 0.14.0
>> +#
>> +# Example:
>> +#
>> +# -> { "execute": "query-balloon" }
>> +# <- { "return": {
>> +#          "actual": 1073741824,
>> +#       }
>> +#    }
>> +#
>> +##
>> +{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
>> +
>> +##
>> +# @BALLOON_CHANGE:
>> +#
>> +# Emitted when the guest changes the actual BALLOON level. This value is
>> +# equivalent to the @actual field return by the 'query-balloon' command
>> +#
>> +# @actual: actual level of the guest memory balloon in bytes
> 
> Dito
> 
> @actual is the logical size of the VM (vm_ram_size - balloon_size)
> 
> 
> Most probably we want to pull this description fix out. #badinterface

Since you understand how ballooning works, do you mind sending a patch 
with description fixed? :)

Thanks,

Phil.



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

* Re: [PATCH v2 3/8] qapi/misc: Restrict balloon-related commands to machine code
  2020-03-17 11:03     ` Philippe Mathieu-Daudé
@ 2020-03-17 11:04       ` David Hildenbrand
  0 siblings, 0 replies; 26+ messages in thread
From: David Hildenbrand @ 2020-03-17 11:04 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Kevin Wolf, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin,
	Markus Armbruster, Peter Lieven, Dr. David Alan Gilbert,
	Max Reitz, Ronnie Sahlberg, Igor Mammedov, Paolo Bonzini,
	qemu-block, Richard Henderson

On 17.03.20 12:03, Philippe Mathieu-Daudé wrote:
> Hi David,
> 
> On 3/16/20 10:05 AM, David Hildenbrand wrote:
>> On 16.03.20 01:03, Philippe Mathieu-Daudé wrote:
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>> ---
>>>   qapi/machine.json          | 83 ++++++++++++++++++++++++++++++++++++++
>>>   qapi/misc.json             | 83 --------------------------------------
>>>   include/sysemu/balloon.h   |  2 +-
>>>   balloon.c                  |  2 +-
>>>   hw/virtio/virtio-balloon.c |  2 +-
>>>   monitor/hmp-cmds.c         |  1 +
>>>   6 files changed, 87 insertions(+), 86 deletions(-)
>>>
>>> diff --git a/qapi/machine.json b/qapi/machine.json
>>> index 07ffc07ba2..c096efbea3 100644
>>> --- a/qapi/machine.json
>>> +++ b/qapi/machine.json
>>> @@ -915,3 +915,86 @@
>>>     'data': 'NumaOptions',
>>>     'allow-preconfig': true
>>>   }
>>> +
>>> +##
>>> +# @balloon:
>>> +#
>>> +# Request the balloon driver to change its balloon size.
>>> +#
>>> +# @value: the target size of the balloon in bytes
>>
>> Not related to your patch. The description of most of this stuff is wrong.
>>
>> It's not the target size of the balloon, it's the target logical size of
>> the VM (logical_vm_size = vm_ram_size - balloon_size)
>>
>> -> balloon_size = vm_ram_size - @value
>>
>> E.g., "balloon 1024" with a 3G guest means "please inflate the balloon
>> to 2048"
>>
>>> +#
>>> +# Returns: - Nothing on success
>>> +#          - If the balloon driver is enabled but not functional because the KVM
>>> +#            kernel module cannot support it, KvmMissingCap
>>> +#          - If no balloon device is present, DeviceNotActive
>>> +#
>>> +# Notes: This command just issues a request to the guest.  When it returns,
>>> +#        the balloon size may not have changed.  A guest can change the balloon
>>> +#        size independent of this command.
>>> +#
>>> +# Since: 0.14.0
>>> +#
>>> +# Example:
>>> +#
>>> +# -> { "execute": "balloon", "arguments": { "value": 536870912 } }
>>> +# <- { "return": {} }
>>> +#
>>> +##
>>> +{ 'command': 'balloon', 'data': {'value': 'int'} }
>>> +
>>> +##
>>> +# @BalloonInfo:
>>> +#
>>> +# Information about the guest balloon device.
>>> +#
>>> +# @actual: the number of bytes the balloon currently contains
>>
>> Dito
>>
>> @actual is the logical size of the VM (logical_vm_size = vm_ram_size -
>> balloon_size)
>>
>>> +#
>>> +# Since: 0.14.0
>>> +#
>>> +##
>>> +{ 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
>>> +
>>> +##
>>> +# @query-balloon:
>>> +#
>>> +# Return information about the balloon device.
>>> +#
>>> +# Returns: - @BalloonInfo on success
>>> +#          - If the balloon driver is enabled but not functional because the KVM
>>> +#            kernel module cannot support it, KvmMissingCap
>>> +#          - If no balloon device is present, DeviceNotActive
>>> +#
>>> +# Since: 0.14.0
>>> +#
>>> +# Example:
>>> +#
>>> +# -> { "execute": "query-balloon" }
>>> +# <- { "return": {
>>> +#          "actual": 1073741824,
>>> +#       }
>>> +#    }
>>> +#
>>> +##
>>> +{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
>>> +
>>> +##
>>> +# @BALLOON_CHANGE:
>>> +#
>>> +# Emitted when the guest changes the actual BALLOON level. This value is
>>> +# equivalent to the @actual field return by the 'query-balloon' command
>>> +#
>>> +# @actual: actual level of the guest memory balloon in bytes
>>
>> Dito
>>
>> @actual is the logical size of the VM (vm_ram_size - balloon_size)
>>
>>
>> Most probably we want to pull this description fix out. #badinterface
> 
> Since you understand how ballooning works, do you mind sending a patch 
> with description fixed? :)

Will add it to my todo list, so your patch can go in first :)

Thanks

-- 
Thanks,

David / dhildenb



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

* Re: [PATCH v2 5/8] qapi/misc: Restrict query-vm-generation-id command to machine code
  2020-03-17  9:44     ` Philippe Mathieu-Daudé
@ 2020-03-17 11:07       ` Igor Mammedov
  0 siblings, 0 replies; 26+ messages in thread
From: Igor Mammedov @ 2020-03-17 11:07 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Kevin Wolf, qemu-block, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin,
	Markus Armbruster, Peter Lieven, qemu-devel,
	Dr. David Alan Gilbert, Ronnie Sahlberg, Paolo Bonzini,
	Max Reitz, Richard Henderson

On Tue, 17 Mar 2020 10:44:33 +0100
Philippe Mathieu-Daudé <philmd@redhat.com> wrote:

> On 3/16/20 1:45 PM, Igor Mammedov wrote:
> > On Mon, 16 Mar 2020 01:03:45 +0100
> > Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> >   
> >> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>  
> > 
> > Acked-by: Igor Mammedov <imammedo@redhat.com>  
> >> ---
> >>   qapi/machine.json | 20 ++++++++++++++++++++
> >>   qapi/misc.json    | 21 ---------------------
> >>   hw/acpi/vmgenid.c |  2 +-
> >>   stubs/vmgenid.c   |  2 +-
> >>   4 files changed, 22 insertions(+), 23 deletions(-)
> >>
> >> diff --git a/qapi/machine.json b/qapi/machine.json
> >> index c096efbea3..1a2a4b0d48 100644
> >> --- a/qapi/machine.json
> >> +++ b/qapi/machine.json
> >> @@ -415,6 +415,26 @@
> >>   ##
> >>   { 'command': 'query-target', 'returns': 'TargetInfo' }
> >>   
> >> +##
> >> +# @GuidInfo:
> >> +#
> >> +# GUID information.
> >> +#
> >> +# @guid: the globally unique identifier
> >> +#
> >> +# Since: 2.9
> >> +##
> >> +{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
> >> +
> >> +##
> >> +# @query-vm-generation-id:
> >> +#
> >> +# Show Virtual Machine Generation ID
> >> +#
> >> +# Since: 2.9
> >> +##
> >> +{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
> >> +
> >>   ##
> >>   # @LostTickPolicy:
> >>   #
> >> diff --git a/qapi/misc.json b/qapi/misc.json
> >> index f70025f34c..8c02870227 100644
> >> --- a/qapi/misc.json
> >> +++ b/qapi/misc.json
> >> @@ -1383,24 +1383,3 @@
> >>   #
> >>   ##
> >>   { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
> >> -
> >> -##
> >> -# @GuidInfo:
> >> -#
> >> -# GUID information.
> >> -#
> >> -# @guid: the globally unique identifier
> >> -#
> >> -# Since: 2.9
> >> -##
> >> -{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
> >> -
> >> -##
> >> -# @query-vm-generation-id:
> >> -#
> >> -# Show Virtual Machine Generation ID
> >> -#
> >> -# Since: 2.9
> >> -##
> >> -{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }  
> 
> Daniel explained on IRC the GUID structure is "standardized by microsoft 
> as a way to detect when a guest has certain operations applied" to a 
> saved snapshot.
> 
> https://docs.microsoft.com/en-us/windows/win32/hyperv_v2/virtual-machine-generation-identifier 
> 
> 
> So this one goes to qapi/block-core.json, right?

I think it belongs to machine

> 
> >> -
> >> diff --git a/hw/acpi/vmgenid.c b/hw/acpi/vmgenid.c
> >> index 2df7623d74..2b26bacaf8 100644
> >> --- a/hw/acpi/vmgenid.c
> >> +++ b/hw/acpi/vmgenid.c
> >> @@ -12,7 +12,7 @@
> >>   
> >>   #include "qemu/osdep.h"
> >>   #include "qapi/error.h"
> >> -#include "qapi/qapi-commands-misc.h"
> >> +#include "qapi/qapi-commands-machine.h"
> >>   #include "qemu/module.h"
> >>   #include "hw/acpi/acpi.h"
> >>   #include "hw/acpi/aml-build.h"
> >> diff --git a/stubs/vmgenid.c b/stubs/vmgenid.c
> >> index 568e42b064..bfad656c6c 100644
> >> --- a/stubs/vmgenid.c
> >> +++ b/stubs/vmgenid.c
> >> @@ -1,6 +1,6 @@
> >>   #include "qemu/osdep.h"
> >>   #include "qapi/error.h"
> >> -#include "qapi/qapi-commands-misc.h"
> >> +#include "qapi/qapi-commands-machine.h"
> >>   #include "qapi/qmp/qerror.h"
> >>   
> >>   GuidInfo *qmp_query_vm_generation_id(Error **errp)  
> >   
> 



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

* Re: [PATCH v2 1/8] target/i386: Restrict X86CPUFeatureWord to X86 targets
  2020-03-16  0:03 ` [PATCH v2 1/8] target/i386: Restrict X86CPUFeatureWord to X86 targets Philippe Mathieu-Daudé
  2020-03-16  0:29   ` Aleksandar Markovic
@ 2020-03-18  8:25   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-18  8:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin, Ronnie Sahlberg,
	Peter Lieven, Dr. David Alan Gilbert, Max Reitz,
	Richard Henderson, Paolo Bonzini, Igor Mammedov, qemu-block,
	Markus Armbruster, Richard Henderson

Hi Eduardo,

On 3/16/20 1:03 AM, Philippe Mathieu-Daudé wrote:
> Move out x86-specific structures from generic machine code.

If you have to respin "x86 and machine queue" please consider including 
this patch :)

> 
> Acked-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>   qapi/machine-target.json   | 45 ++++++++++++++++++++++++++++++++++++++
>   qapi/machine.json          | 42 -----------------------------------
>   target/i386/cpu.c          |  2 +-
>   target/i386/machine-stub.c | 22 +++++++++++++++++++
>   target/i386/Makefile.objs  |  3 ++-
>   5 files changed, 70 insertions(+), 44 deletions(-)
>   create mode 100644 target/i386/machine-stub.c
> 
> diff --git a/qapi/machine-target.json b/qapi/machine-target.json
> index f2c82949d8..fb7a4b7850 100644
> --- a/qapi/machine-target.json
> +++ b/qapi/machine-target.json
> @@ -3,6 +3,51 @@
>   # This work is licensed under the terms of the GNU GPL, version 2 or later.
>   # See the COPYING file in the top-level directory.
>   
> +##
> +# @X86CPURegister32:
> +#
> +# A X86 32-bit register
> +#
> +# Since: 1.5
> +##
> +{ 'enum': 'X86CPURegister32',
> +  'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ],
> +  'if': 'defined(TARGET_I386)' }
> +
> +##
> +# @X86CPUFeatureWordInfo:
> +#
> +# Information about a X86 CPU feature word
> +#
> +# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
> +#
> +# @cpuid-input-ecx: Input ECX value for CPUID instruction for that
> +#                   feature word
> +#
> +# @cpuid-register: Output register containing the feature bits
> +#
> +# @features: value of output register, containing the feature bits
> +#
> +# Since: 1.5
> +##
> +{ 'struct': 'X86CPUFeatureWordInfo',
> +  'data': { 'cpuid-input-eax': 'int',
> +            '*cpuid-input-ecx': 'int',
> +            'cpuid-register': 'X86CPURegister32',
> +            'features': 'int' },
> +  'if': 'defined(TARGET_I386)' }
> +
> +##
> +# @DummyForceArrays:
> +#
> +# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
> +#
> +# Since: 2.5
> +##
> +{ 'struct': 'DummyForceArrays',
> +  'data': { 'unused': ['X86CPUFeatureWordInfo'] },
> +  'if': 'defined(TARGET_I386)' }
> +
>   ##
>   # @CpuModelInfo:
>   #
> diff --git a/qapi/machine.json b/qapi/machine.json
> index 6c11e3cf3a..de05730704 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -505,48 +505,6 @@
>      'dst': 'uint16',
>      'val': 'uint8' }}
>   
> -##
> -# @X86CPURegister32:
> -#
> -# A X86 32-bit register
> -#
> -# Since: 1.5
> -##
> -{ 'enum': 'X86CPURegister32',
> -  'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
> -
> -##
> -# @X86CPUFeatureWordInfo:
> -#
> -# Information about a X86 CPU feature word
> -#
> -# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
> -#
> -# @cpuid-input-ecx: Input ECX value for CPUID instruction for that
> -#                   feature word
> -#
> -# @cpuid-register: Output register containing the feature bits
> -#
> -# @features: value of output register, containing the feature bits
> -#
> -# Since: 1.5
> -##
> -{ 'struct': 'X86CPUFeatureWordInfo',
> -  'data': { 'cpuid-input-eax': 'int',
> -            '*cpuid-input-ecx': 'int',
> -            'cpuid-register': 'X86CPURegister32',
> -            'features': 'int' } }
> -
> -##
> -# @DummyForceArrays:
> -#
> -# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
> -#
> -# Since: 2.5
> -##
> -{ 'struct': 'DummyForceArrays',
> -  'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
> -
>   ##
>   # @NumaCpuOptions:
>   #
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index a84553e50c..0753fe4935 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -37,7 +37,7 @@
>   #include "qemu/option.h"
>   #include "qemu/config-file.h"
>   #include "qapi/error.h"
> -#include "qapi/qapi-visit-machine.h"
> +#include "qapi/qapi-visit-machine-target.h"
>   #include "qapi/qapi-visit-run-state.h"
>   #include "qapi/qmp/qdict.h"
>   #include "qapi/qmp/qerror.h"
> diff --git a/target/i386/machine-stub.c b/target/i386/machine-stub.c
> new file mode 100644
> index 0000000000..cb301af057
> --- /dev/null
> +++ b/target/i386/machine-stub.c
> @@ -0,0 +1,22 @@
> +/*
> + * QAPI x86 CPU features stub
> + *
> + * Copyright (c) 2020 Red Hat, Inc.
> + *
> + * Author:
> + *   Philippe Mathieu-Daudé <philmd@redhat.com>
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2 or later.
> + * See the COPYING file in the top-level directory.
> + * SPDX-License-Identifier: GPL-2.0-or-later
> + */
> +
> +#include "qemu/osdep.h"
> +#include "qapi/error.h"
> +#include "qapi/qapi-visit-machine-target.h"
> +
> +void visit_type_X86CPUFeatureWordInfoList(Visitor *v, const char *name,
> +                                      X86CPUFeatureWordInfoList **obj,
> +                                      Error **errp)
> +{
> +}
> diff --git a/target/i386/Makefile.objs b/target/i386/Makefile.objs
> index 48e0c28434..1cdfc9f50c 100644
> --- a/target/i386/Makefile.objs
> +++ b/target/i386/Makefile.objs
> @@ -17,6 +17,7 @@ obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-posix.o
>   endif
>   obj-$(CONFIG_HVF) += hvf/
>   obj-$(CONFIG_WHPX) += whpx-all.o
> -endif
> +endif # CONFIG_SOFTMMU
>   obj-$(CONFIG_SEV) += sev.o
>   obj-$(call lnot,$(CONFIG_SEV)) += sev-stub.o
> +obj-$(call lnot,$(CONFIG_SOFTMMU)) += machine-stub.o
> 



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

* Re: [PATCH v2 7/8] qapi/misc: Restrict PCI commands to machine code
  2020-03-16  0:03 ` [PATCH v2 7/8] qapi/misc: Restrict PCI " Philippe Mathieu-Daudé
@ 2020-05-25 14:12   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-25 14:12 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin, Ronnie Sahlberg,
	Peter Lieven, Dr. David Alan Gilbert, Max Reitz, Paolo Bonzini,
	Igor Mammedov, qemu-block, Markus Armbruster, Richard Henderson

ping?

On 3/16/20 1:03 AM, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  qapi/machine.json | 304 ++++++++++++++++++++++++++++++++++++++++++++++
>  qapi/misc.json    | 304 ----------------------------------------------
>  hw/pci/pci-stub.c |   2 +-
>  hw/pci/pci.c      |   2 +-
>  4 files changed, 306 insertions(+), 306 deletions(-)
> 
> diff --git a/qapi/machine.json b/qapi/machine.json
> index f77ee63730..33b259dbd0 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -1172,3 +1172,307 @@
>  ##
>  { 'event': 'ACPI_DEVICE_OST',
>       'data': { 'info': 'ACPIOSTInfo' } }
> +
> +##
> +# @PciMemoryRange:
> +#
> +# A PCI device memory region
> +#
> +# @base: the starting address (guest physical)
> +#
> +# @limit: the ending address (guest physical)
> +#
> +# Since: 0.14.0
> +##
> +{ 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
> +
> +##
> +# @PciMemoryRegion:
> +#
> +# Information about a PCI device I/O region.
> +#
> +# @bar: the index of the Base Address Register for this region
> +#
> +# @type: - 'io' if the region is a PIO region
> +#        - 'memory' if the region is a MMIO region
> +#
> +# @size: memory size
> +#
> +# @prefetch: if @type is 'memory', true if the memory is prefetchable
> +#
> +# @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
> +#
> +# Since: 0.14.0
> +##
> +{ 'struct': 'PciMemoryRegion',
> +  'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
> +           '*prefetch': 'bool', '*mem_type_64': 'bool' } }
> +
> +##
> +# @PciBusInfo:
> +#
> +# Information about a bus of a PCI Bridge device
> +#
> +# @number: primary bus interface number.  This should be the number of the
> +#          bus the device resides on.
> +#
> +# @secondary: secondary bus interface number.  This is the number of the
> +#             main bus for the bridge
> +#
> +# @subordinate: This is the highest number bus that resides below the
> +#               bridge.
> +#
> +# @io_range: The PIO range for all devices on this bridge
> +#
> +# @memory_range: The MMIO range for all devices on this bridge
> +#
> +# @prefetchable_range: The range of prefetchable MMIO for all devices on
> +#                      this bridge
> +#
> +# Since: 2.4
> +##
> +{ 'struct': 'PciBusInfo',
> +  'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
> +           'io_range': 'PciMemoryRange',
> +           'memory_range': 'PciMemoryRange',
> +           'prefetchable_range': 'PciMemoryRange' } }
> +
> +##
> +# @PciBridgeInfo:
> +#
> +# Information about a PCI Bridge device
> +#
> +# @bus: information about the bus the device resides on
> +#
> +# @devices: a list of @PciDeviceInfo for each device on this bridge
> +#
> +# Since: 0.14.0
> +##
> +{ 'struct': 'PciBridgeInfo',
> +  'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
> +
> +##
> +# @PciDeviceClass:
> +#
> +# Information about the Class of a PCI device
> +#
> +# @desc: a string description of the device's class
> +#
> +# @class: the class code of the device
> +#
> +# Since: 2.4
> +##
> +{ 'struct': 'PciDeviceClass',
> +  'data': {'*desc': 'str', 'class': 'int'} }
> +
> +##
> +# @PciDeviceId:
> +#
> +# Information about the Id of a PCI device
> +#
> +# @device: the PCI device id
> +#
> +# @vendor: the PCI vendor id
> +#
> +# @subsystem: the PCI subsystem id (since 3.1)
> +#
> +# @subsystem-vendor: the PCI subsystem vendor id (since 3.1)
> +#
> +# Since: 2.4
> +##
> +{ 'struct': 'PciDeviceId',
> +  'data': {'device': 'int', 'vendor': 'int', '*subsystem': 'int',
> +            '*subsystem-vendor': 'int'} }
> +
> +##
> +# @PciDeviceInfo:
> +#
> +# Information about a PCI device
> +#
> +# @bus: the bus number of the device
> +#
> +# @slot: the slot the device is located in
> +#
> +# @function: the function of the slot used by the device
> +#
> +# @class_info: the class of the device
> +#
> +# @id: the PCI device id
> +#
> +# @irq: if an IRQ is assigned to the device, the IRQ number
> +#
> +# @qdev_id: the device name of the PCI device
> +#
> +# @pci_bridge: if the device is a PCI bridge, the bridge information
> +#
> +# @regions: a list of the PCI I/O regions associated with the device
> +#
> +# Notes: the contents of @class_info.desc are not stable and should only be
> +#        treated as informational.
> +#
> +# Since: 0.14.0
> +##
> +{ 'struct': 'PciDeviceInfo',
> +  'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
> +           'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
> +           '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
> +           'regions': ['PciMemoryRegion']} }
> +
> +##
> +# @PciInfo:
> +#
> +# Information about a PCI bus
> +#
> +# @bus: the bus index
> +#
> +# @devices: a list of devices on this bus
> +#
> +# Since: 0.14.0
> +##
> +{ 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
> +
> +##
> +# @query-pci:
> +#
> +# Return information about the PCI bus topology of the guest.
> +#
> +# Returns: a list of @PciInfo for each PCI bus. Each bus is
> +#          represented by a json-object, which has a key with a json-array of
> +#          all PCI devices attached to it. Each device is represented by a
> +#          json-object.
> +#
> +# Since: 0.14.0
> +#
> +# Example:
> +#
> +# -> { "execute": "query-pci" }
> +# <- { "return": [
> +#          {
> +#             "bus": 0,
> +#             "devices": [
> +#                {
> +#                   "bus": 0,
> +#                   "qdev_id": "",
> +#                   "slot": 0,
> +#                   "class_info": {
> +#                      "class": 1536,
> +#                      "desc": "Host bridge"
> +#                   },
> +#                   "id": {
> +#                      "device": 32902,
> +#                      "vendor": 4663
> +#                   },
> +#                   "function": 0,
> +#                   "regions": [
> +#                   ]
> +#                },
> +#                {
> +#                   "bus": 0,
> +#                   "qdev_id": "",
> +#                   "slot": 1,
> +#                   "class_info": {
> +#                      "class": 1537,
> +#                      "desc": "ISA bridge"
> +#                   },
> +#                   "id": {
> +#                      "device": 32902,
> +#                      "vendor": 28672
> +#                   },
> +#                   "function": 0,
> +#                   "regions": [
> +#                   ]
> +#                },
> +#                {
> +#                   "bus": 0,
> +#                   "qdev_id": "",
> +#                   "slot": 1,
> +#                   "class_info": {
> +#                      "class": 257,
> +#                      "desc": "IDE controller"
> +#                   },
> +#                   "id": {
> +#                      "device": 32902,
> +#                      "vendor": 28688
> +#                   },
> +#                   "function": 1,
> +#                   "regions": [
> +#                      {
> +#                         "bar": 4,
> +#                         "size": 16,
> +#                         "address": 49152,
> +#                         "type": "io"
> +#                      }
> +#                   ]
> +#                },
> +#                {
> +#                   "bus": 0,
> +#                   "qdev_id": "",
> +#                   "slot": 2,
> +#                   "class_info": {
> +#                      "class": 768,
> +#                      "desc": "VGA controller"
> +#                   },
> +#                   "id": {
> +#                      "device": 4115,
> +#                      "vendor": 184
> +#                   },
> +#                   "function": 0,
> +#                   "regions": [
> +#                      {
> +#                         "prefetch": true,
> +#                         "mem_type_64": false,
> +#                         "bar": 0,
> +#                         "size": 33554432,
> +#                         "address": 4026531840,
> +#                         "type": "memory"
> +#                      },
> +#                      {
> +#                         "prefetch": false,
> +#                         "mem_type_64": false,
> +#                         "bar": 1,
> +#                         "size": 4096,
> +#                         "address": 4060086272,
> +#                         "type": "memory"
> +#                      },
> +#                      {
> +#                         "prefetch": false,
> +#                         "mem_type_64": false,
> +#                         "bar": 6,
> +#                         "size": 65536,
> +#                         "address": -1,
> +#                         "type": "memory"
> +#                      }
> +#                   ]
> +#                },
> +#                {
> +#                   "bus": 0,
> +#                   "qdev_id": "",
> +#                   "irq": 11,
> +#                   "slot": 4,
> +#                   "class_info": {
> +#                      "class": 1280,
> +#                      "desc": "RAM controller"
> +#                   },
> +#                   "id": {
> +#                      "device": 6900,
> +#                      "vendor": 4098
> +#                   },
> +#                   "function": 0,
> +#                   "regions": [
> +#                      {
> +#                         "bar": 0,
> +#                         "size": 32,
> +#                         "address": 49280,
> +#                         "type": "io"
> +#                      }
> +#                   ]
> +#                }
> +#             ]
> +#          }
> +#       ]
> +#    }
> +#
> +# Note: This example has been shortened as the real response is too long.
> +#
> +##
> +{ 'command': 'query-pci', 'returns': ['PciInfo'] }
> diff --git a/qapi/misc.json b/qapi/misc.json
> index 3d9d7327fe..92b3926c6b 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -156,310 +156,6 @@
>  { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
>    'allow-preconfig': true }
>  
> -##
> -# @PciMemoryRange:
> -#
> -# A PCI device memory region
> -#
> -# @base: the starting address (guest physical)
> -#
> -# @limit: the ending address (guest physical)
> -#
> -# Since: 0.14.0
> -##
> -{ 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
> -
> -##
> -# @PciMemoryRegion:
> -#
> -# Information about a PCI device I/O region.
> -#
> -# @bar: the index of the Base Address Register for this region
> -#
> -# @type: - 'io' if the region is a PIO region
> -#        - 'memory' if the region is a MMIO region
> -#
> -# @size: memory size
> -#
> -# @prefetch: if @type is 'memory', true if the memory is prefetchable
> -#
> -# @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
> -#
> -# Since: 0.14.0
> -##
> -{ 'struct': 'PciMemoryRegion',
> -  'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
> -           '*prefetch': 'bool', '*mem_type_64': 'bool' } }
> -
> -##
> -# @PciBusInfo:
> -#
> -# Information about a bus of a PCI Bridge device
> -#
> -# @number: primary bus interface number.  This should be the number of the
> -#          bus the device resides on.
> -#
> -# @secondary: secondary bus interface number.  This is the number of the
> -#             main bus for the bridge
> -#
> -# @subordinate: This is the highest number bus that resides below the
> -#               bridge.
> -#
> -# @io_range: The PIO range for all devices on this bridge
> -#
> -# @memory_range: The MMIO range for all devices on this bridge
> -#
> -# @prefetchable_range: The range of prefetchable MMIO for all devices on
> -#                      this bridge
> -#
> -# Since: 2.4
> -##
> -{ 'struct': 'PciBusInfo',
> -  'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
> -           'io_range': 'PciMemoryRange',
> -           'memory_range': 'PciMemoryRange',
> -           'prefetchable_range': 'PciMemoryRange' } }
> -
> -##
> -# @PciBridgeInfo:
> -#
> -# Information about a PCI Bridge device
> -#
> -# @bus: information about the bus the device resides on
> -#
> -# @devices: a list of @PciDeviceInfo for each device on this bridge
> -#
> -# Since: 0.14.0
> -##
> -{ 'struct': 'PciBridgeInfo',
> -  'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
> -
> -##
> -# @PciDeviceClass:
> -#
> -# Information about the Class of a PCI device
> -#
> -# @desc: a string description of the device's class
> -#
> -# @class: the class code of the device
> -#
> -# Since: 2.4
> -##
> -{ 'struct': 'PciDeviceClass',
> -  'data': {'*desc': 'str', 'class': 'int'} }
> -
> -##
> -# @PciDeviceId:
> -#
> -# Information about the Id of a PCI device
> -#
> -# @device: the PCI device id
> -#
> -# @vendor: the PCI vendor id
> -#
> -# @subsystem: the PCI subsystem id (since 3.1)
> -#
> -# @subsystem-vendor: the PCI subsystem vendor id (since 3.1)
> -#
> -# Since: 2.4
> -##
> -{ 'struct': 'PciDeviceId',
> -  'data': {'device': 'int', 'vendor': 'int', '*subsystem': 'int',
> -            '*subsystem-vendor': 'int'} }
> -
> -##
> -# @PciDeviceInfo:
> -#
> -# Information about a PCI device
> -#
> -# @bus: the bus number of the device
> -#
> -# @slot: the slot the device is located in
> -#
> -# @function: the function of the slot used by the device
> -#
> -# @class_info: the class of the device
> -#
> -# @id: the PCI device id
> -#
> -# @irq: if an IRQ is assigned to the device, the IRQ number
> -#
> -# @qdev_id: the device name of the PCI device
> -#
> -# @pci_bridge: if the device is a PCI bridge, the bridge information
> -#
> -# @regions: a list of the PCI I/O regions associated with the device
> -#
> -# Notes: the contents of @class_info.desc are not stable and should only be
> -#        treated as informational.
> -#
> -# Since: 0.14.0
> -##
> -{ 'struct': 'PciDeviceInfo',
> -  'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
> -           'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
> -           '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
> -           'regions': ['PciMemoryRegion']} }
> -
> -##
> -# @PciInfo:
> -#
> -# Information about a PCI bus
> -#
> -# @bus: the bus index
> -#
> -# @devices: a list of devices on this bus
> -#
> -# Since: 0.14.0
> -##
> -{ 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
> -
> -##
> -# @query-pci:
> -#
> -# Return information about the PCI bus topology of the guest.
> -#
> -# Returns: a list of @PciInfo for each PCI bus. Each bus is
> -#          represented by a json-object, which has a key with a json-array of
> -#          all PCI devices attached to it. Each device is represented by a
> -#          json-object.
> -#
> -# Since: 0.14.0
> -#
> -# Example:
> -#
> -# -> { "execute": "query-pci" }
> -# <- { "return": [
> -#          {
> -#             "bus": 0,
> -#             "devices": [
> -#                {
> -#                   "bus": 0,
> -#                   "qdev_id": "",
> -#                   "slot": 0,
> -#                   "class_info": {
> -#                      "class": 1536,
> -#                      "desc": "Host bridge"
> -#                   },
> -#                   "id": {
> -#                      "device": 32902,
> -#                      "vendor": 4663
> -#                   },
> -#                   "function": 0,
> -#                   "regions": [
> -#                   ]
> -#                },
> -#                {
> -#                   "bus": 0,
> -#                   "qdev_id": "",
> -#                   "slot": 1,
> -#                   "class_info": {
> -#                      "class": 1537,
> -#                      "desc": "ISA bridge"
> -#                   },
> -#                   "id": {
> -#                      "device": 32902,
> -#                      "vendor": 28672
> -#                   },
> -#                   "function": 0,
> -#                   "regions": [
> -#                   ]
> -#                },
> -#                {
> -#                   "bus": 0,
> -#                   "qdev_id": "",
> -#                   "slot": 1,
> -#                   "class_info": {
> -#                      "class": 257,
> -#                      "desc": "IDE controller"
> -#                   },
> -#                   "id": {
> -#                      "device": 32902,
> -#                      "vendor": 28688
> -#                   },
> -#                   "function": 1,
> -#                   "regions": [
> -#                      {
> -#                         "bar": 4,
> -#                         "size": 16,
> -#                         "address": 49152,
> -#                         "type": "io"
> -#                      }
> -#                   ]
> -#                },
> -#                {
> -#                   "bus": 0,
> -#                   "qdev_id": "",
> -#                   "slot": 2,
> -#                   "class_info": {
> -#                      "class": 768,
> -#                      "desc": "VGA controller"
> -#                   },
> -#                   "id": {
> -#                      "device": 4115,
> -#                      "vendor": 184
> -#                   },
> -#                   "function": 0,
> -#                   "regions": [
> -#                      {
> -#                         "prefetch": true,
> -#                         "mem_type_64": false,
> -#                         "bar": 0,
> -#                         "size": 33554432,
> -#                         "address": 4026531840,
> -#                         "type": "memory"
> -#                      },
> -#                      {
> -#                         "prefetch": false,
> -#                         "mem_type_64": false,
> -#                         "bar": 1,
> -#                         "size": 4096,
> -#                         "address": 4060086272,
> -#                         "type": "memory"
> -#                      },
> -#                      {
> -#                         "prefetch": false,
> -#                         "mem_type_64": false,
> -#                         "bar": 6,
> -#                         "size": 65536,
> -#                         "address": -1,
> -#                         "type": "memory"
> -#                      }
> -#                   ]
> -#                },
> -#                {
> -#                   "bus": 0,
> -#                   "qdev_id": "",
> -#                   "irq": 11,
> -#                   "slot": 4,
> -#                   "class_info": {
> -#                      "class": 1280,
> -#                      "desc": "RAM controller"
> -#                   },
> -#                   "id": {
> -#                      "device": 6900,
> -#                      "vendor": 4098
> -#                   },
> -#                   "function": 0,
> -#                   "regions": [
> -#                      {
> -#                         "bar": 0,
> -#                         "size": 32,
> -#                         "address": 49280,
> -#                         "type": "io"
> -#                      }
> -#                   ]
> -#                }
> -#             ]
> -#          }
> -#       ]
> -#    }
> -#
> -# Note: This example has been shortened as the real response is too long.
> -#
> -##
> -{ 'command': 'query-pci', 'returns': ['PciInfo'] }
> -
>  ##
>  # @stop:
>  #
> diff --git a/hw/pci/pci-stub.c b/hw/pci/pci-stub.c
> index cc2a2e1f73..b50c7ca590 100644
> --- a/hw/pci/pci-stub.c
> +++ b/hw/pci/pci-stub.c
> @@ -22,7 +22,7 @@
>  #include "sysemu/sysemu.h"
>  #include "monitor/monitor.h"
>  #include "qapi/error.h"
> -#include "qapi/qapi-commands-misc.h"
> +#include "qapi/qapi-commands-machine.h"
>  #include "qapi/qmp/qerror.h"
>  #include "hw/pci/pci.h"
>  #include "hw/pci/msi.h"
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index e1ed6677e1..5ebc783d57 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -46,7 +46,7 @@
>  #include "hw/hotplug.h"
>  #include "hw/boards.h"
>  #include "qapi/error.h"
> -#include "qapi/qapi-commands-misc.h"
> +#include "qapi/qapi-commands-machine.h"
>  #include "qemu/cutils.h"
>  
>  //#define DEBUG_PCI
> 



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

* Re: [PATCH v2 2/8] qapi/misc: Restrict LostTickPolicy enum to machine code
  2020-03-16  0:03 ` [PATCH v2 2/8] qapi/misc: Restrict LostTickPolicy enum to machine code Philippe Mathieu-Daudé
@ 2020-05-25 14:12   ` Philippe Mathieu-Daudé
  2020-05-26 15:00   ` Igor Mammedov
  1 sibling, 0 replies; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-25 14:12 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin, Ronnie Sahlberg,
	Peter Lieven, Dr. David Alan Gilbert, Max Reitz, Paolo Bonzini,
	Igor Mammedov, qemu-block, Markus Armbruster, Richard Henderson

ping?

On 3/16/20 1:03 AM, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  qapi/machine.json            | 32 ++++++++++++++++++++++++++++++++
>  qapi/misc.json               | 32 --------------------------------
>  include/hw/rtc/mc146818rtc.h |  2 +-
>  hw/core/qdev-properties.c    |  1 +
>  hw/i386/kvm/i8254.c          |  2 +-
>  5 files changed, 35 insertions(+), 34 deletions(-)
> 
> diff --git a/qapi/machine.json b/qapi/machine.json
> index de05730704..07ffc07ba2 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -415,6 +415,38 @@
>  ##
>  { 'command': 'query-target', 'returns': 'TargetInfo' }
>  
> +##
> +# @LostTickPolicy:
> +#
> +# Policy for handling lost ticks in timer devices.  Ticks end up getting
> +# lost when, for example, the guest is paused.
> +#
> +# @discard: throw away the missed ticks and continue with future injection
> +#           normally.  The guest OS will see the timer jump ahead by a
> +#           potentially quite significant amount all at once, as if the
> +#           intervening chunk of time had simply not existed; needless to
> +#           say, such a sudden jump can easily confuse a guest OS which is
> +#           not specifically prepared to deal with it.  Assuming the guest
> +#           OS can deal correctly with the time jump, the time in the guest
> +#           and in the host should now match.
> +#
> +# @delay: continue to deliver ticks at the normal rate.  The guest OS will
> +#         not notice anything is amiss, as from its point of view time will
> +#         have continued to flow normally.  The time in the guest should now
> +#         be behind the time in the host by exactly the amount of time during
> +#         which ticks have been missed.
> +#
> +# @slew: deliver ticks at a higher rate to catch up with the missed ticks.
> +#        The guest OS will not notice anything is amiss, as from its point
> +#        of view time will have continued to flow normally.  Once the timer
> +#        has managed to catch up with all the missing ticks, the time in
> +#        the guest and in the host should match.
> +#
> +# Since: 2.0
> +##
> +{ 'enum': 'LostTickPolicy',
> +  'data': ['discard', 'delay', 'slew' ] }
> +
>  ##
>  # @NumaOptionsType:
>  #
> diff --git a/qapi/misc.json b/qapi/misc.json
> index c18fe681fb..2725d835ad 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -7,38 +7,6 @@
>  
>  { 'include': 'common.json' }
>  
> -##
> -# @LostTickPolicy:
> -#
> -# Policy for handling lost ticks in timer devices.  Ticks end up getting
> -# lost when, for example, the guest is paused.
> -#
> -# @discard: throw away the missed ticks and continue with future injection
> -#           normally.  The guest OS will see the timer jump ahead by a
> -#           potentially quite significant amount all at once, as if the
> -#           intervening chunk of time had simply not existed; needless to
> -#           say, such a sudden jump can easily confuse a guest OS which is
> -#           not specifically prepared to deal with it.  Assuming the guest
> -#           OS can deal correctly with the time jump, the time in the guest
> -#           and in the host should now match.
> -#
> -# @delay: continue to deliver ticks at the normal rate.  The guest OS will
> -#         not notice anything is amiss, as from its point of view time will
> -#         have continued to flow normally.  The time in the guest should now
> -#         be behind the time in the host by exactly the amount of time during
> -#         which ticks have been missed.
> -#
> -# @slew: deliver ticks at a higher rate to catch up with the missed ticks.
> -#        The guest OS will not notice anything is amiss, as from its point
> -#        of view time will have continued to flow normally.  Once the timer
> -#        has managed to catch up with all the missing ticks, the time in
> -#        the guest and in the host should match.
> -#
> -# Since: 2.0
> -##
> -{ 'enum': 'LostTickPolicy',
> -  'data': ['discard', 'delay', 'slew' ] }
> -
>  ##
>  # @add_client:
>  #
> diff --git a/include/hw/rtc/mc146818rtc.h b/include/hw/rtc/mc146818rtc.h
> index 10c93a096a..58a7748c66 100644
> --- a/include/hw/rtc/mc146818rtc.h
> +++ b/include/hw/rtc/mc146818rtc.h
> @@ -9,7 +9,7 @@
>  #ifndef HW_RTC_MC146818RTC_H
>  #define HW_RTC_MC146818RTC_H
>  
> -#include "qapi/qapi-types-misc.h"
> +#include "qapi/qapi-types-machine.h"
>  #include "qemu/queue.h"
>  #include "qemu/timer.h"
>  #include "hw/isa/isa.h"
> diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
> index 2047114fca..59380ed761 100644
> --- a/hw/core/qdev-properties.c
> +++ b/hw/core/qdev-properties.c
> @@ -4,6 +4,7 @@
>  #include "qapi/error.h"
>  #include "hw/pci/pci.h"
>  #include "qapi/qapi-types-block.h"
> +#include "qapi/qapi-types-machine.h"
>  #include "qapi/qapi-types-misc.h"
>  #include "qapi/qmp/qerror.h"
>  #include "qemu/ctype.h"
> diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c
> index 876f5aa6fa..22ba6149b5 100644
> --- a/hw/i386/kvm/i8254.c
> +++ b/hw/i386/kvm/i8254.c
> @@ -25,7 +25,7 @@
>  
>  #include "qemu/osdep.h"
>  #include <linux/kvm.h>
> -#include "qapi/qapi-types-misc.h"
> +#include "qapi/qapi-types-machine.h"
>  #include "qapi/error.h"
>  #include "qemu/module.h"
>  #include "qemu/timer.h"
> 



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

* Re: [PATCH v2 2/8] qapi/misc: Restrict LostTickPolicy enum to machine code
  2020-03-16  0:03 ` [PATCH v2 2/8] qapi/misc: Restrict LostTickPolicy enum to machine code Philippe Mathieu-Daudé
  2020-05-25 14:12   ` Philippe Mathieu-Daudé
@ 2020-05-26 15:00   ` Igor Mammedov
  1 sibling, 0 replies; 26+ messages in thread
From: Igor Mammedov @ 2020-05-26 15:00 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Kevin Wolf, qemu-block, Daniel P. Berrangé,
	Eduardo Habkost, Ben Warren, Michael S. Tsirkin,
	Markus Armbruster, Peter Lieven, qemu-devel,
	Dr. David Alan Gilbert, Ronnie Sahlberg, Paolo Bonzini,
	Max Reitz, Richard Henderson

On Mon, 16 Mar 2020 01:03:42 +0100
Philippe Mathieu-Daudé <philmd@redhat.com> wrote:

> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: Igor Mammedov <imammedo@redhat.com>

> ---
>  qapi/machine.json            | 32 ++++++++++++++++++++++++++++++++
>  qapi/misc.json               | 32 --------------------------------
>  include/hw/rtc/mc146818rtc.h |  2 +-
>  hw/core/qdev-properties.c    |  1 +
>  hw/i386/kvm/i8254.c          |  2 +-
>  5 files changed, 35 insertions(+), 34 deletions(-)
> 
> diff --git a/qapi/machine.json b/qapi/machine.json
> index de05730704..07ffc07ba2 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -415,6 +415,38 @@
>  ##
>  { 'command': 'query-target', 'returns': 'TargetInfo' }
>  
> +##
> +# @LostTickPolicy:
> +#
> +# Policy for handling lost ticks in timer devices.  Ticks end up getting
> +# lost when, for example, the guest is paused.
> +#
> +# @discard: throw away the missed ticks and continue with future injection
> +#           normally.  The guest OS will see the timer jump ahead by a
> +#           potentially quite significant amount all at once, as if the
> +#           intervening chunk of time had simply not existed; needless to
> +#           say, such a sudden jump can easily confuse a guest OS which is
> +#           not specifically prepared to deal with it.  Assuming the guest
> +#           OS can deal correctly with the time jump, the time in the guest
> +#           and in the host should now match.
> +#
> +# @delay: continue to deliver ticks at the normal rate.  The guest OS will
> +#         not notice anything is amiss, as from its point of view time will
> +#         have continued to flow normally.  The time in the guest should now
> +#         be behind the time in the host by exactly the amount of time during
> +#         which ticks have been missed.
> +#
> +# @slew: deliver ticks at a higher rate to catch up with the missed ticks.
> +#        The guest OS will not notice anything is amiss, as from its point
> +#        of view time will have continued to flow normally.  Once the timer
> +#        has managed to catch up with all the missing ticks, the time in
> +#        the guest and in the host should match.
> +#
> +# Since: 2.0
> +##
> +{ 'enum': 'LostTickPolicy',
> +  'data': ['discard', 'delay', 'slew' ] }
> +
>  ##
>  # @NumaOptionsType:
>  #
> diff --git a/qapi/misc.json b/qapi/misc.json
> index c18fe681fb..2725d835ad 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -7,38 +7,6 @@
>  
>  { 'include': 'common.json' }
>  
> -##
> -# @LostTickPolicy:
> -#
> -# Policy for handling lost ticks in timer devices.  Ticks end up getting
> -# lost when, for example, the guest is paused.
> -#
> -# @discard: throw away the missed ticks and continue with future injection
> -#           normally.  The guest OS will see the timer jump ahead by a
> -#           potentially quite significant amount all at once, as if the
> -#           intervening chunk of time had simply not existed; needless to
> -#           say, such a sudden jump can easily confuse a guest OS which is
> -#           not specifically prepared to deal with it.  Assuming the guest
> -#           OS can deal correctly with the time jump, the time in the guest
> -#           and in the host should now match.
> -#
> -# @delay: continue to deliver ticks at the normal rate.  The guest OS will
> -#         not notice anything is amiss, as from its point of view time will
> -#         have continued to flow normally.  The time in the guest should now
> -#         be behind the time in the host by exactly the amount of time during
> -#         which ticks have been missed.
> -#
> -# @slew: deliver ticks at a higher rate to catch up with the missed ticks.
> -#        The guest OS will not notice anything is amiss, as from its point
> -#        of view time will have continued to flow normally.  Once the timer
> -#        has managed to catch up with all the missing ticks, the time in
> -#        the guest and in the host should match.
> -#
> -# Since: 2.0
> -##
> -{ 'enum': 'LostTickPolicy',
> -  'data': ['discard', 'delay', 'slew' ] }
> -
>  ##
>  # @add_client:
>  #
> diff --git a/include/hw/rtc/mc146818rtc.h b/include/hw/rtc/mc146818rtc.h
> index 10c93a096a..58a7748c66 100644
> --- a/include/hw/rtc/mc146818rtc.h
> +++ b/include/hw/rtc/mc146818rtc.h
> @@ -9,7 +9,7 @@
>  #ifndef HW_RTC_MC146818RTC_H
>  #define HW_RTC_MC146818RTC_H
>  
> -#include "qapi/qapi-types-misc.h"
> +#include "qapi/qapi-types-machine.h"
>  #include "qemu/queue.h"
>  #include "qemu/timer.h"
>  #include "hw/isa/isa.h"
> diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
> index 2047114fca..59380ed761 100644
> --- a/hw/core/qdev-properties.c
> +++ b/hw/core/qdev-properties.c
> @@ -4,6 +4,7 @@
>  #include "qapi/error.h"
>  #include "hw/pci/pci.h"
>  #include "qapi/qapi-types-block.h"
> +#include "qapi/qapi-types-machine.h"
>  #include "qapi/qapi-types-misc.h"
>  #include "qapi/qmp/qerror.h"
>  #include "qemu/ctype.h"
> diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c
> index 876f5aa6fa..22ba6149b5 100644
> --- a/hw/i386/kvm/i8254.c
> +++ b/hw/i386/kvm/i8254.c
> @@ -25,7 +25,7 @@
>  
>  #include "qemu/osdep.h"
>  #include <linux/kvm.h>
> -#include "qapi/qapi-types-misc.h"
> +#include "qapi/qapi-types-machine.h"
>  #include "qapi/error.h"
>  #include "qemu/module.h"
>  #include "qemu/timer.h"



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

end of thread, other threads:[~2020-05-26 15:02 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16  0:03 [PATCH v2 0/8] user-mode: Prune build dependencies (part 2) Philippe Mathieu-Daudé
2020-03-16  0:03 ` [PATCH v2 1/8] target/i386: Restrict X86CPUFeatureWord to X86 targets Philippe Mathieu-Daudé
2020-03-16  0:29   ` Aleksandar Markovic
2020-03-16  0:31     ` Aleksandar Markovic
2020-03-16  7:30     ` Philippe Mathieu-Daudé
2020-03-18  8:25   ` Philippe Mathieu-Daudé
2020-03-16  0:03 ` [PATCH v2 2/8] qapi/misc: Restrict LostTickPolicy enum to machine code Philippe Mathieu-Daudé
2020-05-25 14:12   ` Philippe Mathieu-Daudé
2020-05-26 15:00   ` Igor Mammedov
2020-03-16  0:03 ` [PATCH v2 3/8] qapi/misc: Restrict balloon-related commands " Philippe Mathieu-Daudé
2020-03-16  9:05   ` David Hildenbrand
2020-03-17 11:03     ` Philippe Mathieu-Daudé
2020-03-17 11:04       ` David Hildenbrand
2020-03-16  0:03 ` [PATCH v2 4/8] qapi/misc: Move query-uuid command with block code Philippe Mathieu-Daudé
2020-03-16 13:09   ` Igor Mammedov
2020-03-16 13:57     ` Philippe Mathieu-Daudé
2020-03-16  0:03 ` [PATCH v2 5/8] qapi/misc: Restrict query-vm-generation-id command to machine code Philippe Mathieu-Daudé
2020-03-16 12:45   ` Igor Mammedov
2020-03-17  9:44     ` Philippe Mathieu-Daudé
2020-03-17 11:07       ` Igor Mammedov
2020-03-16  0:03 ` [PATCH v2 6/8] qapi/misc: Restrict ACPI commands " Philippe Mathieu-Daudé
2020-03-16 12:47   ` Igor Mammedov
2020-03-16  0:03 ` [PATCH v2 7/8] qapi/misc: Restrict PCI " Philippe Mathieu-Daudé
2020-05-25 14:12   ` Philippe Mathieu-Daudé
2020-03-16  0:03 ` [PATCH v2 8/8] qapi/misc: Restrict device memory " Philippe Mathieu-Daudé
2020-03-16 12:49   ` Igor Mammedov

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.