[PATCH] linux-user: Add LoongArch to qemu_get_family()

2022-07-05 Thread Song Gao
qemu_get_family() needs to add LoongArch support. Signed-off-by: Song Gao --- scripts/qemu-binfmt-conf.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 1f4e2cd19d..6ef9f118d9 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/s

[PATCH] tcg/tci: Fix enable-debug got an error

2022-07-05 Thread Song Gao
When building tcg configure with --enable-tcg-interpreter and --enable-debug, We may got an error: In file included from ../tcg/tcg.c:432: /root/code/github/soft-qemu/qemu/tcg/tci/tcg-target.c.inc: In function 'tcg_target_init': /root/code/github/soft-qemu/qemu/tcg/tci/tcg-target.c.inc:829:9: err

[PATCH] target/loongarch: Clean up tlb when cpu reset

2022-07-05 Thread Song Gao
We should make sure that tlb is clean when cpu reset. Signed-off-by: Song Gao --- target/loongarch/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index d2d4667a34..e21715592a 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu

Re: [RFC 0/8] Introduce an extensible static analyzer

2022-07-05 Thread Daniel P . Berrangé
On Mon, Jul 04, 2022 at 08:30:08PM +0100, Alberto Faria wrote: > On Mon, Jul 4, 2022 at 5:28 PM Daniel P. Berrangé wrote: > > Have you done any measurement see how much of the overhead is from > > the checks you implemented, vs how much is inherantly forced on us > > by libclang ? ie what does it

Re: [PATCH v8 02/20] job.h: categorize fields in struct Job

2022-07-05 Thread Stefan Hajnoczi
On Wed, Jun 29, 2022 at 10:15:20AM -0400, Emanuele Giuseppe Esposito wrote: > 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 > --- > i

Re: [PULL 00/23] loongarch64 patch queue

2022-07-05 Thread Thomas Huth
On 04/07/2022 17.16, Richard Henderson wrote: On 7/4/22 15:03, Richard Henderson wrote: The following changes since commit e8e86b484eac70cd86e15fa10a2f0038a536cbba:    Merge tag 'pull-riscv-to-apply-20220703-1' of github.com:alistair23/qemu into staging (2022-07-03 06:29:02 +0530) are availa

Re: [PATCH v10 08/12] target/riscv: Add sscofpmf extension support

2022-07-05 Thread Atish Kumar Patra
On Mon, Jul 4, 2022 at 6:31 PM Weiwei Li wrote: > > > 在 2022/6/21 上午7:15, Atish Patra 写道: > > The Sscofpmf ('Ss' for Privileged arch and Supervisor-level extensions, > and 'cofpmf' for Count OverFlow and Privilege Mode Filtering) > extension allows the perf to handle overflow interrupts and filter

Re: [PATCH v8 05/20] job.c: add job_lock/unlock while keeping job.h intact

2022-07-05 Thread Stefan Hajnoczi
On Wed, Jun 29, 2022 at 10:15:23AM -0400, Emanuele Giuseppe Esposito wrote: > +void job_ref(Job *job) > +{ > +JOB_LOCK_GUARD(); > +job_ref_locked(job); > +} You don't need to fix this, but just a note: This API seems dangerous. If we don't hold the lock, how can we be sure job won't be un

Re: [PATCH v8 05/20] job.c: add job_lock/unlock while keeping job.h intact

2022-07-05 Thread Stefan Hajnoczi
On Wed, Jun 29, 2022 at 10:15:23AM -0400, Emanuele Giuseppe Esposito wrote: > With "intact" we mean that all job.h functions implicitly > take the lock. Therefore API callers are unmodified. > > This means that: > - all static functions become _locked, and call _locked functions > - all public fun

Re: [PATCH v8 06/20] job.h: define functions called without job lock held

2022-07-05 Thread Stefan Hajnoczi
On Wed, Jun 29, 2022 at 10:15:24AM -0400, Emanuele Giuseppe Esposito wrote: > These functions don't need a _locked() counterpart, since > they are all called outside job.c and take the lock only > internally. > > Update also the comments in blockjob.c (and move them in job.c). > > Note: at this s

Re: [PATCH v8 07/20] job.h: add _locked public functions

2022-07-05 Thread Stefan Hajnoczi
On Wed, Jun 29, 2022 at 10:15:25AM -0400, Emanuele Giuseppe Esposito wrote: > These functions will be used later when we use the job lock. > > Note: at this stage, job_{lock/unlock} and job lock guard macros > are *nop*. > > Signed-off-by: Emanuele Giuseppe Esposito > --- > include/qemu/job.h |

Re: [PATCH v10 05/12] target/riscv: Implement mcountinhibit CSR

2022-07-05 Thread Atish Kumar Patra
On Mon, Jul 4, 2022 at 8:31 AM Weiwei Li wrote: > > > 在 2022/6/21 上午7:15, Atish Patra 写道: > > From: Atish Patra > > > > As per the privilege specification v1.11, mcountinhibit allows to start/stop > > a pmu counter selectively. > > > > Reviewed-by: Bin Meng > > Reviewed-by: Alistair Francis > >

Re: [Qemu] how to use viriofs in qemu without NUMA

2022-07-05 Thread Thomas Huth
On 05/07/2022 03.02, Zhao, Shirley wrote: Hi, all, I want to use virtiofs to share folder between host and guest. From the guide, it must set the NUMA node. https://virtio-fs.gitlab.io/howto-qemu.html But my guest doesn’t support NUMA. Is there any guide to use qemu + virtiofs without NUM

