[PATCH v17 06/13] scripts: add loongarch64 binfmt config

2022-06-16 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- scripts/qemu-binfmt-conf.sh | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 9cb723f443..1f4e2cd19d 100755 --- a/script

[PATCH v17 10/13] target/loongarch: remove unused include hw/loader.h

2022-06-16 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- target/loongarch/cpu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 0013582a3a..bf163a8dce 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -18,7 +18,6 @@ #inc

Re: [PATCH] target/riscv/pmp: guard against PMP ranges with a negative size

2022-06-16 Thread Nicolas Pitre
On Thu, 16 Jun 2022, Alistair Francis wrote: > On Thu, Jun 16, 2022 at 7:12 AM Nicolas Pitre wrote: > > > > For a TOR entry to match, the stard address must be lower than the end > > address. Normally this is always the case, but correct code might still > > run into the following scenario: > > >

[PATCH v17 05/13] linux-user: Add LoongArch cpu_loop support

2022-06-16 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- linux-user/loongarch64/cpu_loop.c | 96 + linux-user/loongarch64/target_cpu.h | 34 ++ 2 files changed, 130 insertions(+) create mode 100644 linux-user/loongarch64/cpu_

Re: Corrupted display changing screen colour depth in qemu-system-ppc/MacOS

2022-06-16 Thread Mark Cave-Ayland
On 16/06/2022 13:07, Gerd Hoffmann wrote: On Thu, Jun 16, 2022 at 09:54:46AM +0100, Mark Cave-Ayland wrote: Hi all, Howard pointed me off-list to a corrupted screen display issue experienced when changing the screen colour depth in MacOS under qemu-system-ppc. I was able to reproduce it here,

[PATCH v17 12/13] default-configs: Add loongarch linux-user support

2022-06-16 Thread Song Gao
This patch adds loongarch64 linux-user default configs file. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson Reviewed-by: WANG Xuerui --- configs/targets/loongarch64-linux-user.mak | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 configs/targets

[PATCH v17 08/13] target/loongarch: Fix missing update CSR_BADV

2022-06-16 Thread Song Gao
loongarch_cpu_do_interrupt() should update CSR_BADV for some EXCCODE. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- target/loongarch/cpu.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 4c8f96bc3a..

[PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-16 Thread Jinhao Fan
Implement Doorbel Buffer Config command (Section 5.7 in NVMe Spec 1.3) and Shadow Doorbel buffer & EventIdx buffer handling logic (Section 7.13 in NVMe Spec 1.3). For queues created before the Doorbell Buffer Config command, the nvme_dbbuf_config function tries to associate each existing SQ and CQ

[PATCH 0/9] Preliminary patches for subproject split

2022-06-16 Thread marcandre . lureau
From: Marc-André Lureau Hi, Here is another subset of the large "subproject(qga)"" series I intend to send soon after (https://gitlab.com/marcandre.lureau/qemu/-/commits/qga). Thanks Marc-André Lureau (9): monitor: make error_vprintf_unless_qmp() static error-report: misc comment fix err

[PATCH v17 09/13] target/loongarch: Fix helper_asrtle_d/asrtgt_d raise wrong exception

2022-06-16 Thread Song Gao
Raising EXCCODE_BCE instead of EXCCODE_ADEM for helper_asrtle_d/asrtgt_d. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- target/loongarch/cpu.c | 2 ++ target/loongarch/op_helper.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/target/loongarch/cpu.c b/

[PATCH 3/9] error-report: introduce "detailed" variable

2022-06-16 Thread marcandre . lureau
From: Marc-André Lureau Let's use a more explicit variable "detailed" instead of calling monitor_cur() multiple times. Signed-off-by: Marc-André Lureau --- util/error-report.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/util/error-report.c b/util/error-report.c ind

[PATCH v17 07/13] target/loongarch: remove badaddr from CPULoongArch

2022-06-16 Thread Song Gao
We can use CSR_BADV to replace badaddr. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- target/loongarch/cpu.h | 2 -- target/loongarch/gdbstub.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h index 71a5036c3c..

[PATCH 4/9] error-report: simplify print_loc()

2022-06-16 Thread marcandre . lureau
From: Marc-André Lureau Pass the program name as "prefix" argument to print_loc() if printing with "details". This allows to get rid of monitor_cur() call in print_loc(). Signed-off-by: Marc-André Lureau --- util/error-report.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) dif

Re: [QEMU PATCH v2 4/6] nvdimm: Implement ACPI NVDIMM Label Methods

2022-06-16 Thread Igor Mammedov
On Mon, 30 May 2022 11:40:45 +0800 Robert Hoo wrote: > Recent ACPI spec [1] has defined NVDIMM Label Methods _LS{I,R,W}, which > depricates corresponding _DSM Functions defined by PMEM _DSM Interface spec > [2]. > > In this implementation, we do 2 things > 1. Generalize the QEMU<->ACPI BIOS NVDI

