OSDN Git Service

qmiga/qemu.git
2 years agoqtest/numa-test: Correct CPU and NUMA association in aarch64_numa_cpu()
Gavin Shan [Tue, 3 May 2022 14:03:02 +0000 (22:03 +0800)]
qtest/numa-test: Correct CPU and NUMA association in aarch64_numa_cpu()

In aarch64_numa_cpu(), the CPU and NUMA association is something
like below. Two threads in the same core/cluster/socket are
associated with two individual NUMA nodes, which is unreal as
Igor Mammedov mentioned. We don't expect the association to break
NUMA-to-socket boundary, which matches with the real world.

    NUMA-node  socket  cluster   core   thread
    ------------------------------------------
        0       0        0        0      0
        1       0        0        0      1

This corrects the topology for CPUs and their association with
NUMA nodes. After this patch is applied, the CPU and NUMA
association becomes something like below, which looks real.
Besides, socket/cluster/core/thread IDs are all checked when
the NUMA node IDs are verified. It helps to check if the CPU
topology is properly populated or not.

    NUMA-node  socket  cluster   core   thread
    ------------------------------------------
       0        1        0        0       0
       1        0        0        0       0

Suggested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Gavin Shan <gshan@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Message-id: 20220503140304.855514-5-gshan@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agohw/arm/virt: Consider SMP configuration in CPU topology
Gavin Shan [Tue, 3 May 2022 14:03:01 +0000 (22:03 +0800)]
hw/arm/virt: Consider SMP configuration in CPU topology

Currently, the SMP configuration isn't considered when the CPU
topology is populated. In this case, it's impossible to provide
the default CPU-to-NUMA mapping or association based on the socket
ID of the given CPU.

This takes account of SMP configuration when the CPU topology
is populated. The die ID for the given CPU isn't assigned since
it's not supported on arm/virt machine. Besides, the used SMP
configuration in qtest/numa-test/aarch64_numa_cpu() is corrcted
to avoid testing failure

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Yanan Wang <wangyanan55@huawei.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Message-id: 20220503140304.855514-4-gshan@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agoqtest/numa-test: Specify CPU topology in aarch64_numa_cpu()
Gavin Shan [Tue, 3 May 2022 14:03:00 +0000 (22:03 +0800)]
qtest/numa-test: Specify CPU topology in aarch64_numa_cpu()