Re: [PATCH v10 08/12] target/riscv: Add sscofpmf extension support

2022-07-05 Thread Weiwei Li
在 2022/7/5 下午3:36, Atish Kumar Patra 写道: On Mon, Jul 4, 2022 at 6:31 PM Weiwei Li wrote: 在 2022/6/21 上午7:15, Atish Patra 写道: The Sscofpmf ('Ss' for Privileged arch and Supervisor-level extensions, and 'cofpmf' for Count OverFlow and Privilege Mode Filtering) extension allows the perf to han

Re: [PATCH v10 04/12] target/riscv: pmu: Make number of counters configurable

2022-07-05 Thread Atish Kumar Patra
On Mon, Jul 4, 2022 at 5:38 PM Weiwei Li wrote: > > > 在 2022/7/4 下午11:26, Weiwei Li 写道: > > > > 在 2022/6/21 上午7:15, Atish Patra 写道: > >> The RISC-V privilege specification provides flexibility to implement > >> any number of counters from 29 programmable counters. However, the QEMU > >> implements

Re: [PATCH 07/18] block: Add blk_{preadv,pwritev}()

2022-07-05 Thread Hanna Reitz
On 17.05.22 13:38, Alberto Faria wrote: Implement them using generated_co_wrapper. Signed-off-by: Alberto Faria --- include/sysemu/block-backend-io.h | 6 + tests/unit/test-block-iothread.c | 42 ++- 2 files changed, 47 insertions(+), 1 deletion(-) Review

Re: [PATCH 5/8] aspeed: Add fby35 skeleton

2022-07-05 Thread Peter Delevoryas
On Tue, Jul 05, 2022 at 06:53:43AM +, Joel Stanley wrote: > On Mon, 4 Jul 2022 at 21:55, Peter Delevoryas wrote: > > > > Signed-off-by: Peter Delevoryas > > Reviewed-by: Cédric Le Goater > > --- > > MAINTAINERS| 1 + > > hw/arm/fby35.c | 39 +

Re: [PATCH v8 08/20] blockjob.h: introduce block_job _locked() APIs

2022-07-05 Thread Stefan Hajnoczi
On Wed, Jun 29, 2022 at 10:15:26AM -0400, Emanuele Giuseppe Esposito wrote: > +BlockJob *block_job_next(BlockJob *bjob) > { > -Job *job = job_get(id); > +JOB_LOCK_GUARD(); > +return block_job_next_locked(bjob); > +} This seems unsafe for the same reason as job_ref(). How can the calle

Re: [PULL 00/23] loongarch64 patch queue