Re: [QEMU PATCH v2 6/6] acpi/nvdimm: Define trace events for NVDIMM and substitute nvdimm_debug()

2022-06-16 Thread Igor Mammedov
On Mon, 30 May 2022 11:40:47 +0800 Robert Hoo wrote: suggest to put this patch as the 1st in series (well you can rebase it on current master and post that right away for merging since it doesn't really depend on other patches, and post new patches on top (whenever they are ready) will use tracin

[PATCH 2/9] error-report: misc comment fix

2022-06-16 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- util/error-report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/error-report.c b/util/error-report.c index 5edb2e604061..98f242b75bbf 100644 --- a/util/error-report.c +++ b/util/error-report.c @@ -390,7 +3

[PATCH 7/9] qapi: move QEMU-specific dispatch code in monitor

2022-06-16 Thread marcandre . lureau
From: Marc-André Lureau Make QMP-dispatch code free from QEMU-specific OOB dispatch/async coroutine handling. This will allow to move the base code to qemu-common, and clear other users from potential mis-ususe (QGA doesn't have OOB or coroutine). To do that, introduce an optional callback QmpDi

[PATCH v3 2/2] hw/nvme: Add trace events for shadow doorbell buffer

2022-06-16 Thread Jinhao Fan
When shadow doorbell buffer is enabled, doorbell registers are lazily updated. The actual queue head and tail pointers are stored in Shadow Doorbell buffers. Add trace events for updates on the Shadow Doorbell buffers and EventIdx buffers. Also add trace event for the Doorbell Buffer Config comman

[PATCH 1/9] monitor: make error_vprintf_unless_qmp() static

2022-06-16 Thread marcandre . lureau
From: Marc-André Lureau Not needed outside monitor.c. Remove the needless stub. Signed-off-by: Marc-André Lureau --- include/monitor/monitor.h | 1 - monitor/monitor.c | 3 ++- stubs/error-printf.c | 5 - 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/m

[PATCH v3 0/2] hw/nvme: Add shadow doorbell buffer support

2022-06-16 Thread Jinhao Fan
This patch adds shadow doorbell buffer support in NVMe 1.3 to QEMU NVMe. The Doorbell Buffer Config admin command is implemented for the guest to enable shadow doobell buffer. When this feature is enabled, each SQ/CQ is associated with two buffers, i.e., Shadow Doorbell buffer and EventIdx buffer.

[PATCH 8/9] scripts/qapi-gen: add -i option

2022-06-16 Thread marcandre . lureau
From: Marc-André Lureau Replace hard-coded "qemu/osdep.h" include with a qapi-gen option to specify the headers to include. This will allow to substitute QEMU osdep.h with glib.h for example, for projects with different global headers. For historical reasons, we can keep the default as "qemu/osd

[PATCH 6/9] error-report: add a callback to overwrite error_vprintf

2022-06-16 Thread marcandre . lureau
From: Marc-André Lureau error_vprintf() is implemented in monitor.c, which overrides the default implementation from stubs/, while avoiding a direct dependency to the monitor from error-report.c. However, the stub solution isn't working when moving error-report.c and stubs/error-printf.c in a co

Re: [PATCH 1/8] migration: Implemented new parameter stream_content

2022-06-16 Thread Nikita
On 6/16/22 1:32 PM, Daniel P. Berrangé wrote: On Thu, Jun 16, 2022 at 01:19:57PM +0300, nikita.laps...@openvz.org wrote: From: Nikita Lapshin This new optional parameter contains inormation about migration stream parts to be sent (such as RAM, block, bitmap). This looks better than using cap

[PATCH 5/9] error-report: introduce ErrorReportDetailedFunc

2022-06-16 Thread marcandre . lureau
From: Marc-André Lureau Remove monitor dependency from error printing code, by allowing programs to set a callback for when to use "detailed" reporting or not. Signed-off-by: Marc-André Lureau --- include/qemu/error-report.h | 4 +++- bsd-user/main.c | 2 +- linux

[PATCH 9/9] scripts/qapi: add required system includes to visitor

2022-06-16 Thread marcandre . lureau
From: Marc-André Lureau The generated visitor code includes abort() & assert(), we shouldn't rely on the global "-i" headers to include the necessary system headers. Signed-off-by: Marc-André Lureau --- scripts/qapi/visit.py | 4 1 file changed, 4 insertions(+) diff --git a/scripts/qapi/

Re: [PATCH v3 11/17] migration/qemu-file: Fix qemu_ftell() for non-writable file

2022-06-16 Thread Nikita
On 6/16/22 2:20 PM, Daniel P. Berrangé wrote: On Thu, Jun 16, 2022 at 01:28:05PM +0300, nikita.laps...@openvz.org wrote: From: Nikita Lapshin qemu_ftell() will return wrong value for non-writable QEMUFile. This happens due to call qemu_fflush() inside qemu_ftell(), this function won't flush

[PATCH v7 02/18] job.h: categorize fields in struct Job

2022-06-16 Thread 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 --- include/qemu/job.h | 61 +++--- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git

[PATCH v7 07/18] jobs: add job lock in find_* functions

2022-06-16 Thread 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 lock guard macros are *nop*. Signed

[PATCH v7 04/18] aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED

2022-06-16 Thread 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. Reviewed-by: Stefan Hajnoczi Signed-off-by: Emanuele Giuseppe Esposito --- include/block/aio-wait.h | 17 +

Re: [PATCH v5 1/5] hw/i386: add 4g boundary start to X86MachineState

2022-06-16 Thread Igor Mammedov
On Fri, 20 May 2022 11:45:28 +0100 Joao Martins wrote: > Rather than hardcoding the 4G boundary everywhere, introduce a > X86MachineState property @above_4g_mem_start and use it so far it's just field not a property /fix commit message/ > accordingly. > > This is in preparation for relocating r

[PATCH v7 14/18] commit and mirror: create new nodes using bdrv_get_aio_context, and not the job aiocontext

2022-06-16 Thread Emanuele Giuseppe Esposito
We are always using the given bs AioContext, so there is no need to take the job ones (which is identical anyways). This also reduces the point we need to check when protecting job.aio_context field. Reviewed-by: Stefan Hajnoczi Signed-off-by: Emanuele Giuseppe Esposito --- block/commit.c | 4 +

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

2022-06-16 Thread Emanuele Giuseppe Esposito
Just as for the job API, rename block_job functions that are always called under job lock. No functional change intended. Signed-off-by: Emanuele Giuseppe Esposito --- block.c | 3 ++- block/backup.c | 4 ++-- blockdev.c | 12 +++- blockjob.c

[PATCH v7 01/18] job.c: make job_mutex and job_lock/unlock() public

2022-06-16 Thread 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 from aiocontext to job lock, introduce

[PATCH v7 18/18] block_job_query: remove atomic read

2022-06-16 Thread 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. Reviewed-by: Stefan Hajnoczi Signed-off-by: Emanuele Giuseppe Esposito --- blockjob.c | 2 +- 1 file changed, 1 insertion(+)

Re: misaligned-pointer-use libslirp/src/tcp_input.c

2022-06-16 Thread Alexander Bulekov
Is this an --enable-sanitizers build? The virtual-device fuzzer catches these periodically while fuzzing network-devices. However I don't think OSS-Fuzz creates reports for them for some reason. I can create qtest reproducers, if that is useful. -Alex On 220615 0942, Patrick Venture wrote: > Hey

[PATCH v7 06/18] jobs: protect jobs with job_lock/unlock

2022-06-16 Thread Emanuele Giuseppe Esposito
Introduce the job locking mechanism through the whole job API, following the comments in job.h and requirements of job-monitor (like the functions in job-qmp.c, assume lock is held) and job-driver (like in mirror.c and all other JobDriver, lock is not held). Use the _locked helpers introduced bef

Re: [PATCH 1/8] migration: Implemented new parameter stream_content

2022-06-16 Thread Daniel P . Berrangé
On Thu, Jun 16, 2022 at 03:53:29PM +0300, Nikita wrote: > > On 6/16/22 1:32 PM, Daniel P. Berrangé wrote: > > On Thu, Jun 16, 2022 at 01:19:57PM +0300, nikita.laps...@openvz.org wrote: > > > From: Nikita Lapshin > > > > > > This new optional parameter contains inormation about migration > > > st

[PATCH v7 08/18] jobs: use job locks also in the unit tests

2022-06-16 Thread Emanuele Giuseppe Esposito
Add missing job synchronization in the unit tests, with explicit locks. Note: at this stage, job_{lock/unlock} and job lock guard macros are *nop*. Signed-off-by: Emanuele Giuseppe Esposito --- tests/unit/test-bdrv-drain.c | 76 - tests/unit/test-block-iothread.c |

[PATCH v7 17/18] job.c: enable job lock/unlock and remove Aiocontext locks

2022-06-16 Thread 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, reduce the locking section as much as po

Re: [PATCH 0/9] Preliminary patches for subproject split

2022-06-16 Thread Paolo Bonzini
On 6/16/22 14:40, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Hi, Here is another subset of the large "subproject(qga)"" series I intend to send soon after (https://gitlab.com/marcandre.lureau/qemu/-/commits/qga). Hi, I took a peek there and I have a question. While the conf

[PATCH v7 00/18] job: replace AioContext lock with job_mutex

2022-06-16 Thread Emanuele Giuseppe Esposito
In this series, we want to remove the AioContext lock and instead use the already existent job_mutex to protect the job structures and list. This is part of the work to get rid of AioContext lock usage in favour of smaller granularity locks. In order to simplify reviewer's job, job lock/unlock fun

[PATCH v7 16/18] jobs: protect job.aio_context with BQL and job_mutex

2022-06-16 Thread 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 paused). For this reason, introduce job_set

Re: [PATCH v5 3/5] i386/pc: pass pci_hole64_size to pc_memory_init()

2022-06-16 Thread Igor Mammedov
On Fri, 20 May 2022 11:45:30 +0100 Joao Martins wrote: > Use the pre-initialized pci-host qdev and fetch the > pci-hole64-size into pc_memory_init() newly added argument. > piix needs a bit of care given all the !pci_enabled() > and that the pci_hole64_size is private to i440fx. > > This is in p

[PATCH v7 15/18] job: detect change of aiocontext within job coroutine

2022-06-16 Thread Emanuele Giuseppe Esposito
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

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

2022-06-16 Thread 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(). Reviewed-by: Stefan Hajnoczi Signed-off-by: Emanuele Giuseppe Esposito --- include/qemu/job.h | 18 -- job.c | 22 +++--- 2 files change

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

2022-06-16 Thread Emanuele Giuseppe Esposito
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 using the job API). Therefore create a _locked version of such function, so that it

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

