Re: ublk-qcow2: ublk-qcow2 is available

2022-10-07 Thread Ming Lei
On Thu, Oct 06, 2022 at 02:29:55PM -0400, Stefan Hajnoczi wrote: > On Thu, Oct 06, 2022 at 11:09:48PM +0800, Ming Lei wrote: > > On Thu, Oct 06, 2022 at 09:59:40AM -0400, Stefan Hajnoczi wrote: > > > On Thu, Oct 06, 2022 at 06:26:15PM +0800, Ming Lei wrote: > > > > On Wed, Oct 05, 2022 at

[PULL 46/50] job.c: enable job lock/unlock and remove Aiocontext locks

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Change the job_{lock/unlock} and macros to use job_mutex. Now that they are not nop anymore, remove the aiocontext to avoid deadlocks. Therefore: - when possible, remove completely the aiocontext lock/unlock pair - if it is used by some other function too,

[PULL 45/50] job.h: categorize JobDriver callbacks that need the AioContext lock

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Some callbacks implementation use bdrv_* APIs that assume the AioContext lock is held. Make sure this invariant is documented. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id:

[PULL 37/50] jobs: use job locks also in the unit tests

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Add missing job synchronization in the unit tests, with explicit locks. We are deliberately using _locked functions wrapped by a guard instead of a normal call because the normal call will be removed in future, as the only usage is limited to the tests. In

[PULL 43/50] blockjob: rename notifier callbacks as _locked

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito They all are called with job_lock held, in job_event_*_locked() Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Hajnoczi Reviewed-by: Kevin Wolf Message-Id:

[PULL 40/50] job: detect change of aiocontext within job coroutine

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini We want to make sure access of job->aio_context is always done under either BQL or job_mutex. The problem is that using aio_co_enter(job->aiocontext, job->co) in job_start and job_enter_cond makes the coroutine immediately resume, so we can't hold the job lock. And caching it

Re: ublk-qcow2: ublk-qcow2 is available

2022-10-07 Thread Yongji Xie
On Fri, Oct 7, 2022 at 6:51 PM Ming Lei wrote: > > On Fri, Oct 07, 2022 at 06:04:29PM +0800, Yongji Xie wrote: > > On Thu, Oct 6, 2022 at 7:24 PM Ming Lei wrote: > > > > > > On Wed, Oct 05, 2022 at 08:21:45AM -0400, Stefan Hajnoczi wrote: > > > > On Wed, 5 Oct 2022 at 00:19, Ming Lei wrote: > >

Re: ublk-qcow2: ublk-qcow2 is available

2022-10-07 Thread Ming Lei
On Fri, Oct 07, 2022 at 06:04:29PM +0800, Yongji Xie wrote: > On Thu, Oct 6, 2022 at 7:24 PM Ming Lei wrote: > > > > On Wed, Oct 05, 2022 at 08:21:45AM -0400, Stefan Hajnoczi wrote: > > > On Wed, 5 Oct 2022 at 00:19, Ming Lei wrote: > > > > > > > > On Tue, Oct 04, 2022 at 09:53:32AM -0400,

[PULL 32/50] aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Same as AIO_WAIT_WHILE macro, but if we are in the Main loop do not release and then acquire ctx_ 's aiocontext. Once all Aiocontext locks go away, this macro will replace AIO_WAIT_WHILE. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi

[PULL 15/50] qcow2: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id:

[PULL 41/50] jobs: protect job.aio_context with BQL and job_mutex

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito In order to make it thread safe, implement a "fake rwlock", where we allow reads under BQL *or* job_mutex held, but writes only under BQL *and* job_mutex. The only write we have is in child_job_set_aio_ctx, which always happens under drain (so the job is

[PULL 21/50] vmdk: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id:

[PULL 31/50] job.c: API functions not used outside should be static

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito job_event_* functions can all be static, as they are not used outside job.c. Same applies for job_txn_add_job(). Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf

[PATCH v2] hw/arm/aspeed: increase Bletchley memory size

2022-10-07 Thread Patrick Williams
For the PVT-class hardware we have increased the memory size of this device to 2 GiB. Adjust the device model accordingly. Signed-off-by: Patrick Williams --- hw/arm/aspeed.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index

[PULL 14/50] parallels: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id:

[PULL 23/50] coroutine-lock: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id:

[PULL 44/50] blockjob: protect iostatus field in BlockJob struct

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito iostatus is the only field (together with .job) that needs protection using the job mutex. It is set in the main loop (GLOBAL_STATE functions) but read in I/O code (block_job_error_action). In order to protect it, change block_job_iostatus_set_err to

[PULL 29/50] job.c: make job_mutex and job_lock/unlock() public

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito job mutex will be used to protect the job struct elements and list, replacing AioContext locks. Right now use a shared lock for all jobs, in order to keep things simple. Once the AioContext lock is gone, we can introduce per-job locks. To simplify the switch

Re: [PATCH v3] virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events.

2022-10-07 Thread Paolo Bonzini
Il gio 6 ott 2022, 15:25 Venu Busireddy ha scritto: > I do see that the Solaris driver does send the 0x1a command during > the initialization, perhaps (?) seeking the value of UA_INTLCK_CTRL. > Since QEMU currently does not support it, QEMU sends back a > key/asc/ascq=0x05/0x24/0x00 response,

[PULL 26/50] migration: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Marc-André Lureau Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela Reviewed-by: Stefan Hajnoczi Reviewed-by:

[PULL 38/50] block/mirror.c: use of job helpers in drivers

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Once job lock is used and aiocontext is removed, mirror has to perform job operations under the same critical section, Note: at this stage, job_{lock/unlock} and job lock guard macros are *nop*. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir

[PULL 30/50] job.h: categorize fields in struct Job

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Categorize the fields in struct Job to understand which ones need to be protected by the job mutex and which don't. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi

[PULL 33/50] job.c: add job_lock/unlock while keeping job.h intact

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito With "intact" we mean that all job.h functions implicitly take the lock. Therefore API callers are unmodified. This means that: - many static functions that will be always called with job lock held become _locked, and call _locked functions - all public

[PULL 50/50] file-posix: Remove unused s->discard_zeroes

2022-10-07 Thread Kevin Wolf
The field is unused (only ever set, but never read) since commit ac9185603. Additionally, the commit message of commit 34fa110e already explained earlier why it's unreliable. Remove it. Signed-off-by: Kevin Wolf Message-Id: <20220923142838.91043-1-kw...@redhat.com> Signed-off-by: Kevin Wolf ---

[PULL 20/50] throttle: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id:

[PULL 47/50] block_job_query: remove atomic read

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Not sure what the atomic here was supposed to do, since job.busy is protected by the job lock. Since the whole function is called under job_mutex, just remove the atomic. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy

[PULL 27/50] test-coroutine: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Marc-André Lureau Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Signed-off-by: Marc-André Lureau Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id:

[PULL 34/50] job: move and update comments from blockjob.c

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito This comment applies more on job, it was left in blockjob as in the past the whole job logic was implemented there. Note: at this stage, job_{lock/unlock} and job lock guard macros are *nop*. No functional change intended. Signed-off-by: Emanuele Giuseppe

[PULL 24/50] raw-format: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id:

[PULL 39/50] jobs: group together API calls under the same job lock

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Now that the API offers also _locked() functions, take advantage of it and give also the caller control to take the lock and call _locked functions. This makes sense especially when we have for loops, because it makes no sense to have: for(job = job_next();

[PULL 35/50] blockjob: introduce block_job _locked() APIs

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Just as done with job.h, create _locked() functions in blockjob.h These functions will be later useful when caller has already taken the lock. All blockjob _locked functions call job _locked functions. Note: at this stage, job_{lock/unlock} and job lock guard

[PULL 13/50] nvme: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id:

[PULL 17/50] curl: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id:

[PULL 42/50] blockjob.h: categorize fields in struct BlockJob

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito The same job lock is being used also to protect some of blockjob fields. Categorize them just as done in job.h. Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Emanuele Giuseppe Esposito Message-Id: <20220926093214.506243-15-eespo...@redhat.com>

[PULL 28/50] quorum: Remove unnecessary forward declaration

2022-10-07 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Message-Id: <20221006122607.162769-1-kw...@redhat.com> Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Kevin Wolf --- block/quorum.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block/quorum.c b/block/quorum.c index

[PULL 12/50] nfs: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id:

[PULL 08/50] blkverify: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini Message-Id:

[PULL 09/50] file-posix: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini Message-Id:

[PULL 36/50] jobs: add job lock in find_* functions

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Both blockdev.c and job-qmp.c have TOC/TOU conditions, because they first search for the job and then perform an action on it. Therefore, we need to do the search + action under the same job mutex critical section. Note: at this stage, job_{lock/unlock} and job

[PULL 18/50] qed: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id:

[PULL 07/50] coroutine: remove incorrect coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini qemu_coroutine_get_aio_context inspects a coroutine, but it does not have to be called from the coroutine itself (or from any coroutine). Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini Message-Id:

[PULL 25/50] 9p: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Marc-André Lureau Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Signed-off-by: Marc-André Lureau Acked-by: Greg Kurz Reviewed-by: Alberto Faria Signed-off-by: Paolo

[PULL 04/50] block: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Signed-off-by: Paolo Bonzini Message-Id: <20220922084924.201610-3-pbonz...@redhat.com> [kwolf: Fixed up coding

[PULL 02/50] coroutine: Drop coroutine_fn annotation from qemu_coroutine_self()

2022-10-07 Thread Kevin Wolf
From: Alberto Faria qemu_coroutine_self() can be called from outside coroutine context, returning the leader coroutine, and several such invocations currently exist (mostly in qcow2 tracing calls). Signed-off-by: Alberto Faria Message-Id: <20221005175209.975797-1-afa...@redhat.com>

[PULL 22/50] job: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id:

[PULL 03/50] block/nvme: separate nvme_get_free_req cases for coroutine/non-coroutine context

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini nvme_get_free_req has very difference semantics when called in coroutine context (where it waits) and in non-coroutine context (where it doesn't). Split the two cases to make it clear what is being requested. Cc: qemu-bl...@nongnu.org Reviewed-by: Alberto Faria

[PULL 00/50] Block layer patches

2022-10-07 Thread Kevin Wolf
The following changes since commit f1d33f55c47dfdaf8daacd618588ad3ae4c452d1: Merge tag 'pull-testing-gdbstub-plugins-gitdm-061022-3' of https://github.com/stsquad/qemu into staging (2022-10-06 07:11:56 -0400) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git

[PULL 19/50] quorum: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id:

[PULL 05/50] qcow2: remove incorrect coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini This is incorrect because qcow2_mark_clean() calls qcow2_flush_caches(). qcow2_mark_clean() is called from non-coroutine context in qcow2_inactivate() and qcow2_amend_options(). Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini Message-Id:

Re: [PATCH] gitmodules: recurse by default

2022-10-07 Thread Daniel P . Berrangé
On Fri, Oct 07, 2022 at 06:11:25AM -0400, Michael S. Tsirkin wrote: > On Fri, Oct 07, 2022 at 09:07:17AM +0100, Daniel P. Berrangé wrote: > > On Thu, Oct 06, 2022 at 08:24:01PM -0400, Michael S. Tsirkin wrote: > > > On Thu, Oct 06, 2022 at 07:54:52PM +0100, Daniel P. Berrangé wrote: > > > > On

Re: [PATCH v3 42/42] target/arm: Use the max page size in a 2-stage ptw

2022-10-07 Thread Peter Maydell
On Sat, 1 Oct 2022 at 18:04, Richard Henderson wrote: > > We had only been reporting the stage2 page size. This causes > problems if stage1 is using a larger page size (16k, 2M, etc), > but stage2 is using a smaller page size, because cputlb does > not set large_page_{addr,mask} properly. > >

[PULL 16/50] copy-before-write: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id:

[PULL 10/50] iscsi: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini Message-Id:

[PULL 06/50] nbd: remove incorrect coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
From: Paolo Bonzini nbd_co_establish_connection_cancel() cancels a coroutine but is not called from coroutine context itself, for example in nbd_cancel_in_flight() and in timer callbacks reconnect_delay_timer_cb() and open_timer_cb(). Reviewed-by: Alberto Faria Reviewed-by: Eric Blake

Re: [PATCH v6 05/13] block: use BdrvRequestFlags type for supported flag fields

2022-10-07 Thread Stefano Garzarella
On Thu, Oct 06, 2022 at 05:34:59PM -0400, Stefan Hajnoczi wrote: Use the enum type so GDB displays the enum members instead of printing a numeric constant. Signed-off-by: Stefan Hajnoczi --- include/block/block_int-common.h | 8 1 file changed, 4 insertions(+), 4 deletions(-)

Re: [PATCH v6 04/13] block: pass size to bdrv_unregister_buf()

2022-10-07 Thread Stefano Garzarella
On Thu, Oct 06, 2022 at 05:34:58PM -0400, Stefan Hajnoczi wrote: The only implementor of bdrv_register_buf() is block/nvme.c, where the size is not needed when unregistering a buffer. This is because util/vfio-helpers.c can look up mappings by address. Future block drivers that implement

[PULL 01/50] Revert "qapi: fix examples of blockdev-add with qcow2"

2022-10-07 Thread Kevin Wolf
From: Markus Armbruster This reverts commit b6522938327141235b97ab38e40c6c4512587373. Kevin Wolf NAKed this patch, because: 'file' is a required member (defined in BlockdevOptionsGenericFormat), removing it makes the example invalid. 'data-file' is only an additional optional

Re: [PATCH v3 40/42] target/arm: Consider GP an attribute in get_phys_addr_lpae

2022-10-07 Thread Peter Maydell
On Sat, 1 Oct 2022 at 18:19, Richard Henderson wrote: > > Both GP and DBM are in the upper attribute block. > Extend the computation of attrs to include them, > then simplify the setting of guarded. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v6 02/13] blkio: add libblkio block driver

2022-10-07 Thread Stefano Garzarella
On Thu, Oct 06, 2022 at 05:34:56PM -0400, Stefan Hajnoczi wrote: libblkio (https://gitlab.com/libblkio/libblkio/) is a library for high-performance disk I/O. It currently supports io_uring, virtio-blk-vhost-user, and virtio-blk-vhost-vdpa with additional drivers under development. One of the

Re: [PATCH v3 39/42] target/arm: Don't shift attrs in get_phys_addr_lpae

2022-10-07 Thread Peter Maydell
On Sat, 1 Oct 2022 at 17:49, Richard Henderson wrote: > > Leave the upper and lower attributes in the place they originate > from in the descriptor. Shifting them around is confusing, since > one cannot read the bit numbers out of the manual. Also, new > attributes have been added which would

Re: [PATCH v3 38/42] target/arm: Fix fault reporting in get_phys_addr_lpae

2022-10-07 Thread Peter Maydell
On Sat, 1 Oct 2022 at 17:48, Richard Henderson wrote: > > Always overriding fi->type was incorrect, as we would not properly > propagate the fault type from S1_ptw_translate, or arm_ldq_ptw. > Simplify things by providing a new label for a translation fault. > For other faults, store into fi

Re: [PATCH v3 37/42] target/arm: Remove loop from get_phys_addr_lpae

2022-10-07 Thread Peter Maydell
On Sat, 1 Oct 2022 at 18:02, Richard Henderson wrote: > > The unconditional loop was used both to iterate over levels > and to control parsing of attributes. Use an explicit goto > in both cases. > > While this appears less clean for iterating over levels, we > will need to jump back into the

Re: [PATCH] gitmodules: recurse by default

2022-10-07 Thread Michael S. Tsirkin
On Fri, Oct 07, 2022 at 09:07:17AM +0100, Daniel P. Berrangé wrote: > On Thu, Oct 06, 2022 at 08:24:01PM -0400, Michael S. Tsirkin wrote: > > On Thu, Oct 06, 2022 at 07:54:52PM +0100, Daniel P. Berrangé wrote: > > > On Thu, Oct 06, 2022 at 07:39:07AM -0400, Michael S. Tsirkin wrote: > > > > The

Re: ublk-qcow2: ublk-qcow2 is available

2022-10-07 Thread Yongji Xie
On Thu, Oct 6, 2022 at 7:24 PM Ming Lei wrote: > > On Wed, Oct 05, 2022 at 08:21:45AM -0400, Stefan Hajnoczi wrote: > > On Wed, 5 Oct 2022 at 00:19, Ming Lei wrote: > > > > > > On Tue, Oct 04, 2022 at 09:53:32AM -0400, Stefan Hajnoczi wrote: > > > > On Tue, 4 Oct 2022 at 05:44, Ming Lei wrote:

Re: [PATCH v5 17/18] .gitlab-ci.d/windows.yml: Increase the timeout to 90 minutes

2022-10-07 Thread Marc-André Lureau
Hi On Thu, Oct 6, 2022 at 8:16 PM Bin Meng wrote: > From: Bin Meng > > commit 9f8e6cad65a6 ("gitlab-ci: Speed up the msys2-64bit job by using > --without-default-devices" > changed to compile QEMU with the --without-default-devices switch for > the msys2-64bit job, due to the build could not

Re: [PATCH v3] win32: set threads name

2022-10-07 Thread Marc-André Lureau
Hi On Fri, Oct 7, 2022 at 1:04 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 10/6/22 05:51, Marc-André Lureau wrote: > > Hi Richard > > > > On Mon, Oct 3, 2022 at 11:39 AM Marc-André Lureau < > marcandre.lur...@redhat.com > > > wrote: > > >

Re: [PATCH v3 35/42] target/arm: Move S1_ptw_translate outside arm_ld[lq]_ptw

2022-10-07 Thread Peter Maydell
On Sat, 1 Oct 2022 at 18:11, Richard Henderson wrote: > > Separate S1 translation from the actual lookup. > Will enable lpae hardware updates. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v3 36/42] target/arm: Add ARMFault_UnsuppAtomicUpdate

2022-10-07 Thread Peter Maydell
On Sat, 1 Oct 2022 at 17:47, Richard Henderson wrote: > > This fault type is to be used with FEAT_HAFDBS when > the guest enables hw updates, but places the tables > in memory where atomic updates are unsupported. > > Signed-off-by: Richard Henderson > --- > target/arm/internals.h | 4 > 1

Re: [PATCH v3 33/42] target/arm: Split out S1TranslateResult type

2022-10-07 Thread Peter Maydell
On Sat, 1 Oct 2022 at 17:56, Richard Henderson wrote: > > Consolidate the results of S1_ptw_translate in one struct. > > Signed-off-by: Richard Henderson > --- > target/arm/ptw.c | 70 +--- > 1 file changed, 36 insertions(+), 34 deletions(-) > > diff

Re: [PATCH] i386: Fix KVM_CAP_ADJUST_CLOCK capability check

2022-10-07 Thread Vitaly Kuznetsov
Vitaly Kuznetsov writes: > Vitaly Kuznetsov writes: > >> KVM commit c68dc1b577ea ("KVM: x86: Report host tsc and realtime values in >> KVM_GET_CLOCK") broke migration of certain workloads, e.g. Win11 + WSL2 >> guest reboots immediately after migration. KVM, however, is not to >> blame this

Re: [PATCH v3 34/42] target/arm: Move be test for regime into S1TranslateResult

2022-10-07 Thread Peter Maydell
On Sat, 1 Oct 2022 at 17:58, Richard Henderson wrote: > > Hoist this test out of arm_ld[lq]_ptw into S1_ptw_translate. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v3 31/42] target/arm: Add isar predicates for FEAT_HAFDBS

2022-10-07 Thread Peter Maydell
On Sat, 1 Oct 2022 at 17:55, Richard Henderson wrote: > > The MMFR1 field may indicate support for hardware update of > access flag alone, or access flag and dirty bit. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v3 32/42] target/arm: Extract HA and HD in aa64_va_parameters

2022-10-07 Thread Peter Maydell
On Sat, 1 Oct 2022 at 17:42, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > target/arm/internals.h | 2 ++ > target/arm/helper.c| 8 +++- > 2 files changed, 9 insertions(+), 1 deletion(-) > > diff --git a/target/arm/internals.h b/target/arm/internals.h > index

Re: [PATCH v3 30/42] target/arm: Add ptw_idx argument to S1_ptw_translate

2022-10-07 Thread Peter Maydell
On Sat, 1 Oct 2022 at 17:42, Richard Henderson wrote: > > Hoist the computation of the mmu_idx for the ptw up to > get_phys_addr_with_secure_debug and get_phys_addr_twostage. > This removes the duplicate check for stage2 disabled > from the middle of the walk, performing it only once. > > Pass

Re: [PATCH 3/3] block: Start/end drain on correct AioContext

2022-10-07 Thread Kevin Wolf
Am 23.09.2022 um 14:52 hat Hanna Reitz geschrieben: > bdrv_parent_drained_{begin,end}_single() are supposed to operate on the > parent, not on the child, so they should not attempt to get the context > to poll from the child but the parent instead. BDRV_POLL_WHILE(c->bs) > does get the context

Re: [PATCH v3 27/42] target/arm: Use softmmu tlbs for page table walking

2022-10-07 Thread Peter Maydell
On Sat, 1 Oct 2022 at 17:52, Richard Henderson wrote: > > So far, limit the change to S1_ptw_translate, arm_ldl_ptw, and > arm_ldq_ptw. Use probe_access_full to find the host address, > and if so use a host load. If the probe fails, we've got our > fault info already. On the off chance that

Re: [PATCH 2/3] block-backend: Update ctx immediately after root

2022-10-07 Thread Kevin Wolf
Am 23.09.2022 um 14:52 hat Hanna Reitz geschrieben: > blk_get_aio_context() asserts that blk->ctx is always equal to the root > BDS's context (if there is a root BDS). Therefore, > blk_do_set_aio_context() must update blk->ctx immediately after the root > BDS's context has changed. > > Without

Re: [PATCH 1/3] block: bdrv_child_get_parent_aio_context is not GS

2022-10-07 Thread Kevin Wolf
Am 23.09.2022 um 14:52 hat Hanna Reitz geschrieben: > All implementations of bdrv_child_get_parent_aio_context() are IO_CODE > (or do not mark anything in the case of block jobs), so this too can be > IO_CODE. By the definition of "I/O API functions" in block-io.h, this > is a strict relaxation,

Re: [PATCH v1] qapi/qmp: Add timestamps to qmp command responses

2022-10-07 Thread Daniel P . Berrangé
On Fri, Oct 07, 2022 at 10:52:08AM +0300, Denis Plotnikov wrote: > Add "start" & "end" time values to qmp command responses. > > These time values are added to let the qemu management layer get the exact > command execution time without any other time variance which might be brought > by > other

Re: [PATCH] gitmodules: recurse by default

2022-10-07 Thread Daniel P . Berrangé
On Thu, Oct 06, 2022 at 08:24:01PM -0400, Michael S. Tsirkin wrote: > On Thu, Oct 06, 2022 at 07:54:52PM +0100, Daniel P. Berrangé wrote: > > On Thu, Oct 06, 2022 at 07:39:07AM -0400, Michael S. Tsirkin wrote: > > > The most commmon complaint about submodules is that > > > they don't follow when

Re: [PATCH] hw/arm/aspeed: increase Bletchley memory size

2022-10-07 Thread Peter Maydell
On Fri, 7 Oct 2022 at 08:28, Cédric Le Goater wrote: > > On 10/7/22 00:52, Patrick Williams wrote: > > For the PVT-class hardware we have increased the memory size of > > this device to 2 GiB. Adjust the device model accordingly. > > You should add some defines similar to : > > /* On

Re: [PATCH v2] tests: Add sndio to the FreeBSD CI containers / VM

2022-10-07 Thread Daniel P . Berrangé
On Fri, Oct 07, 2022 at 03:21:29AM -0400, Brad Smith wrote: > tests: Add sndio to the FreeBSD CI containers / VM > > --- > .gitlab-ci.d/cirrus/freebsd-12.vars | 2 +- > .gitlab-ci.d/cirrus/freebsd-13.vars | 2 +- > tests/docker/dockerfiles/alpine.docker| 3 +- >

[PATCH v1] qapi/qmp: Add timestamps to qmp command responses

2022-10-07 Thread Denis Plotnikov
Add "start" & "end" time values to qmp command responses. These time values are added to let the qemu management layer get the exact command execution time without any other time variance which might be brought by other parts of management layer or qemu internals. This is particulary useful for

Re: [PATCH] hw/arm/aspeed: increase Bletchley memory size

2022-10-07 Thread Cédric Le Goater
On 10/7/22 00:52, Patrick Williams wrote: For the PVT-class hardware we have increased the memory size of this device to 2 GiB. Adjust the device model accordingly. You should add some defines similar to : /* On 32-bit hosts, lower RAM to 1G because of the 2047 MB limit */ #if

[PATCH v2] tests: Add sndio to the FreeBSD CI containers / VM

2022-10-07 Thread Brad Smith
tests: Add sndio to the FreeBSD CI containers / VM --- .gitlab-ci.d/cirrus/freebsd-12.vars | 2 +- .gitlab-ci.d/cirrus/freebsd-13.vars | 2 +- tests/docker/dockerfiles/alpine.docker| 3 +- tests/docker/dockerfiles/centos8.docker | 2 +-

Re: A few QEMU questiosn

2022-10-07 Thread a b
Thanks Peter. How QEMU deals with different page size? Does a 2GB hugepage has a single corresponding TLB entry? Or it is partitioned to 512 4K pages and has 512 TLB entries? does a CPUTLBDescFast always hold TLB entries for the same single process? Is it always flushed/restored on context

<    1   2