[PATCH v4 0/9] user-mode: Prune build dependencies (part 2)

Philippe Mathieu-Daudé posted 9 patches 3 years, 7 months ago
Test docker-quick@centos7 failed
Test docker-mingw@fedora failed
Test checkpatch failed
Test FreeBSD failed
Failed in applying to current master (apply log)
There is a newer version of this series
qapi/acpi.json                       | 141 +++++
qapi/machine-target.json             |  45 ++
qapi/machine.json                    | 430 ++++++++++++--
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 +-
target/i386/cpu.c                    |   2 +-
target/i386/machine-stub.c           |  23 +
MAINTAINERS                          |   2 +
qapi/meson.build                     |   2 +
target/i386/meson.build              |   1 +
32 files changed, 944 insertions(+), 880 deletions(-)
create mode 100644 qapi/acpi.json
create mode 100644 qapi/pci.json
create mode 100644 target/i386/machine-stub.c
[PATCH v4 0/9] user-mode: Prune build dependencies (part 2)
Posted by Philippe Mathieu-Daudé 3 years, 7 months ago
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 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/188367944

Philippe Mathieu-Daudé (9):
  target/i386: Restrict X86CPUFeatureWord to X86 targets
  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-target.json             |  45 ++
 qapi/machine.json                    | 430 ++++++++++++--
 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 +-
 target/i386/cpu.c                    |   2 +-
 target/i386/machine-stub.c           |  23 +
 MAINTAINERS                          |   2 +
 qapi/meson.build                     |   2 +
 target/i386/meson.build              |   1 +
 32 files changed, 944 insertions(+), 880 deletions(-)
 create mode 100644 qapi/acpi.json
 create mode 100644 qapi/pci.json
 create mode 100644 target/i386/machine-stub.c

-- 
2.26.2

Re: [PATCH v4 0/9] user-mode: Prune build dependencies (part 2)
Posted by no-reply@patchew.org 3 years, 7 months ago
Patchew URL: https://patchew.org/QEMU/20200910152225.524322-1-philmd@redhat.com/



Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#! /bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-mingw@fedora J=14 NETWORK=1
=== TEST SCRIPT END ===




The full log is available at
http://patchew.org/logs/20200910152225.524322-1-philmd@redhat.com/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH v4 0/9] user-mode: Prune build dependencies (part 2)
Posted by Paolo Bonzini 3 years, 7 months ago
On 10/09/20 17:22, Philippe Mathieu-Daudé wrote:
> 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 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/188367944
> 
> Philippe Mathieu-Daudé (9):
>   target/i386: Restrict X86CPUFeatureWord to X86 targets
>   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-target.json             |  45 ++
>  qapi/machine.json                    | 430 ++++++++++++--
>  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 +-
>  target/i386/cpu.c                    |   2 +-
>  target/i386/machine-stub.c           |  23 +
>  MAINTAINERS                          |   2 +
>  qapi/meson.build                     |   2 +
>  target/i386/meson.build              |   1 +
>  32 files changed, 944 insertions(+), 880 deletions(-)
>  create mode 100644 qapi/acpi.json
>  create mode 100644 qapi/pci.json
>  create mode 100644 target/i386/machine-stub.c
> 

I'm not sure about the first.  It's a bit ugly to have a property whose
getter aborts.

For patches 2-9 though:

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

Paolo