2022-06-16 Thread Emanuele Giuseppe Esposito
With the *nop* job_lock/unlock placed, rename the static functions that are always under job_mutex, adding "_locked" suffix. List of functions that get this suffix: job_txn_refjob_txn_del_job job_txn_apply job_state_transition job_should_pause job_event_cance

[PATCH v7 09/18] block/mirror.c: use of job helpers in drivers to avoid TOC/TOU

2022-06-16 Thread Emanuele Giuseppe Esposito
Once job lock is used and aiocontext is removed, mirror has to perform job operations under the same critical section, using the helpers prepared in previous commit. Note: at this stage, job_{lock/unlock} and job lock guard macros are *nop*. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by:

Re: [PATCH v5 2/5] i386/pc: create pci-host qdev prior to pc_memory_init()

2022-06-16 Thread Reviewed-by: Igor Mammedov
On Fri, 20 May 2022 11:45:29 +0100 Joao Martins wrote: > At the start of pc_memory_init() we usually pass a range of > 0..UINT64_MAX as pci_memory, when really its 2G (i440fx) or > 32G (q35). To get the real user value, we need to get pci-host > passed property for default pci_hole64_size. Thus t

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

2022-06-16 Thread Emanuele Giuseppe Esposito
With the *nop* job_lock/unlock placed, rename the job functions of the job API that are always under job_mutex, adding "_locked" suffix. List of functions that get this suffix: job_txn_unref job_txn_add_job job_ref job_unref job_enter_cond job_finish_sync job_is_