2022-07-05 Thread Richard Henderson
On 7/5/22 13:01, Thomas Huth wrote: On 04/07/2022 17.16, Richard Henderson wrote: On 7/4/22 15:03, Richard Henderson wrote: The following changes since commit e8e86b484eac70cd86e15fa10a2f0038a536cbba:    Merge tag 'pull-riscv-to-apply-20220703-1' of github.com:alistair23/qemu into staging (20

Re: [PATCH v8 09/20] blockjob: rename notifier callbacks as _locked

2022-07-05 Thread Stefan Hajnoczi
On Wed, Jun 29, 2022 at 10:15:27AM -0400, Emanuele Giuseppe Esposito wrote: > They all are called with job_lock held, in job_event_*_locked() > > Signed-off-by: Emanuele Giuseppe Esposito > --- > blockjob.c | 25 +++-- > 1 file changed, 15 insertions(+), 10 deletions(-) Revi

Re: [Qemu] how to use viriofs in qemu without NUMA

2022-07-05 Thread Dr. David Alan Gilbert
* Thomas Huth (th...@redhat.com) wrote: > On 05/07/2022 03.02, Zhao, Shirley wrote: > > Hi, all, > > > > I want to use virtiofs to share folder between host and guest. > > > > From the guide, it must set the NUMA node. > > https://virtio-fs.gitlab.io/howto-qemu.html > > > > But my guest doesn’t

Re: [PATCH v8 10/20] jobs: add job lock in find_* functions

2022-07-05 Thread Stefan Hajnoczi
On Wed, Jun 29, 2022 at 10:15:28AM -0400, Emanuele Giuseppe Esposito wrote: > 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.

Re: [PATCH v3 3/3] migration/multifd: Warn user when zerocopy not working

2022-07-05 Thread Daniel P . Berrangé
On Mon, Jul 04, 2022 at 05:23:15PM -0300, Leonardo Bras wrote: > Some errors, like the lack of Scatter-Gather support by the network > interface(NETIF_F_SG) may cause sendmsg(...,MSG_ZEROCOPY) to fail on using > zero-copy, which causes it to fall back to the default copying mechanism. > > After ea

Re: [PATCH v10 09/12] target/riscv: Simplify counter predicate function

2022-07-05 Thread Atish Kumar Patra
On Mon, Jul 4, 2022 at 8:19 AM Weiwei Li wrote: > > > 在 2022/6/21 上午7:15, Atish Patra 写道: > > All the hpmcounters and the fixed counters (CY, IR, TM) can be represented > as a unified counter. Thus, the predicate function doesn't need handle each > case separately. > > Simplify the predicate funct

Re: [PATCH v3 2/3] Add dirty-sync-missed-zero-copy migration stat

2022-07-05 Thread Daniel P . Berrangé
On Mon, Jul 04, 2022 at 05:23:14PM -0300, Leonardo Bras wrote: > Signed-off-by: Leonardo Bras > --- > qapi/migration.json | 7 ++- > migration/migration.c | 2 ++ > monitor/hmp-cmds.c| 4 > 3 files changed, 12 insertions(+), 1 deletion(-) Reviewed-by: Daniel P. Berrangé With re

Re: [PATCH v3 1/3] QIOChannelSocket: Fix zero-copy flush returning code 1 when nothing sent

2022-07-05 Thread Daniel P . Berrangé
On Mon, Jul 04, 2022 at 05:23:13PM -0300, Leonardo Bras wrote: > If flush is called when no buffer was sent with MSG_ZEROCOPY, it currently > returns 1. This return code should be used only when Linux fails to use > MSG_ZEROCOPY on a lot of sendmsg(). > > Fix this by returning early from flush if

Re: [PATCH 5/8] aspeed: Add fby35 skeleton

2022-07-05 Thread Cédric Le Goater
On 7/5/22 09:58, Peter Delevoryas wrote: On Tue, Jul 05, 2022 at 06:53:43AM +, Joel Stanley wrote: On Mon, 4 Jul 2022 at 21:55, Peter Delevoryas wrote: Signed-off-by: Peter Delevoryas Reviewed-by: Cédric Le Goater --- MAINTAINERS| 1 + hw/arm/fby35.c | 39 +++

Re: [RFC PATCH 5/5] tests: stop skipping migration test on s390x/ppc64

2022-07-05 Thread Thomas Huth
On 28/06/2022 12.54, Daniel P. Berrangé wrote: There have been checks put into the migration test which skip it in a few scenarios * ppc64 TCG * ppc64 KVM with kvm-pr * s390x TCG In the original commits there are references to unexplained hangs in the test. There is no record of details o

Re: [PATCH v8 11/20] jobs: use job locks also in the unit tests

2022-07-05 Thread Stefan Hajnoczi
On Wed, Jun 29, 2022 at 10:15:29AM -0400, Emanuele Giuseppe Esposito wrote: > 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,

Re: [PATCH v10 04/12] target/riscv: pmu: Make number of counters configurable

2022-07-05 Thread Weiwei Li
在 2022/7/5 下午3:51, Atish Kumar Patra 写道: On Mon, Jul 4, 2022 at 5:38 PM Weiwei Li wrote: 在 2022/7/4 下午11:26, Weiwei Li 写道: 在 2022/6/21 上午7:15, Atish Patra 写道: The RISC-V privilege specification provides flexibility to implement any number of counters from 29 programmable counters. However,

Re: [PATCH v8 05/20] job.c: add job_lock/unlock while keeping job.h intact

2022-07-05 Thread Emanuele Giuseppe Esposito
Am 05/07/2022 um 09:39 schrieb Stefan Hajnoczi: > On Wed, Jun 29, 2022 at 10:15:23AM -0400, Emanuele Giuseppe Esposito wrote: >> +void job_ref(Job *job) >> +{ >> +JOB_LOCK_GUARD(); >> +job_ref_locked(job); >> +} > > You don't need to fix this, but just a note: > > This API seems danger

Re: [PATCH v3] hw/nvme: Use ioeventfd to handle doorbell updates

2022-07-05 Thread Klaus Jensen
On Jul 4 11:26, Jinhao Fan wrote: > Add property "ioeventfd" which is enabled by default. When this is > enabled, updates on the doorbell registers will cause KVM to signal > an event to the QEMU main loop to handle the doorbell updates. > Therefore, instead of letting the vcpu thread run both gue

Re: [PATCH 08/18] block: Add blk_[co_]preadv_part()

2022-07-05 Thread Hanna Reitz
On 17.05.22 13:38, Alberto Faria wrote: Implement blk_preadv_part() using generated_co_wrapper. Signed-off-by: Alberto Faria --- block/block-backend.c | 30 +++--- block/coroutines.h| 5 - include/sysemu/block-backend-io.h | 7 ++

Re: [PATCH v8 08/20] blockjob.h: introduce block_job _locked() APIs

2022-07-05 Thread Emanuele Giuseppe Esposito
Am 05/07/2022 um 09:58 schrieb Stefan Hajnoczi: > On Wed, Jun 29, 2022 at 10:15:26AM -0400, Emanuele Giuseppe Esposito wrote: >> +BlockJob *block_job_next(BlockJob *bjob) >> { >> -Job *job = job_get(id); >> +JOB_LOCK_GUARD(); >> +return block_job_next_locked(bjob); >> +} > > This s

Re: [RFC PATCH 5/5] tests: stop skipping migration test on s390x/ppc64

2022-07-05 Thread Daniel P . Berrangé
On Tue, Jul 05, 2022 at 10:06:58AM +0200, Thomas Huth wrote: > On 28/06/2022 12.54, Daniel P. Berrangé wrote: > > There have been checks put into the migration test which skip it in a > > few scenarios > > > > * ppc64 TCG > > * ppc64 KVM with kvm-pr > > * s390x TCG > > > > In the original c

Re: [PATCH v8 13/20] jobs: group together API calls under the same job lock

2022-07-05 Thread Stefan Hajnoczi
On Wed, Jun 29, 2022 at 10:15:31AM -0400, Emanuele Giuseppe Esposito wrote: > diff --git a/blockdev.c b/blockdev.c > index 71f793c4ab..5b79093155 100644 > --- a/blockdev.c > +++ b/blockdev.c > @@ -150,12 +150,15 @@ void blockdev_mark_auto_del(BlockBackend *blk) > return; > } > > -

Re: [PATCH v8 13/20] jobs: group together API calls under the same job lock

