Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ clean: recurse-clean

VERSION = $(shell cat $(SRC_PATH)/VERSION)

dist: qemu-$(VERSION).tar.bz2
dist: qemu-$(VERSION).tar.xz

qemu-%.tar.bz2:
$(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)"
qemu-%.tar.xz:
$(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.xz,%,$@)"

distclean: clean recurse-distclean
-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) -t clean -g || :
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.2.1
9.2.4
2 changes: 1 addition & 1 deletion accel/tcg/translate-all.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static int64_t decode_sleb128(const uint8_t **pp)
val |= (int64_t)(byte & 0x7f) << shift;
shift += 7;
} while (byte & 0x80);
if (shift < TARGET_LONG_BITS && (byte & 0x40)) {
if (shift < 64 && (byte & 0x40)) {
val |= -(int64_t)1 << shift;
}

Expand Down
2 changes: 1 addition & 1 deletion backends/cryptodev-vhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ cryptodev_vhost_init(
CryptoDevBackendVhost *crypto;
Error *local_err = NULL;

crypto = g_new(CryptoDevBackendVhost, 1);
crypto = g_new0(CryptoDevBackendVhost, 1);
crypto->dev.max_queues = 1;
crypto->dev.nvqs = 1;
crypto->dev.vqs = crypto->vqs;
Expand Down
4 changes: 2 additions & 2 deletions block/block-backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -2134,10 +2134,10 @@ static void send_qmp_error_event(BlockBackend *blk,
{
IoOperationType optype;
BlockDriverState *bs = blk_bs(blk);
g_autofree char *path = blk_get_attached_dev_path(blk);

optype = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
qapi_event_send_block_io_error(blk_name(blk),
blk_get_attached_dev_path(blk),
qapi_event_send_block_io_error(path, blk_name(blk),
bs ? bdrv_get_node_name(bs) : NULL, optype,
action, blk_iostatus_is_enabled(blk),
error == ENOSPC, strerror(error));
Expand Down
1 change: 1 addition & 0 deletions block/qed.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ static void bdrv_qed_detach_aio_context(BlockDriverState *bs)

qed_cancel_need_check_timer(s);
timer_free(s->need_check_timer);
s->need_check_timer = NULL;
}

static void bdrv_qed_attach_aio_context(BlockDriverState *bs,
Expand Down
1 change: 1 addition & 0 deletions block/snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ int bdrv_snapshot_goto(BlockDriverState *bs,
bdrv_graph_wrunlock();

ret = bdrv_snapshot_goto(fallback_bs, snapshot_id, errp);
memset(bs->opaque, 0, drv->instance_size);
open_ret = drv->bdrv_open(bs, options, bs->open_flags, &local_err);
qobject_unref(options);
if (open_ret < 0) {
Expand Down
4 changes: 2 additions & 2 deletions common-user/host/riscv/safe-syscall.inc.S
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ safe_syscall_end:

/* code path setting errno */
0: neg a0, a0
j safe_syscall_set_errno_tail
tail safe_syscall_set_errno_tail

/* code path when we didn't execute the syscall */
2: li a0, QEMU_ERESTARTSYS
j safe_syscall_set_errno_tail
tail safe_syscall_set_errno_tail

.cfi_endproc
.size safe_syscall_base, .-safe_syscall_base
2 changes: 1 addition & 1 deletion docs/about/build-platforms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Python runtime
option of the ``configure`` script to point QEMU to a supported
version of the Python runtime.

As of QEMU |version|, the minimum supported version of Python is 3.7.
As of QEMU |version|, the minimum supported version of Python is 3.8.

Python build dependencies
Some of QEMU's build dependencies are written in Python. Usually these
Expand Down
2 changes: 1 addition & 1 deletion docs/about/emulation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ for that architecture.
- Unified Hosting Interface (MD01069)
* - RISC-V
- System and User-mode
- https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc
- https://github.com/riscv-non-isa/riscv-semihosting/blob/main/riscv-semihosting.adoc
* - Xtensa
- System
- Tensilica ISS SIMCALL
Expand Down
10 changes: 5 additions & 5 deletions docs/devel/build-system.rst
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ Target-dependent emulator sourcesets:
Each emulator also includes sources for files in the ``hw/`` and ``target/``
subdirectories. The subdirectory used for each emulator comes
from the target's definition of ``TARGET_BASE_ARCH`` or (if missing)
``TARGET_ARCH``, as found in ``default-configs/targets/*.mak``.
``TARGET_ARCH``, as found in ``configs/targets/*.mak``.

Each subdirectory in ``hw/`` adds one sourceset to the ``hw_arch`` dictionary,
for example::
Expand Down Expand Up @@ -317,8 +317,8 @@ Utility sourcesets:
The following files concur in the definition of which files are linked
into each emulator:

``default-configs/devices/*.mak``
The files under ``default-configs/devices/`` control the boards and devices
``configs/devices/*.mak``
The files under ``configs/devices/`` control the boards and devices
that are built into each QEMU system emulation targets. They merely contain
a list of config variable definitions such as::

Expand All @@ -327,11 +327,11 @@ into each emulator:
CONFIG_XLNX_VERSAL=y

``*/Kconfig``
These files are processed together with ``default-configs/devices/*.mak`` and
These files are processed together with ``configs/devices/*.mak`` and
describe the dependencies between various features, subsystems and
device models. They are described in :ref:`kconfig`

``default-configs/targets/*.mak``
``configs/targets/*.mak``
These files mostly define symbols that appear in the ``*-config-target.h``
file for each emulator\ [#cfgtarget]_. However, the ``TARGET_ARCH``
and ``TARGET_BASE_ARCH`` will also be used to select the ``hw/`` and
Expand Down
16 changes: 8 additions & 8 deletions docs/devel/kconfig.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ originated in the Linux kernel, though it was heavily simplified and
the handling of dependencies is stricter in QEMU.

Unlike Linux, there is no user interface to edit the configuration, which
is instead specified in per-target files under the ``default-configs/``
is instead specified in per-target files under the ``configs/``
directory of the QEMU source tree. This is because, unlike Linux,
configuration and dependencies can be treated as a black box when building
QEMU; the default configuration that QEMU ships with should be okay in
Expand Down Expand Up @@ -103,7 +103,7 @@ directives can be included:
**default value**: ``default <value> [if <expr>]``

Default values are assigned to the config symbol if no other value was
set by the user via ``default-configs/*.mak`` files, and only if
set by the user via ``configs/*.mak`` files, and only if
``select`` or ``depends on`` directives do not force the value to true
or false respectively. ``<value>`` can be ``y`` or ``n``; it cannot
be an arbitrary Boolean expression. However, a condition for applying
Expand All @@ -119,7 +119,7 @@ directives can be included:
This is similar to ``select`` as it applies a lower limit of ``y``
to another symbol. However, the lower limit is only a default
and the "implied" symbol's value may still be set to ``n`` from a
``default-configs/*.mak`` files. The following two examples are
``configs/*.mak`` files. The following two examples are
equivalent::

config FOO
Expand All @@ -146,7 +146,7 @@ declares its dependencies in different ways:
bool

Subsystems always default to false (they have no ``default`` directive)
and are never visible in ``default-configs/*.mak`` files. It's
and are never visible in ``configs/*.mak`` files. It's
up to other symbols to ``select`` whatever subsystems they require.

They sometimes have ``select`` directives to bring in other required
Expand Down Expand Up @@ -238,7 +238,7 @@ declares its dependencies in different ways:
include libraries (such as ``FDT``) or ``TARGET_BIG_ENDIAN``
(possibly negated).

Boards are listed for convenience in the ``default-configs/*.mak``
Boards are listed for convenience in the ``configs/*.mak``
for the target they apply to.

**internal elements**
Expand All @@ -251,18 +251,18 @@ declares its dependencies in different ways:

Internal elements group code that is useful in several boards or
devices. They are usually enabled with ``select`` and in turn select
other elements; they are never visible in ``default-configs/*.mak``
other elements; they are never visible in ``configs/*.mak``
files, and often not even in the Makefile.

Writing and modifying default configurations
--------------------------------------------

In addition to the Kconfig files under hw/, each target also includes
a file called ``default-configs/TARGETNAME-softmmu.mak``. These files
a file called ``configs/TARGETNAME-softmmu.mak``. These files
initialize some Kconfig variables to non-default values and provide the
starting point to turn on devices and subsystems.

A file in ``default-configs/`` looks like the following example::
A file in ``configs/`` looks like the following example::

# Default configuration for alpha-softmmu

Expand Down
6 changes: 3 additions & 3 deletions docs/specs/riscv-iommu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ RISC-V IOMMU support for RISC-V machines
========================================

QEMU implements a RISC-V IOMMU emulation based on the RISC-V IOMMU spec
version 1.0 `iommu1.0`_.
version 1.0 `iommu1.0.0`_.

The emulation includes a PCI reference device, riscv-iommu-pci, that QEMU
RISC-V boards can use. The 'virt' RISC-V machine is compatible with this
Expand All @@ -14,7 +14,7 @@ riscv-iommu-pci reference device
--------------------------------

This device implements the RISC-V IOMMU emulation as recommended by the section
"Integrating an IOMMU as a PCIe device" of `iommu1.0`_: a PCI device with base
"Integrating an IOMMU as a PCIe device" of `iommu1.0.0`_: a PCI device with base
class 08h, sub-class 06h and programming interface 00h.

As a reference device it doesn't implement anything outside of the specification,
Expand Down Expand Up @@ -83,7 +83,7 @@ Several options are available to control the capabilities of the device, namely:
- "s-stage": enable s-stage support
- "g-stage": enable g-stage support

.. _iommu1.0: https://github.com/riscv-non-isa/riscv-iommu/releases/download/v1.0/riscv-iommu.pdf
.. _iommu1.0.0: https://github.com/riscv-non-isa/riscv-iommu/releases/download/v1.0.0/riscv-iommu.pdf

.. _linux-v8: https://lore.kernel.org/linux-riscv/[email protected]/

Expand Down
4 changes: 2 additions & 2 deletions host/include/loongarch64/host/atomic128-ldst.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static inline Int128 atomic16_read_ro(const Int128 *ptr)
asm("vld $vr0, %2, 0\n\t"
"vpickve2gr.d %0, $vr0, 0\n\t"
"vpickve2gr.d %1, $vr0, 1"
: "=r"(l), "=r"(h) : "r"(ptr), "m"(*ptr) : "f0");
: "=r"(l), "=r"(h) : "r"(ptr), "m"(*ptr) : "$f0");

return int128_make128(l, h);
}
Expand All @@ -46,7 +46,7 @@ static inline void atomic16_set(Int128 *ptr, Int128 val)
asm("vinsgr2vr.d $vr0, %1, 0\n\t"
"vinsgr2vr.d $vr0, %2, 1\n\t"
"vst $vr0, %3, 0"
: "=m"(*ptr) : "r"(l), "r"(h), "r"(ptr) : "f0");
: "=m"(*ptr) : "r"(l), "r"(h), "r"(ptr) : "$f0");
}

#endif /* LOONGARCH_ATOMIC128_LDST_H */
6 changes: 4 additions & 2 deletions host/include/loongarch64/host/bufferiszero.c.inc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ static bool buffer_is_zero_lsx(const void *buf, size_t len)
"2:"
: "=&r"(ret), "+r"(p)
: "r"(buf), "r"(e), "r"(l)
: "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "fcc0");
: "$f0", "$f1", "$f2", "$f3", "$f4", "$f5", "$f6", "$f7", "$f8",
"$fcc0");

return ret;
}
Expand Down Expand Up @@ -119,7 +120,8 @@ static bool buffer_is_zero_lasx(const void *buf, size_t len)
"3:"
: "=&r"(ret), "+r"(p)
: "r"(buf), "r"(e), "r"(l)
: "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "fcc0");
: "$f0", "$f1", "$f2", "$f3", "$f4", "$f5", "$f6", "$f7", "$f8",
"$fcc0");

return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion host/include/loongarch64/host/load-extract-al16-al8.h.inc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static inline uint64_t load_atom_extract_al16_or_al8(void *pv, int s)
asm("vld $vr0, %2, 0\n\t"
"vpickve2gr.d %0, $vr0, 0\n\t"
"vpickve2gr.d %1, $vr0, 1"
: "=r"(l), "=r"(h) : "r"(ptr_align), "m"(*ptr_align) : "f0");
: "=r"(l), "=r"(h) : "r"(ptr_align), "m"(*ptr_align) : "$f0");

return (l >> shr) | (h << (-shr & 63));
}
Expand Down
39 changes: 30 additions & 9 deletions hw/9pfs/9p.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,16 +434,24 @@ void coroutine_fn v9fs_reclaim_fd(V9fsPDU *pdu)
V9fsFidState *f;
GHashTableIter iter;
gpointer fid;
int err;
int nclosed = 0;

/* prevent multiple coroutines running this function simultaniously */
if (s->reclaiming) {
return;
}
s->reclaiming = true;

g_hash_table_iter_init(&iter, s->fids);

QSLIST_HEAD(, V9fsFidState) reclaim_list =
QSLIST_HEAD_INITIALIZER(reclaim_list);

/* Pick FIDs to be closed, collect them on reclaim_list. */
while (g_hash_table_iter_next(&iter, &fid, (gpointer *) &f)) {
/*
* Unlink fids cannot be reclaimed. Check
* for them and skip them. Also skip fids
* Unlinked fids cannot be reclaimed, skip those, and also skip fids
* currently being operated on.
*/
if (f->ref || f->flags & FID_NON_RECLAIMABLE) {
Expand Down Expand Up @@ -493,23 +501,34 @@ void coroutine_fn v9fs_reclaim_fd(V9fsPDU *pdu)
}
}
/*
* Now close the fid in reclaim list. Free them if they
* are already clunked.
* Close the picked FIDs altogether on a background I/O driver thread. Do
* this all at once to keep latency (i.e. amount of thread hops between main
* thread <-> fs driver background thread) as low as possible.
*/
v9fs_co_run_in_worker({
QSLIST_FOREACH(f, &reclaim_list, reclaim_next) {
err = (f->fid_type == P9_FID_DIR) ?
s->ops->closedir(&s->ctx, &f->fs_reclaim) :
s->ops->close(&s->ctx, &f->fs_reclaim);
if (!err) {
/* total_open_fd must only be mutated on main thread */
nclosed++;
}
}
});
total_open_fd -= nclosed;
/* Free the closed FIDs. */
while (!QSLIST_EMPTY(&reclaim_list)) {
f = QSLIST_FIRST(&reclaim_list);
QSLIST_REMOVE(&reclaim_list, f, V9fsFidState, reclaim_next);
if (f->fid_type == P9_FID_FILE) {
v9fs_co_close(pdu, &f->fs_reclaim);
} else if (f->fid_type == P9_FID_DIR) {
v9fs_co_closedir(pdu, &f->fs_reclaim);
}
/*
* Now drop the fid reference, free it
* if clunked.
*/
put_fid(pdu, f);
}

s->reclaiming = false;
}

/*
Expand Down Expand Up @@ -4291,6 +4310,8 @@ int v9fs_device_realize_common(V9fsState *s, const V9fsTransport *t,
s->ctx.fst = &fse->fst;
fsdev_throttle_init(s->ctx.fst);

s->reclaiming = false;

rc = 0;
out:
if (rc) {
Expand Down
1 change: 1 addition & 0 deletions hw/9pfs/9p.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ struct V9fsState {
uint64_t qp_ndevices; /* Amount of entries in qpd_table. */
uint16_t qp_affix_next;
uint64_t qp_fullpath_next;
bool reclaiming;
};