Re: [PATCH 1/8] migration: Implemented new parameter stream_content

2022-06-16 Thread Nikita
On 6/16/22 4:10 PM, Daniel P. Berrangé wrote: On Thu, Jun 16, 2022 at 03:53:29PM +0300, Nikita wrote: On 6/16/22 1:32 PM, Daniel P. Berrangé wrote: On Thu, Jun 16, 2022 at 01:19:57PM +0300, nikita.laps...@openvz.org wrote: From: Nikita Lapshin This new optional parameter contains inormatio

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

2022-06-16 Thread Emanuele Giuseppe Esposito
All these functions assume that the lock is not held, and acquire it internally. These functions will be useful when job_lock is globally applied, as they will allow callers to access the job struct fields without worrying about the job lock. Update also the comments in blockjob.c (and move them

Re: [PATCH 0/9] Preliminary patches for subproject split

2022-06-16 Thread Marc-André Lureau
Hi On Thu, Jun 16, 2022 at 5:12 PM Paolo Bonzini wrote: > > On 6/16/22 14:40, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Hi, > > > > Here is another subset of the large "subproject(qga)"" series I intend to > > send > > soon after (https://gitlab.com/marcandre.lureau

Re: [PATCH 0/4] hw/nvme: add support for TP4084

2022-06-16 Thread Keith Busch
On Thu, Jun 16, 2022 at 12:42:49PM +0200, Klaus Jensen wrote: > On Jun 8 03:28, Niklas Cassel via wrote: > > Hello there, > > > > considering that Linux v5.19-rc1 is out which includes support for > > NVMe TP4084: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drive

Re: [PATCH v5 3/5] i386/pc: pass pci_hole64_size to pc_memory_init()

2022-06-16 Thread Michael S. Tsirkin
On Thu, Jun 16, 2022 at 03:30:14PM +0200, Igor Mammedov wrote: > On Fri, 20 May 2022 11:45:30 +0100 > Joao Martins wrote: > > > Use the pre-initialized pci-host qdev and fetch the > > pci-hole64-size into pc_memory_init() newly added argument. > > piix needs a bit of care given all the !pci_enabl

[PATCH v11 0/2] arm/virt: CXL support via pxb_cxl

2022-06-16 Thread Jonathan Cameron via
Previously patches 40 and 41 of [PATCH v10 00/45] CXl 2.0 emulation Support https://lore.kernel.org/qemu-devel/20220429144110.25167-45-jonathan.came...@huawei.com/#r Now the base CXL support including for x86/pc is upstream (patches 1-39) there are no dependencies between the next few CXL elements

[PATCH v11 1/2] hw/arm/virt: Basic CXL enablement on pci_expander_bridge instances pxb-cxl

2022-06-16 Thread Jonathan Cameron via
Code based on i386/pc enablement. The memory layout places space for 16 host bridge register regions after the GIC_REDIST2 in the extended memmap. The CFMWs are placed above the extended memmap. Only create the CEDT table if cxl=on set for the machine. Signed-off-by: Jonathan Cameron --- hw/ar

[PATCH v11 2/2] qtest/cxl: Add aarch64 virt test for CXL

2022-06-16 Thread Jonathan Cameron via
Add a single complex case for aarch64 virt machine. Signed-off-by: Jonathan Cameron --- tests/qtest/cxl-test.c | 48 + tests/qtest/meson.build | 1 + 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/tests/qtest/cxl-test.c b/tests/qtest/cxl

Re: [PATCH v5 4/5] i386/pc: relocate 4g start to 1T where applicable

2022-06-16 Thread Igor Mammedov
On Fri, 20 May 2022 11:45:31 +0100 Joao Martins wrote: > It is assumed that the whole GPA space is available to be DMA > addressable, within a given address space limit, expect for a ^^^ typo? > tiny region before the 4G. Since Linux v5.4, VFIO

[PATCH v2 03/10] qga: treat get-guest-fsinfo as "best effort"

2022-06-16 Thread John Snow
In some container environments, there may be references to block devices witnessable from a container through /proc/self/mountinfo that reference devices we simply don't have access to in the container, and could not provide information about. Instead of failing the entire fsinfo command, return s

[PATCH v2 00/10] Improve reliability of VM tests

2022-06-16 Thread John Snow
This patch series attempts to improve the reliability of several of the VM test targets. In particular, both CentOS 8 tests are non-functional because CentOS 8 was EOL at the beginning of this calendar year, with repositories and mirrors going offline. Notably, I also remove the ubuntu.i386 test b

[PATCH v2 04/10] tests/vm: use 'cp' instead of 'ln' for temporary vm images

2022-06-16 Thread John Snow
If the initial setup fails, you've permanently altered the state of the downloaded image in an unknowable way. Use 'cp' like our other test setup scripts do. Signed-off-by: John Snow Reviewed-by: Thomas Huth --- tests/vm/centos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v2 08/10] tests/vm: remove ubuntu.i386 VM test

2022-06-16 Thread John Snow
Ubuntu 18.04 is out of our support window, and Ubuntu 20.04 does not support i386 anymore. The debian project does, but they do not provide any cloud images for it, a new expect-style script would have to be written. Since we have i386 cross-compiler tests hosted on GitLab CI, we don't need to sup

[PATCH v2 09/10] tests/vm: remove duplicate 'centos' VM test

2022-06-16 Thread John Snow
This is listed twice by accident; we require genisoimage to run the test, so remove the unconditional entry. Signed-off-by: John Snow --- tests/vm/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 70ee

[PATCH v2 05/10] tests/vm: switch CentOS 8 to CentOS 8 Stream

2022-06-16 Thread John Snow
The old CentOS image didn't work anymore because it was already EOL at the beginning of 2022. Signed-off-by: John Snow Reviewed-by: Thomas Huth --- tests/vm/centos | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/vm/centos b/tests/vm/centos index be4f6ff2f14..3a52

[PATCH v2 01/10] tests/qemu-iotests: hotfix for 307, 223 output

2022-06-16 Thread John Snow
Fixes: 58a6fdcc Signed-off-by: John Snow Tested-by: Daniel P. Berrangé Reviewed-by: Daniel P. Berrangé --- tests/qemu-iotests/223.out | 4 ++-- tests/qemu-iotests/307.out | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/223.out b/tests/qemu-iotests/223

[PATCH v2 10/10] tests/vm: add 512MB extra memory per core

2022-06-16 Thread John Snow
If you try to run a 16 or 32 threaded test, you're going to run out of memory very quickly with qom-test and a few others. Bump the memory limit to try to scale with larger-core machines. Add this magic in early to the configuration process so that the config file, if provided, can still override

Re: [PATCH v2 03/10] qga: treat get-guest-fsinfo as "best effort"

2022-06-16 Thread Marc-André Lureau
Hi On Thu, Jun 16, 2022 at 6:27 PM John Snow wrote: > In some container environments, there may be references to block devices > witnessable from a container through /proc/self/mountinfo that reference > devices we simply don't have access to in the container, and could not > provide information

[PATCH v2 02/10] tests/qemu-iotests: skip 108 when FUSE is not loaded

2022-06-16 Thread John Snow
In certain container environments we may not have FUSE at all, so skip the test in this circumstance too. Signed-off-by: John Snow --- tests/qemu-iotests/108 | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/108 b/tests/qemu-iotests/108 index 9e923d6a59f..54e935acf28 10

[PATCH v2 07/10] tests/vm: update sha256sum for ubuntu.aarch64

2022-06-16 Thread John Snow
This checksum changes weekly; use a fixed point image and update the checksum so we don't have to re-download it quite so much. Note: Just like the centos.aarch64 test, this test currently seems very flaky when run as a TCG test. Signed-off-by: John Snow --- tests/vm/ubuntu.aarch64 | 8 ++--

Re: [PATCH v2 03/10] qga: treat get-guest-fsinfo as "best effort"

2022-06-16 Thread John Snow
On Thu, Jun 16, 2022 at 10:36 AM Marc-André Lureau wrote: > > Hi > > On Thu, Jun 16, 2022 at 6:27 PM John Snow wrote: >> >> In some container environments, there may be references to block devices >> witnessable from a container through /proc/self/mountinfo that reference >> devices we simply don

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

2022-06-16 Thread Igor Mammedov
On Fri, 20 May 2022 11:45:32 +0100 Joao Martins 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_DEVICE_REQUEST > or possibly other kinds of IOMMU ev

Re: [PATCH V8 01/39] migration: fix populate_vfio_info

2022-06-16 Thread Marc-André Lureau
On Wed, Jun 15, 2022 at 7:20 PM Steve Sistare wrote: > Include CONFIG_DEVICES so that populate_vfio_info is instantiated for > CONFIG_VFIO. > > Signed-off-by: Steve Sistare > Fixes: 43bd0bf30fce ("migration: Move populate_vfio_info() into a separate file") Reviewed-by: Marc-André Lureau ---

Re: [PULL v2 25/86] hw/cxl/component: Implement host bridge MMIO (8.2.5, table 142)

2022-06-16 Thread Igor Mammedov
On Mon, 16 May 2022 16:51:34 -0400 "Michael S. Tsirkin" wrote: > From: Ben Widawsky > > CXL host bridges themselves may have MMIO. Since host bridges don't have > a BAR they are treated as special for MMIO. This patch includes > i386/pc support. > Also hook up the device reset now that we have

[PATCH v11 1/3] pci-bridge/cxl_upstream: Add a CXL switch upstream port

2022-06-16 Thread Jonathan Cameron via
An initial simple upstream port emulation to allow the creation of CXL switches. The Device ID has been allocated for this use. Signed-off-by: Jonathan Cameron --- hw/pci-bridge/cxl_upstream.c | 216 +++ hw/pci-bridge/meson.build| 2 +- include/hw/cxl/cxl.h

[PATCH v11 2/3] pci-bridge/cxl_downstream: Add a CXL switch downstream port

2022-06-16 Thread Jonathan Cameron via
Emulation of a simple CXL Switch downstream port. The Device ID has been allocated for this use. Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-host.c | 43 +- hw/pci-bridge/cxl_downstream.c | 249 + hw/pci-bridge/meson.build | 2 +- 3 fil

[PATCH v11 0/3] hw/pci-bridge/cxl: Add CXL Switches.

2022-06-16 Thread Jonathan Cameron via
Previously sent as patches 43-45 of [PATCH v10 00/45] CXl 2.0 emulation Support https://lore.kernel.org/qemu-devel/20220429144110.25167-45-jonathan.came...@huawei.com/#r Now the initial CXL support is upstream, patch sets applying to different parts of the CXL infrastructure can be reviewed / appl

[PATCH v11 3/3] docs/cxl: Add switch documentation

2022-06-16 Thread Jonathan Cameron via
Switches were already introduced, but now we support them update the documentation to provide an example in diagram and qemu command line parameter forms. Signed-off-by: Jonathan Cameron --- docs/system/devices/cxl.rst | 88 - 1 file changed, 86 insertions(+),

Re: [PATCH V8 02/39] migration: qemu file wrappers

2022-06-16 Thread Marc-André Lureau
Hi On Wed, Jun 15, 2022 at 6:54 PM Steve Sistare wrote: > Add qemu_file_open and qemu_fd_open to create QEMUFile objects for unix > files and file descriptors. > File descriptors are not really unix specific, but that's a detail. The names of the functions in the summary do not match the code,

Re: [PATCH V8 03/39] migration: simplify savevm

2022-06-16 Thread Marc-André Lureau
Hi On Wed, Jun 15, 2022 at 6:57 PM Steve Sistare wrote: > Use qemu_file_open to simplify a few functions in savevm.c. > No functional change. > > Signed-off-by: Steve Sistare > Reviewed-by: Dr. David Alan Gilbert > (ok, I get why you keep the mode_t in fopen) Reviewed-by: Marc-André Lureau

Re: [PATCH V8 02/39] migration: qemu file wrappers

2022-06-16 Thread Daniel P . Berrangé
On Wed, Jun 15, 2022 at 07:51:49AM -0700, Steve Sistare wrote: > Add qemu_file_open and qemu_fd_open to create QEMUFile objects for unix > files and file descriptors. > > Signed-off-by: Steve Sistare > --- > migration/qemu-file-channel.c | 36 > migration/qem

Re: [PATCH 0/4] Multiple interface support on top of Multi-FD

2022-06-16 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Wed, Jun 15, 2022 at 05:43:28PM +0100, Daniel P. Berrangé wrote: > > On Fri, Jun 10, 2022 at 05:58:31PM +0530, manish.mishra wrote: > > > > > > On 09/06/22 9:17 pm, Daniel P. Berrangé wrote: > > > > On Thu, Jun 09, 2022 at 07:33:01AM +, He

Re: [PATCH V8 05/39] vl: start on wakeup request

2022-06-16 Thread Marc-André Lureau
Hi On Wed, Jun 15, 2022 at 7:27 PM Steve Sistare wrote: > If qemu starts and loads a VM in the suspended state, then a later wakeup > request will set the state to running, which is not sufficient to > initialize > the vm, as vm_start was never called during this invocation of qemu. See > qemu_

Re: [PATCH V8 13/39] oslib: qemu_clear_cloexec

2022-06-16 Thread Marc-André Lureau
On Wed, Jun 15, 2022 at 7:01 PM Steve Sistare wrote: > Define qemu_clear_cloexec, analogous to qemu_set_cloexec. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Steve Sistare > Reviewed-by: Marc-André Lureau > --- > include/qemu/osdep.h | 1 + > util/oslib-posix.c | 9 +

Re: [PATCH V8 15/39] qapi: QAPI_LIST_LENGTH

2022-06-16 Thread Marc-André Lureau
Hi On Wed, Jun 15, 2022 at 7:38 PM Steve Sistare wrote: > Signed-off-by: Steve Sistare > Reviewed-by: Marc-André Lureau > --- > include/qapi/util.h | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/include/qapi/util.h b/include/qapi/util.h > index 7d88b09..75dddca 100

Re: [PATCH V8 14/39] qapi: strList_from_string

2022-06-16 Thread Marc-André Lureau
Hi On Wed, Jun 15, 2022 at 7:04 PM Steve Sistare wrote: > Generalize strList_from_comma_list() to take any delimiter character, > rename > as strList_from_string(), and move it to qapi/util.c. > > No functional change. > > Signed-off-by: Steve Sistare > --- > include/qapi/util.h | 9 +

Re: [PATCH V8 16/39] qapi: strv_from_strList

2022-06-16 Thread Marc-André Lureau
Hi On Wed, Jun 15, 2022 at 7:30 PM Steve Sistare wrote: > Signed-off-by: Steve Sistare > --- > include/qapi/util.h | 6 ++ > qapi/qapi-util.c| 14 ++ > 2 files changed, 20 insertions(+) > > diff --git a/include/qapi/util.h b/include/qapi/util.h > index 75dddca..51ff64e 100

Re: [PATCH V8 13/39] oslib: qemu_clear_cloexec

2022-06-16 Thread Daniel P . Berrangé
On Wed, Jun 15, 2022 at 07:52:00AM -0700, Steve Sistare wrote: > Define qemu_clear_cloexec, analogous to qemu_set_cloexec. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Steve Sistare > --- > include/qemu/osdep.h | 1 + > util/oslib-posix.c | 9 + > util/oslib-win32.c | 4

Re: [PULL 00/21] Statistics, preconfig and cleanup patches for 2022-06-16

2022-06-16 Thread Richard Henderson
On 6/16/22 01:31, Paolo Bonzini wrote: The following changes since commit debd0753663bc89c86f5462a53268f2e3f680f60: Merge tag 'pull-testing-next-140622-1' of https://github.com/stsquad/qemu into staging (2022-06-13 21:10:57 -0700) are available in the Git repository at: https://gitlab.c

Re: [PATCH V8 17/39] qapi: strList unit tests

2022-06-16 Thread Marc-André Lureau
On Wed, Jun 15, 2022 at 6:58 PM Steve Sistare wrote: > Signed-off-by: Steve Sistare > Reviewed-by: Marc-André Lureau > --- > MAINTAINERS | 1 + > tests/unit/meson.build| 1 + > tests/unit/test-strlist.c | 81 > +++ > 3 files ch

Re: [PATCH 0/4] hw/nvme: add support for TP4084

2022-06-16 Thread Klaus Jensen
On Jun 16 07:57, Keith Busch wrote: > On Thu, Jun 16, 2022 at 12:42:49PM +0200, Klaus Jensen wrote: > > On Jun 8 03:28, Niklas Cassel via wrote: > > > Hello there, > > > > > > considering that Linux v5.19-rc1 is out which includes support for > > > NVMe TP4084: > > > https://git.kernel.org/pub/sc

Re: [PATCH 01/20] io: add a QIOChannelNull equivalent to /dev/null

2022-06-16 Thread Daniel P . Berrangé
On Tue, May 24, 2022 at 04:14:31PM -0500, Eric Blake wrote: > On Tue, May 24, 2022 at 12:02:16PM +0100, Daniel P. Berrangé wrote: > > This is for code which needs a portable equivalent to a QIOChannelFile > > connected to /dev/null. > > > > Signed-off-by: Daniel P. Berrangé > > --- > > include/i

Re: misaligned-pointer-use libslirp/src/tcp_input.c

2022-06-16 Thread Patrick Venture
On Thu, Jun 16, 2022 at 6:31 AM Alexander Bulekov wrote: > Is this an --enable-sanitizers build? The virtual-device fuzzer catches > Yeah - it should be reproducible with a sanitizers build from HEAD -- I can try to get a manual instance going again without automation to try and reproduce it. W

Re: [Phishing Risk] [External] Re: [PATCH 4/7] crypto: Add ECDSA key parser

2022-06-16 Thread Michael S. Tsirkin
On Tue, Jun 14, 2022 at 09:43:59AM +0800, 何磊 wrote: > Hi Philippe, lots of thanks for your review! > > > On Jun 13, 2022, at 10:19 PM, Philippe Mathieu-Daudé > > wrote: > > > > On 13/6/22 10:45, Lei He wrote: > >> Add ECDSA key parser and ECDSA signautre parser. > >> Signed-off-by: lei he > >>

Re: [PATCH 4/8] virtio: categorize callbacks in GS

2022-06-16 Thread Michael S. Tsirkin
On Thu, Jun 09, 2022 at 10:37:23AM -0400, Emanuele Giuseppe Esposito wrote: > All the callbacks below are always running in the main loop. > > The callbacks are the following: > - start/stop_ioeventfd: these are the callbacks where > blk_set_aio_context(iothread) is done, so they are called in t

[PULL 00/10] virtio,pc,pci: fixes,cleanups,features

2022-06-16 Thread Michael S. Tsirkin
The following changes since commit def6fd6c9ce9e00a30cdd0066e0fde206b3f3d2f: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2022-06-16 07:13:04 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for

[PULL 03/10] docs/cxl: Add switch documentation

2022-06-16 Thread Michael S. Tsirkin
From: Jonathan Cameron Switches were already introduced, but now we support them update the documentation to provide an example in diagram and qemu command line parameter forms. Signed-off-by: Jonathan Cameron Message-Id: <20220616145126.8002-4-jonathan.came...@huawei.com> Signed-off-by: Michae

[PULL 06/10] virtio-iommu: Use recursive lock to avoid deadlock

2022-06-16 Thread Michael S. Tsirkin
From: Zhenzhong Duan When switching address space with mutex lock hold, mapping will be replayed for assigned device. This will trigger relock deadlock. Also release the mutex resource in unrealize routine. Signed-off-by: Zhenzhong Duan Message-Id: <20220613061010.2674054-3-zhenzhong.d...@inte

[PULL 01/10] pci-bridge/cxl_upstream: Add a CXL switch upstream port

2022-06-16 Thread Michael S. Tsirkin
From: Jonathan Cameron An initial simple upstream port emulation to allow the creation of CXL switches. The Device ID has been allocated for this use. Signed-off-by: Jonathan Cameron Message-Id: <20220616145126.8002-2-jonathan.came...@huawei.com> Signed-off-by: Michael S. Tsirkin Reviewed-by:

[PULL 02/10] pci-bridge/cxl_downstream: Add a CXL switch downstream port

2022-06-16 Thread Michael S. Tsirkin
From: Jonathan Cameron Emulation of a simple CXL Switch downstream port. The Device ID has been allocated for this use. Signed-off-by: Jonathan Cameron Message-Id: <20220616145126.8002-3-jonathan.came...@huawei.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Michael S. Tsirkin Signed-off-

<    1   2   3   >