2022-07-05 Thread Emanuele Giuseppe Esposito
Am 05/07/2022 um 10:14 schrieb Stefan Hajnoczi: > On Wed, Jun 29, 2022 at 10:15:31AM -0400, Emanuele Giuseppe Esposito wrote: >> diff --git a/blockdev.c b/blockdev.c >> index 71f793c4ab..5b79093155 100644 >> --- a/blockdev.c >> +++ b/blockdev.c >> @@ -150,12 +150,15 @@ void blockdev_mark_auto_de

[PATCH] hw/rtc/ls7a_rtc: Drop unused inline functions

2022-07-05 Thread Richard Henderson
Remove toy_val_to_time_mon and toy_val_to_time_year as unused, and to avoid a build failure with clang. Remove all of the other inline markers foo so that this does not creep back in. Signed-off-by: Richard Henderson --- hw/rtc/ls7a_rtc.c | 27 ++- 1 file changed, 6 inse

Re: [PATCH 34/40] lasips2: update VMStateDescription for LASIPS2 device

2022-07-05 Thread Peter Maydell
On Tue, 5 Jul 2022 at 07:48, Mark Cave-Ayland wrote: > > On 04/07/2022 14:38, Peter Maydell wrote: > > > On Wed, 29 Jun 2022 at 13:41, Mark Cave-Ayland > > wrote: > >> > >> Since this series has already introduced a migration break for the HPPA > >> B160L > >> machine, we can use this opportunit

Re: [PATCH] hw/rtc/ls7a_rtc: Drop unused inline functions

2022-07-05 Thread Thomas Huth
On 05/07/2022 10.28, Richard Henderson wrote: Remove toy_val_to_time_mon and toy_val_to_time_year as unused, and to avoid a build failure with clang. Remove all of the other inline markers foo so that this does not creep back in. Signed-off-by: Richard Henderson --- hw/rtc/ls7a_rtc.c | 27 ++

Re: [PATCH 10/18] block: Change blk_pwrite_compressed() param order

2022-07-05 Thread Hanna Reitz
On 17.05.22 13:38, Alberto Faria wrote: Swap 'buf' and 'bytes' around for consistency with other I/O functions. Signed-off-by: Alberto Faria --- block/block-backend.c | 4 ++-- include/sysemu/block-backend-io.h | 4 ++-- qemu-img.c| 2 +- qemu-io-cmds.c

Re: [PATCH 09/18] block: Export blk_pwritev_part() in block-backend-io.h

2022-07-05 Thread Hanna Reitz
On 17.05.22 13:38, Alberto Faria wrote: Also convert it into a generated_co_wrapper. Signed-off-by: Alberto Faria --- block/block-backend.c | 14 -- block/coroutines.h| 5 - include/sysemu/block-backend-io.h | 4 tests/unit/test-block-ioth

[PATCH] tcg/tci: Remove CONFIG_DEBUG_TCG_INTERPRETER

2022-07-05 Thread Richard Henderson
There is nothing in this environment variable that cannot be done better with -d flags. There is nothing special about TCI that warrants this hack. Moreover, it does not compile -- remove it. Reported-by: Song Gao Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 5 - tcg/tc

Re: [RFC PATCH 5/5] tests: stop skipping migration test on s390x/ppc64

2022-07-05 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Tue, Jul 05, 2022 at 10:06:58AM +0200, Thomas Huth wrote: > > On 28/06/2022 12.54, Daniel P. Berrangé wrote: > > > There have been checks put into the migration test which skip it in a > > > few scenarios > > > > > > * ppc64 TCG > > > * pp

Re: [PATCH] target/loongarch: Clean up tlb when cpu reset

2022-07-05 Thread Richard Henderson
On 7/5/22 12:39, Song Gao wrote: We should make sure that tlb is clean when cpu reset. Signed-off-by: Song Gao --- target/loongarch/cpu.c | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Richard Henderson Applied. r~

Re: [PATCH v10 09/12] target/riscv: Simplify counter predicate function

2022-07-05 Thread Weiwei Li
在 2022/7/5 下午4:00, Atish Kumar Patra 写道: On Mon, Jul 4, 2022 at 8:19 AM Weiwei Li wrote: 在 2022/6/21 上午7:15, Atish Patra 写道: All the hpmcounters and the fixed counters (CY, IR, TM) can be represented as a unified counter. Thus, the predicate function doesn't need handle each case separately

Re: [PATCH] hw/rtc/ls7a_rtc: Drop unused inline functions

2022-07-05 Thread gaosong
On 2022/7/5 下午4:28, Richard Henderson wrote: Remove toy_val_to_time_mon and toy_val_to_time_year as unused, and to avoid a build failure with clang. Remove all of the other inline markers foo so that this does not creep back in. Signed-off-by: Richard Henderson --- Sorry for this problem, 

Re: [PATCH] tcg/tci: Remove CONFIG_DEBUG_TCG_INTERPRETER

2022-07-05 Thread gaosong
On 2022/7/5 下午4:36, Richard Henderson wrote: There is nothing in this environment variable that cannot be done better with -d flags. There is nothing special about TCI that warrants this hack. Moreover, it does not compile -- remove it. Reported-by: Song Gao Signed-off-by: Richard Henderson

Re: [PATCH 11/18] block: Add blk_co_pwrite_compressed()

2022-07-05 Thread Hanna Reitz
On 17.05.22 13:38, Alberto Faria wrote: Also convert blk_pwrite_compressed() into a generated_co_wrapper. Signed-off-by: Alberto Faria --- block/block-backend.c | 8 include/sysemu/block-backend-io.h | 7 +-- tests/unit/test-block-iothread.c | 18

