Skip to content

Commit 2c7a79e

Browse files
committed
Merge tag 'v9.0.1' into update_qemu_9_0_1
v9.0.1 release
2 parents 712661c + 60b4f3a commit 2c7a79e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1154
-499
lines changed

.gitlab-ci.d/buildtest-template.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
then
2727
pyvenv/bin/meson configure . -Dbackend_max_links="$LD_JOBS" ;
2828
fi || exit 1;
29-
- make -j"$JOBS"
29+
- $MAKE -j"$JOBS"
3030
- if test -n "$MAKE_CHECK_ARGS";
3131
then
32-
make -j"$JOBS" $MAKE_CHECK_ARGS ;
32+
$MAKE -j"$JOBS" $MAKE_CHECK_ARGS ;
3333
fi
3434
- ccache --show-stats
3535

@@ -60,7 +60,7 @@
6060
- cd build
6161
- find . -type f -exec touch {} +
6262
# Avoid recompiling by hiding ninja with NINJA=":"
63-
- make NINJA=":" $MAKE_CHECK_ARGS
63+
- $MAKE NINJA=":" $MAKE_CHECK_ARGS
6464

6565
.native_test_job_template:
6666
extends: .common_test_job_template

.gitlab-ci.d/buildtest.yml

+3
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,9 @@ tsan-build:
575575
CONFIGURE_ARGS: --enable-tsan --cc=clang --cxx=clang++
576576
--enable-trace-backends=ust --disable-slirp
577577
TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
578+
# Remove when we switch to a distro with clang >= 18
579+
# https://github.com/google/sanitizers/issues/1716
580+
MAKE: setarch -R make
578581

579582
# gcov is a GCC features
580583
gcov:

.gitlab-ci.d/cirrus.yml

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ x64-freebsd-13-build:
5757
CIRRUS_VM_RAM: 8G
5858
UPDATE_COMMAND: pkg update; pkg upgrade -y
5959
INSTALL_COMMAND: pkg install -y
60+
CONFIGURE_ARGS: --target-list-exclude=arm-softmmu,i386-softmmu,microblaze-softmmu,mips64el-softmmu,mipsel-softmmu,mips-softmmu,ppc-softmmu,sh4eb-softmmu,xtensa-softmmu
6061
TEST_TARGETS: check
6162

6263
aarch64-macos-13-base-build:
@@ -72,6 +73,7 @@ aarch64-macos-13-base-build:
7273
INSTALL_COMMAND: brew install
7374
PATH_EXTRA: /opt/homebrew/ccache/libexec:/opt/homebrew/gettext/bin
7475
PKG_CONFIG_PATH: /opt/homebrew/curl/lib/pkgconfig:/opt/homebrew/ncurses/lib/pkgconfig:/opt/homebrew/readline/lib/pkgconfig
76+
CONFIGURE_ARGS: --target-list-exclude=arm-softmmu,i386-softmmu,microblazeel-softmmu,mips64-softmmu,mipsel-softmmu,mips-softmmu,ppc-softmmu,sh4-softmmu,xtensaeb-softmmu
7577
TEST_TARGETS: check-unit check-block check-qapi-schema check-softfloat check-qtest-x86_64
7678

7779
aarch64-macos-14-base-build:

.gitlab-ci.d/windows.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
msys2-64bit:
22
extends: .base_job_template
33
tags:
4-
- shared-windows
5-
- windows
6-
- windows-1809
4+
- saas-windows-medium-amd64
75
cache:
86
key: "$CI_JOB_NAME"
97
paths:

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9.0.0
1+
9.0.1

backends/cryptodev-builtin.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#include "qemu/osdep.h"
2525
#include "sysemu/cryptodev.h"
26+
#include "qemu/error-report.h"
2627
#include "qapi/error.h"
2728
#include "standard-headers/linux/virtio_crypto.h"
2829
#include "crypto/cipher.h"
@@ -396,8 +397,8 @@ static int cryptodev_builtin_create_session(
396397
case VIRTIO_CRYPTO_HASH_CREATE_SESSION:
397398
case VIRTIO_CRYPTO_MAC_CREATE_SESSION:
398399
default:
399-
error_setg(&local_error, "Unsupported opcode :%" PRIu32 "",
400-
sess_info->op_code);
400+
error_report("Unsupported opcode :%" PRIu32 "",
401+
sess_info->op_code);
401402
return -VIRTIO_CRYPTO_NOTSUPP;
402403
}
403404

