Re: [PATCH v2] hw/smbios: fix field corruption in type 4 table

2023-02-23 Thread Igor Mammedov
On Thu, 23 Feb 2023 13:57:47 +0100 Julia Suvorova wrote: > Since table type 4 of SMBIOS version 2.6 is shorter than 3.0, the > strings which follow immediately after the struct fields have been > overwritten by unconditional filling of later fields such as core_count2. > Make these fields

Re: [PATCH v2 5/5] gitlab-ci.d: Build with --enable-fdt=system by default

2023-02-23 Thread Daniel P . Berrangé
On Tue, Feb 07, 2023 at 09:14:47PM +0100, Thomas Huth wrote: > By using --enable-fdt=system we can make sure that the configure > script does not try to check out the "dtc" submodule. This should > help to safe some precious CI minutes in the long run. If our containers have the system dtc

Re: [PATCH v2 3/5] gitlab-ci.d/buildtest: Disintegrate the build-coroutine-sigaltstack job

2023-02-23 Thread David Woodhouse
On Tue, 2023-02-07 at 21:14 +0100, Thomas Huth wrote: > We can get rid of the build-coroutine-sigaltstack job by moving > the configure flags that should be tested here to other jobs: > Move --with-coroutine=sigaltstack to the build-system-debian job > (where the coroutines should get some more

Re: [PATCH v2 1/7] target/arm: v8.3 PAC ID_AA64ISAR[12] feature-detection

2023-02-23 Thread Peter Maydell
On Wed, 22 Feb 2023 at 20:27, Richard Henderson wrote: > > On 2/22/23 09:35, Aaron Lindsay wrote: > > +static inline bool isar_feature_aa64_pauth_epac(const ARMISARegisters *id) > > +{ > > +/* > > + * Note that unlike most AArch64 features, EPAC is treated (in the ARM > > + *

Re: [PATCH v2 2/5] gitlab-ci.d/buildtest: Remove aarch64-softmmu from the build-system-ubuntu job

2023-02-23 Thread David Woodhouse
On Tue, 2023-02-07 at 21:14 +0100, Thomas Huth wrote: > aarch64-softmmu is also checked on the same version of Ubuntu in the > gcov job, so it is redundant to check again in the normal ubuntu job. > > Signed-off-by: Thomas Huth Reviewed-by: David Woodhouse smime.p7s Description: S/MIME

Re: [PATCH v2 3/5] gitlab-ci.d/buildtest: Disintegrate the build-coroutine-sigaltstack job

2023-02-23 Thread Daniel P . Berrangé
On Tue, Feb 07, 2023 at 09:14:45PM +0100, Thomas Huth wrote: > We can get rid of the build-coroutine-sigaltstack job by moving > the configure flags that should be tested here to other jobs: > Move --with-coroutine=sigaltstack to the build-system-debian job > (where the coroutines should get some

Re: [PATCH v2 1/5] build: deprecate --enable-gprof builds and remove from CI

2023-02-23 Thread David Woodhouse
On Tue, 2023-02-07 at 21:14 +0100, Thomas Huth wrote: > From: Alex Bennée > > As gprof relies on instrumentation you rarely get useful data compared > to a real optimised build. Lets deprecate the build option and > simplify the CI configuration as a result. > > Buglink:

Re: [PATCH v2 2/5] gitlab-ci.d/buildtest: Remove aarch64-softmmu from the build-system-ubuntu job

2023-02-23 Thread Daniel P . Berrangé
On Tue, Feb 07, 2023 at 09:14:44PM +0100, Thomas Huth wrote: > aarch64-softmmu is also checked on the same version of Ubuntu in the > gcov job, so it is redundant to check again in the normal ubuntu job. > > Signed-off-by: Thomas Huth > --- > .gitlab-ci.d/buildtest.yml | 2 +- > 1 file changed,

Re: [PATCH v2 4/5] .gitlab-ci.d/buildtest-template: Simplify the configure step

2023-02-23 Thread David Woodhouse
On Tue, 2023-02-07 at 21:14 +0100, Thomas Huth wrote: > It's easier to use ${TARGETS:+--target-list="$TARGETS"} to add > a --target-list parameter depending on whether the TARGETS variable > is set or not. > > Signed-off-by: Thomas Huth Reviewed-by: David Woodhouse smime.p7s Description:

Re: [PATCH v3 0/4] target: Restrict 'qapi-commands-machine.h' to system emulation

2023-02-23 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > All series reviewed, can patches be picked by corresponding > maintainers, or should I include them in on of my PRs? I'm sitting on a lonely patch for the monitor subsystem. Want me to throw in your series, so my PR is a less complete waste of CI minutes?

[PULL 09/12] replay: Simplify setting replay blockers

2023-02-23 Thread Markus Armbruster
replay_add_blocker() takes an Error *. All callers pass one created like this: error_setg(, QERR_REPLAY_NOT_SUPPORTED, "some feature"); Folding this into replay_add_blocker() simplifies the callers, losing a bit of generality we haven't needed in more than six years. Since there are no

[PULL 11/12] migration/colo: Improve an x-colo-lost-heartbeat error message

2023-02-23 Thread Markus Armbruster
The QERR_ macros are leftovers from the days of "rich" error objects. We've been trying to reduce their remaining use. Get rid of a use of QERR_FEATURE_DISABLED, and improve the somewhat imprecise error message (qemu) x_colo_lost_heartbeat Error: The feature 'colo' is not enabled to

[PULL 10/12] hw/core: Improve the query-hotpluggable-cpus error message

2023-02-23 Thread Markus Armbruster
The QERR_ macros are leftovers from the days of "rich" error objects. We've been trying to reduce their remaining use. Get rid of a use of QERR_FEATURE_DISABLED, and improve the slightly awkward error message (qemu) info hotpluggable-cpus Error: The feature 'query-hotpluggable-cpus' is

[PULL 00/12] Error reporting patches patches for 2023-02-23

2023-02-23 Thread Markus Armbruster
The following changes since commit 79b677d658d3d35e1e776826ac4abb28cdce69b8: Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging (2023-02-21 11:28:31 +) are available in the Git repository at: https://repo.or.cz/qemu/armbru.git tags/pull-error-2023-02-23 for

[PULL 05/12] hw/smbios: Dumb down smbios_entry_add() stub

2023-02-23 Thread Markus Armbruster
The QERR_ macros are leftovers from the days of "rich" error objects. We've been trying to reduce their remaining use. smbios_entry_add() is only ever called on behalf of CLI option -smbios. Since qemu-options.hx sets @arch_mask to QEMU_ARCH_I386 | QEMU_ARCH_ARM, it is reachable only for these

Re: out of CI pipeline minutes again

2023-02-23 Thread Thomas Huth
On 23/02/2023 13.56, Peter Maydell wrote: Hi; the project is out of gitlab CI pipeline minutes again. In the absence of any other proposals, no more pull request merges will happen til 1st March... I'd like to propose again to send a link along with the pull request that shows that the shared

[PULL 12/12] rocker: Tweak stubbed out monitor commands' error messages

2023-02-23 Thread Markus Armbruster
The QERR_ macros are leftovers from the days of "rich" error objects. We've been trying to reduce their remaining use. The stubbed out Rocker monitor commands are the last remaining users of QERR_FEATURE_DISABLED. They fail like this: (qemu) info rocker mumble Error: The feature

[PULL 08/12] qga: Drop dangling reference to QERR_QGA_LOGGING_DISABLED

2023-02-23 Thread Markus Armbruster
slog()'s function comment advises to use QERR_QGA_LOGGING_DISABLED. This macro never existed. The reference got added in commit e3d4d25206a "guest agent: add guest agent RPCs/commands" along with QERR_QGA_LOGGING_FAILED, so maybe that one was meant. However, QERR_QGA_LOGGING_FAILED was never

[PULL 02/12] dump: Improve error message when target doesn't support memory dump

2023-02-23 Thread Markus Armbruster
The QERR_ macros are leftovers from the days of "rich" error objects. We've been trying to reduce their remaining use. Get rid of a use of QERR_UNSUPPORTED, and improve the rather vague error message (qemu) dump-guest-memory mumble Error: this feature or command is not currently

[PULL 01/12] error: Drop superfluous #include "qapi/qmp/qerror.h"

2023-02-23 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20230207075115.1525-2-arm...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Reviewed-by: Konstantin Kostiuk --- authz/listfile.c | 1 - backends/cryptodev-vhost.c | 1 - backends/rng.c

[PULL 04/12] hw/core: Improve error message when machine doesn't provide NMIs

2023-02-23 Thread Markus Armbruster
The QERR_ macros are leftovers from the days of "rich" error objects. We've been trying to reduce their remaining use. Get rid of a use of QERR_UNSUPPORTED, and improve the rather vague error message (qemu) nmi Error: this feature or command is not currently supported to Error:

[PULL 06/12] hw/acpi: Dumb down acpi_table_add() stub

2023-02-23 Thread Markus Armbruster
The QERR_ macros are leftovers from the days of "rich" error objects. We've been trying to reduce their remaining use. acpi_table_add() is only ever called on behalf of CLI option -acpitable. Since qemu-options.hx sets @arch_mask to QEMU_ARCH_I386, it is reachable only for these targets. Since

[PULL 07/12] hw/acpi: Move QMP command to hw/core/

2023-02-23 Thread Markus Armbruster
The QERR_ macros are leftovers from the days of "rich" error objects. We've been trying to reduce their remaining use. qmp_query_vm_generation_id() in stubs/vmgenid.c is the last user of QERR_UNSUPPORTED outside qga/. Unlike the stubs we just dropped, it is actually reachable, namely when

[PULL 03/12] dump: Assert cpu_get_note_size() can't fail

2023-02-23 Thread Markus Armbruster
The only way cpu_get_note_size() can return a negative value is integer overflow in the non-stub versions, which is a programming error. The stub version is not actually reachable, because the cpu_get_dump_info() stub will fail first. Use assert(). This gets rid of another use of

Re: [PATCH v3 4/4] target/ppc: Restrict 'qapi-commands-machine.h' to system emulation

2023-02-23 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Since commit a0e61807a3 ("qapi: Remove QMP events and commands from > user-mode builds") we don't generate the "qapi-commands-machine.h" > header in a user-emulation-only build. > > Move the QMP functions from cpu_init.c (which is always compiled) to > monitor.c

Re: [PATCH v3 3/4] target/loongarch: Restrict 'qapi-commands-machine.h' to system emulation

2023-02-23 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Since commit a0e61807a3 ("qapi: Remove QMP events and commands from > user-mode builds") we don't generate the "qapi-commands-machine.h" > header in a user-emulation-only build. > > Extract the QMP functions from cpu.c (which is always compiled) > to the new

Re: [PATCH v3 1/4] target/arm: Restrict 'qapi-commands-machine.h' to system emulation

2023-02-23 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Since commit a0e61807a3 ("qapi: Remove QMP events and commands from > user-mode builds") we don't generate the "qapi-commands-machine.h" > header in a user-emulation-only build. > > Move the QMP functions from helper.c (which is always compiled) > to

[PATCH v2 2/3] qapi: use env var to trigger qapi test output updates

2023-02-23 Thread Daniel P . Berrangé
It is possible to pass --update to tests/qapi-schema/test-qapi.py to make it update the output files on error. This is inconvient to achieve though when test-qapi.py is run indirectly by make/meson. Instead simply allow for an env variable to be set: $ QAPI_TEST_UPDATE=1 make check-qapi-schema

[PATCH v2 3/3] qapi: allow unions to contain further unions

2023-02-23 Thread Daniel P . Berrangé
This extends the QAPI schema validation to permit unions inside unions, provided the checks for clashing fields pass. Signed-off-by: Daniel P. Berrangé --- scripts/qapi/schema.py| 6 +- tests/qapi-schema/meson.build | 2 +

[PATCH v2 1/3] qapi: improve specificity of type/member descriptions

2023-02-23 Thread Daniel P . Berrangé
When describing member types always include the context of the containing type. Although this is often redundant, in some cases it will help to reduce ambiguity. Signed-off-by: Daniel P. Berrangé --- scripts/qapi/schema.py | 5 ++---

Re: [PATCH] qapi: allow unions to contain further unions

2023-02-23 Thread Daniel P . Berrangé
On Thu, Feb 23, 2023 at 08:24:33AM +0100, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > This extends the QAPI schema validation to permit unions inside unions, > > provided the checks for clashing fields pass. > > > > Signed-off-by: Daniel P. Berrangé > > --- > > > > This patch

[PATCH v2 0/3] qapi: allow unions to contain further unions

2023-02-23 Thread Daniel P . Berrangé
Currently it is not possible for a union type to contain a further union as one (or more) of its branches. This relaxes that restriction and adds the calls needed to validate field name uniqueness as unions are flattened. In v2: * Improve specificity of type/members descriptions for error

Re: [PATCH 0/4] hw: QOM housekeeping around IOTHREAD / IRQ types

2023-02-23 Thread Peter Maydell
On Tue, 7 Feb 2023 at 09:17, Philippe Mathieu-Daudé wrote: > > Hi Peter, > > On 13/1/23 21:01, Philippe Mathieu-Daudé wrote: > > - remove unused code > > - use recent QOM macros > > - use CamelCase typedef > > > > Philippe Mathieu-Daudé (4): > >iothread: Remove unused IOThreadClass /

Re: [PATCH] meson: Avoid duplicates in generated config-poison.h again

2023-02-23 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH] target/i386: Fix BZHI instruction

2023-02-23 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v16 03/11] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-02-23 Thread Thomas Huth
On 22/02/2023 15.20, Pierre Morel wrote: On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel --- ... diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index d654267a71..c899f4e04b 100644

Re: [PATCH v7 00/20] target/arm: Allow CONFIG_TCG=n builds

2023-02-23 Thread Peter Maydell
On Thu, 23 Feb 2023 at 13:10, Fabiano Rosas wrote: > > Changes since v6: > > Now using the same feature set for -cpu max for both qtests and > TCG. This requires a slightly awkward code movement to expose > aa32_max_features to non-tcg code, but we gain by not having a > different environment for

Re: [PATCH v2 0/4] NUMA: Apply socket-NUMA-node boundary for aarch64 and RiscV machines

2023-02-23 Thread Daniel Henrique Barboza
On 2/23/23 05:13, Gavin Shan wrote: For arm64 and RiscV architecture, the driver (/base/arch_topology.c) is used to populate the CPU topology in the Linux guest. It's required that the CPUs in one socket can't span mutiple NUMA nodes. Otherwise, the Linux scheduling domain can't be sorted

Re: [PATCH 0/5] Pegasos2 fixes and audio output support

2023-02-23 Thread Bernhard Beschow
On Thu, Feb 23, 2023 at 1:34 PM BALATON Zoltan wrote: > On Thu, 23 Feb 2023, Bernhard Beschow wrote: > > Am 22. Februar 2023 23:00:02 UTC schrieb BALATON Zoltan < > bala...@eik.bme.hu>: > >> On Wed, 22 Feb 2023, Bernhard Beschow wrote: > >>> Am 22. Februar 2023 21:12:01 UTC schrieb BALATON

[PATCH v7 10/20] cpu-defs.h: Expose CPUTLBEntryFull to non-TCG code

2023-02-23 Thread Fabiano Rosas
This struct has no dependencies on TCG code and it is being used in target/arm/ptw.c to simplify the passing around of page table walk results. Those routines can be reached by KVM code via the gdbstub breakpoint code, so take the structure out of CONFIG_TCG to make it visible when building with

[PATCH v7 14/20] target/arm: move cpu_tcg to tcg/cpu32.c

2023-02-23 Thread Fabiano Rosas
From: Claudio Fontana move the module containing cpu models definitions for 32bit TCG-only CPUs to tcg/ and rename it for clarity. Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson --- hw/arm/virt.c | 2 +-

[PATCH v7 08/20] target/arm: Move regime_using_lpae_format into internal.h

2023-02-23 Thread Fabiano Rosas
This function is needed by common code (ptw.c), so move it along with the other regime_* functions in internal.h. When we enable the build without TCG, the tlb_helper.c file will not be present. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé ---

[PATCH v7 04/20] target/arm: move helpers to tcg/

2023-02-23 Thread Fabiano Rosas
From: Claudio Fontana Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- target/arm/meson.build | 15 ++- target/arm/tcg-stubs.c | 23

[PATCH v7 09/20] target/arm: Don't access TCG code when debugging with KVM

2023-02-23 Thread Fabiano Rosas
When TCG is disabled this part of the code should not be reachable, so wrap it with an ifdef for now. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé --- target/arm/ptw.c | 4 1 file changed, 4 insertions(+) diff --git a/target/arm/ptw.c

[PATCH v7 06/20] target/arm: Wrap arm_rebuild_hflags calls with tcg_enabled

2023-02-23 Thread Fabiano Rosas
This is in preparation to moving the hflags code into its own file under the tcg/ directory. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé --- hw/arm/boot.c | 6 +- hw/intc/armv7m_nvic.c | 20 +---

[PATCH v7 13/20] target/arm: Move aa32_max_features out of cpu_tcg.c

2023-02-23 Thread Fabiano Rosas
In preparation to moving the cpu_tcg.c code into a 32-bit, tcg-only file, move the aa32_max_features function which is shared between 32/64/tcg/non-tcg into cpu.c. Signed-off-by: Fabiano Rosas --- target/arm/cpu.c | 69 target/arm/cpu_tcg.c | 69

[PATCH v7 07/20] target/arm: Move hflags code into the tcg directory

2023-02-23 Thread Fabiano Rosas
The hflags are used only for TCG code, so introduce a new file hflags.c to keep that code. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé --- target/arm/helper.c| 393 +--- target/arm/internals.h | 2

[PATCH v7 18/20] arm/Kconfig: Do not build TCG-only boards on a KVM-only build

2023-02-23 Thread Fabiano Rosas
Move all the CONFIG_FOO=y from default.mak into "default y if TCG" statements in Kconfig. That way they won't be selected when CONFIG_TCG=n. I'm leaving CONFIG_ARM_VIRT in default.mak because it allows us to keep the two default.mak files not empty and keep aarch64-default.mak including

[PATCH v7 17/20] arm/Kconfig: Always select SEMIHOSTING when TCG is present

2023-02-23 Thread Fabiano Rosas
We are about to enable the build without TCG, so CONFIG_SEMIHOSTING and CONFIG_ARM_COMPATIBLE_SEMIHOSTING cannot be unconditionally set in default.mak anymore. So reflect the change in a Kconfig. Instead of using semihosting/Kconfig, use a target-specific file, so that the change doesn't affect

[PATCH v7 16/20] tests/avocado: add machine:none tag to version.py

2023-02-23 Thread Fabiano Rosas
This test currently fails when run on a host for which the QEMU target has no default machine set: ERROR| Output: qemu-system-aarch64: No machine specified, and there is no default Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Fabiano Rosas --- tests/avocado/version.py | 1 + 1 file

[PATCH v7 20/20] tests/qtest: Fix tests when no KVM or TCG are present

2023-02-23 Thread Fabiano Rosas
It is possible to have a build with both TCG and KVM disabled due to Xen requiring the i386 and x86_64 binaries to be present in an aarch64 host. If we build with --disable-tcg on the aarch64 host, we will end-up with a QEMU binary (x86) that does not support TCG nor KVM. Fix tests that crash or

[PATCH v7 00/20] target/arm: Allow CONFIG_TCG=n builds

2023-02-23 Thread Fabiano Rosas
Changes since v6: Now using the same feature set for -cpu max for both qtests and TCG. This requires a slightly awkward code movement to expose aa32_max_features to non-tcg code, but we gain by not having a different environment for the tests. Also applied Richard's suggestion of creating a new

[PATCH v7 11/20] target/arm: Move cortex sysregs into a separate file

2023-02-23 Thread Fabiano Rosas
The file cpu_tcg.c is about to be moved into the tcg/ directory, so move the register definitions into a new file. Also move the function declaration to the more appropriate cpregs.h. Signed-off-by: Fabiano Rosas --- target/arm/cortex-regs.c | 69

[PATCH v7 19/20] gitlab-ci: Check building KVM-only aarch64 target

2023-02-23 Thread Fabiano Rosas
From: Philippe Mathieu-Daudé Add a manual new job to cross-build the aarch64 target with only the KVM accelerator enabled (in particular, no TCG). Re-enable running the similar job on the project Aarch64 custom runner. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Fabiano Rosas

[PATCH v7 15/20] tests/avocado: Pass parameters to migration test

2023-02-23 Thread Fabiano Rosas
The migration tests are currently broken for an aarch64 host because the tests pass no 'machine' and 'cpu' options on the QEMU command line. Add a separate class to each architecture so that we can specify 'machine' and 'cpu' options instead of relying on defaults. Add a skip decorator to keep

[PATCH v7 01/20] target/arm: Wrap breakpoint/watchpoint updates with tcg_enabled

2023-02-23 Thread Fabiano Rosas
This is in preparation for restricting compilation of some parts of debug_helper.c to TCG only. Reviewed-by: Richard Henderson Signed-off-by: Fabiano Rosas --- target/arm/cpu.c | 6 -- target/arm/debug_helper.c | 16 target/arm/machine.c | 7 +-- 3

[PATCH v7 12/20] target/arm: Move 64-bit TCG CPUs into tcg/

2023-02-23 Thread Fabiano Rosas
Move the 64-bit CPUs that are TCG-only: - cortex-a35 - cortex-a55 - cortex-a72 - cortex-a76 - a64fx - neoverse-n1 Keep the CPUs that can be used with KVM: - cortex-a57 - cortex-a53 - max - host For the special case "max" CPU, there's a nuance that while KVM/HVF use the "host" model instead, we

[PATCH v7 03/20] target/arm: move translate modules to tcg/

2023-02-23 Thread Fabiano Rosas
Introduce the target/arm/tcg directory. Its purpose is to hold the TCG code that is selected by CONFIG_TCG. Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe

[PATCH v7 05/20] target/arm: Move psci.c into the tcg directory

2023-02-23 Thread Fabiano Rosas
From: Claudio Fontana Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé --- target/arm/meson.build | 1 - target/arm/tcg/meson.build | 4 target/arm/{ => tcg}/psci.c | 0 3 files

[PATCH v7 02/20] target/arm: Wrap TCG-only code in debug_helper.c

2023-02-23 Thread Fabiano Rosas
The next few patches will move helpers under CONFIG_TCG. We'd prefer to keep the debug helpers and debug registers close together, so rearrange the file a bit to be able to wrap the helpers with a TCG ifdef. Reviewed-by: Richard Henderson Signed-off-by: Fabiano Rosas ---

Re: [PATCH 0/4] hw/qdev-properties: Constify Property* in DeviceClass

2023-02-23 Thread Philippe Mathieu-Daudé
On 3/2/23 11:12, Philippe Mathieu-Daudé wrote: Qualify some Property pointers as 'const' when the structure is accessed read-only. Philippe Mathieu-Daudé (4): hw/qdev-properties: Constify Property* in object_field_prop_ptr() hw/qdev-properties: Constify Property* in PropertyInfo::print()

Re: [PULL v2 00/36] Testing, docs, semihosting and plugin updates

2023-02-23 Thread Philippe Mathieu-Daudé
On 3/2/23 18:38, Philippe Mathieu-Daudé wrote: On 2/2/23 17:01, Alex Bennée wrote: Testing, docs, semihosting and plugin updates FTR I'm now seeing this

Re: [PATCH v2 0/4] NUMA: Apply socket-NUMA-node boundary for aarch64 and RiscV machines

2023-02-23 Thread Daniel P . Berrangé
On Thu, Feb 23, 2023 at 04:13:57PM +0800, Gavin Shan wrote: > For arm64 and RiscV architecture, the driver (/base/arch_topology.c) is > used to populate the CPU topology in the Linux guest. It's required that > the CPUs in one socket can't span mutiple NUMA nodes. Otherwise, the Linux > scheduling

[PATCH v13 26/60] i386/xen: implement HVMOP_set_param

2023-02-23 Thread David Woodhouse
From: Ankur Arora This is the hook for adding the HVM_PARAM_CALLBACK_IRQ parameter in a subsequent commit. Signed-off-by: Ankur Arora Signed-off-by: Joao Martins [dwmw2: Split out from another commit] Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- target/i386/kvm/xen-emu.c |

[PATCH v13 17/60] i386/xen: implement HYPERVISOR_memory_op

2023-02-23 Thread David Woodhouse
From: Joao Martins Specifically XENMEM_add_to_physmap with space XENMAPSPACE_shared_info to allow the guest to set its shared_info page. Signed-off-by: Joao Martins [dwmw2: Use the xen_overlay device, add compat support] Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant ---

[PATCH v13 29/60] hw/xen: Implement EVTCHNOP_status

2023-02-23 Thread David Woodhouse
From: David Woodhouse This adds the basic structure for maintaining the port table and reporting the status of ports therein. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/xen_evtchn.c | 104 ++ hw/i386/kvm/xen_evtchn.h | 3

Re: [PATCH 00/23] block: Lock the graph, part 2 (BlockDriver callbacks)

2023-02-23 Thread Stefan Hajnoczi
On Thu, Feb 23, 2023 at 12:48:18PM +0100, Kevin Wolf wrote: > Am 21.02.2023 um 23:13 hat Stefan Hajnoczi geschrieben: > > On Fri, Feb 03, 2023 at 04:21:39PM +0100, Kevin Wolf wrote: > > > After introducing the graph lock in a previous series, this series > > > actually starts making widespread use

[PATCH v13 54/60] i386/xen: Implement HYPERVISOR_physdev_op

2023-02-23 Thread David Woodhouse
From: David Woodhouse Just hook up the basic hypercalls to stubs in xen_evtchn.c for now. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/xen_evtchn.c | 25 hw/i386/kvm/xen_evtchn.h | 11 target/i386/kvm/xen-compat.h | 19 ++

[PATCH v13 57/60] hw/xen: Support MSI mapping to PIRQ

2023-02-23 Thread David Woodhouse
From: David Woodhouse The way that Xen handles MSI PIRQs is kind of awful. There is a special MSI message which targets a PIRQ. The vector in the low bits of data must be zero. The low 8 bits of the PIRQ# are in the destination ID field, the extended destination ID field is unused, and instead

[PATCH v13 43/60] hw/xen: Add xen_gnttab device for grant table emulation

2023-02-23 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/meson.build | 1 + hw/i386/kvm/xen_gnttab.c | 111 ++ hw/i386/kvm/xen_gnttab.h | 18 +++ hw/i386/pc.c | 2 + target/i386/kvm/xen-emu.c |

out of CI pipeline minutes again

2023-02-23 Thread Peter Maydell
Hi; the project is out of gitlab CI pipeline minutes again. In the absence of any other proposals, no more pull request merges will happen til 1st March... -- PMM

[PATCH v13 11/60] i386/xen: implement HYPERVISOR_sched_op, SCHEDOP_shutdown

2023-02-23 Thread David Woodhouse
From: Joao Martins It allows to shutdown itself via hypercall with any of the 3 reasons: 1) self-reboot 2) shutdown 3) crash Implementing SCHEDOP_shutdown sub op let us handle crashes gracefully rather than leading to triple faults if it remains unimplemented. In addition, the

[PATCH v13 45/60] i386/xen: Implement HYPERVISOR_grant_table_op and GNTTABOP_[gs]et_verson

2023-02-23 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/xen_gnttab.c | 31 hw/i386/kvm/xen_gnttab.h | 5 target/i386/kvm/xen-emu.c | 60 +++ 3 files changed, 96 insertions(+) diff --git

[PATCH v13 00/60] Xen HVM support under KVM

2023-02-23 Thread David Woodhouse
Lucky version 13, now with a full set of Reviewed-by: tags from Paul for the Xen side. One minor tweak to the return value of the timer op call. Now I think we're just looking to Paolo to approve from the KVM side, and potentially a last chance for anyone else to give a slightly belated

[PATCH v13 15/60] i386/xen: add pc_machine_kvm_type to initialize XEN_EMULATE mode

2023-02-23 Thread David Woodhouse
From: David Woodhouse The xen_overlay device (and later similar devices for event channels and grant tables) need to be instantiated. Do this from a kvm_type method on the PC machine derivatives, since KVM is only way to support Xen emulation for now. Signed-off-by: David Woodhouse

[PATCH v2] hw/smbios: fix field corruption in type 4 table

2023-02-23 Thread Julia Suvorova
Since table type 4 of SMBIOS version 2.6 is shorter than 3.0, the strings which follow immediately after the struct fields have been overwritten by unconditional filling of later fields such as core_count2. Make these fields dependent on the SMBIOS version. Fixes: 05e27d74c7 ("hw/smbios: add

[PATCH v13 16/60] i386/xen: manage and save/restore Xen guest long_mode setting

2023-02-23 Thread David Woodhouse
From: David Woodhouse Xen will "latch" the guest's 32-bit or 64-bit ("long mode") setting when the guest writes the MSR to fill in the hypercall page, or when the guest sets the event channel callback in HVM_PARAM_CALLBACK_IRQ. KVM handles the former and sets the kernel's long_mode flag

[PATCH v13 40/60] hw/xen: Support HVM_PARAM_CALLBACK_TYPE_GSI callback

2023-02-23 Thread David Woodhouse
From: David Woodhouse The GSI callback (and later PCI_INTX) is a level triggered interrupt. It is asserted when an event channel is delivered to vCPU0, and is supposed to be cleared when the vcpu_info->evtchn_upcall_pending field for vCPU0 is cleared again. Thankfully, Xen does *not* assert the

[PATCH v13 34/60] hw/xen: Implement EVTCHNOP_send

2023-02-23 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/xen_evtchn.c | 180 ++ hw/i386/kvm/xen_evtchn.h | 2 + target/i386/kvm/xen-emu.c | 12 +++ 3 files changed, 194 insertions(+) diff --git

[PATCH v13 49/60] i386/xen: handle HVMOP_get_param

2023-02-23 Thread David Woodhouse
From: Joao Martins Which is used to fetch xenstore PFN and port to be used by the guest. This is preallocated by the toolstack when guest will just read those and use it straight away. Signed-off-by: Joao Martins Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant ---

[PATCH v13 50/60] hw/xen: Add backend implementation of interdomain event channel support

2023-02-23 Thread David Woodhouse
From: David Woodhouse The provides the QEMU side of interdomain event channels, allowing events to be sent to/from the guest. The API mirrors libxenevtchn, and in time both this and the real Xen one will be available through ops structures so that the PV backend drivers can use the correct one

[PATCH v13 30/60] hw/xen: Implement EVTCHNOP_close

2023-02-23 Thread David Woodhouse
From: David Woodhouse It calls an internal close_port() helper which will also be used from EVTCHNOP_reset and will actually do the work to disconnect/unbind a port once any of that is actually implemented in the first place. That in turn calls a free_port() internal function which will be in

Re: [PATCH v16 02/11] s390x/cpu topology: add topology entries on CPU hotplug

2023-02-23 Thread Thomas Huth
On 22/02/2023 15.20, Pierre Morel wrote: The topology information are attributes of the CPU and are specified during the CPU device creation. ... diff --git a/include/hw/s390x/cpu-topology.h b/include/hw/s390x/cpu-topology.h index 83f31604cc..fa7f885a9f 100644 ---

[PATCH v13 41/60] hw/xen: Support HVM_PARAM_CALLBACK_TYPE_PCI_INTX callback

2023-02-23 Thread David Woodhouse
From: David Woodhouse The guest is permitted to specify an arbitrary domain/bus/device/function and INTX pin from which the callback IRQ shall appear to have come. In QEMU we can only easily do this for devices that actually exist, and even that requires us "knowing" that it's a PCMachine in

[PATCH v13 32/60] hw/xen: Implement EVTCHNOP_bind_virq

2023-02-23 Thread David Woodhouse
From: David Woodhouse Add the array of virq ports to each vCPU so that we can deliver timers, debug ports, etc. Global virqs are allocated against vCPU 0 initially, but can be migrated to other vCPUs (when we implement that). The kernel needs to know about VIRQ_TIMER in order to accelerate

[PATCH v13 39/60] i386/xen: add monitor commands to test event injection

2023-02-23 Thread David Woodhouse
From: Joao Martins Specifically add listing, injection of event channels. Signed-off-by: Joao Martins Signed-off-by: David Woodhouse Acked-by: Dr. David Alan Gilbert Reviewed-by: Paul Durrant --- hmp-commands.hx | 29 + hw/i386/kvm/xen_evtchn.c | 137

[PATCH v13 51/60] hw/xen: Add xen_xenstore device for xenstore emulation

2023-02-23 Thread David Woodhouse
From: David Woodhouse Just the basic shell, with the event channel hookup. It only dumps the buffer for now; a real ring implmentation will come in a subsequent patch. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/meson.build| 1 + hw/i386/kvm/xen_evtchn.c

[PATCH v13 58/60] kvm/i386: Add xen-evtchn-max-pirq property

2023-02-23 Thread David Woodhouse
From: David Woodhouse The default number of PIRQs is set to 256 to avoid issues with 32-bit MSI devices. Allow it to be increased if the user desires. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- accel/kvm/kvm-all.c | 1 + hw/i386/kvm/xen_evtchn.c | 21

[PATCH v13 23/60] i386/xen: handle VCPUOP_register_runstate_memory_area

2023-02-23 Thread David Woodhouse
From: Joao Martins Allow guest to setup the vcpu runstates which is used as steal clock. Signed-off-by: Joao Martins Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- target/i386/cpu.h | 1 + target/i386/kvm/xen-emu.c | 57 +++

[PATCH v13 44/60] hw/xen: Support mapping grant frames

2023-02-23 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/xen_gnttab.c | 73 ++- hw/i386/kvm/xen_overlay.c | 2 +- hw/i386/kvm/xen_overlay.h | 2 ++ 3 files changed, 75 insertions(+), 2 deletions(-) diff --git

[PATCH v13 07/60] xen-platform: exclude vfio-pci from the PCI platform unplug

2023-02-23 Thread David Woodhouse
From: Joao Martins Such that PCI passthrough devices work for Xen emulated guests. Signed-off-by: Joao Martins Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/xen/xen_platform.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git

[PATCH v13 12/60] i386/xen: Implement SCHEDOP_poll and SCHEDOP_yield

2023-02-23 Thread David Woodhouse
From: David Woodhouse They both do the same thing and just call sched_yield. This is enough to stop the Linux guest panicking when running on a host kernel which doesn't intercept SCHEDOP_poll and lets it reach userspace. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant ---

[PATCH v13 22/60] i386/xen: handle VCPUOP_register_vcpu_time_info

2023-02-23 Thread David Woodhouse
From: Joao Martins In order to support Linux vdso in Xen. Signed-off-by: Joao Martins Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- target/i386/cpu.h | 1 + target/i386/kvm/xen-emu.c | 100 +- target/i386/machine.c | 1 + 3

[PATCH v13 19/60] i386/xen: implement HYPERVISOR_hvm_op

2023-02-23 Thread David Woodhouse
From: Joao Martins This is when guest queries for support for HVMOP_pagetable_dying. Signed-off-by: Joao Martins Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- target/i386/kvm/xen-emu.c | 17 + 1 file changed, 17 insertions(+) diff --git

[PATCH v13 33/60] hw/xen: Implement EVTCHNOP_bind_ipi

2023-02-23 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/xen_evtchn.c | 69 +++ hw/i386/kvm/xen_evtchn.h | 2 ++ target/i386/kvm/xen-emu.c | 15 + 3 files changed, 86 insertions(+) diff --git

[PATCH v13 35/60] hw/xen: Implement EVTCHNOP_alloc_unbound

2023-02-23 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/xen_evtchn.c | 32 hw/i386/kvm/xen_evtchn.h | 2 ++ target/i386/kvm/xen-emu.c | 15 +++ 3 files changed, 49 insertions(+) diff --git

[PATCH v13 48/60] i386/xen: Reserve Xen special pages for console, xenstore rings

2023-02-23 Thread David Woodhouse
From: David Woodhouse Xen has eight frames at 0xfeff8000 for this; we only really need two for now and KVM puts the identity map at 0xfeffc000, so limit ourselves to four. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- include/sysemu/kvm_xen.h | 8

[PATCH v13 04/60] i386/kvm: Add xen-version KVM accelerator property and init KVM Xen support

2023-02-23 Thread David Woodhouse
From: David Woodhouse This just initializes the basic Xen support in KVM for now. Only permitted on TYPE_PC_MACHINE because that's where the sysbus devices for Xen heap overlay, event channel, grant tables and other stuff will exist. There's no point having the basic hypercall support if nothing

[PATCH v13 56/60] hw/xen: Support GSI mapping to PIRQ

2023-02-23 Thread David Woodhouse
From: David Woodhouse If I advertise XENFEAT_hvm_pirqs then a guest now boots successfully as long as I tell it 'pci=nomsi'. [root@localhost ~]# cat /proc/interrupts CPU0 0: 52 IO-APIC 2-edge timer 1: 16 xen-pirq 1-ioapic-edge i8042 4: 1534

[PATCH v13 52/60] hw/xen: Add basic ring handling to xenstore

2023-02-23 Thread David Woodhouse
From: David Woodhouse Extract requests, return ENOSYS to all of them. This is enough to allow older Linux guests to boot, as they need *something* back but it doesn't matter much what. A full implementation of a single-tentant internal XenStore copy-on-write tree with transactions and watches

<    1   2   3   4   5   6   >