The CPU topology isn't enabled on arm/virt machine yet, but we're
going to do it in next patch. After the CPU topology is enabled by
next patch, "thread-id=1" becomes invalid because the CPU core is
preferred on arm/virt machine. It means these two CPUs have 0/1
as their core IDs, but their thread IDs are all 0. It will trigger
test failure as the following message indicates:

  [14/21 qemu:qtest+qtest-aarch64 / qtest-aarch64/numa-test  ERROR
  1.48s   killed by signal 6 SIGABRT
  >>> G_TEST_DBUS_DAEMON=/home/gavin/sandbox/qemu.main/tests/dbus-vmstate-daemon.sh \
      QTEST_QEMU_STORAGE_DAEMON_BINARY=./storage-daemon/qemu-storage-daemon         \
      QTEST_QEMU_BINARY=./qemu-system-aarch64                                       \
      QTEST_QEMU_IMG=./qemu-img MALLOC_PERTURB_=83                                  \
      /home/gavin/sandbox/qemu.main/build/tests/qtest/numa-test --tap -k
  ――――――――――――――――――――――――――――――――――――――――――――――
  stderr:
  qemu-system-aarch64: -numa cpu,node-id=0,thread-id=1: no match found

This fixes the issue by providing comprehensive SMP configurations
in aarch64_numa_cpu(). The SMP configurations aren't used before
the CPU topology is enabled in next patch.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Yanan Wang <wangyanan55@huawei.com>
Message-id: 20220503140304.855514-3-gshan@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agoqapi/machine.json: Add cluster-id
Gavin Shan [Tue, 3 May 2022 14:02:59 +0000 (22:02 +0800)]
qapi/machine.json: Add cluster-id

This adds cluster-id in CPU instance properties, which will be used
by arm/virt machine. Besides, the cluster-id is also verified or
dumped in various spots:

  * hw/core/machine.c::machine_set_cpu_numa_node() to associate
    CPU with its NUMA node.

  * hw/core/machine.c::machine_numa_finish_cpu_init() to record
    CPU slots with no NUMA mapping set.

  * hw/core/machine-hmp-cmds.c::hmp_hotpluggable_cpus() to dump
    cluster-id.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Yanan Wang <wangyanan55@huawei.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Message-id: 20220503140304.855514-2-gshan@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agohw/arm: add versioning to sbsa-ref machine DT
Leif Lindholm [Thu, 5 May 2022 11:39:47 +0000 (12:39 +0100)]
hw/arm: add versioning to sbsa-ref machine DT

The sbsa-ref machine is continuously evolving. Some of the changes we
want to make in the near future, to align with real components (e.g.
the GIC-700), will break compatibility for existing firmware.

Introduce two new properties to the DT generated on machine generation:
- machine-version-major
  To be incremented when a platform change makes the machine
  incompatible with existing firmware.
- machine-version-minor
  To be incremented when functionality is added to the machine
  without causing incompatibility with existing firmware.
  to be reset to 0 when machine-version-major is incremented.

This versioning scheme is *neither*:
- A QEMU versioned machine type; a given version of QEMU will emulate
  a given version of the platform.
- A reflection of level of SBSA (now SystemReady SR) support provided.

The version will increment on guest-visible functional changes only,
akin to a revision ID register found on a physical platform.

These properties are both introduced with the value 0.
(Hence, a machine where the DT is lacking these nodes is equivalent
to version 0.0.)

Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
Message-id: 20220505113947.75714-1-quic_llindhol@quicinc.com
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Radoslaw Biernacki <rad@semihalf.com>
Cc: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Define neoverse-n1
Richard Henderson [Fri, 6 May 2022 18:02:42 +0000 (13:02 -0500)]
target/arm: Define neoverse-n1

Enable the n1 for virt and sbsa board use.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-25-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Define cortex-a76
Richard Henderson [Fri, 6 May 2022 18:02:41 +0000 (13:02 -0500)]
target/arm: Define cortex-a76

Enable the a76 for virt and sbsa board use.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-24-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Enable FEAT_DGH for -cpu max
Richard Henderson [Fri, 6 May 2022 18:02:40 +0000 (13:02 -0500)]
target/arm: Enable FEAT_DGH for -cpu max

This extension concerns not merging memory access, which TCG does
not implement.  Thus we can trivially enable this feature.
Add a comment to handle_hint for the DGH instruction, but no code.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-23-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Enable FEAT_CSV3 for -cpu max
Richard Henderson [Fri, 6 May 2022 18:02:39 +0000 (13:02 -0500)]
target/arm: Enable FEAT_CSV3 for -cpu max

This extension concerns cache speculation, which TCG does
not implement.  Thus we can trivially enable this feature.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-22-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Enable FEAT_CSV2_2 for -cpu max
Richard Henderson [Fri, 6 May 2022 18:02:38 +0000 (13:02 -0500)]
target/arm: Enable FEAT_CSV2_2 for -cpu max

There is no branch prediction in TCG, therefore there is no
need to actually include the context number into the predictor.
Therefore all we need to do is add the state for SCXTNUM_ELx.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-21-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Enable FEAT_CSV2 for -cpu max
Richard Henderson [Fri, 6 May 2022 18:02:37 +0000 (13:02 -0500)]
target/arm: Enable FEAT_CSV2 for -cpu max

This extension concerns branch speculation, which TCG does
not implement.  Thus we can trivially enable this feature.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-20-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Enable FEAT_IESB for -cpu max
Richard Henderson [Fri, 6 May 2022 18:02:36 +0000 (13:02 -0500)]
target/arm: Enable FEAT_IESB for -cpu max

This feature is AArch64 only, and applies to physical SErrors,
which QEMU does not implement, thus the feature is a nop.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-19-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Enable FEAT_RAS for -cpu max
Richard Henderson [Fri, 6 May 2022 18:02:35 +0000 (13:02 -0500)]
target/arm: Enable FEAT_RAS for -cpu max

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-18-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Implement ESB instruction
Richard Henderson [Fri, 6 May 2022 18:02:34 +0000 (13:02 -0500)]
target/arm: Implement ESB instruction

Check for and defer any pending virtual SError.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-17-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Implement virtual SError exceptions
Richard Henderson [Fri, 6 May 2022 18:02:33 +0000 (13:02 -0500)]
target/arm: Implement virtual SError exceptions

Virtual SError exceptions are raised by setting HCR_EL2.VSE,
and are routed to EL1 just like other virtual exceptions.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-16-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Enable SCR and HCR bits for RAS
Richard Henderson [Fri, 6 May 2022 18:02:32 +0000 (13:02 -0500)]
target/arm: Enable SCR and HCR bits for RAS

Enable writes to the TERR and TEA bits when RAS is enabled.
These bits are otherwise RES0.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-15-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Add minimal RAS registers
Richard Henderson [Fri, 6 May 2022 18:02:31 +0000 (13:02 -0500)]
target/arm: Add minimal RAS registers

Add only the system registers required to implement zero error
records.  This means that all values for ERRSELR are out of range,
which means that it and all of the indexed error record registers
need not be implemented.

Add the EL2 registers required for injecting virtual SError.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-14-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Enable FEAT_Debugv8p4 for -cpu max
Richard Henderson [Fri, 6 May 2022 18:02:30 +0000 (13:02 -0500)]
target/arm: Enable FEAT_Debugv8p4 for -cpu max

This extension concerns changes to the External Debug interface,
with Secure and Non-secure access to the debug registers, and all
of it is outside the scope of QEMU.  Indicating support for this
is mandatory with FEAT_SEL2, which we do implement.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-13-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Enable FEAT_Debugv8p2 for -cpu max
Richard Henderson [Fri, 6 May 2022 18:02:29 +0000 (13:02 -0500)]
target/arm: Enable FEAT_Debugv8p2 for -cpu max

The only portion of FEAT_Debugv8p2 that is relevant to QEMU
is CONTEXTIDR_EL2, which is also conditionally implemented
with FEAT_VHE.  The rest of the debug extension concerns the
External debug interface, which is outside the scope of QEMU.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-12-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Use field names for manipulating EL2 and EL3 modes
Richard Henderson [Fri, 6 May 2022 18:02:28 +0000 (13:02 -0500)]
target/arm: Use field names for manipulating EL2 and EL3 modes

Use FIELD_DP{32,64} to manipulate id_pfr1 and id_aa64pfr0
during arm_cpu_realizefn.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-11-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Annotate arm_max_initfn with FEAT identifiers
Richard Henderson [Fri, 6 May 2022 18:02:27 +0000 (13:02 -0500)]
target/arm: Annotate arm_max_initfn with FEAT identifiers

Update the legacy feature names to the current names.
Provide feature names for id changes that were not marked.
Sort the field updates into increasing bitfield order.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-10-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Split out aa32_max_features
Richard Henderson [Fri, 6 May 2022 18:02:26 +0000 (13:02 -0500)]
target/arm: Split out aa32_max_features

Share the code to set AArch32 max features so that we no
longer have code drift between qemu{-system,}-{arm,aarch64}.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-9-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Set ID_DFR0.PerfMon for qemu-system-arm -cpu max
Richard Henderson [Fri, 6 May 2022 18:02:25 +0000 (13:02 -0500)]
target/arm: Set ID_DFR0.PerfMon for qemu-system-arm -cpu max

We set this for qemu-system-aarch64, but failed to do so
for the strictly 32-bit emulation.

Fixes: 3bec78447a9 ("target/arm: Provide ARMv8.4-PMU in '-cpu max'")
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-8-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Update qemu-system-arm -cpu max to cortex-a57
Richard Henderson [Fri, 6 May 2022 18:02:24 +0000 (13:02 -0500)]
target/arm: Update qemu-system-arm -cpu max to cortex-a57

Instead of starting with cortex-a15 and adding v8 features to
a v7 cpu, begin with a v8 cpu stripped of its aarch64 features.
This fixes the long-standing to-do where we only enabled v8
features for user-only.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-7-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Move cortex impdef sysregs to cpu_tcg.c
Richard Henderson [Fri, 6 May 2022 18:02:23 +0000 (13:02 -0500)]
target/arm: Move cortex impdef sysregs to cpu_tcg.c

Previously we were defining some of these in user-only mode,
but none of them are accessible from user-only, therefore
define them only in system mode.

This will shortly be used from cpu_tcg.c also.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-6-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Adjust definition of CONTEXTIDR_EL2
Richard Henderson [Fri, 6 May 2022 18:02:22 +0000 (13:02 -0500)]
target/arm: Adjust definition of CONTEXTIDR_EL2

This register is present for either VHE or Debugv8p2.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-5-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Merge zcr reginfo
Richard Henderson [Fri, 6 May 2022 18:02:21 +0000 (13:02 -0500)]
target/arm: Merge zcr reginfo

Drop zcr_no_el2_reginfo and merge the 3 registers into one array,
now that ZCR_EL2 can be squashed to RES0 and ZCR_EL3 dropped
while registering.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-4-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Drop EL3 no EL2 fallbacks
Richard Henderson [Fri, 6 May 2022 18:02:20 +0000 (13:02 -0500)]
target/arm: Drop EL3 no EL2 fallbacks

Drop el3_no_el2_cp_reginfo, el3_no_el2_v8_cp_reginfo, and the local
vpidr_regs definition, and rely on the squashing to ARM_CP_CONST
while registering for v8.

This is a behavior change for v7 cpus with Security Extensions and
without Virtualization Extensions, in that the virtualization cpregs
are now correctly not present.  This would be a migration compatibility
break, except that we have an existing bug in which migration of 32-bit
cpus with Security Extensions enabled does not work.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-3-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotarget/arm: Handle cpreg registration for missing EL
Richard Henderson [Fri, 6 May 2022 18:02:19 +0000 (13:02 -0500)]
target/arm: Handle cpreg registration for missing EL

More gracefully handle cpregs when EL2 and/or EL3 are missing.
If the reg is entirely inaccessible, do not register it at all.
If the reg is for EL2, and EL3 is present but EL2 is not,
either discard, squash to res0, const, or keep unchanged.

Per rule RJFFP, mark the 4 aarch32 hypervisor access registers
with ARM_CP_EL3_NO_EL2_KEEP, and mark all of the EL2 address
translation and tlb invalidation "regs" ARM_CP_EL3_NO_EL2_UNDEF.
Mark the 2 virtualization processor id regs ARM_CP_EL3_NO_EL2_C_NZ.

This will simplify cpreg registration for conditional arm features.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220506180242.216785-2-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agoMAINTAINERS/.mailmap: update email for Leif Lindholm
Leif Lindholm [Thu, 5 May 2022 11:37:40 +0000 (12:37 +0100)]
MAINTAINERS/.mailmap: update email for Leif Lindholm

NUVIA was acquired by Qualcomm in March 2021, but kept functioning on
separate infrastructure for a transitional period. We've now switched
over to contributing as Qualcomm Innovation Center (quicinc), so update
my email address to reflect this.

Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
Message-id: 20220505113740.75565-1-quic_llindhol@quicinc.com
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
[Fixed commit message typo]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agoMerge tag 'qemu-sparc-20220508' of https://github.com/mcayland/qemu into staging
Richard Henderson [Sun, 8 May 2022 22:03:26 +0000 (17:03 -0500)]
Merge tag 'qemu-sparc-20220508' of https://github.com/mcayland/qemu into staging

qemu-sparc queue

# -----BEGIN PGP SIGNATURE-----
#
# iQFSBAABCgA8FiEEzGIauY6CIA2RXMnEW8LFb64PMh8FAmJ4A6ceHG1hcmsuY2F2
# ZS1heWxhbmRAaWxhbmRlLmNvLnVrAAoJEFvCxW+uDzIf4SAH+weljMrdObceJ4vg
# MedvVXUGmr0Uzk0iSkac1FGLCwEC/9bzBMrxMxNCsGHwVWjuX7S9Vikj/4mMi15U
# 6iJ56QzVbsxZknr2+gGtB4QEAWHlQSuSrvcFVFc+Vc9enCBZNZoaehF0HzUSUFxU
# nMnZQqDWrc4H9D2E+YK4OLgv3IMqOy3uKWMgIZ7JJX6YebLMXqZV1mq2G9LjKf9X
# zM3HM6V9yd+1UEzb5biHkorBcdyt5F8P/V1VtiGZYFws27UwSBxW9EEDV3XcSGYD
# kS9RpYka4qmC0saj5cBUR/AYQ/jwSbI9kEs4VsBzRQ/eX25F5TPEbyXp6bJZ75Gi
# tsOhvvg=
# =Qnnm
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun 08 May 2022 12:53:43 PM CDT
# gpg:                using RSA key CC621AB98E82200D915CC9C45BC2C56FAE0F321F
# gpg:                issuer "mark.cave-ayland@ilande.co.uk"
# gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: CC62 1AB9 8E82 200D 915C  C9C4 5BC2 C56F AE0F 321F

* tag 'qemu-sparc-20220508' of https://github.com/mcayland/qemu: (53 commits)
  artist: only render dirty scanlines on the display surface
  artist: remove unused ROP8OFF() macro
  artist: checkpatch and newline style fixes
  hppa: simplify machine function names in machine.c
  hppa: fold machine_hppa_machine_init() into machine_hppa_machine_init_class_init()
  hppa: use MACHINE QOM macros for defining the hppa machine
  hppa: remove the empty hppa_sys.h file
  hppa: move enable_lan() define from hppa_sys.h to machine.c
  hppa: remove unused trace-events from from hw/hppa
  hppa: remove hw/hppa/pci.c
  hppa: move hppa_pci_ignore_ops from pci.c to machine.c
  lasi: move from hw/hppa to hw/misc
  hppa: move device headers from hppa_sys.h into individual .c files
  lasi: use numerical constant for iar reset value
  lasi: use constants for device register offsets
  lasi: move lasi_initfn() to machine.c
  lasi: remove address space parameter from lasi_initfn()
  lasi: move PS2 initialisation to machine.c
  lasi: move second serial port initialisation to machine.c
  lasi: move parallel port initialisation to machine.c
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agoartist: only render dirty scanlines on the display surface
Mark Cave-Ayland [Wed, 4 May 2022 15:37:08 +0000 (16:37 +0100)]
artist: only render dirty scanlines on the display surface

The framebuffer_update_display() function returns the dirty scanlines that were
touched since the last display update, however artist_update_display() always calls
dpy_gfx_update() with start and end scanlines of 0 and s->height causing the
entire display surface to be rendered on every update.

Update artist_update_display() so that dpy_gfx_update() only renders the dirty
scanlines on the display surface, bypassing the display surface rendering
completely if framebuffer_update_display() indicates no changes occurred.

This noticeably improves boot performance when the framebuffer is enabled on my
rather modest laptop here, including making the GTK UI usable.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220504153708.10352-4-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Helge Deller <deller@gmx.de>
Reviewed-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agoartist: remove unused ROP8OFF() macro
Mark Cave-Ayland [Wed, 4 May 2022 15:37:07 +0000 (16:37 +0100)]
artist: remove unused ROP8OFF() macro

This macro is unused and so can simply be removed.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220504153708.10352-3-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Helge Deller <deller@gmx.de>
Reviewed-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agoartist: checkpatch and newline style fixes
Mark Cave-Ayland [Wed, 4 May 2022 15:37:06 +0000 (16:37 +0100)]
artist: checkpatch and newline style fixes

Ensure that subsequent patches do not cause checkpatch to fail and also tidy up
extra/missing newlines.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220504153708.10352-2-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Helge Deller <deller@gmx.de>
Reviewed-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agohppa: simplify machine function names in machine.c
Mark Cave-Ayland [Wed, 4 May 2022 09:26:00 +0000 (10:26 +0100)]
hppa: simplify machine function names in machine.c

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-51-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agohppa: fold machine_hppa_machine_init() into machine_hppa_machine_init_class_init()
Mark Cave-Ayland [Wed, 4 May 2022 09:25:59 +0000 (10:25 +0100)]
hppa: fold machine_hppa_machine_init() into machine_hppa_machine_init_class_init()

There is no need for a separate function to set the machine class properties
separately from the others.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-50-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agohppa: use MACHINE QOM macros for defining the hppa machine
Mark Cave-Ayland [Wed, 4 May 2022 09:25:58 +0000 (10:25 +0100)]
hppa: use MACHINE QOM macros for defining the hppa machine

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-49-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agohppa: remove the empty hppa_sys.h file
Mark Cave-Ayland [Wed, 4 May 2022 09:25:57 +0000 (10:25 +0100)]
hppa: remove the empty hppa_sys.h file

This file is now just a simple wrapper that includes hppa_hardware.h so remove
the file completely, and update its single user in machine.c to include
hppa_hardware.h directly.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-48-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agohppa: move enable_lan() define from hppa_sys.h to machine.c
Mark Cave-Ayland [Wed, 4 May 2022 09:25:56 +0000 (10:25 +0100)]
hppa: move enable_lan() define from hppa_sys.h to machine.c

Now that the board configuration is in one place, the define is only needed when
wiring up the board in machine.c.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-47-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agohppa: remove unused trace-events from from hw/hppa
Mark Cave-Ayland [Wed, 4 May 2022 09:25:55 +0000 (10:25 +0100)]
hppa: remove unused trace-events from from hw/hppa

Now that there are no longer any devices in hw/hppa the trace-events file is
empty and can be removed.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-46-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agohppa: remove hw/hppa/pci.c
Mark Cave-Ayland [Wed, 4 May 2022 09:25:54 +0000 (10:25 +0100)]
hppa: remove hw/hppa/pci.c

The functions and definitions in this file are not used anywhere within the
generic hppa machine.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-45-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agohppa: move hppa_pci_ignore_ops from pci.c to machine.c
Mark Cave-Ayland [Wed, 4 May 2022 09:25:53 +0000 (10:25 +0100)]
hppa: move hppa_pci_ignore_ops from pci.c to machine.c

The memory region only has one user which is for ensuring accesses to the ISA
bus memory do not fault.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-44-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: move from hw/hppa to hw/misc
Mark Cave-Ayland [Wed, 4 May 2022 09:25:52 +0000 (10:25 +0100)]
lasi: move from hw/hppa to hw/misc

Move the LASI device implementation from hw/hppa to hw/misc so that it is
located with all the other miscellaneous devices.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-43-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agohppa: move device headers from hppa_sys.h into individual .c files
Mark Cave-Ayland [Wed, 4 May 2022 09:25:51 +0000 (10:25 +0100)]
hppa: move device headers from hppa_sys.h into individual .c files

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-42-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: use numerical constant for iar reset value
Mark Cave-Ayland [Wed, 4 May 2022 09:25:50 +0000 (10:25 +0100)]
lasi: use numerical constant for iar reset value

This is to allow us to decouple the LASI device from the board logic. If it is
decided later that this value needs to be configurable then it can easily be
converted to a qdev property.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-41-mark.cave-ayland@ilande.co.uk>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: use constants for device register offsets
Mark Cave-Ayland [Wed, 4 May 2022 09:25:49 +0000 (10:25 +0100)]
lasi: use constants for device register offsets

Instead of generating the offset based upon the physical address of the
register, add constants for each of the device registers to lasi.h and
update lasi.c to use them.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-40-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: move lasi_initfn() to machine.c
Mark Cave-Ayland [Wed, 4 May 2022 09:25:48 +0000 (10:25 +0100)]
lasi: move lasi_initfn() to machine.c

Move the simplified lasi_initfn() back to machine.c whilst also renaming it
back to its original lasi_init() name.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-39-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: remove address space parameter from lasi_initfn()
Mark Cave-Ayland [Wed, 4 May 2022 09:25:47 +0000 (10:25 +0100)]
lasi: remove address space parameter from lasi_initfn()

Now that all of the LASI devices are mapped by the board, this parameter is no
longer required.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-38-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: move PS2 initialisation to machine.c
Mark Cave-Ayland [Wed, 4 May 2022 09:25:46 +0000 (10:25 +0100)]
lasi: move PS2 initialisation to machine.c

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-37-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: move second serial port initialisation to machine.c
Mark Cave-Ayland [Wed, 4 May 2022 09:25:45 +0000 (10:25 +0100)]
lasi: move second serial port initialisation to machine.c

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-36-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: move parallel port initialisation to machine.c
Mark Cave-Ayland [Wed, 4 May 2022 09:25:44 +0000 (10:25 +0100)]
lasi: move parallel port initialisation to machine.c

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-35-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: move LAN initialisation to machine.c
Mark Cave-Ayland [Wed, 4 May 2022 09:25:43 +0000 (10:25 +0100)]
lasi: move LAN initialisation to machine.c

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-34-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: update lasi_initfn() to return LASIState
Mark Cave-Ayland [Wed, 4 May 2022 09:25:42 +0000 (10:25 +0100)]
lasi: update lasi_initfn() to return LASIState

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-33-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: fix serial port initialisation
Mark Cave-Ayland [Wed, 4 May 2022 09:25:41 +0000 (10:25 +0100)]
lasi: fix serial port initialisation

The existing code checks for serial_hd(1) but sets the LASI serial port chardev
to serial_hd(0). Use serial_hd(1) for the LASI serial port and also set the
serial port endian to DEVICE_BIG_ENDIAN (which also matches the endian of the
existing serial port).

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-32-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: use qdev GPIOs to wire up IRQs in lasi_initfn()
Mark Cave-Ayland [Wed, 4 May 2022 09:25:40 +0000 (10:25 +0100)]
lasi: use qdev GPIOs to wire up IRQs in lasi_initfn()

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-31-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: define IRQ inputs as qdev GPIOs
Mark Cave-Ayland [Wed, 4 May 2022 09:25:39 +0000 (10:25 +0100)]
lasi: define IRQ inputs as qdev GPIOs

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-30-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: replace lasi_get_irq() with defined constants
Mark Cave-Ayland [Wed, 4 May 2022 09:25:38 +0000 (10:25 +0100)]
lasi: replace lasi_get_irq() with defined constants

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-29-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: move LASIState and associated QOM structures to lasi.h
Mark Cave-Ayland [Wed, 4 May 2022 09:25:37 +0000 (10:25 +0100)]
lasi: move LASIState and associated QOM structures to lasi.h

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-28-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: move initialisation of iar and rtc to new lasi_reset() function
Mark Cave-Ayland [Wed, 4 May 2022 09:25:36 +0000 (10:25 +0100)]
lasi: move initialisation of iar and rtc to new lasi_reset() function

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-27-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: move register memory mapping from lasi.c to machine.c
Mark Cave-Ayland [Wed, 4 May 2022 09:25:35 +0000 (10:25 +0100)]
lasi: move register memory mapping from lasi.c to machine.c

The device register should be mapped directly by the board code.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-26-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: move memory region initialisation to new lasi_init() function
Mark Cave-Ayland [Wed, 4 May 2022 09:25:34 +0000 (10:25 +0100)]
lasi: move memory region initialisation to new lasi_init() function

Create a new lasi_init() instance initialisation function and move the LASI
memory region initialisation into it. Rename the existing lasi_init() function
to lasi_initfn() for now.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-25-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agolasi: checkpatch fixes
Mark Cave-Ayland [Wed, 4 May 2022 09:25:33 +0000 (10:25 +0100)]
lasi: checkpatch fixes

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-24-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: move from hw/hppa to hw/pci-host
Mark Cave-Ayland [Wed, 4 May 2022 09:25:32 +0000 (10:25 +0100)]
dino: move from hw/hppa to hw/pci-host

Move the DINO device implementation from hw/hppa to hw/pci-host so that it is
located with all the other PCI host bridges.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-23-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: move DINO HPA constants from hppa_hardware.h to dino.h
Mark Cave-Ayland [Wed, 4 May 2022 09:25:31 +0000 (10:25 +0100)]
dino: move DINO HPA constants from hppa_hardware.h to dino.h

This is to allow us to decouple the DINO device from the board logic.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-22-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: use numerical constant for iar0 and iar1 reset values
Mark Cave-Ayland [Wed, 4 May 2022 09:25:30 +0000 (10:25 +0100)]
dino: use numerical constant for iar0 and iar1 reset values

This is to allow us to decouple the DINO device from the board logic. The choice
of using a hard-coded constant (along with a comment) is to match how this is
already done for toc_addr. If it is decided later that these values need to be
configurable then they can easily be converted to qdev properties.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-21-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agohppa: move dino_init() from dino.c to machine.c
Mark Cave-Ayland [Wed, 4 May 2022 09:25:29 +0000 (10:25 +0100)]
hppa: move dino_init() from dino.c to machine.c

Now that dino_init() is completely decoupled from dino.c it can be moved to
machine.c with the rest of the board configuration.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-20-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: remove unused dino_set_timer_irq() IRQ handler
Mark Cave-Ayland [Wed, 4 May 2022 09:25:28 +0000 (10:25 +0100)]
dino: remove unused dino_set_timer_irq() IRQ handler

According to the comments in dino.c the timer IRQ is unused, so remove the empty
dino_set_timer_irq() handler function and simply pass NULL to mc146818_rtc_init()
in machine.c instead.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-19-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: wire up serial IRQ using a qdev GPIO in machine.c
Mark Cave-Ayland [Wed, 4 May 2022 09:25:27 +0000 (10:25 +0100)]
dino: wire up serial IRQ using a qdev GPIO in machine.c

This makes it unnecessary to allocate a separate IRQ for the serial port.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-18-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: define IRQ inputs as qdev GPIOs
Mark Cave-Ayland [Wed, 4 May 2022 09:25:26 +0000 (10:25 +0100)]
dino: define IRQ inputs as qdev GPIOs

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-17-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino.h: add defines for DINO IRQ numbers
Mark Cave-Ayland [Wed, 4 May 2022 09:25:25 +0000 (10:25 +0100)]
dino.h: add defines for DINO IRQ numbers

This is to allow the DINO IRQs to be defined as qdev GPIOs.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-16-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agomachine.c: map DINO device during board configuration
Mark Cave-Ayland [Wed, 4 May 2022 09:25:24 +0000 (10:25 +0100)]
machine.c: map DINO device during board configuration

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-15-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: change dino_init() to return the DINO device instead of PCIBus
Mark Cave-Ayland [Wed, 4 May 2022 09:25:23 +0000 (10:25 +0100)]
dino: change dino_init() to return the DINO device instead of PCIBus

This is in preparation for using more qdev APIs during the configuration of the
HPPA generic machine.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-14-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agohppa: use new CONFIG_HPPA_B160L option instead of CONFIG_DINO to build hppa machine
Mark Cave-Ayland [Wed, 4 May 2022 09:25:22 +0000 (10:25 +0100)]
hppa: use new CONFIG_HPPA_B160L option instead of CONFIG_DINO to build hppa machine

DINO refers to the GSC-PCI bridge device which will soon be handled separately,
however the QEMU HPPA machine is actually based upon the HPPA B160L as indicated
by the Linux kernel dmesg output when booted in qemu-system-hppa and the QEMU
MAINTAINERS file.

Update the machine configuration to use CONFIG_HPPA_B160L instead of CONFIG_DINO
and also update the machine description accordingly.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-13-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: split declarations from dino.c into dino.h
Mark Cave-Ayland [Wed, 4 May 2022 09:25:21 +0000 (10:25 +0100)]
dino: split declarations from dino.c into dino.h

This is to allow access to DinoState from outside dino.c. With the changes to
the headers it is now possible to remove the duplicate definition for
TYPE_DINO_PCI_HOST_BRIDGE from hppa_sys.h.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-12-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: return PCIBus from dino_init() using qdev_get_child_bus()
Mark Cave-Ayland [Wed, 4 May 2022 09:25:20 +0000 (10:25 +0100)]
dino: return PCIBus from dino_init() using qdev_get_child_bus()

This allows access to the PCI bus without having to reference parent_obj directly.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-11-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: use QOM cast instead of directly referencing parent_obj
Mark Cave-Ayland [Wed, 4 May 2022 09:25:19 +0000 (10:25 +0100)]
dino: use QOM cast instead of directly referencing parent_obj

Use a QOM cast in both dino_chip_read_with_attrs() and dino_chip_write_with_attrs()
instead of directly referencing parent_obj.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-10-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: move initial register configuration to new dino_pcihost_reset() function
Mark Cave-Ayland [Wed, 4 May 2022 09:25:18 +0000 (10:25 +0100)]
dino: move initial register configuration to new dino_pcihost_reset() function

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-9-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: move PCI bus master address space setup to dino_pcihost_realize()
Mark Cave-Ayland [Wed, 4 May 2022 09:25:17 +0000 (10:25 +0100)]
dino: move PCI bus master address space setup to dino_pcihost_realize()

Add a new dino_pcihost_unrealize() function to remove the address space when the
device is unrealized.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-8-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: move pci_setup_iommu() to dino_pcihost_init()
Mark Cave-Ayland [Wed, 4 May 2022 09:25:16 +0000 (10:25 +0100)]
dino: move pci_setup_iommu() to dino_pcihost_init()

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-7-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: add memory-as property containing a link to the memory address space
Mark Cave-Ayland [Wed, 4 May 2022 09:25:15 +0000 (10:25 +0100)]
dino: add memory-as property containing a link to the memory address space

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-6-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: move PCI windows initialisation to dino_pcihost_init()
Mark Cave-Ayland [Wed, 4 May 2022 09:25:14 +0000 (10:25 +0100)]
dino: move PCI windows initialisation to dino_pcihost_init()

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-5-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: move PCI bus initialisation to dino_pcihost_init()
Mark Cave-Ayland [Wed, 4 May 2022 09:25:13 +0000 (10:25 +0100)]
dino: move PCI bus initialisation to dino_pcihost_init()

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-4-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: move registers from dino_init() to DINO_PCI_BRIDGE init function
Mark Cave-Ayland [Wed, 4 May 2022 09:25:12 +0000 (10:25 +0100)]
dino: move registers from dino_init() to DINO_PCI_BRIDGE init function

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-3-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agodino: checkpatch fixes
Mark Cave-Ayland [Wed, 4 May 2022 09:25:11 +0000 (10:25 +0100)]
dino: checkpatch fixes

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-2-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2 years agoMerge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
Richard Henderson [Sat, 7 May 2022 11:14:15 +0000 (06:14 -0500)]
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging

* WHPX support for xcr0
* qga-wss fixes
* Meson conversions
* Removed -soundhw pcspk

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmJ2CEcUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroMHUAgAq6BXpuqyAMMnrylvt77qwGG37keV
# lxw8aGciztUJIZFi1dAxIuw2ohsFGdfxKKt1sEIUu33OSBeb1I786f2xuLF7t7Am
# An0Jd5I/V/9ClRrz2ITiLOCBzPTU3faY8h382OdnMJCkAFjjF5PIoECZWRBtjPVq
# B4jDKuredgCt4EGDViQr0R5om+bBdHQmHcPHTNIv3UsRu2RhzIieBy4qLBUADIMU
# wJeW0jIdtfE9gwfdjtdom1tDxxKNtYttyIAQY8SpSEGLHzpqfNW0Z3UFGcswIk8g
# QCJpsddJzKivvS3a8pm/3tKkSWmqcgGNH2b3CFEZ26MkkLZIOYiVmPGNqQ==
# =7/z9
# -----END PGP SIGNATURE-----
# gpg: Signature made Sat 07 May 2022 12:48:55 AM CDT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [undefined]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu: (25 commits)
  pc: remove -soundhw pcspk
  configure, meson: move vhost options to Meson
  meson: use have_vhost_* variables to pick sources
  meson: create have_vhost_* variables
  build: move vhost-user-fs configuration to Kconfig
  build: move vhost-scsi configuration to Kconfig
  build: move vhost-vsock configuration to Kconfig
  configure: simplify vhost-net-{user, vdpa} configuration
  meson, virtio: place all virtio-pci devices under virtio_pci_ss
  configure: omit options with default values from meson command line
  meson: pass more options directly as -D
  configure: switch directory options to automatic parsing
  meson: always combine directories with prefix
  meson, configure: move --interp-prefix to meson
  meson, configure: move --with-pkgversion, CONFIG_STAMP to meson
  meson, configure: move bdrv whitelists to meson
  meson, configure: move --tls-priority to meson
  configure: switch string options to automatic parsing
  configure: move Windows flags detection to meson
  configure, meson: move iasl detection to meson
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agopc: remove -soundhw pcspk
Paolo Bonzini [Wed, 27 Apr 2022 10:01:48 +0000 (12:01 +0200)]
pc: remove -soundhw pcspk

The pcspk device is the only user of the init_isa function, and the only
-soundhw option which does not create a new device (it hacks into the
PCSpkState by hand).  Remove it, since it was deprecated.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agoconfigure, meson: move vhost options to Meson
Paolo Bonzini [Wed, 20 Apr 2022 15:34:07 +0000 (17:34 +0200)]
configure, meson: move vhost options to Meson

Finish the conversion by moving all the definitions and the constraint
checks to meson_options.txt and meson.build respectively.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agomeson: use have_vhost_* variables to pick sources
Paolo Bonzini [Wed, 20 Apr 2022 15:34:06 +0000 (17:34 +0200)]
meson: use have_vhost_* variables to pick sources

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agomeson: create have_vhost_* variables
Paolo Bonzini [Wed, 20 Apr 2022 15:34:05 +0000 (17:34 +0200)]
meson: create have_vhost_* variables

When using Meson options rather than config-host.h, the "when" clauses
have to be changed to if statements (which is not necessarily great,
though at least it highlights which parts of the build are per-target
and which are not).

Do that before moving vhost logic to meson.build, though for now
the variables are just based on config-host.mak data.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agobuild: move vhost-user-fs configuration to Kconfig
Paolo Bonzini [Wed, 20 Apr 2022 15:34:04 +0000 (17:34 +0200)]
build: move vhost-user-fs configuration to Kconfig

vhost-user-fs is a device and it should be possible to enable/disable
it with --without-default-devices, not --without-default-features.
Compute its default value in Kconfig to obtain the more intuitive
behavior.

In this case the configure options were undocumented, too.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agobuild: move vhost-scsi configuration to Kconfig
Paolo Bonzini [Wed, 20 Apr 2022 15:34:03 +0000 (17:34 +0200)]
build: move vhost-scsi configuration to Kconfig

vhost-scsi and vhost-user-scsi are two devices of their own; it should
be possible to enable/disable them with --without-default-devices, not
--without-default-features.  Compute their default value in Kconfig to
obtain the more intuitive behavior.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agobuild: move vhost-vsock configuration to Kconfig
Paolo Bonzini [Wed, 20 Apr 2022 15:34:02 +0000 (17:34 +0200)]
build: move vhost-vsock configuration to Kconfig

vhost-vsock and vhost-user-vsock are two devices of their own; it should
be possible to enable/disable them with --without-default-devices, not
--without-default-features.  Compute their default value in Kconfig to
obtain the more intuitive behavior.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agoconfigure: simplify vhost-net-{user, vdpa} configuration
Paolo Bonzini [Wed, 20 Apr 2022 15:34:01 +0000 (17:34 +0200)]
configure: simplify vhost-net-{user, vdpa} configuration

Cleanup to ease review of the conversion to meson.  vhost_net_user and
vhost_net_vdpa are never assigned anything in the command line parsing
loop, so they are always equal to $vhost_user and $vhost_vdpa.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agomeson, virtio: place all virtio-pci devices under virtio_pci_ss
Paolo Bonzini [Wed, 20 Apr 2022 15:34:00 +0000 (17:34 +0200)]
meson, virtio: place all virtio-pci devices under virtio_pci_ss

Since a sourceset already exists for this, avoid unnecessary repeat
of CONFIG_VIRTIO_PCI.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agoconfigure: omit options with default values from meson command line
Paolo Bonzini [Wed, 20 Apr 2022 15:33:59 +0000 (17:33 +0200)]
configure: omit options with default values from meson command line

This has no functional change, it only makes the command line shorter
and nicer.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agomeson: pass more options directly as -D
Paolo Bonzini [Wed, 20 Apr 2022 15:33:58 +0000 (17:33 +0200)]
meson: pass more options directly as -D

If an option is not used anywhere by the configure script, it can be just
added to $meson_options even if it is not parsed by the automatically
generated bits in scripts/meson-buildoptions.sh.

The only slightly tricky case is $debug, where the

  if test "$fortify_source" = "yes" ; then
    QEMU_CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
    debug=no
  fi

assignment is dead; configure sets fortify_source=no whenever debug=yes.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agoconfigure: switch directory options to automatic parsing
Paolo Bonzini [Wed, 20 Apr 2022 15:33:57 +0000 (17:33 +0200)]
configure: switch directory options to automatic parsing

While prefix, bindir and qemu_suffix needs special treatment due to
differences between Windows and POSIX systems, everything else
needs no extra code in configure.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agomeson: always combine directories with prefix
Paolo Bonzini [Wed, 20 Apr 2022 15:33:56 +0000 (17:33 +0200)]
meson: always combine directories with prefix

Meson allows directories such as "bindir" to be relative to the prefix.  Right
now configure is forcing an absolute path, but that is not really necessary:
just make sure all uses of the directory variables are prefixed appropriately.
Do the same also for the options that are custom for QEMU, i.e. docdir and
qemu_firmwarepath.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agomeson, configure: move --interp-prefix to meson
Paolo Bonzini [Wed, 20 Apr 2022 15:33:55 +0000 (17:33 +0200)]
meson, configure: move --interp-prefix to meson

This is the last CONFIG_* entry in config-host.mak that had to be
special cased.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agomeson, configure: move --with-pkgversion, CONFIG_STAMP to meson
Paolo Bonzini [Wed, 20 Apr 2022 15:33:54 +0000 (17:33 +0200)]
meson, configure: move --with-pkgversion, CONFIG_STAMP to meson

The hash is now generated with a Python script.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>