mbox series

[v5,0/8] user-mode: Prune build dependencies (part 2)

Message ID 20200913195348.1064154-1-philmd@redhat.com
Headers show
Series user-mode: Prune build dependencies (part 2) | expand

Message

Philippe Mathieu-Daudé Sept. 13, 2020, 7:53 p.m. UTC
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).

Series is fully Acked.

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

Since v4:
- Rebased on "QOM boilerplate cleanup"
- Dropped patch #1 "target/i386: Restrict X86CPUFeatureWord"
- Added Paolo's A-b tag

Since v3:
- Rebased (Meson)
- Addressed Markus comments:
  - Use g_assert_not_reached() in stub
  - Add commit descriptions
  - Extract ACPI / PCI
  - MEMORY not extracted as no feedback from Igor/MST

Since v2:
- Addressed Igor review comments (move query-uuid to machine)
- Addressed David review comments (fix balloon documentation)

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

CI:
https://gitlab.com/philmd/qemu/-/pipelines/189374631

Philippe Mathieu-Daudé (8):
  qapi: Restrict LostTickPolicy enum to machine code
  qapi: Correct balloon documentation
  qapi: Restrict balloon-related commands to machine code
  qapi: Restrict query-vm-generation-id command to machine code
  qapi: Restrict query-uuid command to machine code
  qapi: Restrict device memory commands to machine code
  qapi: Extract ACPI commands to 'acpi.json'
  qapi: Extract PCI commands to 'pci.json'

 qapi/acpi.json                       | 141 +++++
 qapi/machine.json                    | 388 +++++++++++++
 qapi/misc.json                       | 820 ---------------------------
 qapi/pci.json                        | 316 +++++++++++
 qapi/qapi-schema.json                |   2 +
 include/hw/acpi/acpi_dev_interface.h |   2 +-
 include/hw/mem/memory-device.h       |   2 +-
 include/hw/rtc/mc146818rtc.h         |   2 +-
 include/hw/virtio/virtio-pmem.h      |   2 +-
 include/sysemu/balloon.h             |   2 +-
 block/iscsi.c                        |   2 +-
 hw/acpi/core.c                       |   2 +-
 hw/acpi/cpu.c                        |   2 +-
 hw/acpi/memory_hotplug.c             |   3 +-
 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 +-
 hw/virtio/virtio-mem-pci.c           |   1 +
 monitor/hmp-cmds.c                   |   2 +
 monitor/qmp-cmds.c                   |   1 +
 softmmu/balloon.c                    |   2 +-
 stubs/uuid.c                         |   2 +-
 stubs/vmgenid.c                      |   2 +-
 MAINTAINERS                          |   2 +
 qapi/meson.build                     |   2 +
 28 files changed, 874 insertions(+), 837 deletions(-)
 create mode 100644 qapi/acpi.json
 create mode 100644 qapi/pci.json

Comments

Markus Armbruster Sept. 14, 2020, 9:14 a.m. UTC | #1
Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> Acked-by: Markus Armbruster <armbru@redhat.com>
> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Unlike the other patches that move code out of misc.json, this one
doesn't say "allows pulling less declarations/definitions to user-mode."
Intentional?
Philippe Mathieu-Daudé Sept. 14, 2020, 9:42 a.m. UTC | #2
+Laurent and David

On 9/14/20 11:16 AM, Markus Armbruster wrote:
> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> 
>> Only qemu-system-FOO and qemu-storage-daemon provide QMP
>> monitors, therefore such declarations and definitions are
>> irrelevant for user-mode emulation.
>>
>> Restricting the balloon-related commands to machine.json
>> allows pulling less declarations/definitions to user-mode.
> 
> How this affects user mode is not obvious to (ignorant) me.  Can you
> provide a clue?

I guess this was discussed with David at some point.

Maybe the QMP commands are not exposed via HMP, making this
code unreachable?

Anyhow user-mode binaries don't use the memory ballooning feature,
this is specific to system-mode emulation.

Laurent/David, do you have some more trivial explanation?

Thanks,

Phil.
Markus Armbruster Sept. 15, 2020, 6:27 a.m. UTC | #3
Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> +Laurent + qemu-block@

>

> On 9/14/20 11:14 AM, Markus Armbruster wrote:

>> Philippe Mathieu-Daudé <philmd@redhat.com> writes:

>> 

>>> Acked-by: Markus Armbruster <armbru@redhat.com>

>>> Acked-by: Paolo Bonzini <pbonzini@redhat.com>

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

>> 

>> Unlike the other patches that move code out of misc.json, this one

>> doesn't say "allows pulling less declarations/definitions to user-mode."

>> Intentional?

>

> TBH I don't remember as this is 6months old.

>

> IIUC the "tick lost" feature is only meaningful when running

> virtualized with a RTC profile, so this is pointless for

> user-mode binaries and tools.


Your reply to my question on PATCH 3 "What exactly is being pulled
where before the series, and no more afterwards?" leads me to believe
this patch is no different.  Suggest to add the same rationale to this
commit message.
Markus Armbruster Sept. 15, 2020, 6:29 a.m. UTC | #4
Philippe Mathieu-Daudé <philmd@redhat.com> writes:

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

>

> Series is fully Acked.


One more:
Acked-by: Markus Armbruster <armbru@redhat.com>


I suggested commit message tweaks.  Happy to do them in my tree, if you
agree.
Philippe Mathieu-Daudé Sept. 15, 2020, 7:09 a.m. UTC | #5
On 9/15/20 8:29 AM, Markus Armbruster wrote:
> Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> 

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

>>

>> Series is fully Acked.

> 

> One more:

> Acked-by: Markus Armbruster <armbru@redhat.com>

> 

> I suggested commit message tweaks.  Happy to do them in my tree, if you

> agree.


Sure, no problem!

Thanks :)

Phil.
Markus Armbruster Sept. 15, 2020, 8:52 a.m. UTC | #6
Philippe Mathieu-Daudé <philmd@redhat.com> writes:

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

>

> Series is fully Acked.


Queued, thanks!