v9.0.2 release

-----BEGIN PGP SIGNATURE-----
 
 iQFDBAABCAAtFiEEe3O61ovnosKJMUsicBtPaxppPlkFAmaWB/8PHG1qdEB0bHMu
 bXNrLnJ1AAoJEHAbT2saaT5ZYRoIALPfd8HRbQgBAgX/uQfRFCtkmv5BQ7SiYm1b
 IDZro9WWLTtcKOIEalLH63EOAspFzYtq6BHhhTvSakrF9xonVa4ou5yNIKqxHajt
 QvJiBQ4+5ArzZPPQcAiflQX09JuzKFmHGYwmj6/0ppm+uWZ4+yWE7Q58cUg6taFU
 9xVhYtwU1Gz6umvF6c9495gS9+bLYp7D3VMbbxbNmsOyIo9AX8sL3S5kcekoRNJI
 MwdXWLpRviVZ6JZ6NGA2m1Irnq8X9djK1mymoALf1bo+rN8Kh27Xy3ABBffQaSbX
 5bcNxUnOYhvXWDDG5XwLGujtPQHZfBnyhuDlvcTOBxafBA2o6Ns=
 =PXcF
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQSq9xYmtep25y1RrMYC5KE/dBVGigUCZp/AxQAKCRAC5KE/dBVG
 itM1AP9vNB4aAqU8N33pAsrsj1gucu8+B33oZK8p7E/61uJIRwEArFesKIIp+fJp
 e1mc9WaUKRUc4Jx1CxI7JuDtOv4KZQc=
 =C8DB
 -----END PGP SIGNATURE-----

Merge tag 'v9.0.2' into update_qemu_9_0_2

v9.0.2 release
This commit is contained in:
Romain Malmain 2024-07-23 16:40:04 +02:00
commit 5782c014d1
41 changed files with 315 additions and 232 deletions

View File

@ -158,9 +158,9 @@ build-system-centos:
- .native_build_job_template - .native_build_job_template
- .native_build_artifact_template - .native_build_artifact_template
needs: needs:
job: amd64-centos8-container job: amd64-centos9-container
variables: variables:
IMAGE: centos8 IMAGE: centos9
CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-vfio-user-server CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-vfio-user-server
--enable-modules --enable-trace-backends=dtrace --enable-docs --enable-modules --enable-trace-backends=dtrace --enable-docs
TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
@ -242,7 +242,7 @@ check-system-centos:
- job: build-system-centos - job: build-system-centos
artifacts: true artifacts: true
variables: variables:
IMAGE: centos8 IMAGE: centos9
MAKE_CHECK_ARGS: check MAKE_CHECK_ARGS: check
avocado-system-centos: avocado-system-centos:
@ -251,7 +251,7 @@ avocado-system-centos:
- job: build-system-centos - job: build-system-centos
artifacts: true artifacts: true
variables: variables:
IMAGE: centos8 IMAGE: centos9
MAKE_CHECK_ARGS: check-avocado MAKE_CHECK_ARGS: check-avocado
AVOCADO_TAGS: arch:ppc64 arch:or1k arch:s390x arch:x86_64 arch:rx AVOCADO_TAGS: arch:ppc64 arch:or1k arch:s390x arch:x86_64 arch:rx
arch:sh4 arch:nios2 arch:sh4 arch:nios2
@ -327,9 +327,9 @@ avocado-system-flaky:
build-tcg-disabled: build-tcg-disabled:
extends: .native_build_job_template extends: .native_build_job_template
needs: needs:
job: amd64-centos8-container job: amd64-centos9-container
variables: variables:
IMAGE: centos8 IMAGE: centos9
script: script:
- mkdir build - mkdir build
- cd build - cd build
@ -654,9 +654,9 @@ build-tci:
build-without-defaults: build-without-defaults:
extends: .native_build_job_template extends: .native_build_job_template
needs: needs:
job: amd64-centos8-container job: amd64-centos9-container
variables: variables:
IMAGE: centos8 IMAGE: centos9
CONFIGURE_ARGS: CONFIGURE_ARGS:
--without-default-devices --without-default-devices
--without-default-features --without-default-features

View File

@ -1,10 +1,10 @@
include: include:
- local: '/.gitlab-ci.d/container-template.yml' - local: '/.gitlab-ci.d/container-template.yml'
amd64-centos8-container: amd64-centos9-container:
extends: .container_job_template extends: .container_job_template
variables: variables:
NAME: centos8 NAME: centos9
amd64-fedora-container: amd64-fedora-container:
extends: .container_job_template extends: .container_job_template

View File

@ -1 +1 @@
9.0.1 9.0.2

View File

