[PATCH kvmtool v2 0/7] x86 compilation fixes and arm64 PMU improvements
Alexandru Elisei
alexandru.elisei at arm.com
Thu Jun 18 08:49:54 PDT 2026
v1 here [1].
v1 was sent to fix this compilation error:
disk/core.c: In function ‘disk_img_name_parser’:
disk/core.c:27:21: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
27 | sep = strstr(arg, ":");
| ^
fixed in patches #2 and #3.
Working on v2 found another one:
x86/include/kvm/bios.h:91:43: error: ‘regparm’ attribute ignored [-Werror=attributes]
91 | extern bioscall void int10_handler(struct biosregs *regs);
| ^~~~~~~~
which is fixed in patch #1.
The remaining of the patches are there to improve PMU initialisation and
error reporting.
Tested on arm64, with and without hugetlbfs, with and without a PMU. Also
tested on arm64 using scsi-virtio (got it working in v2, I couldn't get
scsi-virtio working for v1, most likely user error).
Tested on x86_64 by booting a VM. Don't have an x86_32 machine to do the
same, but I did cross-compile for x86_32.
Changes in v2:
- Patch #1 ("x86: Define bioscall only in 32-bit mode") is new. The bug
that it fixes was probably triggered when I updated the gcc compiler.
- pmu__init() is now called from gic__init_gic() (Will).
- die_perror() prints the original errno is vsnprintf() fails (Will).
[1] https://lore.kernel.org/kvm/20260323150221.49256-1-alexandru.elisei@arm.com/
Alexandru Elisei (7):
x86: Define bioscall only in 32-bit mode
virtio: Do not modify const strings in virtio_9p_rootdir_parser()
disk/core: Do not modify const strings in disk_img_name_parser()
arm64: Initialise the PMU after the GIC
util: Set exit status to errno in die_perror()
util: Allow die_perror() to take a variable list of argument
arm64: Improve KVM_ARM_VCPU_PMU_V3_CTRL diagnostics
arm64/gic.c | 9 +++++-
arm64/include/asm/pmu.h | 3 ++
arm64/pmu.c | 59 ++++++++++++++++++++++++++++------------
disk/core.c | 44 ++++++++++++++++++++----------
include/kvm/disk-image.h | 6 ++--
include/kvm/util.h | 2 +-
util/util.c | 21 ++++++++++++--
virtio/9p.c | 21 +++++++++-----
x86/include/kvm/bios.h | 4 +++
9 files changed, 123 insertions(+), 46 deletions(-)
base-commit: 6c2de8d9531c7e9aad7ac6701e848bedb3f1d3a4
--
2.54.0
More information about the linux-arm-kernel
mailing list