Re: [PATCH 12/18] block: Implement blk_pwrite_zeroes() using generated_co_wrapper

2022-07-05 Thread Hanna Reitz
On 17.05.22 13:39, Alberto Faria wrote: Signed-off-by: Alberto Faria --- block/block-backend.c | 8 include/sysemu/block-backend-io.h | 5 +++-- tests/unit/test-block-iothread.c | 17 + 3 files changed, 20 insertions(+), 10 deletions(-) Reviewed-by:

Re: [PATCH v6 10/10] i386/pc: restrict AMD only enforcing of valid IOVAs to new machine type

2022-07-05 Thread Joao Martins
On 7/4/22 15:27, Dr. David Alan Gilbert wrote: > * Joao Martins (joao.m.mart...@oracle.com) wrote: >> The added enforcing is only relevant in the case of AMD where the >> range right before the 1TB is restricted and cannot be DMA mapped >> by the kernel consequently leading to IOMMU INVALID_DEVI

Re: [PATCH 13/18] block: Implement blk_pdiscard() using generated_co_wrapper

2022-07-05 Thread Hanna Reitz
On 17.05.22 13:39, Alberto Faria wrote: Signed-off-by: Alberto Faria --- block/block-backend.c | 12 block/coroutines.h| 3 --- include/sysemu/block-backend-io.h | 3 ++- 3 files changed, 2 insertions(+), 16 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH 14/18] block: Implement blk_flush() using generated_co_wrapper

2022-07-05 Thread Hanna Reitz
On 17.05.22 13:39, Alberto Faria wrote: Signed-off-by: Alberto Faria --- block/block-backend.c | 11 --- block/coroutines.h| 2 -- include/sysemu/block-backend-io.h | 2 +- 3 files changed, 1 insertion(+), 14 deletions(-) Reviewed-by: Hanna Reitz

RE: [Qemu] how to use viriofs in qemu without NUMA

2022-07-05 Thread Zhao, Shirley
Thanks for the information. Yes, I also found the memory backend options on s390x, and also copy the command to x86, but failed. The following is the command used to start qemu + virtiofs + ubuntu 20.04. One is worked well using NUMA, another one is failed without NUMA. Is there anything wron

Re: [PATCH 15/18] block: Add blk_co_ioctl()

2022-07-05 Thread Hanna Reitz
On 17.05.22 13:39, Alberto Faria wrote: Also convert blk_ioctl() into a generated_co_wrapper. Signed-off-by: Alberto Faria --- block/block-backend.c | 7 --- block/coroutines.h| 6 -- include/sysemu/block-backend-io.h | 5 - 3 files changed, 8 insert

copy-before-write test failing (was: Re: [PULL 07/10] iotests: copy-before-write: add cases for cbw-timeout option)

2022-07-05 Thread Thomas Huth
On 14/06/2022 12.29, Vladimir Sementsov-Ogievskiy wrote: From: Vladimir Sementsov-Ogievskiy Add two simple test-cases: timeout failure with break-snapshot-on-cbw-error behavior and similar with break-guest-write-on-cbw-error behavior. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: H

Re: [PATCH 16/18] block: Add blk_co_truncate()

2022-07-05 Thread Hanna Reitz
On 17.05.22 13:39, Alberto Faria wrote: Also convert blk_truncate() into a generated_co_wrapper. Signed-off-by: Alberto Faria --- block/block-backend.c | 7 --- include/sysemu/block-backend-io.h | 8 ++-- tests/unit/test-block-iothread.c | 14 ++ 3 files

Re: [PATCH 17/18] block: Reorganize some declarations in block-backend-io.h

2022-07-05 Thread Hanna Reitz
On 17.05.22 13:39, Alberto Faria wrote: Keep generated_co_wrapper and coroutine_fn pairs together. This should make it clear that each I/O function has these two versions. Also move blk_co_{pread,pwrite}()'s implementations out of the header file for consistency. Signed-off-by: Alberto Faria -

Re: [PATCH 18/18] block: Remove remaining unused symbols in coroutines.h

2022-07-05 Thread Hanna Reitz
On 17.05.22 13:39, Alberto Faria wrote: Some can be made static, others are unused generated_co_wrappers. Signed-off-by: Alberto Faria --- block/block-backend.c | 6 +++--- block/coroutines.h| 19 --- 2 files changed, 3 insertions(+), 22 deletions(-) Reviewed-by: Hann

Failure in iotest 183

2022-07-05 Thread Thomas Huth
Hi! I've just hit a failure in iotest 183: --- /home/thuth/devel/qemu/tests/qemu-iotests/183.out +++ /home/thuth/tmp/qemu-build/tests/qemu-iotests/scratch/183/183.out.bad @@ -30,7 +30,7 @@ 'arguments': { 'uri': 'unix:SOCK_DIR/migrate', 'blk': true } } {"return": {}} { 'execute': 'qu

Re: [Qemu] how to use viriofs in qemu without NUMA

2022-07-05 Thread Dr. David Alan Gilbert
* Zhao, Shirley (shirley.z...@intel.com) wrote: > Thanks for the information. > Yes, I also found the memory backend options on s390x, and also copy the > command to x86, but failed. > > The following is the command used to start qemu + virtiofs + ubuntu 20.04. > One is worked well using NUMA,

Re: [PATCH 2/9] target/ppc: add errp to kvmppc_read_int_cpu_dt()