@@ -554,8 +555,8 @@ static int cryptodev_builtin_operation(
554555

555556
if (op_info->session_id >= MAX_NUM_SESSIONS ||
556557
builtin->sessions[op_info->session_id] == NULL) {
557-
error_setg(&local_error, "Cannot find a valid session id: %" PRIu64 "",
558-
op_info->session_id);
558+
error_report("Cannot find a valid session id: %" PRIu64 "",
559+
op_info->session_id);
559560
return -VIRTIO_CRYPTO_INVSESS;
560561
}
561562

configure

+11-2
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,9 @@ else
411411
# Using uname is really broken, but it is just a fallback for architectures
412412
# that are going to use TCI anyway
413413
cpu=$(uname -m)
414-
echo "WARNING: unrecognized host CPU, proceeding with 'uname -m' output '$cpu'"
414+
if test "$host_os" != "bogus"; then
415+
echo "WARNING: unrecognized host CPU, proceeding with 'uname -m' output '$cpu'"
416+
fi
415417
fi
416418

417419
# Normalise host CPU name to the values used by Meson cross files and in source
@@ -779,7 +781,7 @@ for opt do
779781
--*) meson_option_parse "$opt" "$optarg"
780782
;;
781783
# Pass through -Dxxxx options to meson
782-
-D*) meson_options="$meson_options $opt"
784+
-D*) meson_option_add "$opt"
783785
;;
784786
esac
785787
done
@@ -911,6 +913,13 @@ EOF
911913
exit 0
912914
fi
913915