@ -712,7 +712,7 @@ static void tb_record(TranslationBlock *tb)
tb_page_addr_t paddr0 = tb_page_addr0(tb); tb_page_addr_t paddr0 = tb_page_addr0(tb);
tb_page_addr_t paddr1 = tb_page_addr1(tb); tb_page_addr_t paddr1 = tb_page_addr1(tb);
tb_page_addr_t pindex0 = paddr0 >> TARGET_PAGE_BITS; tb_page_addr_t pindex0 = paddr0 >> TARGET_PAGE_BITS;
tb_page_addr_t pindex1 = paddr0 >> TARGET_PAGE_BITS; tb_page_addr_t pindex1 = paddr1 >> TARGET_PAGE_BITS;
assert(paddr0 != -1); assert(paddr0 != -1);
if (unlikely(paddr1 != -1) && pindex0 != pindex1) { if (unlikely(paddr1 != -1) && pindex0 != pindex1) {
@ -744,7 +744,7 @@ static void tb_remove(TranslationBlock *tb)
tb_page_addr_t paddr0 = tb_page_addr0(tb); tb_page_addr_t paddr0 = tb_page_addr0(tb);
tb_page_addr_t paddr1 = tb_page_addr1(tb); tb_page_addr_t paddr1 = tb_page_addr1(tb);
tb_page_addr_t pindex0 = paddr0 >> TARGET_PAGE_BITS; tb_page_addr_t pindex0 = paddr0 >> TARGET_PAGE_BITS;
tb_page_addr_t pindex1 = paddr0 >> TARGET_PAGE_BITS; tb_page_addr_t pindex1 = paddr1 >> TARGET_PAGE_BITS;
assert(paddr0 != -1); assert(paddr0 != -1);
if (unlikely(paddr1 != -1) && pindex0 != pindex1) { if (unlikely(paddr1 != -1) && pindex0 != pindex1) {

90
block.c
View File

@ -86,6 +86,7 @@ static BlockDriverState *bdrv_open_inherit(const char *filename,
BlockDriverState *parent, BlockDriverState *parent,
const BdrvChildClass *child_class, const BdrvChildClass *child_class,
BdrvChildRole child_role, BdrvChildRole child_role,
bool parse_filename,
Error **errp); Error **errp);
static bool bdrv_recurse_has_child(BlockDriverState *bs, static bool bdrv_recurse_has_child(BlockDriverState *bs,
@ -2058,7 +2059,8 @@ static void parse_json_protocol(QDict *options, const char **pfilename,
* block driver has been specified explicitly. * block driver has been specified explicitly.
*/ */
static int bdrv_fill_options(QDict **options, const char *filename, static int bdrv_fill_options(QDict **options, const char *filename,
int *flags, Error **errp) int *flags, bool allow_parse_filename,
Error **errp)
{ {
const char *drvname; const char *drvname;
bool protocol = *flags & BDRV_O_PROTOCOL; bool protocol = *flags & BDRV_O_PROTOCOL;
@ -2100,7 +2102,7 @@ static int bdrv_fill_options(QDict **options, const char *filename,
if (protocol && filename) { if (protocol && filename) {
if (!qdict_haskey(*options, "filename")) { if (!qdict_haskey(*options, "filename")) {
qdict_put_str(*options, "filename", filename); qdict_put_str(*options, "filename", filename);
parse_filename = true; parse_filename = allow_parse_filename;
} else { } else {
error_setg(errp, "Can't specify 'file' and 'filename' options at " error_setg(errp, "Can't specify 'file' and 'filename' options at "
"the same time"); "the same time");
@ -3663,7 +3665,8 @@ int bdrv_open_backing_file(BlockDriverState *bs, QDict *parent_options,
} }
backing_hd = bdrv_open_inherit(backing_filename, reference, options, 0, bs, backing_hd = bdrv_open_inherit(backing_filename, reference, options, 0, bs,
&child_of_bds, bdrv_backing_role(bs), errp); &child_of_bds, bdrv_backing_role(bs), true,
errp);
if (!backing_hd) { if (!backing_hd) {
bs->open_flags |= BDRV_O_NO_BACKING; bs->open_flags |= BDRV_O_NO_BACKING;
error_prepend(errp, "Could not open backing file: "); error_prepend(errp, "Could not open backing file: ");
@ -3697,7 +3700,8 @@ free_exit:
static BlockDriverState * static BlockDriverState *
bdrv_open_child_bs(const char *filename, QDict *options, const char *bdref_key, bdrv_open_child_bs(const char *filename, QDict *options, const char *bdref_key,
BlockDriverState *parent, const BdrvChildClass *child_class, BlockDriverState *parent, const BdrvChildClass *child_class,
BdrvChildRole child_role, bool allow_none, Error **errp) BdrvChildRole child_role, bool allow_none,
bool parse_filename, Error **errp)
{ {
BlockDriverState *bs = NULL; BlockDriverState *bs = NULL;
QDict *image_options; QDict *image_options;
@ -3728,7 +3732,8 @@ bdrv_open_child_bs(const char *filename, QDict *options, const char *bdref_key,
} }
bs = bdrv_open_inherit(filename, reference, image_options, 0, bs = bdrv_open_inherit(filename, reference, image_options, 0,
parent, child_class, child_role, errp); parent, child_class, child_role, parse_filename,
errp);
if (!bs) { if (!bs) {
goto done; goto done;
} }
@ -3738,6 +3743,33 @@ done:
return bs; return bs;
} }
static BdrvChild *bdrv_open_child_common(const char *filename,
QDict *options, const char *bdref_key,
BlockDriverState *parent,
const BdrvChildClass *child_class,
BdrvChildRole child_role,
bool allow_none, bool parse_filename,
Error **errp)
{
BlockDriverState *bs;
BdrvChild *child;
GLOBAL_STATE_CODE();
bs = bdrv_open_child_bs(filename, options, bdref_key, parent, child_class,
child_role, allow_none, parse_filename, errp);
if (bs == NULL) {
return NULL;
}
bdrv_graph_wrlock();
child = bdrv_attach_child(parent, bs, bdref_key, child_class, child_role,
errp);
bdrv_graph_wrunlock();
return child;
}
/* /*
* Opens a disk image whose options are given as BlockdevRef in another block * Opens a disk image whose options are given as BlockdevRef in another block
* device's options. * device's options.
@ -3761,27 +3793,15 @@ BdrvChild *bdrv_open_child(const char *filename,
BdrvChildRole child_role, BdrvChildRole child_role,
bool allow_none, Error **errp) bool allow_none, Error **errp)
{ {
BlockDriverState *bs; return bdrv_open_child_common(filename, options, bdref_key, parent,
BdrvChild *child; child_class, child_role, allow_none, false,
errp);
GLOBAL_STATE_CODE();
bs = bdrv_open_child_bs(filename, options, bdref_key, parent, child_class,
child_role, allow_none, errp);
if (bs == NULL) {
return NULL;
}
bdrv_graph_wrlock();
child = bdrv_attach_child(parent, bs, bdref_key, child_class, child_role,
errp);
bdrv_graph_wrunlock();
return child;
} }
/* /*
* Wrapper on bdrv_open_child() for most popular case: open primary child of bs. * This does mostly the same as bdrv_open_child(), but for opening the primary
* child of a node. A notable difference from bdrv_open_child() is that it
* enables filename parsing for protocol names (including json:).
* *
* @parent can move to a different AioContext in this function. * @parent can move to a different AioContext in this function.
*/ */
@ -3796,8 +3816,8 @@ int bdrv_open_file_child(const char *filename,
role = parent->drv->is_filter ? role = parent->drv->is_filter ?
(BDRV_CHILD_FILTERED | BDRV_CHILD_PRIMARY) : BDRV_CHILD_IMAGE; (BDRV_CHILD_FILTERED | BDRV_CHILD_PRIMARY) : BDRV_CHILD_IMAGE;
if (!bdrv_open_child(filename, options, bdref_key, parent, if (!bdrv_open_child_common(filename, options, bdref_key, parent,
&child_of_bds, role, false, errp)) &child_of_bds, role, false, true, errp))
{ {
return -EINVAL; return -EINVAL;
} }
@ -3842,7 +3862,8 @@ BlockDriverState *bdrv_open_blockdev_ref(BlockdevRef *ref, Error **errp)
} }
bs = bdrv_open_inherit(NULL, reference, qdict, 0, NULL, NULL, 0, errp); bs = bdrv_open_inherit(NULL, reference, qdict, 0, NULL, NULL, 0, false,
errp);
obj = NULL; obj = NULL;
qobject_unref(obj); qobject_unref(obj);
visit_free(v); visit_free(v);
@ -3932,7 +3953,7 @@ static BlockDriverState * no_coroutine_fn
bdrv_open_inherit(const char *filename, const char *reference, QDict *options, bdrv_open_inherit(const char *filename, const char *reference, QDict *options,
int flags, BlockDriverState *parent, int flags, BlockDriverState *parent,
const BdrvChildClass *child_class, BdrvChildRole child_role, const BdrvChildClass *child_class, BdrvChildRole child_role,
Error **errp) bool parse_filename, Error **errp)
{ {
int ret; int ret;
BlockBackend *file = NULL; BlockBackend *file = NULL;
@ -3980,9 +4001,11 @@ bdrv_open_inherit(const char *filename, const char *reference, QDict *options,
} }
/* json: syntax counts as explicit options, as if in the QDict */ /* json: syntax counts as explicit options, as if in the QDict */
parse_json_protocol(options, &filename, &local_err); if (parse_filename) {
if (local_err) { parse_json_protocol(options, &filename, &local_err);
goto fail; if (local_err) {
goto fail;
}
} }
bs->explicit_options = qdict_clone_shallow(options); bs->explicit_options = qdict_clone_shallow(options);
@ -4007,7 +4030,8 @@ bdrv_open_inherit(const char *filename, const char *reference, QDict *options,
parent->open_flags, parent->options); parent->open_flags, parent->options);
} }
ret = bdrv_fill_options(&options, filename, &flags, &local_err); ret = bdrv_fill_options(&options, filename, &flags, parse_filename,
&local_err);
if (ret < 0) { if (ret < 0) {
goto fail; goto fail;
} }
@ -4076,7 +4100,7 @@ bdrv_open_inherit(const char *filename, const char *reference, QDict *options,
file_bs = bdrv_open_child_bs(filename, options, "file", bs, file_bs = bdrv_open_child_bs(filename, options, "file", bs,
&child_of_bds, BDRV_CHILD_IMAGE, &child_of_bds, BDRV_CHILD_IMAGE,
true, &local_err); true, true, &local_err);
if (local_err) { if (local_err) {
goto fail; goto fail;
} }
@ -4225,7 +4249,7 @@ BlockDriverState *bdrv_open(const char *filename, const char *reference,
GLOBAL_STATE_CODE(); GLOBAL_STATE_CODE();
return bdrv_open_inherit(filename, reference, options, flags, NULL, return bdrv_open_inherit(filename, reference, options, flags, NULL,
NULL, 0, errp); NULL, 0, true, errp);
} }
/* Return true if the NULL-terminated @list contains @str */ /* Return true if the NULL-terminated @list contains @str */

View File

@ -1636,7 +1636,22 @@ qcow2_do_open(BlockDriverState *bs, QDict *options, int flags,
goto fail; goto fail;
} }
if (open_data_file) { if (open_data_file && (flags & BDRV_O_NO_IO)) {
/*
* Don't open the data file for 'qemu-img info' so that it can be used
* to verify that an untrusted qcow2 image doesn't refer to external
* files.
*
* Note: This still makes has_data_file() return true.
*/
if (s->incompatible_features & QCOW2_INCOMPAT_DATA_FILE) {
s->data_file = NULL;
} else {
s->data_file = bs->file;
}
qdict_extract_subqdict(options, NULL, "data-file.");
qdict_del(options, "data-file");
} else if (open_data_file) {
/* Open external data file */ /* Open external data file */
bdrv_graph_co_rdunlock(); bdrv_graph_co_rdunlock();
s->data_file = bdrv_co_open_child(NULL, options, "data-file", bs, s->data_file = bdrv_co_open_child(NULL, options, "data-file", bs,

View File

@ -41,6 +41,7 @@
/* init terminal so that we can grab keys */ /* init terminal so that we can grab keys */
static struct termios oldtty; static struct termios oldtty;
static int old_fd0_flags; static int old_fd0_flags;
static int old_fd1_flags;
static bool stdio_in_use; static bool stdio_in_use;
static bool stdio_allow_signal; static bool stdio_allow_signal;
static bool stdio_echo_state; static bool stdio_echo_state;
@ -50,6 +51,8 @@ static void term_exit(void)
if (stdio_in_use) { if (stdio_in_use) {
tcsetattr(0, TCSANOW, &oldtty); tcsetattr(0, TCSANOW, &oldtty);
fcntl(0, F_SETFL, old_fd0_flags); fcntl(0, F_SETFL, old_fd0_flags);
fcntl(1, F_SETFL, old_fd1_flags);
stdio_in_use = false;
} }
} }
@ -102,6 +105,7 @@ static void qemu_chr_open_stdio(Chardev *chr,
stdio_in_use = true; stdio_in_use = true;
old_fd0_flags = fcntl(0, F_GETFL); old_fd0_flags = fcntl(0, F_GETFL);
old_fd1_flags = fcntl(1, F_GETFL);
tcgetattr(0, &oldtty); tcgetattr(0, &oldtty);
if (!g_unix_set_fd_nonblocking(0, true, NULL)) { if (!g_unix_set_fd_nonblocking(0, true, NULL)) {
error_setg_errno(errp, errno, "Failed to set FD nonblocking"); error_setg_errno(errp, errno, "Failed to set FD nonblocking");

View File

@ -219,15 +219,15 @@ class QAPISchemaGenRSTVisitor(QAPISchemaVisitor):
section += dlnode section += dlnode
return [section] return [section]
def _nodes_for_arguments(self, doc, boxed_arg_type): def _nodes_for_arguments(self, doc, arg_type):
"""Return list of doctree nodes for the arguments section""" """Return list of doctree nodes for the arguments section"""
if boxed_arg_type: if arg_type and not arg_type.is_implicit():
assert not doc.args assert not doc.args
section = self._make_section('Arguments') section = self._make_section('Arguments')
dlnode = nodes.definition_list() dlnode = nodes.definition_list()
dlnode += self._make_dlitem( dlnode += self._make_dlitem(
[nodes.Text('The members of '), [nodes.Text('The members of '),
nodes.literal('', boxed_arg_type.name)], nodes.literal('', arg_type.name)],
None) None)
section += dlnode section += dlnode
return [section] return [section]
@ -331,8 +331,7 @@ class QAPISchemaGenRSTVisitor(QAPISchemaVisitor):
allow_preconfig, coroutine): allow_preconfig, coroutine):
doc = self._cur_doc doc = self._cur_doc
self._add_doc('Command', self._add_doc('Command',
self._nodes_for_arguments(doc, self._nodes_for_arguments(doc, arg_type)
arg_type if boxed else None)
+ self._nodes_for_features(doc) + self._nodes_for_features(doc)
+ self._nodes_for_sections(doc) + self._nodes_for_sections(doc)
+ self._nodes_for_if_section(ifcond)) + self._nodes_for_if_section(ifcond))
@ -340,8 +339,7 @@ class QAPISchemaGenRSTVisitor(QAPISchemaVisitor):
def visit_event(self, name, info, ifcond, features, arg_type, boxed): def visit_event(self, name, info, ifcond, features, arg_type, boxed):
doc = self._cur_doc doc = self._cur_doc
self._add_doc('Event', self._add_doc('Event',
self._nodes_for_arguments(doc, self._nodes_for_arguments(doc, arg_type)
arg_type if boxed else None)
+ self._nodes_for_features(doc) + self._nodes_for_features(doc)
+ self._nodes_for_sections(doc) + self._nodes_for_sections(doc)
+ self._nodes_for_if_section(ifcond)) + self._nodes_for_if_section(ifcond))

View File

@ -401,7 +401,7 @@ static void virtio_snd_get_qemu_audsettings(audsettings *as,
as->nchannels = MIN(AUDIO_MAX_CHANNELS, params->channels); as->nchannels = MIN(AUDIO_MAX_CHANNELS, params->channels);
as->fmt = virtio_snd_get_qemu_format(params->format); as->fmt = virtio_snd_get_qemu_format(params->format);
as->freq = virtio_snd_get_qemu_freq(params->rate); as->freq = virtio_snd_get_qemu_freq(params->rate);
as->endianness = target_words_bigendian() ? 1 : 0; as->endianness = 0; /* Conforming to VIRTIO 1.0: always little endian. */
} }
/* /*

View File

@ -112,62 +112,38 @@ void machine_parse_smp_config(MachineState *ms,
} }
/* /*
* If not supported by the machine, a topology parameter must be * If not supported by the machine, a topology parameter must
* omitted. * not be set to a value greater than 1.
*/ */
if (!mc->smp_props.clusters_supported && config->has_clusters) { if (!mc->smp_props.clusters_supported &&
if (config->clusters > 1) { config->has_clusters && config->clusters > 1) {
error_setg(errp, "clusters not supported by this " error_setg(errp,
"machine's CPU topology"); "clusters > 1 not supported by this machine's CPU topology");
return; return;
} else {
/* Here clusters only equals 1 since we've checked zero case. */
warn_report("Deprecated CPU topology (considered invalid): "
"Unsupported clusters parameter mustn't be "
"specified as 1");
}
} }
clusters = clusters > 0 ? clusters : 1; clusters = clusters > 0 ? clusters : 1;
if (!mc->smp_props.dies_supported && config->has_dies) { if (!mc->smp_props.dies_supported &&
if (config->dies > 1) { config->has_dies && config->dies > 1) {
error_setg(errp, "dies not supported by this " error_setg(errp,
"machine's CPU topology"); "dies > 1 not supported by this machine's CPU topology");
return; return;
} else {
/* Here dies only equals 1 since we've checked zero case. */
warn_report("Deprecated CPU topology (considered invalid): "
"Unsupported dies parameter mustn't be "
"specified as 1");
}
} }
dies = dies > 0 ? dies : 1; dies = dies > 0 ? dies : 1;
if (!mc->smp_props.books_supported && config->has_books) { if (!mc->smp_props.books_supported &&
if (config->books > 1) { config->has_books && config->books > 1) {
error_setg(errp, "books not supported by this " error_setg(errp,
"machine's CPU topology"); "books > 1 not supported by this machine's CPU topology");
return; return;
} else {
/* Here books only equals 1 since we've checked zero case. */
warn_report("Deprecated CPU topology (considered invalid): "
"Unsupported books parameter mustn't be "
"specified as 1");
}
} }
books = books > 0 ? books : 1; books = books > 0 ? books : 1;
if (!mc->smp_props.drawers_supported && config->has_drawers) { if (!mc->smp_props.drawers_supported &&
if (config->drawers > 1) { config->has_drawers && config->drawers > 1) {
error_setg(errp, "drawers not supported by this " error_setg(errp,
"machine's CPU topology"); "drawers > 1 not supported by this machine's CPU topology");
return; return;
} else {
/* Here drawers only equals 1 since we've checked zero case. */
warn_report("Deprecated CPU topology (considered invalid): "
"Unsupported drawers parameter mustn't be "
"specified as 1");
}
} }
drawers = drawers > 0 ? drawers : 1; drawers = drawers > 0 ? drawers : 1;

View File

@ -1772,6 +1772,13 @@ static void vga_draw_blank(VGACommonState *s, int full_update)
if (s->last_scr_width <= 0 || s->last_scr_height <= 0) if (s->last_scr_width <= 0 || s->last_scr_height <= 0)
return; return;
if (is_buffer_shared(surface)) {
/* unshare buffer, otherwise the blanking corrupts vga vram */
surface = qemu_create_displaysurface(s->last_scr_width,
s->last_scr_height);
dpy_gfx_replace_surface(s->con, surface);
}
w = s->last_scr_width * surface_bytes_per_pixel(surface); w = s->last_scr_width * surface_bytes_per_pixel(surface);
d = surface_data(surface); d = surface_data(surface);
for(i = 0; i < s->last_scr_height; i++) { for(i = 0; i < s->last_scr_height; i++) {

View File

@ -2749,18 +2749,14 @@ static int32_t virtio_net_flush_tx(VirtIONetQueue *q)
out_sg = elem->out_sg; out_sg = elem->out_sg;
if (out_num < 1) { if (out_num < 1) {
virtio_error(vdev, "virtio-net header not in first element"); virtio_error(vdev, "virtio-net header not in first element");
virtqueue_detach_element(q->tx_vq, elem, 0); goto detach;
g_free(elem);
return -EINVAL;
} }
if (n->has_vnet_hdr) { if (n->has_vnet_hdr) {
if (iov_to_buf(out_sg, out_num, 0, &vhdr, n->guest_hdr_len) < if (iov_to_buf(out_sg, out_num, 0, &vhdr, n->guest_hdr_len) <
n->guest_hdr_len) { n->guest_hdr_len) {
virtio_error(vdev, "virtio-net header incorrect"); virtio_error(vdev, "virtio-net header incorrect");
virtqueue_detach_element(q->tx_vq, elem, 0); goto detach;
g_free(elem);
return -EINVAL;
} }
if (n->needs_vnet_hdr_swap) { if (n->needs_vnet_hdr_swap) {
virtio_net_hdr_swap(vdev, (void *) &vhdr); virtio_net_hdr_swap(vdev, (void *) &vhdr);
@ -2791,6 +2787,11 @@ static int32_t virtio_net_flush_tx(VirtIONetQueue *q)
n->guest_hdr_len, -1); n->guest_hdr_len, -1);
out_num = sg_num; out_num = sg_num;
out_sg = sg; out_sg = sg;
if (out_num < 1) {
virtio_error(vdev, "virtio-net nothing to send");
goto detach;
}
} }
ret = qemu_sendv_packet_async(qemu_get_subqueue(n->nic, queue_index), ret = qemu_sendv_packet_async(qemu_get_subqueue(n->nic, queue_index),
@ -2811,6 +2812,11 @@ drop:
} }
} }
return num_packets; return num_packets;
detach:
virtqueue_detach_element(q->tx_vq, elem, 0);
g_free(elem);
return -EINVAL;
} }
static void virtio_net_tx_timer(void *opaque); static void virtio_net_tx_timer(void *opaque);

View File

@ -4352,7 +4352,7 @@ static uint16_t nvme_io_mgmt_send_ruh_update(NvmeCtrl *n, NvmeRequest *req)
NvmeNamespace *ns = req->ns; NvmeNamespace *ns = req->ns;
uint32_t cdw10 = le32_to_cpu(cmd->cdw10); uint32_t cdw10 = le32_to_cpu(cmd->cdw10);
uint16_t ret = NVME_SUCCESS; uint16_t ret = NVME_SUCCESS;
uint32_t npid = (cdw10 >> 1) + 1; uint32_t npid = (cdw10 >> 16) + 1;
unsigned int i = 0; unsigned int i = 0;
g_autofree uint16_t *pids = NULL; g_autofree uint16_t *pids = NULL;
uint32_t maxnpid; uint32_t maxnpid;

View File

@ -892,7 +892,7 @@ static int kvm_virtio_pci_vector_use_one(VirtIOPCIProxy *proxy, int queue_no)
} }
ret = kvm_virtio_pci_vq_vector_use(proxy, vector); ret = kvm_virtio_pci_vq_vector_use(proxy, vector);
if (ret < 0) { if (ret < 0) {
goto undo; return ret;
} }
/* /*
* If guest supports masking, set up irqfd now. * If guest supports masking, set up irqfd now.
@ -902,25 +902,11 @@ static int kvm_virtio_pci_vector_use_one(VirtIOPCIProxy *proxy, int queue_no)
ret = kvm_virtio_pci_irqfd_use(proxy, n, vector); ret = kvm_virtio_pci_irqfd_use(proxy, n, vector);
if (ret < 0) { if (ret < 0) {
kvm_virtio_pci_vq_vector_release(proxy, vector); kvm_virtio_pci_vq_vector_release(proxy, vector);
goto undo; return ret;
} }
} }
return 0; return 0;
undo:
vector = virtio_queue_vector(vdev, queue_no);
if (vector >= msix_nr_vectors_allocated(dev)) {
return ret;
}
if (vdev->use_guest_notifier_mask && k->guest_notifier_mask) {
ret = virtio_pci_get_notifier(proxy, queue_no, &n, &vector);
if (ret < 0) {
return ret;
}
kvm_virtio_pci_irqfd_release(proxy, n, vector);
}
return ret;
} }
static int kvm_virtio_pci_vector_vq_use(VirtIOPCIProxy *proxy, int nvqs) static int kvm_virtio_pci_vector_vq_use(VirtIOPCIProxy *proxy, int nvqs)
{ {

View File

@ -322,7 +322,6 @@ static void vring_packed_event_read(VirtIODevice *vdev,
/* Make sure flags is seen before off_wrap */ /* Make sure flags is seen before off_wrap */
smp_rmb(); smp_rmb();
e->off_wrap = virtio_lduw_phys_cached(vdev, cache, off_off); e->off_wrap = virtio_lduw_phys_cached(vdev, cache, off_off);
virtio_tswap16s(vdev, &e->flags);
} }
static void vring_packed_off_wrap_write(VirtIODevice *vdev, static void vring_packed_off_wrap_write(VirtIODevice *vdev,

View File

@ -7254,11 +7254,17 @@ static inline int tswapid(int id)
#else #else
#define __NR_sys_setresgid __NR_setresgid #define __NR_sys_setresgid __NR_setresgid
#endif #endif
#ifdef __NR_setgroups32
#define __NR_sys_setgroups __NR_setgroups32
#else
#define __NR_sys_setgroups __NR_setgroups
#endif
_syscall1(int, sys_setuid, uid_t, uid) _syscall1(int, sys_setuid, uid_t, uid)
_syscall1(int, sys_setgid, gid_t, gid) _syscall1(int, sys_setgid, gid_t, gid)
_syscall3(int, sys_setresuid, uid_t, ruid, uid_t, euid, uid_t, suid) _syscall3(int, sys_setresuid, uid_t, ruid, uid_t, euid, uid_t, suid)
_syscall3(int, sys_setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid) _syscall3(int, sys_setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid)
_syscall2(int, sys_setgroups, int, size, gid_t *, grouplist)
void syscall_init(void) void syscall_init(void)
{ {
@ -11936,7 +11942,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1,
unlock_user(target_grouplist, arg2, unlock_user(target_grouplist, arg2,
gidsetsize * sizeof(target_id)); gidsetsize * sizeof(target_id));
} }
return get_errno(setgroups(gidsetsize, grouplist)); return get_errno(sys_setgroups(gidsetsize, grouplist));
} }
case TARGET_NR_fchown: case TARGET_NR_fchown:
return get_errno(fchown(arg1, low2highuid(arg2), low2highgid(arg3))); return get_errno(fchown(arg1, low2highuid(arg2), low2highgid(arg3)));
@ -12272,7 +12278,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1,
} }
unlock_user(target_grouplist, arg2, 0); unlock_user(target_grouplist, arg2, 0);
} }
return get_errno(setgroups(gidsetsize, grouplist)); return get_errno(sys_setgroups(gidsetsize, grouplist));
} }
#endif #endif
#ifdef TARGET_NR_fchown32 #ifdef TARGET_NR_fchown32