2022-07-05 Thread Daniel Henrique Barboza
On 7/5/22 03:51, Mark Cave-Ayland wrote: On 04/07/2022 18:34, Cédric Le Goater wrote: On 7/2/22 15:34, Daniel Henrique Barboza wrote: On 7/2/22 03:24, Cédric Le Goater wrote: On 6/30/22 21:42, Daniel Henrique Barboza wrote: The function can't just return 0 whether an error happened and

Re: copy-before-write test failing (was: Re: [PULL 07/10] iotests: copy-before-write: add cases for cbw-timeout option)

2022-07-05 Thread Vladimir Sementsov-Ogievskiy
On 7/5/22 12:03, Thomas Huth wrote: On 14/06/2022 12.29, Vladimir Sementsov-Ogievskiy wrote: From: Vladimir Sementsov-Ogievskiy Add two simple test-cases: timeout failure with break-snapshot-on-cbw-error behavior and similar with break-guest-write-on-cbw-error behavior. Signed-off-by: Vladimi

Re: [PATCH 2/9] target/ppc: add errp to kvmppc_read_int_cpu_dt()

2022-07-05 Thread Mark Cave-Ayland
On 05/07/2022 10:39, Daniel Henrique Barboza wrote: On 7/5/22 03:51, Mark Cave-Ayland wrote: On 04/07/2022 18:34, Cédric Le Goater wrote: On 7/2/22 15:34, Daniel Henrique Barboza wrote: On 7/2/22 03:24, Cédric Le Goater wrote: On 6/30/22 21:42, Daniel Henrique Barboza wrote: The function

Re: [PATCH 2/9] target/ppc: add errp to kvmppc_read_int_cpu_dt()

2022-07-05 Thread Cédric Le Goater
On 7/5/22 11:39, Daniel Henrique Barboza wrote: On 7/5/22 03:51, Mark Cave-Ayland wrote: On 04/07/2022 18:34, Cédric Le Goater wrote: On 7/2/22 15:34, Daniel Henrique Barboza wrote: On 7/2/22 03:24, Cédric Le Goater wrote: On 6/30/22 21:42, Daniel Henrique Barboza wrote: The function ca

Re: [PATCH 2/9] target/ppc: add errp to kvmppc_read_int_cpu_dt()

2022-07-05 Thread Daniel Henrique Barboza
On 7/5/22 06:44, Mark Cave-Ayland wrote: On 05/07/2022 10:39, Daniel Henrique Barboza wrote: On 7/5/22 03:51, Mark Cave-Ayland wrote: On 04/07/2022 18:34, Cédric Le Goater wrote: On 7/2/22 15:34, Daniel Henrique Barboza wrote: On 7/2/22 03:24, Cédric Le Goater wrote: On 6/30/22 21:42,

[RFC PATCH] qobject: Rewrite implementation of QDict for in-order traversal

2022-07-05 Thread Markus Armbruster
QDict is implemented as a simple hash table of fixed size. Observe: * Slow for large n. Not sure this matters. * A QDict with n entries takes 4120 + n * 32 bytes on my box. Wastes space for small n, which is a common case. * Order of traversal depends on the hash function and on insertion

Re: [PULL 14/15] qdev: Base object creation on QDict rather than QemuOpts

2022-07-05 Thread Markus Armbruster
Markus Armbruster writes: > Peter Maydell writes: > >> On Fri, 15 Oct 2021 at 16:01, Kevin Wolf wrote: >>> QDicts are both what QMP natively uses and what the keyval parser >>> produces. Going through QemuOpts isn't useful for either one, so switch >>> the main device creation function to QDict

questions about QMP commands - "block-export-add" and "nbd-server-add"

2022-07-05 Thread Yu Zhang
Hi All, since QEMU-5.2, the QMP command "nbd-server-add" was deprecated and replaced with "block-export-add" [1]. Arguments for the two are different. For using "block-export-add", "id" and "node-name" are needed, of which "id" is "device" for "nbd-server-add", and "node-name" can be obtained fro

Re: Failure in iotest 183

2022-07-05 Thread Hanna Reitz
On 05.07.22 11:35, Thomas Huth wrote:  Hi! I've just hit a failure in iotest 183: --- /home/thuth/devel/qemu/tests/qemu-iotests/183.out +++ /home/thuth/tmp/qemu-build/tests/qemu-iotests/scratch/183/183.out.bad @@ -30,7 +30,7 @@     'arguments': { 'uri': 'unix:SOCK_DIR/migrate', 'blk': true

Re: Failure in iotest 183

2022-07-05 Thread Thomas Huth
On 05/07/2022 11.58, Hanna Reitz wrote: On 05.07.22 11:35, Thomas Huth wrote:  Hi! I've just hit a failure in iotest 183: --- /home/thuth/devel/qemu/tests/qemu-iotests/183.out +++ /home/thuth/tmp/qemu-build/tests/qemu-iotests/scratch/183/183.out.bad @@ -30,7 +30,7 @@     'arguments': { 'u

Re: [PATCH v8 05/20] job.c: add job_lock/unlock while keeping job.h intact

2022-07-05 Thread Vladimir Sementsov-Ogievskiy
In general looks good to me. On 6/29/22 17:15, Emanuele Giuseppe Esposito wrote: With "intact" we mean that all job.h functions implicitly take the lock. Therefore API callers are unmodified. This means that: - all static functions become _locked, and call _locked functions Some static functi

Re: [PATCH] tcg/tci: Remove CONFIG_DEBUG_TCG_INTERPRETER