916+
# Now that we are sure that the user did not only want to print the --help
917+
# information, we should double-check that the C compiler really works:
918+
write_c_skeleton
919+
if ! compile_object ; then
920+
error_exit "C compiler \"$cc\" either does not exist or does not work."
921+
fi
922+
914923
# Remove old dependency files to make sure that they get properly regenerated
915924
rm -f ./*/config-devices.mak.d
916925

disas/riscv.c

+64-1
Original file line numberDiff line numberDiff line change
@@ -2190,7 +2190,22 @@ static const char *csr_name(int csrno)
21902190
case 0x0383: return "mibound";
21912191
case 0x0384: return "mdbase";
21922192
case 0x0385: return "mdbound";
2193-
case 0x03a0: return "pmpcfg3";
2193+
case 0x03a0: return "pmpcfg0";
2194+
case 0x03a1: return "pmpcfg1";
2195+
case 0x03a2: return "pmpcfg2";
2196+
case 0x03a3: return "pmpcfg3";
2197+
case 0x03a4: return "pmpcfg4";
2198+
case 0x03a5: return "pmpcfg5";
2199+
case 0x03a6: return "pmpcfg6";
2200+
case 0x03a7: return "pmpcfg7";
2201+
case 0x03a8: return "pmpcfg8";
2202+
case 0x03a9: return "pmpcfg9";
2203+
case 0x03aa: return "pmpcfg10";
2204+
case 0x03ab: return "pmpcfg11";
2205+
case 0x03ac: return "pmpcfg12";
2206+
case 0x03ad: return "pmpcfg13";
2207+
case 0x03ae: return "pmpcfg14";
2208+
case 0x03af: return "pmpcfg15";
21942209
case 0x03b0: return "pmpaddr0";
21952210
case 0x03b1: return "pmpaddr1";
21962211
case 0x03b2: return "pmpaddr2";
@@ -2207,6 +2222,54 @@ static const char *csr_name(int csrno)
22072222
case 0x03bd: return "pmpaddr13";
22082223
case 0x03be: return "pmpaddr14";
22092224
case 0x03bf: return "pmpaddr15";
2225+
case 0x03c0: return "pmpaddr16";
2226+
case 0x03c1: return "pmpaddr17";
2227+
case 0x03c2: return "pmpaddr18";
2228+
case 0x03c3: return "pmpaddr19";
2229+
case 0x03c4: return "pmpaddr20";
2230+
case 0x03c5: return "pmpaddr21";
2231+
case 0x03c6: return "pmpaddr22";
2232+
case 0x03c7: return "pmpaddr23";
2233+
case 0x03c8: return "pmpaddr24";
2234+
case 0x03c9: return "pmpaddr25";
2235+
case 0x03ca: return "pmpaddr26";
2236+
case 0x03cb: return "pmpaddr27";
2237+
case 0x03cc: return "pmpaddr28";
2238+
case 0x03cd: return "pmpaddr29";
2239+
case 0x03ce: return "pmpaddr30";
2240+
case 0x03cf: return "pmpaddr31";
2241+
case 0x03d0: return "pmpaddr32";
2242+
case 0x03d1: return "pmpaddr33";
2243+
case 0x03d2: return "pmpaddr34";
2244+
case 0x03d3: return "pmpaddr35";
2245+
case 0x03d4: return "pmpaddr36";
2246+
case 0x03d5: return "pmpaddr37";
2247+
case 0x03d6: return "pmpaddr38";
2248+
case 0x03d7: return "pmpaddr39";
2249+
case 0x03d8: return "pmpaddr40";
2250+
case 0x03d9: return "pmpaddr41";
2251+
case 0x03da: return "pmpaddr42";
2252+
case 0x03db: return "pmpaddr43";
2253+
case 0x03dc: return "pmpaddr44";
2254+
case 0x03dd: return "pmpaddr45";
2255+
case 0x03de: return "pmpaddr46";
2256+
case 0x03df: return "pmpaddr47";
2257+
case 0x03e0: return "pmpaddr48";
2258+
case 0x03e1: return "pmpaddr49";
2259+
case 0x03e2: return "pmpaddr50";
2260+
case 0x03e3: return "pmpaddr51";
2261+
case 0x03e4: return "pmpaddr52";
2262+
case 0x03e5: return "pmpaddr53";
2263+
case 0x03e6: return "pmpaddr54";
2264+
case 0x03e7: return "pmpaddr55";
2265+
case 0x03e8: return "pmpaddr56";
2266+
case 0x03e9: return "pmpaddr57";
2267+
case 0x03ea: return "pmpaddr58";
2268+
case 0x03eb: return "pmpaddr59";
2269+
case 0x03ec: return "pmpaddr60";
2270+
case 0x03ed: return "pmpaddr61";
2271+
case 0x03ee: return "pmpaddr62";
2272+
case 0x03ef: return "pmpaddr63";
22102273
case 0x0780: return "mtohost";
22112274
case 0x0781: return "mfromhost";
22122275
case 0x0782: return "mreset";

docs/system/target-i386-desc.rst.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The QEMU PC System emulator simulates the following peripherals:
3636
- PCI UHCI, OHCI, EHCI or XHCI USB controller and a virtual USB-1.1
3737
hub.
3838

39-
SMP is supported with up to 255 CPUs.
39+
SMP is supported with up to 255 CPUs (and 4096 CPUs for PC Q35 machine).
4040

4141
QEMU uses the PC BIOS from the Seabios project and the Plex86/Bochs LGPL
4242
VGA BIOS.

hw/arm/npcm7xx.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "hw/qdev-clock.h"
2525
#include "hw/qdev-properties.h"
2626
#include "qapi/error.h"
27+
#include "qemu/bswap.h"
2728
#include "qemu/units.h"
2829
#include "sysemu/sysemu.h"
2930
#include "target/arm/cpu-qom.h"
@@ -386,7 +387,7 @@ static void npcm7xx_init_fuses(NPCM7xxState *s)
386387
* The initial mask of disabled modules indicates the chip derivative (e.g.
387388
* NPCM750 or NPCM730).
388389
*/
389-
value = tswap32(nc->disabled_modules);
390+
value = cpu_to_le32(nc->disabled_modules);
390391
npcm7xx_otp_array_write(&s->fuse_array, &value, NPCM7XX_FUSE_DERIVATIVE,
391392
sizeof(value));
392393
}

hw/block/pflash_cfi01.c