Re: [PATCH v4 0/9] user-mode: Prune build dependencies (part 2)
Posted by Philippe Mathieu-Daudé 3 years, 7 months ago
On 9/12/20 11:16 AM, Paolo Bonzini wrote:
> On 10/09/20 17:22, Philippe Mathieu-Daudé wrote:
>> 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 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/188367944
>>
>> Philippe Mathieu-Daudé (9):
>>   target/i386: Restrict X86CPUFeatureWord to X86 targets
>>   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-target.json             |  45 ++
>>  qapi/machine.json                    | 430 ++++++++++++--
>>  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 +-
>>  target/i386/cpu.c                    |   2 +-
>>  target/i386/machine-stub.c           |  23 +
>>  MAINTAINERS                          |   2 +
>>  qapi/meson.build                     |   2 +
>>  target/i386/meson.build              |   1 +
>>  32 files changed, 944 insertions(+), 880 deletions(-)
>>  create mode 100644 qapi/acpi.json
>>  create mode 100644 qapi/pci.json
>>  create mode 100644 target/i386/machine-stub.c
>>
> 
> I'm not sure about the first.  It's a bit ugly to have a property whose
> getter aborts.

This is (IIUC) the change Markus requested in v3 (see [*]).

Commit description: "add a stub to satisfy the linker."

This stub should be never used on user-mode => abort.

[*] https://www.mail-archive.com/qemu-block@nongnu.org/msg67560.html

> 
> For patches 2-9 though:
> 
> Acked-by: Paolo Bonzini <pbonzini@redhat.com>

Thanks!

> 
> Paolo
> 


Re: [PATCH v4 0/9] user-mode: Prune build dependencies (part 2)
Posted by Paolo Bonzini 3 years, 7 months ago
On 13/09/20 13:31, Philippe Mathieu-Daudé wrote:
>> I'm not sure about the first.  It's a bit ugly to have a property whose
>> getter aborts.
> This is (IIUC) the change Markus requested in v3 (see [*]).
> 
> Commit description: "add a stub to satisfy the linker."
> 
> This stub should be never used on user-mode => abort.
> 
> [*] https://www.mail-archive.com/qemu-block@nongnu.org/msg67560.html
> 

Yes, I'm not sure about the stub _in general_.  I would prefer to either
have the type available even on user-mode emulation, or remove the
property altogether... I don't know, anything but not a property that
aborts. :)

Paolo


Re: [PATCH v4 0/9] user-mode: Prune build dependencies (part 2)
Posted by Philippe Mathieu-Daudé 3 years, 7 months ago
On 9/13/20 3:40 PM, Paolo Bonzini wrote:
> On 13/09/20 13:31, Philippe Mathieu-Daudé wrote:
>>> I'm not sure about the first.  It's a bit ugly to have a property whose
>>> getter aborts.
>> This is (IIUC) the change Markus requested in v3 (see [*]).
>>
>> Commit description: "add a stub to satisfy the linker."
>>
>> This stub should be never used on user-mode => abort.
>>
>> [*] https://www.mail-archive.com/qemu-block@nongnu.org/msg67560.html
>>
> 
> Yes, I'm not sure about the stub _in general_.  I would prefer to either
> have the type available even on user-mode emulation, or remove the
> property altogether... I don't know, anything but not a property that
> aborts. :)

I plan to eventually get user-mode cleaned, but this is out of the scope
of this generic second part which is already big enough for Laurent to
digest. Maybe part #4 will be x86 specific.

Let's wait for Markus view on this (personally I don't mind removing
the abort, it was not there on v3).

> 
> Paolo
> 


Re: [PATCH v4 0/9] user-mode: Prune build dependencies (part 2)
Posted by Paolo Bonzini 3 years, 7 months ago
On 13/09/20 17:51, Philippe Mathieu-Daudé wrote:
>>>
>> Yes, I'm not sure about the stub _in general_.  I would prefer to either
>> have the type available even on user-mode emulation, or remove the
>> property altogether... I don't know, anything but not a property that
>> aborts. :)
> I plan to eventually get user-mode cleaned, but this is out of the scope
> of this generic second part which is already big enough for Laurent to
> digest. Maybe part #4 will be x86 specific.
> 
> Let's wait for Markus view on this (personally I don't mind removing
> the abort, it was not there on v3).
> 

The abort is better than v3 which was buggy (like use-uninitialized-data
buggy).  But I'd prefer not needing the stub at all.

Paolo