2022-07-05 Thread Alex Bennée
Richard Henderson writes: > There is nothing in this environment variable that cannot > be done better with -d flags. There is nothing special > about TCI that warrants this hack. > > Moreover, it does not compile -- remove it. > > Reported-by: Song Gao > Signed-off-by: Richard Henderson Re

[PULL 08/14] tests: wait for migration completion before looking for STOP event

2022-07-05 Thread Thomas Huth
From: Daniel P. Berrangé When moving into the convergance phase, the precopy tests will first look for a STOP event and once found will look for migration completion status. If the test VM is not converging, the test suite will be waiting for the STOP event forever. If we wait for the migration c

[PULL 00/14] Testing and misc patches

2022-07-05 Thread Thomas Huth
Hi Richard! The following changes since commit dfe2382f0641f537fdd33399d579215077c8f68c: Merge tag 'kraxel-20220704-pull-request' of https://gitlab.com/kraxel/qemu into staging (2022-07-04 14:57:21 +0530) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-

[PULL 02/14] tests/fp: Do not build softfloat3 tests if TCG is disabled

2022-07-05 Thread Thomas Huth
From: Philippe Mathieu-Daudé Technically we don't need the TCG accelerator to run the softfloat3 tests. However it is unlikely an interesting build combination. Developers using softfloat3 likely use TCG too. Similarly, developers disabling TCG shouldn't mind much about softfloat3 tests. This re

[PULL 03/14] gitlab: normalize indentation in edk2/opensbi rules

2022-07-05 Thread Thomas Huth
From: Daniel P. Berrangé The edk2/opensbi gitlab CI config was using single space indents which is not consistent with the rest of the gitlab CI config files. Signed-off-by: Daniel P. Berrangé Reviewed-by: Richard Henderson Message-Id: <20220629170638.520630-2-berra...@redhat.com> Signed-off-b

[PULL 04/14] gitlab: tweak comments in edk2/opensbi jobs

2022-07-05 Thread Thomas Huth
From: Daniel P. Berrangé Get rid of comments stating the obvious and re-arrange remaining comments. The opensbi split of rules for file matches is also merged into one rule. Signed-off-by: Daniel P. Berrangé Reviewed-by: Richard Henderson Message-Id: <20220629170638.520630-3-berra...@redhat.co

[PULL 05/14] gitlab: honour QEMU_CI variable in edk2/opensbi jobs

2022-07-05 Thread Thomas Huth
From: Daniel P. Berrangé To preserve contributor CI credits we don't want jobs to run by default unless the QEMU_CI variable is set. For most jobs we can achieve this using the base template, but the edk2/opensbi jobs are a little special as they have some complex conditions we can't easily model

[PULL 10/14] tests: use consistent bandwidth/downtime limits in migration tests

2022-07-05 Thread Thomas Huth
From: Daniel P. Berrangé The different migration test cases are using a variety of settings to ensure convergance/non-convergance. Introduce two helpers to extra the common functionality and ensure consistency. * Non-convergance: 1ms downtime, 30mbs bandwidth * Convergance: 30s downtime, 1gb

[PULL 06/14] gitlab-ci: Extend timeout for ubuntu-20.04-s390x-all to 75m

2022-07-05 Thread Thomas Huth
From: Richard Henderson Recent runs have been taking just over the 60m default. Signed-off-by: Richard Henderson Message-Id: <20220606182436.410053-1-richard.hender...@linaro.org> Signed-off-by: Thomas Huth --- .gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml | 1 + 1 file changed, 1 insert

[PULL 01/14] tests: fix test-cutils leaks

2022-07-05 Thread Thomas Huth
From: Marc-André Lureau Reported by ASAN. Fixes commit cfb34489 ("cutils: add functions for IEC and SI prefixes"). Signed-off-by: Marc-André Lureau Reviewed-by: Peter Maydell Message-Id: <20220621083420.66365-1-marcandre.lur...@redhat.com> Signed-off-by: Thomas Huth --- tests/unit/test-cuti

[PULL 07/14] tests: wait max 120 seconds for migration test status changes

2022-07-05 Thread Thomas Huth
From: Daniel P. Berrangé Currently the wait_for_migration_fail and wait_for_migration_complete functions will spin in an infinite loop checking query-migrate status to detect a specific change/goal. This is fine when everything goes to plan, but when the unusual happens, these will hang the test

[PULL 12/14] po: add ukrainian translation

2022-07-05 Thread Thomas Huth
From: Andrij Mizyk Signed-off-by: Andrij Mizyk Message-Id: <20220613123758.13280-1-andmi...@gmail.com> Signed-off-by: Thomas Huth --- po/LINGUAS | 1 + po/uk.po | 75 ++ 2 files changed, 76 insertions(+) create mode 100644 po/uk.po diff

[PULL 14/14] include/qemu/host-utils: Remove unused code in the *_overflow wrappers

2022-07-05 Thread Thomas Huth
According to commit cec07c0b612975 the code in the #else paths was required for GCC < 5.0 and Clang < 3.8. We don't support such old compilers at all anymore, so we can remove these lines now. We keep the wrapper function, though, since they are easier to read and help to make sure that the paramet

[PULL 09/14] tests: increase migration test converge downtime to 30 seconds

2022-07-05 Thread Thomas Huth
From: Daniel P. Berrangé While 1 second might be enough to converge migration on a fast host, this is not guaranteed, especially if using TLS in the tests without hardware accelerated crypto available. Increasing the downtime to 30 seconds should guarantee it can converge in any sane scenario.

[PULL 13/14] meson.build: Require a recent version of libpng

