On 210624 1012, Philippe Mathieu-Daudé wrote:
> On 6/24/21 4:50 AM, Alexander Bulekov wrote:
> > On 210623 2000, Philippe Mathieu-Daudé wrote:
> >> Hi Ubi-Wan Kenubi and Tom,
> >>
> >> In commit a9bcedd (SD card size has to be power of 2) we decided
> >> to restrict SD card size to avoid security p
On Sat, Jun 26, 2021 at 1:17 AM Philippe Mathieu-Daudé wrote:
>
> On 6/25/21 3:49 PM, Bin Meng wrote:
> > On Thu, Jun 24, 2021 at 10:28 PM Philippe Mathieu-Daudé
> > wrote:
> >>
> >> Signed-off-by: Philippe Mathieu-Daudé
> >> ---
> >> hw/sd/sd.c | 21 -
> >> 1 file changed,
On Thu, Jun 17, 2021 at 09:06:46PM +0200, Klaus Jensen wrote:
> From: Klaus Jensen
>
> This series reimplements flush, dsm, copy, zone reset and format nvm to
> allow cancellation. I posted an RFC back in March ("hw/block/nvme:
> convert ad-hoc aio tracking to aiocb") and I've applied some feedba
As a convenience, since iotests is an extremely prominent user of the
qemu.qmp and qemu.machine packages and already implements a linting
regime, run those tests as well so that it's very hard to miss
regressions caused by changes to the python library.
Signed-off-by: John Snow
---
python/tests/
Add a main() function to linters.py so that the Python CI infrastructure
has something it can run.
Now, linters.py represents an invocation of the linting scripts that
more resembles a "normal" execution of pylint/mypy, like you'd expect to
use if 'qemu' was a bona-fide package you obtained from P
Split the linter execution itself out from 297, leaving just environment
setup in 297. This is done so that non-iotest code can invoke the
linters without needing to worry about imports of unpackaged iotest
code.
Eventually, it should be possible to replace linters.py with mypy.ini
and pylintrc fi
Allow run_linters to work well if it's executed from a different
directory.
Signed-off-by: John Snow
---
tests/qemu-iotests/297 | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297
index c7428af901..1e8334d1d4 100755
--- a/tests/qemu-iotests/297
Instead of running "run_linters" directly, create a main() function that
will be responsible for environment setup, leaving run_linters()
responsible only for execution of the linters.
(That environment setup will be moved over in forthcoming commits.)
Signed-off-by: John Snow
---
tests/qemu-io
This turns run_linters() into a bit of a hybrid test; returning non-zero
on failed execution while also printing diffable information. This is
done for the benefit of the avocado simple test runner, which will soon
be attempting to execute this test from a different environment.
(Note: universal_n
'pylint-3' is another Fedora-ism. Use "python3 -m pylint" or "python3 -m
mypy" to access these scripts instead. This style of invocation will
prefer the "correct" tool when run in a virtual environment.
Note that we still check for "pylint-3" before the test begins -- this
check is now "overly str
Split out file discovery into its own method to begin separating out the
"environment setup" and "test execution" phases.
Signed-off-by: John Snow
---
tests/qemu-iotests/297 | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotest
Move environment setup into main(), leaving pure test execution behind
in run_linters().
Signed-off-by: John Snow
---
tests/qemu-iotests/297 | 36 +---
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297
Add a directory argument to is_python_file to allow it to work correctly
no matter what CWD we happen to run it from. This is done in
anticipation of running the iotests from another directory (./python/).
Signed-off-by: John Snow
---
tests/qemu-iotests/297 | 8 +---
1 file changed, 5 insert
Based-on: <20210625154540.783306-1-js...@redhat.com>
GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-package-iotest
CI: https://gitlab.com/jsnow/qemu/-/pipelines/327413868
Since iotests are such a heavy and prominent user of the Python qemu.qmp
and qemu.machine packages, it would be conveni
On 6/25/21 3:49 PM, Bin Meng wrote:
> On Thu, Jun 24, 2021 at 10:28 PM Philippe Mathieu-Daudé
> wrote:
>>
>> Signed-off-by: Philippe Mathieu-Daudé
>> ---
>> hw/sd/sd.c | 21 -
>> 1 file changed, 12 insertions(+), 9 deletions(-)
>> qemu_log_mask(LOG_GUEST_ERROR, "SD: AC
On Thu, 24 Jun 2021 at 12:43, Max Reitz wrote:
>
> The following changes since commit b22726abdfa54592d6ad88f65b0297c0e8b363e2:
>
> Merge remote-tracking branch
> 'remotes/vivier2/tags/linux-user-for-6.1-pull-request' into staging
> (2021-06-22 16:07:53 +0100)
>
> are available in the Git repo
Signed-off-by: Max Reitz
---
tests/qemu-iotests/tests/fuse-allow-other | 175 ++
tests/qemu-iotests/tests/fuse-allow-other.out | 88 +
2 files changed, 263 insertions(+)
create mode 100755 tests/qemu-iotests/tests/fuse-allow-other
create mode 100644 tests/qemu-iotes
Test that +w on read-only FUSE exports returns an EROFS error. u+x on
the other hand should work. (There is no special reason to choose u+x
here, it simply is like +w another flag that is not set by default.)
Signed-off-by: Max Reitz
---
tests/qemu-iotests/308 | 11 +++
tests/qemu-
We do not do any permission checks in fuse_open(), so let the kernel do
them. We already let fuse_getattr() report the proper UNIX permissions,
so this should work the way we want.
This causes a change in 308's reference output, because now opening a
non-writable export with O_RDWR fails already,
In order to support changing other attributes than the file size in
fuse_setattr(), we have to give each its own independent branch. This
also applies to the only attribute we do support right now.
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
---
block/export/fuse.c | 20 +++---
Without the allow_other mount option, no user (not even root) but the
one who started qemu/the storage daemon can access the export. Allow
users to configure the export such that such accesses are possible.
While allow_other is probably what users want, we cannot make it an
unconditional default,
Hi,
The v1 cover letter is here:
https://lists.nongnu.org/archive/html/qemu-block/2021-06/msg00730.html
In v2, I changed the following:
- default_permissions is now passed always. This is the right thing to
do regardless of whether allow_other is active or not.
- allow_other is no longer a bo
Allow changing the file mode, UID, and GID through SETATTR.
Without allow_other, UID and GID are not allowed to be changed, because
it would not make sense. Also, changing group or others' permissions
is not allowed either.
For read-only exports, +w cannot be set.
Signed-off-by: Max Reitz
---
On Thu, Jun 24, 2021 at 10:28 PM Philippe Mathieu-Daudé wrote:
>
> Signed-off-by: Philippe Mathieu-Daudé
> ---
> hw/sd/sd.c | 28 +++-
> 1 file changed, 15 insertions(+), 13 deletions(-)
>
Reviewed-by: Bin Meng
On Thu, Jun 24, 2021 at 10:29 PM Philippe Mathieu-Daudé wrote:
>
> Signed-off-by: Philippe Mathieu-Daudé
> ---
> hw/sd/sd.c | 24
> 1 file changed, 12 insertions(+), 12 deletions(-)
>
Reviewed-by: Bin Meng
On Thu, Jun 24, 2021 at 10:23 PM Philippe Mathieu-Daudé wrote:
>
> Signed-off-by: Philippe Mathieu-Daudé
> ---
> hw/sd/sd.c | 23 ---
> 1 file changed, 12 insertions(+), 11 deletions(-)
>
Reviewed-by: Bin Meng
On Thu, Jun 24, 2021 at 10:28 PM Philippe Mathieu-Daudé wrote:
>
> Signed-off-by: Philippe Mathieu-Daudé
> ---
> hw/sd/sd.c | 21 -
> 1 file changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
> index 0215bdb3689..2647fd26566 100644
> --- a/hw/s
On Thu, Jun 24, 2021 at 10:23 PM Philippe Mathieu-Daudé wrote:
>
> Log illegal commands as GUEST_ERROR.
>
> Note: we are logging back the SDIO commands (CMD5, CMD52-54).
>
> Signed-off-by: Philippe Mathieu-Daudé
> ---
> hw/sd/sd.c | 57 ++
> 1
On Thu, Jun 24, 2021 at 10:27 PM Philippe Mathieu-Daudé wrote:
>
> Add 2 command handler arrays in SDProto, for CMD and ACMD.
> Have sd_normal_command() / sd_app_command() use these arrays:
> if an command handler is registered, call it, otherwise fall
a command
> back to current code base.
>
>
From: Paolo Bonzini
Reviewed-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
Message-Id: <20210614081130.22134-3-eespo...@redhat.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/block-copy.c | 28 +++-
From: Emanuele Giuseppe Esposito
By adding acquire/release pairs, we ensure that .ret and .error_is_read
fields are written by block_copy_dirty_clusters before .finished is true,
and that they are read by API user after .finished is true.
The atomic here are necessary because the fields are conc
From: Emanuele Giuseppe Esposito
Moving this function in task_end ensures to update the progress
anyways, even if there is an error.
It also helps in next patch, allowing task_end to have only
one critical section.
Reviewed-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Emanuele Giuseppe Espo
From: Emanuele Giuseppe Esposito
co-shared-resource is currently not thread-safe, as also reported
in co-shared-resource.h. Add a QemuMutex because co_try_get_from_shres
can also be invoked from non-coroutine context.
Reviewed-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Emanuele Giuseppe Es
From: Emanuele Giuseppe Esposito
Use a local variable instead of referencing BlockCopyState through a
BlockCopyCallState or BlockCopyTask every time.
This is in preparation for next patches.
No functional change intended.
Reviewed-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Emanuele Giusep
From: Emanuele Giuseppe Esposito
Group various structures fields, to better understand what we need to
protect with a lock and what doesn't need it.
Then, add a CoMutex to protect concurrent access of block-copy
data structures. This mutex also protects .copy_bitmap, because its thread-safe
API d
From: Paolo Bonzini
Put the logic to determine the copy size in a separate function, so
that there is a simple state machine for the possible methods of
copying data from one BlockDriverState to the other.
Use .method instead of .copy_range as in-out argument, and
include also .zeroes as an addi
From: Paolo Bonzini
Reviewed-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
Message-Id: <20210614081130.22134-4-eespo...@redhat.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
blockjob.c | 13 +++--
1 file changed, 3 inser
From: Emanuele Giuseppe Esposito
Progressmeter is protected by the AioContext mutex, which
is taken by the block jobs and their caller (like blockdev).
We would like to remove the dependency of block layer code on the
AioContext mutex, since most drivers and the core I/O code are already
not rel
The following changes since commit e0da9171e02f4534124b9a9e0782b38376c6:
Merge remote-tracking branch 'remotes/kraxel/tags/ui-20210624-pull-request'
into staging (2021-06-25 09:10:37 +0100)
are available in the Git repository at:
ssh://g...@src.openvz.org/~vsementsov/qemu.git tags/pull-
From: Paolo Bonzini
Both users of RateLimit, block-copy.c and blockjob.c, treat
a speed of zero as unlimited, while RateLimit treats it as
"as slow as possible". The latter is nicer from the code
point of view but pretty useless, so disable rate limiting
if a speed of zero is provided.
Reviewed
From: Philippe Mathieu-Daudé
Some machines use floppy controllers via the SysBus interface,
and don't need to pull in all the SysBus code.
Extract the SysBus specific code to a new unit: fdc-sysbus.c,
and add a new Kconfig symbol: "FDC_SYSBUS".
Reviewed-by: John Snow
Acked-by: Mark Cave-Ayland
From: Philippe Mathieu-Daudé
Reviewed-by: John Snow
Acked-by: Mark Cave-Ayland
Reviewed-by: Mark Cave-Ayland
Acked-by: Paolo Bonzini
Signed-off-by: Philippe Mathieu-Daudé
Message-id: 20210614193220.2007159-3-phi...@redhat.com
Signed-off-by: John Snow
---
hw/block/fdc.c| 7 +--
From: Philippe Mathieu-Daudé
isa_superio_realize() calls isa_fdc_init_drives(), which is defined
in hw/block/fdc.c, so ISA_SUPERIO needs to select the FDC symbol.
Reported-by: John Snow
Reviewed-by: Thomas Huth
Acked-by: Paolo Bonzini
Signed-off-by: Philippe Mathieu-Daudé
Message-id: 2021061
From: Philippe Mathieu-Daudé
Change the '-device help' output from:
Storage devices:
name "floppy", bus floppy-bus, desc "virtual floppy drive"
name "isa-fdc", bus ISA
to:
Storage devices:
name "floppy", bus floppy-bus, desc "virtual floppy drive"
name "isa-fdc", bus ISA, desc "vir
From: Philippe Mathieu-Daudé
Some machines use floppy controllers via the SysBus interface,
and don't need to pull in all the ISA code.
Extract the ISA specific code to a new unit: fdc-isa.c, and
add a new Kconfig symbol: "FDC_ISA".
This allows us to remove the FIXME from commit dd0ff8191ab
("isa
From: Philippe Mathieu-Daudé
We want to extract ISA/SysBus code from the generic fdc.c file.
First, declare the prototypes we will access from the new units
into a new local header: "fdc-internal.h".
Acked-by: Mark Cave-Ayland
Reviewed-by: Mark Cave-Ayland
Acked-by: Paolo Bonzini
Signed-off-b
The following changes since commit e0da9171e02f4534124b9a9e0782b38376c6:
Merge remote-tracking branch 'remotes/kraxel/tags/ui-20210624-pull-request'
into staging (2021-06-25 09:10:37 +0100)
are available in the Git repository at:
https://gitlab.com/jsnow/qemu.git tags/floppy-pull-reques
24.06.2021 10:20, Emanuele Giuseppe Esposito wrote:
This serie of patches aims to reduce the usage of the
AioContexlock in block-copy, by introducing smaller granularity
locks thus on making the block layer thread safe.
This serie depends on my previous serie that brings thread safety
to the sma
14.06.2021 11:11, Emanuele Giuseppe Esposito wrote:
This serie of patches bring thread safety to the smaller APIs used by
block-copy, namely ratelimit, progressmeter, co-shared-resource
and aiotask.
The end goal is to reduce the usage of AioContexlock in block-copy,
by introducing smaller granula
24.06.2021 10:20, Emanuele Giuseppe Esposito wrote:
This serie of patches aims to reduce the usage of the
AioContexlock in block-copy, by introducing smaller granularity
locks thus on making the block layer thread safe.
This serie depends on my previous serie that brings thread safety
to the sma
On 25.06.21 10:52, Paolo Bonzini wrote:
On 25/06/21 10:37, Max Reitz wrote:
Thanks, looks good to me, though I’m afraid I’ll be on PTO the next
two weeks so I can’t take this series through my tree... (I don’t
really want to send a pull request today when I probably wouldn’t be
able to deal wi
On 25/06/21 10:37, Max Reitz wrote:
Thanks, looks good to me, though I’m afraid I’ll be on PTO the next two
weeks so I can’t take this series through my tree... (I don’t really
want to send a pull request today when I probably wouldn’t be able to
deal with potential problems)
I can take it to
On 24.06.21 20:04, Paolo Bonzini wrote:
New patches:
- 3/4 (for review comments),
- 9 (split for ease of review),
- 11 (new bugfix)
v1->v2: add missing patch
v2->v3: add max_hw_transfer to BlockLimits
v3->v4: fix compilation after patch 1, tweak commit messages according
to Vladimir's
On 24.06.21 20:04, Paolo Bonzini wrote:
Similar to other handle_aiocb_* functions, handle_aiocb_ioctl needs to cater
for the possibility that ioctl is interrupted by a signal. Otherwise, the
I/O is incorrectly reported as a failure to the guest.
Reported-by: Gordon Watson
Signed-off-by: Paolo
On 6/24/21 8:04 PM, Paolo Bonzini wrote:
> Similar to other handle_aiocb_* functions, handle_aiocb_ioctl needs to cater
> for the possibility that ioctl is interrupted by a signal. Otherwise, the
> I/O is incorrectly reported as a failure to the guest.
>
> Reported-by: Gordon Watson
> Signed-off
On 24.06.21 20:04, Paolo Bonzini wrote:
From: Joelle van Dyne
iOS hosts do not have these defined so we fallback to the
default behaviour.
Co-authored-by: Warner Losh
Signed-off-by: Joelle van Dyne
Signed-off-by: Paolo Bonzini
---
block/file-posix.c | 2 +-
1 file changed, 1 insertion(+)
On 24.06.21 20:04, Paolo Bonzini wrote:
Try all the possible ioctls for disk size as long as they are
supported, to keep the #if ladder simple.
Extracted and cleaned up from a patch by Joelle van Dyne and
Warner Losh.
Signed-off-by: Paolo Bonzini
---
block/file-posix.c | 34 -
On 6/24/21 8:04 PM, Paolo Bonzini wrote:
> osdep.h provides a ROUND_UP macro to hide bitwise operations for the
> purpose of rounding a number up to a power of two; add a ROUND_DOWN
> macro that does the same with truncation towards zero.
>
> While at it, change the formatting of some comments.
>
On 24.06.21 20:04, Paolo Bonzini wrote:
From: Joelle van Dyne
On Darwin (iOS), there are no system level APIs for directly accessing
host block devices. We detect this at configure time.
Signed-off-by: Joelle van Dyne
Message-Id: <20210315180341.31638-...@getutm.app>
Signed-off-by: Paolo Bonz
On 24.06.21 20:04, Paolo Bonzini wrote:
bs->sg is only true for character devices, but block devices can also
be used with scsi-block and scsi-generic. Unfortunately BLKSECTGET
returns bytes in an int for /dev/sgN devices, and sectors in a short
for block devices, so account for that in the code
On 24.06.21 20:04, Paolo Bonzini wrote:
For block host devices, I/O can happen through either the kernel file
descriptor I/O system calls (preadv/pwritev, io_submit, io_uring)
or the SCSI passthrough ioctl SG_IO.
In the latter case, the size of each transfer can be limited by the
HBA, while for
On 24.06.21 20:04, Paolo Bonzini wrote:
Block device requests must be aligned to bs->bl.request_alignment.
It makes sense for drivers to align bs->bl.max_transfer the same
way; however when there is no specified limit, blk_get_max_transfer
just returns INT_MAX. Since the contract of the function
On 24.06.21 20:04, Paolo Bonzini wrote:
osdep.h provides a ROUND_UP macro to hide bitwise operations for the
purpose of rounding a number up to a power of two; add a ROUND_DOWN
macro that does the same with truncation towards zero.
While at it, change the formatting of some comments.
Signed-off
On Thu, Jun 24, 2021 at 10:24 PM Philippe Mathieu-Daudé wrote:
>
> Introduce a new structure to hold the bus protocol specific
> fields: SDProto. The first field is the protocol name.
>
> Signed-off-by: Philippe Mathieu-Daudé
> ---
> hw/sd/sd.c | 28
> 1 file changed
On Thu, Jun 24, 2021 at 10:24 PM Philippe Mathieu-Daudé wrote:
>
> Multiple commands have to check the address requested is valid.
> Extract this code pattern as a new address_in_range() helper, and
> log invalid accesses as guest errors.
>
> Signed-off-by: Philippe Mathieu-Daudé
> ---
> hw/sd/s
On Thu, Jun 24, 2021 at 10:22 PM Philippe Mathieu-Daudé wrote:
>
> We report the card is in an inconsistent state, but don't precise
%s/don't/is not
> in which state it is. Add this information, as it is useful when
> debugging problems.
>
> Since we will reuse this code, extract as sd_invalid_s
66 matches
Mail list logo