From: Matheus Ferst
Change VSX Scalar Multiply-Add/Subtract Type-A/M Single Precision
helpers to use float64r32_muladd. This method should correctly handle
all rounding modes, so the workaround for float_round_nearest_even can
be dropped.
Reviewed-by: Richard Henderson
Signed-off-by: Matheus Fe
From: Matheus Ferst
LLVM/Clang does not support __builtin_mtfsf.
Acked-by: Alex Bennée
Signed-off-by: Matheus Ferst
---
tests/tcg/ppc64le/mtfsf.c | 19 +--
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/tests/tcg/ppc64le/mtfsf.c b/tests/tcg/ppc64le/mtfsf.c
inde
From: Matheus Ferst
As the configuration scripts used -mbig and -mlittle, building PPC tests
with Clang was silently skipped. With the patch to fix these options[1],
"make check-tcg" fails because of build and runtime errors. This patch
series tries to fix some of these problems.
The first patch
On Wed, Dec 22, 2021 at 11:05:15AM -0800, Steve Sistare wrote:
> Allocate anonymous memory using memfd_create if the memfd-alloc machine
> option is set.
>
> Signed-off-by: Steve Sistare
> ---
> hw/core/machine.c | 19 +++
> include/hw/boards.h | 1 +
> qemu-options.hx |
This adds the missing bits to support FUSE_SYNCFS in the case submounts
aren't announced to the client.
Iterate over all submounts and call syncfs() on them. Since syncfs() can
block for an indefinite time, we cannot call it with lo->mutex held as
it would prevent the server to process other reque
If the server doesn't announce submounts to the client, it needs to
track them internally to properly support FUSE_SYNCFS. lo_do_lookup()
already knows how to detect them : it is a directory with a different
device ID or mount ID than its parent. Use the same logic and put
submount inodes into a de
This is the current patches I have : one to track submounts
and the other to call syncfs() on them. Tested on simple
cases only.
I won't be able to work on this anymore, so I'm posting for the
records. Anyone is welcome to pick it up as there won't be a v2
from my side.
Cheers,
--
Greg
Greg Kur
Am 16.02.2022 um 11:53 hat Hanna Reitz geschrieben:
> bdrv_refresh_limits() recurses down to the node's children. That does
> not seem necessary: When we refresh limits on some node, and then
> recurse down and were to change one of its children's BlockLimits, then
> that would mean we noticed the
On Sun, 27 Feb 2022 at 18:36, Richard Henderson
wrote:
>
> On 2/27/22 02:54, Peter Maydell wrote:
> >>> +if (size) {
> >>> +ptr = _aligned_malloc(size, alignment);
> >>> +} else {
> >>> +ptr = NULL;
> >>> +}
> >>
> >> Oh, should we set errno to something here?
> >> Othe
To implement this, we reuse the existing daemonizing functions from the
system emulator, which mainly do the following:
- Fork off a child process, and set up a pipe between parent and child
- The parent process waits until the child sends a status byte over the
pipe (0 means that the child was s
> Too many changes in one patch.
> You need to split these into smaller, logical units.
Can you give some guideline on that?
IE: change to two, the shifts and reversed loads into two patches or more
on line count of each patch?
.
> Tabs, and more later.
The tabs should not happen at all, I disa
In contrast to qemu-nbd (where it is called --fork) and the system
emulator, QSD does not have a --daemonize switch yet. Just like them,
QSD allows setting up block devices and exports on the command line.
When doing so, it is often necessary for whoever invoked the QSD to wait
until these exports
Hi,
v1 cover letter:
https://lists.nongnu.org/archive/html/qemu-block/2021-12/msg00499.html
In v2, I followed Vladimir’s suggestion to look into whether we could
reuse os_daemonize(). Indeed we can, and it makes patch 3 (formerly 2)
much simpler!
I decided to leave patch 2 (formerly 1) largel
185 tests quitting qemu while a block job is active. It does not
specifically test quitting qemu while a mirror or active commit job is
in its READY phase.
Add two test cases for this, where we respectively mirror or commit to
an external QSD instance, which provides a throttled block device. qe
The daemonizing functions in os-posix (os_daemonize() and
os_setup_post()) only daemonize the process if the static `daemonize`
variable is set. Right now, it can only be set by os_parse_cmd_args().
In order to use os_daemonize() and os_setup_post() from the storage
daemon to have it be daemonize
On Mon, Feb 28, 2022 at 8:06 AM Jason Wang wrote:
>
>
> 在 2022/2/27 下午9:41, Eugenio Pérez 写道:
> > This tree is able to look for a translated address from an IOVA address.
> >
> > At first glance it is similar to util/iova-tree. However, SVQ working on
> > devices with limited IOVA space need more
On 3/3/2022 11:21 AM, Peter Maydell wrote:
> On Thu, 3 Mar 2022 at 15:55, Steven Sistare wrote:
>>
>> On 2/24/2022 1:42 PM, Peter Maydell wrote:
>>> ...it also seems to be making a no-change-of-behaviour rewrite
>>> of the rest of the file. Is there a reason I'm missing for doing
>>> that ?
>
>>
On 3/3/22 15:41, Philippe Mathieu-Daudé wrote:
On 23/2/22 10:07, Damien Hedde wrote:
Add the property to configure a the base address of the ram.
The default value remains zero.
This commit is needed to use the 'none' machine as a base, and
subsequently to dynamically populate it using qapi
Hi
On Thu, Mar 3, 2022 at 6:41 PM Eric Auger wrote:
> Hi Stefan,
>
> On 2/8/22 6:58 PM, Eric Auger wrote:
> > Hi Stefan,
> >
> > On 2/8/22 6:16 PM, Stefan Berger wrote:
> >>
> >> On 2/8/22 08:38, Eric Auger wrote:
> >>> Representing the CRB cmd/response buffer as a standard
> >>> RAM region caus
On Tue, 01 Mar 2022 15:32:02 +
Alex Bennée wrote:
> Jonathan Cameron writes:
>
> > From: Ben Widawsky
> >
> > This is the beginning of implementing mailbox support for CXL 2.0
> > devices. The implementation recognizes when the doorbell is rung,
> > handles the command/payload, clears the
Based-on: 20220227182125.21809-1-richard.hender...@linaro.org
("target/nios2: Rewrite interrupt handling")
Implement nios2 Shadow register set, EIC and VIC.
Currently nios2 on QEMU contains an internal Interrupt Controller.
The nios2 architecture can support a more powerful External Interrupt
Con
On Thu, 3 Mar 2022 at 15:43, Richard Henderson
wrote:
>
> On 3/3/22 05:04, Peter Maydell wrote:
> >> if (USE_GUEST_BASE) {
> >> tcg_out_qemu_ld_direct(s, memop, ext, data_reg,
> >> - TCG_REG_GUEST_BASE, otype, addr_reg);
> >> +
Implement shadow register set and related instructions
rdprs, wrprs. Fix eret to update either status or sstatus
according to current register set.
eret also changes register set when needed.
Signed-off-by: Amir Gonnen
---
target/nios2/cpu.c | 1 +
target/nios2/cpu.h | 48 ++
On 3/3/22 01:37, Peter Maydell wrote:
For VLD1/VST1 (single element to one lane) we are only accessing one
register, and so the 'stride' is meaningless. The bits that would
specify stride (insn bit [4] for size=1, bit [6] for size=2) are
specified to be zero in the encoding (which would correspo
This validates that connections to an NBD server running on a UNIX
socket can use TLS with pre-shared keys (PSK).
Signed-off-by: Daniel P. Berrangé
---
tests/qemu-iotests/233| 28
tests/qemu-iotests/233.out| 17 +
tests/qemu-iotests/common
On 3/3/22 16:35, Daniel Henrique Barboza wrote:
Some ppc64 hosts (e.g. IBM POWER hosts) aren't able to run the e500
machine using KVM accel. Skip this test if TCG accel isn't available.
Cc: Cleber Rosa
Signed-off-by: Daniel Henrique Barboza
Reviewed-by: Cédric Le Goater
Thanks,
C.
---
On 3/3/22 16:35, Daniel Henrique Barboza wrote:
The PowerNV8/9 machines does not work with KVM acceleration, meaning
that boot_linux_console.py:BootLinuxConsole.test_ppc_powernv8/9 tests
will always fail when QEMU is compiled with --disable-tcg:
ERROR 1-tests/avocado/boot_linux_console.py:BootLi
This validates that connections to an NBD server where the certificate
hostname does not match will fail. It further validates that using the
new 'tls-hostname' override option can solve the failure.
Signed-off-by: Daniel P. Berrangé
---
tests/qemu-iotests/233| 18 ++
tes
Using standard filters is more future proof than rolling our own.
Signed-off-by: Daniel P. Berrangé
---
tests/qemu-iotests/233 | 29 -
tests/qemu-iotests/233.out | 9 -
2 files changed, 16 insertions(+), 22 deletions(-)
diff --git a/tests/qemu-iotests/23
When developing an I/O test it is typical to add some logic to the
test script, run it to view the output diff, and then apply the
output diff to the reference file. This can be drastically simplified
by letting the test runner update the reference file in place.
By setting 'QEMU_IOTESTS_REGEN=1',
The TLS usage for NBD was restricted to IP sockets because validating
x509 certificates requires knowledge of the hostname that the client
is connecting to.
TLS does not have to use x509 certificates though, as PSK (pre-shared
keys) provide an alternative credential option. These have no
requireme
On Thu, 3 Mar 2022 at 15:55, Steven Sistare wrote:
>
> On 2/24/2022 1:42 PM, Peter Maydell wrote:
> > ...it also seems to be making a no-change-of-behaviour rewrite
> > of the rest of the file. Is there a reason I'm missing for doing
> > that ?
> I'll change the commit message to explain:
>
>
This validates that connections to an NBD server running on a UNIX
socket can use TLS, and require a TLS hostname override to pass
certificate validation.
Signed-off-by: Daniel P. Berrangé
---
tests/qemu-iotests/233 | 24
tests/qemu-iotests/233.out | 15 +
When using the --list option, qemu-nbd acts as an NBD client rather
than a server. As such when using TLS, it has a need to validate
the server certificate. This adds a --tls-hostname option which can
be used to override the default hostname used for certificate
validation.
Signed-off-by: Daniel P
In
commit a71d597b989fd701b923f09b3c20ac4fcaa55e81
Author: Vladimir Sementsov-Ogievskiy
Date: Thu Jun 10 13:08:00 2021 +0300
block/nbd: reuse nbd_co_do_establish_connection() in nbd_open()
the use of the 'hostname' field from the BDRVNBDState struct was
lost, and 'nbd_connect' just
Introduce a filter for the output of qemu-nbd export list so it can be
reused in multiple tests.
The filter is a bit more permissive that what test 241 currently uses,
as its allows printing of the export count, along with any possible
error messages that might be emitted.
Signed-off-by: Daniel P
When connecting to an NBD server with TLS and x509 credentials,
the client must validate the hostname it uses for the connection,
against that published in the server's certificate. If the client
is tunnelling its connection over some other channel, however, the
hostname it uses may not match the i
This series was principally motivated by a desire to enabl use of TLS
on non-TCP transports. For x509 certificates this means we need a way
to set the hostname to use for validation. This also lets us override
the hostname when connecting on a TCP transport that is tunnelled or
port-forwarded. It a
On 3/3/22 01:37, Peter Maydell wrote:
For VLD3 (single 3-element structure to one lane), there is no
alignment specification and the alignment bits in the instruction
must be zero. This is bit [4] for the size=0 and size=1 cases, and
bits [5:4] for the size=2 case. We do this check correctly in
Some tests will want to use 'localhost' instead of '127.0.0.1', and
some will use the image options syntax rather than the classic URI
syntax.
Signed-off-by: Daniel P. Berrangé
---
tests/qemu-iotests/common.filter | 4
1 file changed, 4 insertions(+)
diff --git a/tests/qemu-iotests/common.
Currently the TLS session object assumes that the caller will always
provide a hostname when using x509 creds on a client endpoint. This
relies on the caller to detect and report an error if the user has
configured QEMU with x509 credentials on a UNIX socket. The migration
code has such a check, bu
On 2/24/2022 12:56 PM, Dr. David Alan Gilbert wrote:
> * Steve Sistare (steven.sist...@oracle.com) wrote:
>> Allocate anonymous memory using memfd_create if the memfd-alloc machine
>> option is set.
>>
>> Signed-off-by: Steve Sistare
>
> So other than the minor error nit that Guoyi spotted, I thi
On 2/24/2022 1:51 PM, Dr. David Alan Gilbert wrote:
> * Steve Sistare (steven.sist...@oracle.com) wrote:
>> If qemu starts and loads a VM in the suspended state, then a later wakeup
>> request will set the state to running, which is not sufficient to initialize
>> the vm, as vm_start was never call
On 2/18/2022 4:43 AM, Guoyi Tu wrote:
> On Wed, 2021-12-22 at 11:05 -0800, Steve Sistare wrote:
>> Add the only-cpr-capable option, which causes qemu to exit with an
>> error
>> if any devices that are not capable of cpr are added. This
>> guarantees that
>> a cpr-exec operation will not fail with
Demonstrate how to use nios2 VIC on a machine.
Introduce a new machine "10m50-ghrd-vic" which is based on "10m50-ghrd"
with a VIC attached and internal interrupt controller removed.
When VIC is present, irq0 connects the VIC to the cpu, intc_present
is set to false to disable the internal interrup
On 2/18/2022 4:03 AM, Guoyi Tu wrote:
> On Wed, 2021-12-22 at 11:05 -0800, Steve Sistare wrote:
>> Save accepted socket fds before cpr-save, and look for them after
>> cpr-load.
>> in the environment after cpr-load. Reject cpr-exec if a socket
>> enables
>> the TLS or websocket option. Allow a mo
On 2/18/2022 3:05 AM, Guoyi Tu wrote:
> On Wed, 2021-12-22 at 11:05 -0800, Steve Sistare wrote:
>> Allocate anonymous memory using memfd_create if the memfd-alloc
>> machine
>> option is set.
>>
>> Signed-off-by: Steve Sistare
>> ---
>> hw/core/machine.c | 19 +++
>> include/hw/
On 2/24/2022 1:25 PM, Dr. David Alan Gilbert wrote:
> * Steve Sistare (steven.sist...@oracle.com) wrote:
>> Use qemu_file_open to simplify a few functions in savevm.c.
>> No functional change.
>>
>> Signed-off-by: Steve Sistare
>
> So I think this is mostly OK, but a couple of minor tidyups below
On Tue, Mar 1, 2022 at 11:21 AM Akihiko Odaki
wrote:
> On 2022/03/01 17:09, Vladislav Yaroshchuk wrote:
> > > Not sure that only one field is enough, cause
> > > we may have two states on bh execution start:
> > > 1. There are packets in vmnet buffer s->packets_buf
> > >
Implement nios2 Vectored Interrupt Controller (VIC).
VIC is connected to EIC. It needs to update rha, ril, rrs and rnmi
fields on Nios2CPU before raising an IRQ.
For that purpose, VIC has a "cpu" property which should refer to the
nios2 cpu and set by the board that connects VIC.
Signed-off-by: Am
On 3/3/22 05:04, Peter Maydell wrote:
if (USE_GUEST_BASE) {
tcg_out_qemu_ld_direct(s, memop, ext, data_reg,
- TCG_REG_GUEST_BASE, otype, addr_reg);
+ TCG_REG_GUEST_BASE, option, addr_reg);
} else {
tcg_out
On 2/24/2022 1:21 PM, Dr. David Alan Gilbert wrote:
> * Steve Sistare (steven.sist...@oracle.com) wrote:
>> Add qemu_file_open and qemu_fd_open to create QEMUFile objects for unix
>> files and file descriptors.
>>
>> Signed-off-by: Steve Sistare
>> ---
>> migration/qemu-file-channel.c | 36 ++
On Wed, 2 Mar 2022 at 21:38, Mark Cave-Ayland
wrote:
>
> This involves (re)adding a PDMA-specific subsection to hold the reference to
> the
> current PDMA callback.
>
> Signed-off-by: Mark Cave-Ayland
> ---
> hw/scsi/esp.c | 23 +++
> 1 file changed, 23 insertions(+)
>
> dif
Implement Exteral Interrupt Controller interface (EIC).
Added intc_present property, true by default. When set to false, nios2
uses the EIC interface when handling IRQ. When set to true (default)
it uses the internal interrupt controller.
When nios2 recieves irq, it first checks intc_present to dec
On 2/24/2022 1:42 PM, Peter Maydell wrote:
> On Wed, 22 Dec 2021 at 19:45, Steve Sistare wrote:
>>
>> Include CONFIG_DEVICES so that populate_vfio_info is instantiated for
>> CONFIG_VFIO.
>
> The commit message says "include CONFIG_DEVICES"...
>
>> Signed-off-by: Steve Sistare
>> ---
>> migrat
The icount framework relies on TCG availability. If QEMU is built with
--disable-tcg we won't have icount either, and then this test will fail
with the following message in an IBM POWER9 host:
tests/avocado/replay_kernel.py:ReplayKernelNormal.test_ppc64_pseries:
ERROR: ConnectError: Failed to esta
'boot-serial-test' does not work with a QEMU built with --disable-tcg in
a IBM POWER9 host. The reason is that without TCG QEMU will default to
KVM acceleration, but then the KVM module in IBM POWER hosts aren't able
to handle other CPUs.
The result is that the test will break with a KVM error whe
eret instruction is only allowed in supervisor mode.
Signed-off-by: Amir Gonnen
---
target/nios2/translate.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/target/nios2/translate.c b/target/nios2/translate.c
index ce3aacf59d..007c17e6e9 100644
--- a/target/nios2/translate.c
+++ b/target/n
Some ppc64 hosts (e.g. IBM POWER hosts) aren't able to run the e500
machine using KVM accel. Skip this test if TCG accel isn't available.
Cc: Cleber Rosa
Signed-off-by: Daniel Henrique Barboza
---
tests/avocado/boot_linux_console.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/av
On 2/24/2022 1:28 PM, Dr. David Alan Gilbert wrote:
> * Steve Sistare (steven.sist...@oracle.com) wrote:
>> Add a function that returns an error if any ram_list block represents
>> volatile memory.
>>
>> Signed-off-by: Steve Sistare
>> ---
>> include/exec/memory.h | 8
>> softmmu/memory
The PowerNV8/9 machines does not work with KVM acceleration, meaning
that boot_linux_console.py:BootLinuxConsole.test_ppc_powernv8/9 tests
will always fail when QEMU is compiled with --disable-tcg:
ERROR 1-tests/avocado/boot_linux_console.py:BootLinuxConsole.test_ppc_powernv8
-> VMLaunchFailure: C
Hi,
'make check' and 'make check-avocado' in a ppc64 host, using a QEMU
built with --disable-tcg, fails in a handful of tests/files due to the
lack of TCG support not being accounted for. The tests usually fall back
to KVM acceleration, and when running in an IBM POWER server this accel
type isn't
'prom-env-test' is a TCG test that will fail if QEMU is compiled with
--disable-tcg:
$ QTEST_QEMU_BINARY=./qemu-system-ppc64 ./tests/qtest/prom-env-test
/ppc64/prom-env/mac99: qemu-system-ppc64: -accel tcg: invalid accelerator tcg
(... hangs indefinitely ...)
Fix it by checking CONFIG_TCG before
On Thu, 3 Mar 2022 at 15:25, Peter Maydell wrote:
>
> On Wed, 2 Mar 2022 at 21:31, Mark Cave-Ayland
> wrote:
> >
> > The MacOS toolbox ROM accesses a number of addresses between 0x0 and 0x200
> > during
> > initialisation and resolution changes. Whilst the function of many of these
> > registers
Signed-off-by: Emanuele Giuseppe Esposito
---
block.c| 17 +
block/create.c | 2 ++
2 files changed, 19 insertions(+)
diff --git a/block.c b/block.c
index 4a3447b2a0..5afdbe3060 100644
--- a/block.c
+++ b/block.c
@@ -529,6 +529,7 @@ static void coroutine_fn bdrv_create_c
On Wed, 2 Mar 2022 at 21:41, Mark Cave-Ayland
wrote:
>
> Currently when QEMU tries to migrate the macfb framebuffer it crashes randomly
> because the opaque provided by the DeviceClass vmsd property for both devices
> is set to MacfbState rather than MacfbNubusState or MacfbSysBusState as
> approp
On Wed, 2 Mar 2022 at 21:31, Mark Cave-Ayland
wrote:
>
> These fields are required in the migration stream to restore macfb state
> correctly.
>
> Signed-off-by: Mark Cave-Ayland
> ---
> hw/display/macfb.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/display/macfb.c b/hw/display
Assertions in the callers of the function pointrs are already
added by previous patches.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Philippe Mathieu-Daudé
---
include/sysemu/block-backend-common.h | 28 ++-
1 file changed, 23 ins
The job API will be handled separately in another serie.
Signed-off-by: Emanuele Giuseppe Esposito
---
include/qemu/job.h | 22 ++
1 file changed, 22 insertions(+)
diff --git a/include/qemu/job.h b/include/qemu/job.h
index 6e67b6977f..c105b31076 100644
--- a/include/qemu/job
Snapshots run also under the BQL, so they all are
in the global state API. The aiocontext lock that they hold
is currently an overkill and in future could be removed.
Signed-off-by: Emanuele Giuseppe Esposito
---
block/snapshot.c | 28
include/block/snapshot.
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-backend.c | 3 +++
blockdev.c| 16
2 files changed, 19 insertions(+)
diff --git a/block/block-backend.c b/block/block-backend.c
index 2ab1274dfe..bf77c4a8fa 100644
--- a/block/block-backend.c
+++ b/block/bloc
Signed-off-by: Emanuele Giuseppe Esposito
---
job.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/job.c b/job.c
index 54db80df66..075c6f3a20 100644
--- a/job.c
+++ b/job.c
@@ -381,6 +381,8 @@ void job_ref(Job *job)
void job_unref(Job *job)
{
+GLOBAL_STATE_CODE();
+
On Wed, 2 Mar 2022 at 21:35, Mark Cave-Ayland
wrote:
>
> If booting Linux directly in the q800 machine using -kernel rather than using
> a
> MacOS toolbox ROM, the mode control registers are never initialised,
> causing macfb_mode_write() to fail to determine the current resolution after
> migrat
copy-before-write functions always run under BQL.
Signed-off-by: Emanuele Giuseppe Esposito
---
block/copy-before-write.c | 2 ++
block/copy-before-write.h | 7 +++
2 files changed, 9 insertions(+)
diff --git a/block/copy-before-write.c b/block/copy-before-write.c
index c30a5ff8de..80b7684d
Similar to the header split, also the function pointers in BlockDriver
can be split in I/O and global state.
Signed-off-by: Emanuele Giuseppe Esposito
---
include/block/block_int-common.h | 445 ---
1 file changed, 237 insertions(+), 208 deletions(-)
diff --git a/inc
blockdev functions run always under the BQL lock.
Signed-off-by: Emanuele Giuseppe Esposito
---
include/sysemu/blockdev.h | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h
index f9fb54d437..3211b16513 100644
-
On Wed, 2 Mar 2022 at 21:31, Mark Cave-Ayland
wrote:
>
> The MacOS toolbox ROM accesses a number of addresses between 0x0 and 0x200
> during
> initialisation and resolution changes. Whilst the function of many of these
> registers is unknown, it is worth the minimal cost of saving these extra
>
block coroutines functions run in different aiocontext, and are
not protected by the BQL. Therefore are I/O.
On the other side, generated_co_wrapper functions use BDRV_POLL_WHILE,
meaning the caller can either be the main loop or a specific iothread.
Signed-off-by: Emanuele Giuseppe Esposito
---
Following the assertion derived from the API split,
propagate the assertion also in the static functions.
Signed-off-by: Emanuele Giuseppe Esposito
---
block.c | 46 ++-
block/block-backend.c | 3 +++
2 files changed, 48 insertions(+), 1 del
Mark all I/O functions with IO_CODE, and all "I/O OR GS" with
IO_OR_GS_CODE.
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-backend.c | 58 +++
include/sysemu/block-backend-io.h | 2 ++
2 files changed, 60 insertions(+)
diff --git a/block/bloc
Signed-off-by: Emanuele Giuseppe Esposito
---
blockjob.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/blockjob.c b/blockjob.c
index d79a52d204..4868453d74 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -62,6 +62,7 @@ static bool is_block_job(Job *job)
BlockJob *block_job_next(Bl
Signed-off-by: Emanuele Giuseppe Esposito
---
include/block/block_int-common.h | 81 ++--
1 file changed, 47 insertions(+), 34 deletions(-)
diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h
index f05ebb0da3..5a04c778e4 100644
--- a/inclu
Signed-off-by: Emanuele Giuseppe Esposito
---
block.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/block.c b/block.c
index 5afdbe3060..01811d6519 100644
--- a/block.c
+++ b/block.c
@@ -1497,7 +1497,7 @@ const BdrvChildClass child_of_bds = {
AioContext *bdrv_chi
Allow writable exports to get BLK_PERM_RESIZE permission
from creation, in fuse_export_create().
In this way, there is no need to give the permission in
fuse_do_truncate(), which might be run in an iothread.
Permissions should be set only in the main thread, so
in any case if an iothread tries to
blockjob functions run always under the BQL lock.
Signed-off-by: Emanuele Giuseppe Esposito
---
include/block/blockjob.h | 29 ++---
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/include/block/blockjob.h b/include/block/blockjob.h
index 87fbb3985f..6525e1
Signed-off-by: Emanuele Giuseppe Esposito
---
blockjob.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/blockjob.c b/blockjob.c
index 10815a89fe..d79a52d204 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -84,6 +84,7 @@ BlockJob *block_job_get(const char *id)
void block_job_free(Job *job)
Since the I/O functions are not many, keep a single file.
Also split the function pointers in BlockJobDriver.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Stefan Hajnoczi
---
include/block/blockjob_int.h | 28
1 file changed, 28 insertions(+)
diff --git a
Mark all I/O functions with IO_CODE, and all "I/O OR GS" with
IO_OR_GS_CODE.
Signed-off-by: Emanuele Giuseppe Esposito
---
block.c | 14 +-
block/block-backend.c| 2 ++
block/dirty-bitmap.c | 3 +++
block/io.c | 13
Mark all I/O functions with IO_CODE, and all "I/O OR GS" with
IO_OR_GS_CODE.
Signed-off-by: Emanuele Giuseppe Esposito
---
block.c | 38 ++-
block/dirty-bitmap.c | 1 +
block/io.c | 43 ++--
i
Similarly to the previous patches, split block-backend.h
in block-backend-io.h and block-backend-global-state.h
In addition, remove "block/block.h" include as it seems
it is not necessary anymore, together with "qemu/iov.h"
block-backend-common.h contains the structures shared between
the two hea
We want to be sure that the functions that write the child and
parent list of a bs are under BQL and drain.
BQL prevents from concurrent writings from the GS API, while
drains protect from I/O.
TODO: drains are missing in some functions using this assert.
Therefore a proper assertion will fail. B
block.h currently contains a mix of functions:
some of them run under the BQL and modify the block layer graph,
others are instead thread-safe and perform I/O in iothreads.
Some others can only be called by either the main loop or the
iothread running the AioContext (and not other iothreads),
and u
Similarly to the previous patch, split block_int.h
in block_int-io.h and block_int-global-state.h
block_int-common.h contains the structures shared between
the two headers, and the functions that can't be categorized as
I/O or global state.
Assertions are added in the next patch.
Signed-off-by:
Righ now, IO_CODE and IO_OR_GS_CODE are nop, as there isn't
really a way to check that a function is only called in I/O.
On the other side, we can use qemu_in_main_thread() to check if
we are in the main loop.
The usage of macros makes easy to extend them in the future without
making changes in al
Currently, block layer APIs like block.h contain a mix of
functions that are either running in the main loop and under the
BQL, or are thread-safe functions and run in iothreads performing I/O.
The functions running under BQL also take care of modifying the
block graph, by using drain and/or aio_co
Signed-off-by: Emanuele Giuseppe Esposito
---
block.c | 15 +++
block/backup.c | 1 +
block/block-backend.c | 3 +++
block/commit.c | 2 ++
block/dirty-bitmap.c| 1 +
block/io.c |
Now that we "covered" the three main cases where the
permission API was being used under BQL (fuse,
amend and invalidate_cache), we can safely assert for
the permission functions implemented in block.c
Signed-off-by: Emanuele Giuseppe Esposito
---
block.c | 12
1 file changed, 12 in
When invoked from the main loop, this function is the same
as qemu_mutex_iothread_locked, and returns true if the BQL is held.
When invoked from iothreads or tests, it returns true only
if the current AioContext is the Main Loop.
This essentially just extends qemu_mutex_iothread_locked to work
als
On Sun, 27 Feb 2022 at 02:08, Richard Henderson
wrote:
>
> When TCG_TARGET_SIGNED_ADDR32 is set, adjust the tlb addend to
> allow the 32-bit guest address to be sign extended within the
> 64-bit host register instead of zero extended.
>
> This will simplify tcg hosts like MIPS, RISC-V, and LoongAr
All the global state (GS) API functions will check that
qemu_in_main_thread() returns true. If not, it means
that the safety of BQL cannot be guaranteed, and
they need to be moved to I/O.
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-backend.c | 78 ++
201 - 300 of 382 matches
Mail list logo