+3-5
Original file line numberDiff line numberDiff line change
@@ -518,10 +518,6 @@ static void pflash_write(PFlashCFI01 *pfl, hwaddr offset,
518518
break;
519519
case 0xe8: /* Write to buffer */
520520
trace_pflash_write(pfl->name, "write to buffer");
521-
/* FIXME should save @offset, @width for case 1+ */
522-
qemu_log_mask(LOG_UNIMP,
523-
"%s: Write to buffer emulation is flawed\n",
524-
__func__);
525521
pfl->status |= 0x80; /* Ready! */
526522
break;
527523
case 0xf0: /* Probe for AMD flash */
@@ -574,7 +570,6 @@ static void pflash_write(PFlashCFI01 *pfl, hwaddr offset,
574570
}
575571
pfl->counter = value;
576572
pfl->wcycle++;
577-
pflash_blk_write_start(pfl, offset);
578573
break;
579574
case 0x60:
580575
if (cmd == 0xd0) {
@@ -605,6 +600,9 @@ static void pflash_write(PFlashCFI01 *pfl, hwaddr offset,
605600
switch (pfl->cmd) {
606601
case 0xe8: /* Block write */
607602
/* FIXME check @offset, @width */
603+
if (pfl->blk_offset == -1 && pfl->counter) {
604+
pflash_blk_write_start(pfl, offset);
605+
}
608606
if (!pfl->ro && (pfl->blk_offset != -1)) {
609607
pflash_data_write(pfl, offset, value, width, be);
610608
} else {

hw/core/machine.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ GlobalProperty hw_compat_8_2[] = {
3737
{ "migration", "zero-page-detection", "legacy"},
3838
{ TYPE_VIRTIO_IOMMU_PCI, "granule", "4k" },
3939
{ TYPE_VIRTIO_IOMMU_PCI, "aw-bits", "64" },
40+
{ "virtio-gpu-device", "x-scanout-vmstate-version", "1" },
4041
};
4142
const size_t hw_compat_8_2_len = G_N_ELEMENTS(hw_compat_8_2);
4243

@@ -45,15 +46,15 @@ GlobalProperty hw_compat_8_1[] = {
4546
{ "ramfb", "x-migrate", "off" },
4647
{ "vfio-pci-nohotplug", "x-ramfb-migrate", "off" },
4748
{ "igb", "x-pcie-flr-init", "off" },
49+
{ TYPE_VIRTIO_NET, "host_uso", "off"},
50+
{ TYPE_VIRTIO_NET, "guest_uso4", "off"},
51+
{ TYPE_VIRTIO_NET, "guest_uso6", "off"},
4852
};
4953
const size_t hw_compat_8_1_len = G_N_ELEMENTS(hw_compat_8_1);
5054

5155
GlobalProperty hw_compat_8_0[] = {
5256
{ "migration", "multifd-flush-after-each-section", "on"},
5357
{ TYPE_PCI_DEVICE, "x-pcie-ari-nextfn-1", "on" },
54-
{ TYPE_VIRTIO_NET, "host_uso", "off"},
55-
{ TYPE_VIRTIO_NET, "guest_uso4", "off"},
56-
{ TYPE_VIRTIO_NET, "guest_uso6", "off"},
5758
};
5859
const size_t hw_compat_8_0_len = G_N_ELEMENTS(hw_compat_8_0);
5960

hw/display/virtio-gpu.c

+22-8
Original file line numberDiff line numberDiff line change
@@ -1166,10 +1166,17 @@ static void virtio_gpu_cursor_bh(void *opaque)
11661166
virtio_gpu_handle_cursor(&g->parent_obj.parent_obj, g->cursor_vq);
11671167
}
11681168

1169+
static bool scanout_vmstate_after_v2(void *opaque, int version)
1170+
{
1171+
struct VirtIOGPUBase *base = container_of(opaque, VirtIOGPUBase, scanout);
1172+
struct VirtIOGPU *gpu = container_of(base, VirtIOGPU, parent_obj);
1173+
1174+
return gpu->scanout_vmstate_version >= 2;
1175+
}
1176+
11691177
static const VMStateDescription vmstate_virtio_gpu_scanout = {
11701178
.name = "virtio-gpu-one-scanout",
1171-
.version_id = 2,
1172-
.minimum_version_id = 1,
1179+
.version_id = 1,
11731180
.fields = (const VMStateField[]) {
11741181
VMSTATE_UINT32(resource_id, struct virtio_gpu_scanout),
11751182
VMSTATE_UINT32(width, struct virtio_gpu_scanout),
@@ -1181,12 +1188,18 @@ static const VMStateDescription vmstate_virtio_gpu_scanout = {
11811188
VMSTATE_UINT32(cursor.hot_y, struct virtio_gpu_scanout),
11821189
VMSTATE_UINT32(cursor.pos.x, struct virtio_gpu_scanout),
11831190
VMSTATE_UINT32(cursor.pos.y, struct virtio_gpu_scanout),
1184-
VMSTATE_UINT32_V(fb.format, struct virtio_gpu_scanout, 2),
1185-
VMSTATE_UINT32_V(fb.bytes_pp, struct virtio_gpu_scanout, 2),
1186-
VMSTATE_UINT32_V(fb.width, struct virtio_gpu_scanout, 2),
1187-
VMSTATE_UINT32_V(fb.height, struct virtio_gpu_scanout, 2),
1188-
VMSTATE_UINT32_V(fb.stride, struct virtio_gpu_scanout, 2),
1189-
VMSTATE_UINT32_V(fb.offset, struct virtio_gpu_scanout, 2),
1191+
VMSTATE_UINT32_TEST(fb.format, struct virtio_gpu_scanout,
1192+
scanout_vmstate_after_v2),
1193+
VMSTATE_UINT32_TEST(fb.bytes_pp, struct virtio_gpu_scanout,
1194+
scanout_vmstate_after_v2),
1195+
VMSTATE_UINT32_TEST(fb.width, struct virtio_gpu_scanout,
1196+
scanout_vmstate_after_v2),
1197+
VMSTATE_UINT32_TEST(fb.height, struct virtio_gpu_scanout,
1198+
scanout_vmstate_after_v2),
1199+
VMSTATE_UINT32_TEST(fb.stride, struct virtio_gpu_scanout,
1200+
scanout_vmstate_after_v2),
1201+
VMSTATE_UINT32_TEST(fb.offset, struct virtio_gpu_scanout,
1202+
scanout_vmstate_after_v2),
11901203
VMSTATE_END_OF_LIST()
11911204
},
11921205
};
@@ -1659,6 +1672,7 @@ static Property virtio_gpu_properties[] = {
16591672
DEFINE_PROP_BIT("blob", VirtIOGPU, parent_obj.conf.flags,
16601673
VIRTIO_GPU_FLAG_BLOB_ENABLED, false),
16611674
DEFINE_PROP_SIZE("hostmem", VirtIOGPU, parent_obj.conf.hostmem, 0),
1675+
DEFINE_PROP_UINT8("x-scanout-vmstate-version", VirtIOGPU, scanout_vmstate_version, 2),
16621676
DEFINE_PROP_END_OF_LIST(),
16631677
};
16641678

hw/dma/xlnx_dpdma.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -175,24 +175,24 @@ static uint64_t xlnx_dpdma_desc_get_source_address(DPDMADescriptor *desc,
175175

176176
switch (frag) {
177177
case 0:
178-
addr = desc->source_address
179-
+ (extract32(desc->address_extension, 16, 12) << 20);
178+
addr = (uint64_t)desc->source_address
179+
+ (extract64(desc->address_extension, 16, 16) << 32);
180180
break;
181181
case 1:
182-
addr = desc->source_address2
183-
+ (extract32(desc->address_extension_23, 0, 12) << 8);
182+
addr = (uint64_t)desc->source_address2
183+
+ (extract64(desc->address_extension_23, 0, 16) << 32);
184184
break;
185185
case 2:
186-
addr = desc->source_address3
187-
+ (extract32(desc->address_extension_23, 16, 12) << 20);
186+
addr = (uint64_t)desc->source_address3
187+
+ (extract64(desc->address_extension_23, 16, 16) << 32);
188188
break;
189189
case 3:
190-
addr = desc->source_address4
191-
+ (extract32(desc->address_extension_45, 0, 12) << 8);
190+
addr = (uint64_t)desc->source_address4
191+
+ (extract64(desc->address_extension_45, 0, 16) << 32);
192192
break;
193193
case 4:
194-
addr = desc->source_address5
195-
+ (extract32(desc->address_extension_45, 16, 12) << 20);
194+
addr = (uint64_t)desc->source_address5
195+
+ (extract64(desc->address_extension_45, 16, 16) << 32);
196196
break;
197197
default:
198198
addr = 0;

hw/intc/arm_gic.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1658,7 +1658,7 @@ static MemTxResult gic_cpu_read(GICState *s, int cpu, int offset,
16581658
*data = s->h_apr[gic_get_vcpu_real_id(cpu)];
16591659
} else if (gic_cpu_ns_access(s, cpu, attrs)) {
16601660
/* NS view of GICC_APR<n> is the top half of GIC_NSAPR<n> */
1661-
*data = gic_apr_ns_view(s, regno, cpu);
1661+
*data = gic_apr_ns_view(s, cpu, regno);
16621662
} else {
16631663
*data = s->apr[regno][cpu];
16641664
}
@@ -1746,7 +1746,7 @@ static MemTxResult gic_cpu_write(GICState *s, int cpu, int offset,
17461746
s->h_apr[gic_get_vcpu_real_id(cpu)] = value;
17471747
} else if (gic_cpu_ns_access(s, cpu, attrs)) {
17481748
/* NS view of GICC_APR<n> is the top half of GIC_NSAPR<n> */
1749-
gic_apr_write_ns_view(s, regno, cpu, value);
1749+
gic_apr_write_ns_view(s, cpu, regno, value);
17501750
} else {
17511751
s->apr[regno][cpu] = value;
17521752
}

0 commit comments

Comments
 (0)