2022-07-05 Thread Thomas Huth
According to https://gitlab.com/qemu-project/qemu/-/issues/1080#note_998088246 QEMU does not compile with older versions of libpng, so we should check for a good version in meson.build. According to repology.org, our supported host target operating systems ship these versions: Fedora

Re: [PATCH v4 20/45] target/arm: Implement SME LD1, ST1

2022-07-05 Thread Peter Maydell
On Tue, 5 Jul 2022 at 02:49, Richard Henderson wrote: > > On 7/4/22 16:09, Peter Maydell wrote: > >> +static void copy_vertical_h(void *vdst, const void *vsrc, size_t len) > >> +{ > >> +const uint16_t *src = vsrc; > >> +uint16_t *dst = vdst; > >> +size_t i; > >> + > >> +for (i = 0;

Re: [PATCH v8 06/20] job.h: define functions called without job lock held

2022-07-05 Thread Vladimir Sementsov-Ogievskiy
On 6/29/22 17:15, Emanuele Giuseppe Esposito wrote: These functions don't need a _locked() counterpart, since they are all called outside job.c and take the lock only internally. Update also the comments in blockjob.c (and move them in job.c). Still, that would be better as a separate patch.

Re: [PATCH v3 0/2] Fix IPI device emulation for LoongArch machine

2022-07-05 Thread Richard Henderson
On 7/5/22 12:18, Xiaojuan Yang wrote: Fix LoongArch IPI device emulation follwing Richard's advice based on v2 version: 1. Change ipi64_ops' valid.min_access_size to 8, as it only support 8 bytes writing. 2. Remove 'UL' prefix in send_ipi_data(). 3. Add a condition to skip the method of geting

Re: [PATCH] hw/rtc/ls7a_rtc: Drop unused inline functions

2022-07-05 Thread Richard Henderson
On 7/5/22 14:01, Thomas Huth wrote: I wonder why the other Clang-based CI jobs (running on Linux) did not complain about this...? I wondered about that too. We must be limiting them to a set of targets. r~ Reviewed-by: Thomas Huth

Re: [PATCH] linux-user: Add LoongArch to qemu_get_family()

2022-07-05 Thread Richard Henderson
On 7/5/22 12:29, Song Gao wrote: qemu_get_family() needs to add LoongArch support. Signed-off-by: Song Gao --- scripts/qemu-binfmt-conf.sh | 3 +++ 1 file changed, 3 insertions(+) Reviewed-by: Richard Henderson Applied. r~

Re: [PATCH v8 06/20] job.h: define functions called without job lock held

2022-07-05 Thread Vladimir Sementsov-Ogievskiy
To subject: hmm, the commit don't define any function.. -- Best regards, Vladimir

Re: [PATCH] tcg/tci: Fix enable-debug got an error

2022-07-05 Thread Richard Henderson
On 7/5/22 12:29, Song Gao wrote: When building tcg configure with --enable-tcg-interpreter and --enable-debug, We may got an error: In file included from ../tcg/tcg.c:432: /root/code/github/soft-qemu/qemu/tcg/tci/tcg-target.c.inc: In function 'tcg_target_init': /root/code/github/soft-qemu/qemu/

[PULL 1/6] hw/rtc/ls7a_rtc: Drop unused inline functions

2022-07-05 Thread Richard Henderson
Remove toy_val_to_time_mon and toy_val_to_time_year as unused, to avoid a build failure with clang. Remove all of the other inline markers too so that this does not creep back in. Reviewed-by: Song Gao Reviewed-by: Thomas Huth Signed-off-by: Richard Henderson --- hw/rtc/ls7a_rtc.c | 27 ++

Re: [PATCH v8 07/20] job.h: add _locked public functions

2022-07-05 Thread Vladimir Sementsov-Ogievskiy
First, to subject: no function is added in this commit Second, to my comment on previous patch: so, you decided to add "not held" comment to all functions, even that have public _locked() counterpart. Not sure we really need it, but it's OK. Anyway, let's just add all these comments together wi

[PULL 0/6] loongarch64 patch queue

2022-07-05 Thread Richard Henderson
The following changes since commit 1437479e5ee1a49ccd84cad9e7b010fb2ee9d805: Merge tag 'pull-la-20220704' of https://gitlab.com/rth7680/qemu into staging (2022-07-04 16:37:13 +0530) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-la-2022070

[PULL 3/6] scripts/qemu-binfmt-conf: Add LoongArch to qemu_get_family()

2022-07-05 Thread Richard Henderson
From: Song Gao qemu_get_family() needs to add LoongArch support. Signed-off-by: Song Gao Message-Id: <20220705065943.2353930-1-gaos...@loongson.cn> Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- scripts/qemu-binfmt-conf.sh | 3 +++ 1 file changed, 3 insertions(+) diff -

[PATCH] tcg/tci: Remove CONFIG_DEBUG_TCG_INTERPRETER

2022-07-05 Thread Richard Henderson
There is nothing in this environment variable that cannot be done better with -d flags. There is nothing special about TCI that warrants this hack. Moreover, it does not compile -- remove it. Reported-by: Song Gao Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 5 - tcg/tc

[PULL 5/6] hw/intc/loongarch_ipi: Fix ipi device access of 64bits

2022-07-05 Thread Richard Henderson
From: Xiaojuan Yang In general loongarch ipi device, 32bit registers is emulated, however for anysend/mailsend device only 64bit register access is supported. So separate the ipi memory region into two regions, including 32 bits and 64 bits. Signed-off-by: Xiaojuan Yang Message-Id: <20220705064

  1   2   3   >