Re: [PATCH 06/20] migration: rename qemu_ftell to qemu_file_total_transferred

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > The name 'ftell' gives the misleading impression that the QEMUFile > objects are seekable. This is not the case, as in general we just > have an opaque stream. The users of this method are only interested > in the total bytes processed. This

Re: [PATCH 04/20] migration: rename rate limiting fields in QEMUFile

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > This renames the following QEMUFile fields > > * bytes_xfer -> rate_limit_used > * xfer_limit -> rate_limit_max > > The intent is to make it clear that 'bytes_xfer' is specifically related > to rate limiting of data and applies to data

Re: [PATCH 05/20] migration: rename 'pos' field in QEMUFile to 'bytes_processed'

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > This makes the field name align with the newly introduced method > names in the previous commit. I think that's the method in the following commits? tbh I'm not sure about this; 'pos' is still passed to writev_buffer and get_buffer to say where

Re: [PATCH 05/20] migration: rename 'pos' field in QEMUFile to 'bytes_processed'

2022-06-09 Thread Daniel P . Berrangé
On Thu, Jun 09, 2022 at 10:51:27AM +0100, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > This makes the field name align with the newly introduced method > > names in the previous commit. > > I think that's the method in the following commits? Opps, yeah, I

Re: [PATCH v6 03/18] job.c: API functions not used outside should be static

2022-06-09 Thread Stefan Hajnoczi
On Mon, Mar 14, 2022 at 09:36:52AM -0400, Emanuele Giuseppe Esposito wrote: > 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 > --- > include/qemu/job.h | 18 --

Re: [PATCH 05/20] migration: rename 'pos' field in QEMUFile to 'bytes_processed'

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Thu, Jun 09, 2022 at 10:51:27AM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > This makes the field name align with the newly introduced method > > > names in the previous commit. > > > > I

Re: [PATCH v6 11/18] job.h: rename job API functions called with job_mutex held

2022-06-09 Thread Stefan Hajnoczi
On Mon, Mar 14, 2022 at 09:37:00AM -0400, Emanuele Giuseppe Esposito wrote: > /** > - * Release a reference that was previously acquired with job_ref() or > + * Release a reference that was previously acquired with job_ref_locked() or > * job_create(). If it's the last reference to the object,

Re: [PATCH v6 10/18] jobs: rename static functions called with job_mutex held

2022-06-09 Thread Stefan Hajnoczi
On Mon, Mar 14, 2022 at 09:36:59AM -0400, Emanuele Giuseppe Esposito wrote: > @@ -530,20 +540,24 @@ void job_enter(Job *job) > job_enter_cond(job, NULL); > } > > -/* Yield, and schedule a timer to reenter the coroutine after @ns > nanoseconds. > +/* > + * Yield, and schedule a timer to

Re: [PATCH v6 12/18] block_job: rename block_job functions called with job_mutex held

2022-06-09 Thread Stefan Hajnoczi
On Mon, Mar 14, 2022 at 09:37:01AM -0400, Emanuele Giuseppe Esposito wrote: > @@ -135,32 +137,37 @@ void block_job_remove_all_bdrv(BlockJob *job); > bool block_job_has_bdrv(BlockJob *job, BlockDriverState *bs); > > /** > - * block_job_set_speed: > + * block_job_set_speed_locked: > * @job:

Re: [PATCH v6 13/18] job.h: define unlocked functions

2022-06-09 Thread Stefan Hajnoczi
On Mon, Mar 14, 2022 at 09:37:02AM -0400, Emanuele Giuseppe Esposito wrote: > /** > * @job: The job to enter. > + * Called with job_mutex *not* held. > * > * Continue the specified job by entering the coroutine. > + * Called with job_mutex lock *not* held. A similar comment was added just

Re: [PATCH v6 05/18] job.h: add _locked duplicates for job API functions called with and without job_mutex

2022-06-09 Thread Stefan Hajnoczi
On Mon, Mar 14, 2022 at 09:36:54AM -0400, Emanuele Giuseppe Esposito wrote: > In preparation to the job_lock/unlock usage, create _locked > duplicates of some functions, since they will be sometimes called with > job_mutex held (mostly within job.c), > and sometimes without (mostly from JobDrivers

Re: [PATCH v2 2/2] hw: m25p80: add tests for write protect

2022-06-09 Thread Thomas Huth
On 09/06/2022 05.13, Iris Chen wrote: Signed-off-by: Iris Chen --- Include the tests in a separate patch. Using qtest_set_irq_in() as per review. tests/qtest/aspeed_smc-test.c | 60 +++ 1 file changed, 60 insertions(+) diff --git

<    1   2