View File

@ -84,12 +84,19 @@ void file_start_outgoing_migration(MigrationState *s,
trace_migration_file_outgoing(filename); trace_migration_file_outgoing(filename);
fioc = qio_channel_file_new_path(filename, O_CREAT | O_WRONLY | O_TRUNC, fioc = qio_channel_file_new_path(filename, O_CREAT | O_WRONLY, 0600, errp);
0600, errp);
if (!fioc) { if (!fioc) {
return; return;
} }
if (ftruncate(fioc->fd, offset)) {
error_setg_errno(errp, errno,
"failed to truncate migration file to offset %" PRIx64,
offset);
object_unref(OBJECT(fioc));
return;
}
outgoing_args.fname = g_strdup(filename); outgoing_args.fname = g_strdup(filename);
ioc = QIO_CHANNEL(fioc); ioc = QIO_CHANNEL(fioc);

View File

@ -1671,8 +1671,6 @@
# #
# Takes a synchronous snapshot of a block device. # Takes a synchronous snapshot of a block device.
# #
# For the arguments, see the documentation of BlockdevSnapshotSync.
#
# Errors: # Errors:
# - If @device is not a valid block device, DeviceNotFound # - If @device is not a valid block device, DeviceNotFound
# #
@ -1701,8 +1699,6 @@
# device, the block device changes to using 'overlay' as its new # device, the block device changes to using 'overlay' as its new
# active image. # active image.
# #
# For the arguments, see the documentation of BlockdevSnapshot.
#
# Features: # Features:
# #
# @allow-write-only-overlay: If present, the check whether this # @allow-write-only-overlay: If present, the check whether this
@ -6061,9 +6057,6 @@
# string, or a snapshot with name already exists, the operation will # string, or a snapshot with name already exists, the operation will
# fail. # fail.
# #
# For the arguments, see the documentation of
# BlockdevSnapshotInternal.
#
# Errors: # Errors:
# - If @device is not a valid block device, GenericError # - If @device is not a valid block device, GenericError
# - If any snapshot matching @name exists, or @name is empty, # - If any snapshot matching @name exists, or @name is empty,

View File

@ -212,7 +212,8 @@ QDict *coroutine_mixed_fn qmp_dispatch(const QmpCommandList *cmds, QObject *requ
* executing the command handler so that it can make progress if it * executing the command handler so that it can make progress if it
* involves an AIO_WAIT_WHILE(). * involves an AIO_WAIT_WHILE().
*/ */
aio_co_reschedule_self(qemu_get_aio_context()); aio_co_schedule(qemu_get_aio_context(), qemu_coroutine_self());
qemu_coroutine_yield();
} }
monitor_set_cur(qemu_coroutine_self(), cur_mon); monitor_set_cur(qemu_coroutine_self(), cur_mon);
@ -226,7 +227,9 @@ QDict *coroutine_mixed_fn qmp_dispatch(const QmpCommandList *cmds, QObject *requ
* Move back to iohandler_ctx so that nested event loops for * Move back to iohandler_ctx so that nested event loops for
* qemu_aio_context don't start new monitor commands. * qemu_aio_context don't start new monitor commands.
*/ */
aio_co_reschedule_self(iohandler_get_aio_context()); aio_co_schedule(iohandler_get_aio_context(),
qemu_coroutine_self());
qemu_coroutine_yield();
} }
} else { } else {
/* /*

View File

@ -843,7 +843,7 @@ void HELPER(gvec_fcmlah_idx)(void *vd, void *vn, void *vm, void *va,
intptr_t index = extract32(desc, SIMD_DATA_SHIFT + 2, 2); intptr_t index = extract32(desc, SIMD_DATA_SHIFT + 2, 2);
uint32_t neg_real = flip ^ neg_imag; uint32_t neg_real = flip ^ neg_imag;
intptr_t elements = opr_sz / sizeof(float16); intptr_t elements = opr_sz / sizeof(float16);
intptr_t eltspersegment = 16 / sizeof(float16); intptr_t eltspersegment = MIN(16 / sizeof(float16), elements);
intptr_t i, j; intptr_t i, j;
/* Shift boolean to the sign bit so we can xor to negate. */ /* Shift boolean to the sign bit so we can xor to negate. */
@ -905,7 +905,7 @@ void HELPER(gvec_fcmlas_idx)(void *vd, void *vn, void *vm, void *va,
intptr_t index = extract32(desc, SIMD_DATA_SHIFT + 2, 2); intptr_t index = extract32(desc, SIMD_DATA_SHIFT + 2, 2);
uint32_t neg_real = flip ^ neg_imag; uint32_t neg_real = flip ^ neg_imag;
intptr_t elements = opr_sz / sizeof(float32); intptr_t elements = opr_sz / sizeof(float32);
intptr_t eltspersegment = 16 / sizeof(float32); intptr_t eltspersegment = MIN(16 / sizeof(float32), elements);
intptr_t i, j; intptr_t i, j;
/* Shift boolean to the sign bit so we can xor to negate. */ /* Shift boolean to the sign bit so we can xor to negate. */

View File

@ -1121,8 +1121,8 @@ const FloatRoundMode arm_rmode_to_sf_map[] = {
uint64_t HELPER(fjcvtzs)(float64 value, void *vstatus) uint64_t HELPER(fjcvtzs)(float64 value, void *vstatus)
{ {
float_status *status = vstatus; float_status *status = vstatus;
uint32_t inexact, frac; uint32_t frac, e_old, e_new;
uint32_t e_old, e_new; bool inexact;
e_old = get_float_exception_flags(status); e_old = get_float_exception_flags(status);
set_float_exception_flags(0, status); set_float_exception_flags(0, status);
@ -1130,13 +1130,13 @@ uint64_t HELPER(fjcvtzs)(float64 value, void *vstatus)
e_new = get_float_exception_flags(status); e_new = get_float_exception_flags(status);
set_float_exception_flags(e_old | e_new, status); set_float_exception_flags(e_old | e_new, status);
if (value == float64_chs(float64_zero)) { /* Normal inexact, denormal with flush-to-zero, or overflow or NaN */
/* While not inexact for IEEE FP, -0.0 is inexact for JavaScript. */ inexact = e_new & (float_flag_inexact |
inexact = 1; float_flag_input_denormal |
} else { float_flag_invalid);
/* Normal inexact or overflow or NaN */
inexact = e_new & (float_flag_inexact | float_flag_invalid); /* While not inexact for IEEE FP, -0.0 is inexact for JavaScript. */
} inexact |= value == float64_chs(float64_zero);
/* Pack the result and the env->ZF representation of Z together. */ /* Pack the result and the env->ZF representation of Z together. */
return deposit64(frac, 32, 32, inexact); return deposit64(frac, 32, 32, inexact);

View File

@ -6097,10 +6097,8 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
if (*eax & 31) { if (*eax & 31) {
int host_vcpus_per_cache = 1 + ((*eax & 0x3FFC000) >> 14); int host_vcpus_per_cache = 1 + ((*eax & 0x3FFC000) >> 14);
int vcpus_per_socket = cs->nr_cores * cs->nr_threads; int vcpus_per_socket = cs->nr_cores * cs->nr_threads;
if (cs->nr_cores > 1) { *eax &= ~0xFC000000;
*eax &= ~0xFC000000; *eax |= (pow2ceil(cs->nr_cores) - 1) << 26;
*eax |= (pow2ceil(cs->nr_cores) - 1) << 26;
}
if (host_vcpus_per_cache > vcpus_per_socket) { if (host_vcpus_per_cache > vcpus_per_socket) {
*eax &= ~0x3FFC000; *eax &= ~0x3FFC000;
*eax |= (pow2ceil(vcpus_per_socket) - 1) << 14; *eax |= (pow2ceil(vcpus_per_socket) - 1) << 14;

View File

@ -2703,7 +2703,7 @@ static void gen_enter(DisasContext *s, int esp_addend, int level)
} }
/* Copy the FrameTemp value to EBP. */ /* Copy the FrameTemp value to EBP. */
gen_op_mov_reg_v(s, a_ot, R_EBP, s->T1); gen_op_mov_reg_v(s, d_ot, R_EBP, s->T1);
/* Compute the final value of ESP. */ /* Compute the final value of ESP. */
tcg_gen_subi_tl(s->T1, s->T1, esp_addend + size * level); tcg_gen_subi_tl(s->T1, s->T1, esp_addend + size * level);

View File

@ -121,7 +121,7 @@ uint64_t helper_sdiv(CPUSPARCState *env, target_ulong a, target_ulong b)
return (uint32_t)(b32 < 0 ? INT32_MAX : INT32_MIN) | (-1ull << 32); return (uint32_t)(b32 < 0 ? INT32_MAX : INT32_MIN) | (-1ull << 32);
} }
a64 /= b; a64 /= b32;
r = a64; r = a64;
if (unlikely(r != a64)) { if (unlikely(r != a64)) {
return (uint32_t)(a64 < 0 ? INT32_MIN : INT32_MAX) | (-1ull << 32); return (uint32_t)(a64 < 0 ? INT32_MIN : INT32_MAX) | (-1ull << 32);

View File

@ -366,8 +366,7 @@ static void tcg_out_movi(TCGContext *s, TCGType type, TCGReg rd,
* back to the slow path. * back to the slow path.
*/ */
intptr_t pc_offset; intptr_t src_rx, pc_offset;
tcg_target_long val_lo, val_hi, pc_hi, offset_hi;
tcg_target_long hi12, hi32, hi52; tcg_target_long hi12, hi32, hi52;
/* Value fits in signed i32. */ /* Value fits in signed i32. */
@ -377,24 +376,23 @@ static void tcg_out_movi(TCGContext *s, TCGType type, TCGReg rd,
} }
/* PC-relative cases. */ /* PC-relative cases. */
pc_offset = tcg_pcrel_diff(s, (void *)val); src_rx = (intptr_t)tcg_splitwx_to_rx(s->code_ptr);
if (pc_offset == sextreg(pc_offset, 0, 22) && (pc_offset & 3) == 0) { if ((val & 3) == 0) {
/* Single pcaddu2i. */ pc_offset = val - src_rx;
tcg_out_opc_pcaddu2i(s, rd, pc_offset >> 2); if (pc_offset == sextreg(pc_offset, 0, 22)) {
return; /* Single pcaddu2i. */
tcg_out_opc_pcaddu2i(s, rd, pc_offset >> 2);
return;
}
} }
if (pc_offset == (int32_t)pc_offset) { pc_offset = (val >> 12) - (src_rx >> 12);
/* Offset within 32 bits; load with pcalau12i + ori. */ if (pc_offset == sextreg(pc_offset, 0, 20)) {
val_lo = sextreg(val, 0, 12); /* Load with pcalau12i + ori. */
val_hi = val >> 12; tcg_target_long val_lo = val & 0xfff;
pc_hi = (val - pc_offset) >> 12; tcg_out_opc_pcalau12i(s, rd, pc_offset);
offset_hi = val_hi - pc_hi;
tcg_debug_assert(offset_hi == sextreg(offset_hi, 0, 20));
tcg_out_opc_pcalau12i(s, rd, offset_hi);
if (val_lo != 0) { if (val_lo != 0) {
tcg_out_opc_ori(s, rd, rd, val_lo & 0xfff); tcg_out_opc_ori(s, rd, rd, val_lo);
} }
return; return;
} }

View File

@ -2274,7 +2274,7 @@ static bool fold_setcond2(OptContext *ctx, TCGOp *op)
case TCG_COND_TSTEQ: case TCG_COND_TSTEQ:
case TCG_COND_TSTNE: case TCG_COND_TSTNE:
if (arg_is_const_val(op->args[2], 0)) { if (arg_is_const_val(op->args[3], 0)) {
goto do_setcond_high; goto do_setcond_high;
} }
if (arg_is_const_val(op->args[4], 0)) { if (arg_is_const_val(op->args[4], 0)) {

View File

@ -1,15 +1,14 @@
# THIS FILE WAS AUTO-GENERATED # THIS FILE WAS AUTO-GENERATED
# #
# $ lcitool dockerfile --layers all centos-stream-8 qemu # $ lcitool dockerfile --layers all centos-stream-9 qemu
# #
# https://gitlab.com/libvirt/libvirt-ci # https://gitlab.com/libvirt/libvirt-ci
FROM quay.io/centos/centos:stream8 FROM quay.io/centos/centos:stream9
RUN dnf distro-sync -y && \ RUN dnf distro-sync -y && \
dnf install 'dnf-command(config-manager)' -y && \ dnf install 'dnf-command(config-manager)' -y && \
dnf config-manager --set-enabled -y powertools && \ dnf config-manager --set-enabled -y crb && \
dnf install -y centos-release-advanced-virtualization && \
dnf install -y epel-release && \ dnf install -y epel-release && \
dnf install -y epel-next-release && \ dnf install -y epel-next-release && \
dnf install -y \ dnf install -y \
@ -42,7 +41,6 @@ RUN dnf distro-sync -y && \
glib2-static \ glib2-static \
glibc-langpack-en \ glibc-langpack-en \
glibc-static \ glibc-static \
glusterfs-api-devel \
gnutls-devel \ gnutls-devel \
gtk3-devel \ gtk3-devel \
hostname \ hostname \
@ -82,6 +80,7 @@ RUN dnf distro-sync -y && \
lzo-devel \ lzo-devel \
make \ make \
mesa-libgbm-devel \ mesa-libgbm-devel \
meson \
mtools \ mtools \
ncurses-devel \ ncurses-devel \
nettle-devel \ nettle-devel \
@ -95,25 +94,25 @@ RUN dnf distro-sync -y && \
pixman-devel \ pixman-devel \
pkgconfig \ pkgconfig \
pulseaudio-libs-devel \ pulseaudio-libs-devel \
python38 \ python3 \
python38-PyYAML \ python3-PyYAML \
python38-numpy \ python3-numpy \
python38-pip \ python3-pillow \
python38-setuptools \ python3-pip \
python38-wheel \ python3-sphinx \
python3-sphinx_rtd_theme \
python3-tomli \
rdma-core-devel \ rdma-core-devel \
sed \ sed \
snappy-devel \ snappy-devel \
socat \ socat \
spice-protocol \ spice-protocol \
spice-server-devel \
swtpm \ swtpm \
systemd-devel \ systemd-devel \
systemtap-sdt-devel \ systemtap-sdt-devel \
tar \ tar \
usbredir-devel \ usbredir-devel \
util-linux \ util-linux \
virglrenderer-devel \
vte291-devel \ vte291-devel \
which \ which \
xfsprogs-devel \ xfsprogs-devel \
@ -131,18 +130,11 @@ RUN dnf distro-sync -y && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
RUN /usr/bin/pip3.8 install \
meson==0.63.2 \
pillow \
sphinx \
sphinx-rtd-theme \
tomli
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8" ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make" ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja" ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3.8" ENV PYTHON "/usr/bin/python3"
# As a final step configure the user (if env is defined) # As a final step configure the user (if env is defined)
ARG USER ARG USER
ARG UID ARG UID

View File

@ -1,66 +1,50 @@
mappings: mappings:
flake8: flake8:
CentOSStream8:
OpenSUSELeap15: OpenSUSELeap15:
meson: meson:
CentOSStream8:
OpenSUSELeap15: OpenSUSELeap15:
python3: python3:
CentOSStream8: python38
OpenSUSELeap15: python311-base OpenSUSELeap15: python311-base
python3-PyYAML: python3-PyYAML:
CentOSStream8: python38-PyYAML
OpenSUSELeap15: OpenSUSELeap15:
python3-devel: python3-devel:
CentOSStream8: python38-devel
OpenSUSELeap15: python311-devel OpenSUSELeap15: python311-devel
python3-docutils: python3-docutils:
CentOSStream8:
OpenSUSELeap15: OpenSUSELeap15:
python3-numpy: python3-numpy:
CentOSStream8: python38-numpy
OpenSUSELeap15: OpenSUSELeap15:
python3-opencv: python3-opencv:
CentOSStream8:
OpenSUSELeap15: OpenSUSELeap15:
python3-pillow: python3-pillow:
CentOSStream8:
OpenSUSELeap15: OpenSUSELeap15:
python3-pip: python3-pip:
CentOSStream8: python38-pip
OpenSUSELeap15: python311-pip OpenSUSELeap15: python311-pip
python3-pillow: python3-pillow:
CentOSStream8:
OpenSUSELeap15: OpenSUSELeap15:
python3-selinux: python3-selinux:
CentOSStream8:
OpenSUSELeap15: OpenSUSELeap15:
python3-setuptools: python3-setuptools:
CentOSStream8: python38-setuptools
OpenSUSELeap15: python311-setuptools OpenSUSELeap15: python311-setuptools
python3-sphinx: python3-sphinx:
CentOSStream8:
OpenSUSELeap15: OpenSUSELeap15:
python3-sphinx-rtd-theme: python3-sphinx-rtd-theme:
CentOSStream8:
OpenSUSELeap15: OpenSUSELeap15:
python3-sqlite3: python3-sqlite3:
CentOSStream8: python38
OpenSUSELeap15: python311 OpenSUSELeap15: python311
python3-tomli: python3-tomli:
@ -69,15 +53,11 @@ mappings:
Fedora: Fedora:
Debian12: Debian12:
OpenSUSELeap15: OpenSUSELeap15:
# Not available for Python 3.8
CentOSStream8:
python3-venv: python3-venv:
CentOSStream8: python38
OpenSUSELeap15: python311-base OpenSUSELeap15: python311-base
python3-wheel: python3-wheel:
CentOSStream8: python38-wheel
OpenSUSELeap15: python311-pip OpenSUSELeap15: python311-pip
pypi_mappings: pypi_mappings:

View File

@ -125,7 +125,7 @@ try:
# Standard native builds # Standard native builds
# #
generate_dockerfile("alpine", "alpine-318") generate_dockerfile("alpine", "alpine-318")
generate_dockerfile("centos8", "centos-stream-8") generate_dockerfile("centos9", "centos-stream-9")
generate_dockerfile("debian", "debian-12", generate_dockerfile("debian", "debian-12",
trailer="".join(debian12_extras)) trailer="".join(debian12_extras))
generate_dockerfile("fedora", "fedora-38") generate_dockerfile("fedora", "fedora-38")

View File

@ -326,12 +326,14 @@ $QEMU_IMG amend -o "data_file=foo" "$TEST_IMG"
echo echo
_make_test_img -o "compat=1.1,data_file=$TEST_IMG.data" 64M _make_test_img -o "compat=1.1,data_file=$TEST_IMG.data" 64M
$QEMU_IMG amend -o "data_file=foo" "$TEST_IMG" $QEMU_IMG amend -o "data_file=foo" "$TEST_IMG"
_img_info --format-specific $QEMU_IO -c "read 0 4k" "$TEST_IMG" 2>&1 | _filter_testdir | _filter_imgfmt
$QEMU_IO -c "open -o data-file.filename=$TEST_IMG.data,file.filename=$TEST_IMG" -c "read 0 4k" | _filter_qemu_io
TEST_IMG="data-file.filename=$TEST_IMG.data,file.filename=$TEST_IMG" _img_info --format-specific --image-opts TEST_IMG="data-file.filename=$TEST_IMG.data,file.filename=$TEST_IMG" _img_info --format-specific --image-opts
echo echo
$QEMU_IMG amend -o "data_file=" --image-opts "data-file.filename=$TEST_IMG.data,file.filename=$TEST_IMG" $QEMU_IMG amend -o "data_file=" --image-opts "data-file.filename=$TEST_IMG.data,file.filename=$TEST_IMG"
_img_info --format-specific $QEMU_IO -c "read 0 4k" "$TEST_IMG" 2>&1 | _filter_testdir | _filter_imgfmt
$QEMU_IO -c "open -o data-file.filename=$TEST_IMG.data,file.filename=$TEST_IMG" -c "read 0 4k" | _filter_qemu_io
TEST_IMG="data-file.filename=$TEST_IMG.data,file.filename=$TEST_IMG" _img_info --format-specific --image-opts TEST_IMG="data-file.filename=$TEST_IMG.data,file.filename=$TEST_IMG" _img_info --format-specific --image-opts
echo echo

View File

@ -545,7 +545,9 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-img: data-file can only be set for images that use an external data file qemu-img: data-file can only be set for images that use an external data file
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data
qemu-img: Could not open 'TEST_DIR/t.IMGFMT': Could not open 'foo': No such file or directory qemu-io: can't open device TEST_DIR/t.IMGFMT: Could not open 'foo': No such file or directory
read 4096/4096 bytes at offset 0
4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
image: TEST_DIR/t.IMGFMT image: TEST_DIR/t.IMGFMT
file format: IMGFMT file format: IMGFMT
virtual size: 64 MiB (67108864 bytes) virtual size: 64 MiB (67108864 bytes)
@ -560,7 +562,9 @@ Format specific information:
corrupt: false corrupt: false
extended l2: false extended l2: false
qemu-img: Could not open 'TEST_DIR/t.IMGFMT': 'data-file' is required for this image qemu-io: can't open device TEST_DIR/t.IMGFMT: 'data-file' is required for this image
read 4096/4096 bytes at offset 0
4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
image: TEST_DIR/t.IMGFMT image: TEST_DIR/t.IMGFMT
file format: IMGFMT file format: IMGFMT
virtual size: 64 MiB (67108864 bytes) virtual size: 64 MiB (67108864 bytes)

View File

@ -215,9 +215,22 @@ $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -n -C "$TEST_IMG.src" "$TEST_IMG"
$QEMU_IMG compare -f $IMGFMT -F $IMGFMT "$TEST_IMG.src" "$TEST_IMG" $QEMU_IMG compare -f $IMGFMT -F $IMGFMT "$TEST_IMG.src" "$TEST_IMG"
# blkdebug doesn't support copy offloading, so this tests the error path # blkdebug doesn't support copy offloading, so this tests the error path
$QEMU_IMG amend -f $IMGFMT -o "data_file=blkdebug::$TEST_IMG.data" "$TEST_IMG" test_img_with_blkdebug="json:{
$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -n -C "$TEST_IMG.src" "$TEST_IMG" 'driver': 'qcow2',
$QEMU_IMG compare -f $IMGFMT -F $IMGFMT "$TEST_IMG.src" "$TEST_IMG" 'file': {
'driver': 'file',
'filename': '$TEST_IMG'
},
'data-file': {
'driver': 'blkdebug',
'image': {
'driver': 'file',
'filename': '$TEST_IMG.data'
}
}
}"
$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -n -C "$TEST_IMG.src" "$test_img_with_blkdebug"
$QEMU_IMG compare -f $IMGFMT -F $IMGFMT "$TEST_IMG.src" "$test_img_with_blkdebug"
echo echo
echo "=== Flushing should flush the data file ===" echo "=== Flushing should flush the data file ==="

View File

@ -60,8 +60,16 @@ _make_test_img -o cluster_size=2M,data_file="$TEST_IMG.orig" \
# "write" 2G of data without using any space. # "write" 2G of data without using any space.
# (qemu-img create does not like it, though, because null-co does not # (qemu-img create does not like it, though, because null-co does not
# support image creation.) # support image creation.)
$QEMU_IMG amend -o data_file="json:{'driver':'null-co',,'size':'4294967296'}" \ test_img_with_null_data="json:{
"$TEST_IMG" 'driver': '$IMGFMT',
'file': {
'filename': '$TEST_IMG'
},
'data-file': {
'driver': 'null-co',
'size':'4294967296'
}
}"
# This gives us a range of: # This gives us a range of:
# 2^31 - 512 + 768 - 1 = 2^31 + 255 > 2^31 # 2^31 - 512 + 768 - 1 = 2^31 + 255 > 2^31
@ -74,7 +82,7 @@ $QEMU_IMG amend -o data_file="json:{'driver':'null-co',,'size':'4294967296'}" \
# on L2 boundaries, we need large L2 tables; hence the cluster size of # on L2 boundaries, we need large L2 tables; hence the cluster size of
# 2 MB. (Anything from 256 kB should work, though, because then one L2 # 2 MB. (Anything from 256 kB should work, though, because then one L2
# table covers 8 GB.) # table covers 8 GB.)
$QEMU_IO -c "write 768 $((2 ** 31 - 512))" "$TEST_IMG" | _filter_qemu_io $QEMU_IO -c "write 768 $((2 ** 31 - 512))" "$test_img_with_null_data" | _filter_qemu_io
_check_test_img _check_test_img

View File

@ -41,8 +41,9 @@ endif
# Pauth Tests # Pauth Tests
ifneq ($(CROSS_CC_HAS_ARMV8_3),) ifneq ($(CROSS_CC_HAS_ARMV8_3),)
AARCH64_TESTS += pauth-1 pauth-2 pauth-4 pauth-5 AARCH64_TESTS += pauth-1 pauth-2 pauth-4 pauth-5 test-2375
pauth-%: CFLAGS += -march=armv8.3-a pauth-%: CFLAGS += -march=armv8.3-a
test-2375: CFLAGS += -march=armv8.3-a
run-pauth-1: QEMU_OPTS += -cpu max run-pauth-1: QEMU_OPTS += -cpu max
run-pauth-2: QEMU_OPTS += -cpu max run-pauth-2: QEMU_OPTS += -cpu max
# Choose a cpu with FEAT_Pauth but without FEAT_FPAC for pauth-[45]. # Choose a cpu with FEAT_Pauth but without FEAT_FPAC for pauth-[45].

View File

@ -0,0 +1,21 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* Copyright (c) 2024 Linaro Ltd */
/* See https://gitlab.com/qemu-project/qemu/-/issues/2375 */
#include <assert.h>
int main(void)
{
int r, z;
asm("msr fpcr, %2\n\t"
"fjcvtzs %w0, %d3\n\t"
"cset %1, eq"
: "=r"(r), "=r"(z)
: "r"(0x01000000L), /* FZ = 1 */
"w"(0xfcff00L)); /* denormal */
assert(r == 0);
assert(z == 0);
return 0;
}

View File

@ -8,6 +8,8 @@
include $(SRC_PATH)/tests/tcg/i386/Makefile.target include $(SRC_PATH)/tests/tcg/i386/Makefile.target
X86_64_TESTS += test-2413
ifeq ($(filter %-linux-user, $(TARGET)),$(TARGET)) ifeq ($(filter %-linux-user, $(TARGET)),$(TARGET))
X86_64_TESTS += vsyscall X86_64_TESTS += vsyscall
X86_64_TESTS += noexec X86_64_TESTS += noexec

View File

@ -0,0 +1,30 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* Copyright 2024 Linaro, Ltd. */
/* See https://gitlab.com/qemu-project/qemu/-/issues/2413 */
#include <assert.h>
void test(unsigned long *a, unsigned long *d, unsigned long c)
{
asm("xorl %%eax, %%eax\n\t"
"xorl %%edx, %%edx\n\t"
"testb $0x20, %%cl\n\t"
"sete %%al\n\t"
"setne %%dl\n\t"
"shll %%cl, %%eax\n\t"
"shll %%cl, %%edx\n\t"
: "=a"(*a), "=d"(*d)
: "c"(c));
}
int main(void)
{
unsigned long a, c, d;
for (c = 0; c < 64; c++) {
test(&a, &d, c);
assert(a == (c & 0x20 ? 0 : 1u << (c & 0x1f)));
assert(d == (c & 0x20 ? 1u << (c & 0x1f) : 0));
}
return 0;
}

View File

@ -330,6 +330,14 @@ static const struct SMPTestData data_generic_valid[] = {
.config = SMP_CONFIG_GENERIC(T, 8, T, 2, T, 4, T, 2, T, 16), .config = SMP_CONFIG_GENERIC(T, 8, T, 2, T, 4, T, 2, T, 16),
.expect_prefer_sockets = CPU_TOPOLOGY_GENERIC(8, 2, 4, 2, 16), .expect_prefer_sockets = CPU_TOPOLOGY_GENERIC(8, 2, 4, 2, 16),
.expect_prefer_cores = CPU_TOPOLOGY_GENERIC(8, 2, 4, 2, 16), .expect_prefer_cores = CPU_TOPOLOGY_GENERIC(8, 2, 4, 2, 16),
}, {
/*
* Unsupported parameters are always allowed to be set to '1'
* config: -smp 8,books=1,drawers=1,sockets=2,modules=1,dies=1,cores=2,threads=2,maxcpus=8
* expect: cpus=8,sockets=2,cores=2,threads=2,maxcpus=8 */
.config = SMP_CONFIG_WITH_FULL_TOPO(8, 1, 1, 2, 1, 1, 2, 2, 8),
.expect_prefer_sockets = CPU_TOPOLOGY_GENERIC(8, 2, 2, 2, 8),
.expect_prefer_cores = CPU_TOPOLOGY_GENERIC(8, 2, 2, 2, 8),
}, },
}; };
@ -337,21 +345,21 @@ static const struct SMPTestData data_generic_invalid[] = {
{ {
/* config: -smp 2,dies=2 */ /* config: -smp 2,dies=2 */
.config = SMP_CONFIG_WITH_DIES(T, 2, F, 0, T, 2, F, 0, F, 0, F, 0), .config = SMP_CONFIG_WITH_DIES(T, 2, F, 0, T, 2, F, 0, F, 0, F, 0),
.expect_error = "dies not supported by this machine's CPU topology", .expect_error = "dies > 1 not supported by this machine's CPU topology",
}, { }, {
/* config: -smp 2,clusters=2 */ /* config: -smp 2,clusters=2 */
.config = SMP_CONFIG_WITH_CLUSTERS(T, 2, F, 0, T, 2, F, 0, F, 0, F, 0), .config = SMP_CONFIG_WITH_CLUSTERS(T, 2, F, 0, T, 2, F, 0, F, 0, F, 0),
.expect_error = "clusters not supported by this machine's CPU topology", .expect_error = "clusters > 1 not supported by this machine's CPU topology",
}, { }, {
/* config: -smp 2,books=2 */ /* config: -smp 2,books=2 */
.config = SMP_CONFIG_WITH_BOOKS_DRAWERS(T, 2, F, 0, T, 2, F, .config = SMP_CONFIG_WITH_BOOKS_DRAWERS(T, 2, F, 0, T, 2, F,
0, F, 0, F, 0, F, 0), 0, F, 0, F, 0, F, 0),
.expect_error = "books not supported by this machine's CPU topology", .expect_error = "books > 1 not supported by this machine's CPU topology",
}, { }, {
/* config: -smp 2,drawers=2 */ /* config: -smp 2,drawers=2 */
.config = SMP_CONFIG_WITH_BOOKS_DRAWERS(T, 2, T, 2, F, 0, F, .config = SMP_CONFIG_WITH_BOOKS_DRAWERS(T, 2, T, 2, F, 0, F,
0, F, 0, F, 0, F, 0), 0, F, 0, F, 0, F, 0),
.expect_error = "drawers not supported by this machine's CPU topology", .expect_error = "drawers > 1 not supported by this machine's CPU topology",
}, { }, {
/* config: -smp 8,sockets=2,cores=4,threads=2,maxcpus=8 */ /* config: -smp 8,sockets=2,cores=4,threads=2,maxcpus=8 */
.config = SMP_CONFIG_GENERIC(T, 8, T, 2, T, 4, T, 2, T, 8), .config = SMP_CONFIG_GENERIC(T, 8, T, 2, T, 4, T, 2, T, 8),

View File

@ -26,8 +26,8 @@ class CentosVM(basevm.BaseVM):
export SRC_ARCHIVE=/dev/vdb; export SRC_ARCHIVE=/dev/vdb;
sudo chmod a+r $SRC_ARCHIVE; sudo chmod a+r $SRC_ARCHIVE;
tar -xf $SRC_ARCHIVE; tar -xf $SRC_ARCHIVE;
make docker-test-block@centos8 {verbose} J={jobs} NETWORK=1; make docker-test-block@centos9 {verbose} J={jobs} NETWORK=1;
make docker-test-quick@centos8 {verbose} J={jobs} NETWORK=1; make docker-test-quick@centos9 {verbose} J={jobs} NETWORK=1;
""" """
def build_image(self, img): def build_image(self, img):

View File

@ -150,6 +150,7 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
vc, vc->window ? vc->window : vc->gfx.drawing_area); vc, vc->window ? vc->window : vc->gfx.drawing_area);
if (vc->gfx.guest_fb.dmabuf && vc->gfx.guest_fb.dmabuf->draw_submitted) { if (vc->gfx.guest_fb.dmabuf && vc->gfx.guest_fb.dmabuf->draw_submitted) {
gd_egl_draw(vc);
return; return;
} }

View File

@ -126,6 +126,7 @@ void gd_gl_area_refresh(DisplayChangeListener *dcl)
gd_update_monitor_refresh_rate(vc, vc->window ? vc->window : vc->gfx.drawing_area); gd_update_monitor_refresh_rate(vc, vc->window ? vc->window : vc->gfx.drawing_area);
if (vc->gfx.guest_fb.dmabuf && vc->gfx.guest_fb.dmabuf->draw_submitted) { if (vc->gfx.guest_fb.dmabuf && vc->gfx.guest_fb.dmabuf->draw_submitted) {
gd_gl_area_draw(vc);
return; return;
} }