/* 9p2000.L open flags */
Expand Down
6 changes: 5 additions & 1 deletion hw/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ config ZYNQ
select PL330
select SDHCI
select SSI_M25P80
select USB_EHCI_SYSBUS
select USB_CHIPIDEA
select XILINX # UART
select XILINX_AXI
select XILINX_SPI
Expand Down Expand Up @@ -491,6 +491,7 @@ config FSL_IMX25
select IMX
select IMX_FEC
select IMX_I2C
select USB_CHIPIDEA
select WDT_IMX2
select SDHCI

Expand Down Expand Up @@ -518,6 +519,7 @@ config FSL_IMX6
select PL310 # cache controller
select PCI_EXPRESS_DESIGNWARE
select SDHCI
select USB_CHIPIDEA

config ASPEED_SOC
bool
Expand Down Expand Up @@ -576,6 +578,7 @@ config FSL_IMX7
select PCI_EXPRESS_DESIGNWARE
select SDHCI
select UNIMP
select USB_CHIPIDEA

config ARM_SMMUV3
bool
Expand All @@ -591,6 +594,7 @@ config FSL_IMX6UL
select IMX_I2C
select WDT_IMX2
select SDHCI
select USB_CHIPIDEA
select UNIMP

config MICROBIT
Expand Down
Loading
Loading