Re: [RFC 02/10] vhost: add 3 commands for vhost-vdpa

2022-01-04 Thread Jason Wang
On Wed, Jan 5, 2022 at 3:02 PM Michael S. Tsirkin wrote: > > On Wed, Jan 05, 2022 at 12:35:53PM +0800, Jason Wang wrote: > > On Wed, Jan 5, 2022 at 8:59 AM Longpeng(Mike) wrote: > > > > > > From: Longpeng > > > > > > To support generic vdpa deivce, we need add the following ioctls: > > > -

Re: Re: [PATCH 4/5] usb: allow max 8192 bytes for desc

2022-01-04 Thread zhenwei pi
On 1/4/22 11:22 PM, Philippe Mathieu-Daudé wrote: On 27/12/21 15:27, zhenwei pi wrote: A device of USB video class usually uses larger desc structure, so use larger buffer to avoid failure. Signed-off-by: zhenwei pi ---   hw/usb/desc.c | 15 ---   hw/usb/desc.h |  1 +   2 files

Re: Re: [PATCH 0/5] Introduce camera subsystem and USB video device

2022-01-04 Thread zhenwei pi
On 1/4/22 9:39 PM, Daniel P. Berrangé wrote: On Mon, Dec 27, 2021 at 10:27:29PM +0800, zhenwei pi wrote: 1, The full picture of this patch set: +-+ ++ +---+ |UVC(done)| |virtio(TODO)| |other HW device| +-+

Re: [RFC 02/10] vhost: add 3 commands for vhost-vdpa

2022-01-04 Thread Michael S. Tsirkin
On Wed, Jan 05, 2022 at 12:35:53PM +0800, Jason Wang wrote: > On Wed, Jan 5, 2022 at 8:59 AM Longpeng(Mike) wrote: > > > > From: Longpeng > > > > To support generic vdpa deivce, we need add the following ioctls: > > - GET_VECTORS_NUM: the count of vectors that supported > > Does this mean MSI

Re: [PATCH v2 1/2] linux-user/ppc: deliver SIGTRAP on POWERPC_EXCP_TRAP

2022-01-04 Thread Cédric Le Goater
On 1/4/22 22:00, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst Handle POWERPC_EXCP_TRAP in cpu_loop to deliver SIGTRAP on tw[i]/td[i]. The si_code comes from do_program_check in the kernel source file arch/powerpc/kernel/traps.c Signed-off-by: Matheus Ferst ---

Re: [RFC 02/10] vhost: add 3 commands for vhost-vdpa

2022-01-04 Thread Jason Wang
在 2022/1/5 下午2:40, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) 写道: -Original Message- From: Jason Wang [mailto:jasow...@redhat.com] Sent: Wednesday, January 5, 2022 12:36 PM To: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) Cc: Stefan Hajnoczi ; mst ;

RE: [RFC 02/10] vhost: add 3 commands for vhost-vdpa

2022-01-04 Thread longpeng2--- via
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Wednesday, January 5, 2022 12:36 PM > To: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > > Cc: Stefan Hajnoczi ; mst ; Stefano > Garzarella ; Cornelia Huck ; pbonzini > ; Gonglei (Arei) ; Yechuan

Re: [PATCH v3 kvm/queue 14/16] KVM: Handle page fault for private memory

2022-01-04 Thread Chao Peng
On Tue, Jan 04, 2022 at 06:06:12PM +0800, Yan Zhao wrote: > On Tue, Jan 04, 2022 at 05:10:08PM +0800, Chao Peng wrote: > > On Tue, Jan 04, 2022 at 09:46:35AM +0800, Yan Zhao wrote: > > > On Thu, Dec 23, 2021 at 08:30:09PM +0800, Chao Peng wrote: > > > > When a page fault from the secondary page

Re: [RFC 01/10] virtio: get class_id and pci device id by the virtio id

2022-01-04 Thread Jason Wang
On Wed, Jan 5, 2022 at 1:48 PM Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: > > > > > -Original Message- > > From: Jason Wang [mailto:jasow...@redhat.com] > > Sent: Wednesday, January 5, 2022 12:38 PM > > To: Longpeng (Mike, Cloud Infrastructure Service Product

Re: [PATCH v3 kvm/queue 11/16] KVM: Add kvm_map_gfn_range

2022-01-04 Thread Chao Peng
On Tue, Jan 04, 2022 at 05:31:30PM +, Sean Christopherson wrote: > On Fri, Dec 31, 2021, Chao Peng wrote: > > On Fri, Dec 24, 2021 at 12:13:51PM +0800, Chao Peng wrote: > > > On Thu, Dec 23, 2021 at 06:06:19PM +, Sean Christopherson wrote: > > > > On Thu, Dec 23, 2021, Chao Peng wrote: > >

Re: [PATCH v3 kvm/queue 05/16] KVM: Maintain ofs_tree for fast memslot lookup by file offset

2022-01-04 Thread Chao Peng
On Tue, Jan 04, 2022 at 05:43:50PM +, Sean Christopherson wrote: > On Fri, Dec 31, 2021, Chao Peng wrote: > > On Tue, Dec 28, 2021 at 09:48:08PM +, Sean Christopherson wrote: > > >KVM handles > > > reverse engineering the memslot to get the offset and whatever else it > > > needs. > > >

Re: [PATCH v3 kvm/queue 03/16] mm/memfd: Introduce MEMFD_OPS

2022-01-04 Thread Chao Peng
On Tue, Jan 04, 2022 at 05:38:38PM +, Sean Christopherson wrote: > On Fri, Dec 31, 2021, Chao Peng wrote: > > On Fri, Dec 24, 2021 at 11:53:15AM +0800, Robert Hoo wrote: > > > On Thu, 2021-12-23 at 20:29 +0800, Chao Peng wrote: > > > > From: "Kirill A. Shutemov" > > > > > > > > +static void

RE: [RFC 01/10] virtio: get class_id and pci device id by the virtio id

2022-01-04 Thread longpeng2--- via
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Wednesday, January 5, 2022 12:38 PM > To: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > > Cc: Stefan Hajnoczi ; mst ; Stefano > Garzarella ; Cornelia Huck ; pbonzini > ; Gonglei (Arei) ; Yechuan

[PATCH] common-user: Really fix i386 calls to safe_syscall_set_errno_tail

2022-01-04 Thread Richard Henderson
Brown bag time: offset 0 from esp is the return address, offset 4 is the first argument. Fixes: d7478d4229f0 ("common-user: Fix tail calls to safe_syscall_set_errno_tail") Signed-off-by: Richard Henderson --- Ho hum. I'm disappointed that our CI didn't catch this, despite cross-i386-user.

Re: [RFC 01/10] virtio: get class_id and pci device id by the virtio id

2022-01-04 Thread Jason Wang
On Wed, Jan 5, 2022 at 8:59 AM Longpeng(Mike) wrote: > > From: Longpeng > > Add helpers to get the "Transitional PCI Device ID" and "class_id" of the > deivce which is specificed by the "Virtio Device ID". > > These helpers will be used to build the generic vDPA device later. > > Signed-off-by:

Re: [RFC 02/10] vhost: add 3 commands for vhost-vdpa

2022-01-04 Thread Jason Wang
On Wed, Jan 5, 2022 at 8:59 AM Longpeng(Mike) wrote: > > From: Longpeng > > To support generic vdpa deivce, we need add the following ioctls: > - GET_VECTORS_NUM: the count of vectors that supported Does this mean MSI vectors? If yes, it looks like a layer violation: vhost is transport

[PATCH 3/3] intel-iommu: PASID support

2022-01-04 Thread Jason Wang
This patch introduce ECAP_PASID via "x-pasid-mode". Based on the existing support for scalable mode, we need to implement the following missing parts: 1) tag VTDAddressSpace with PASID and support IOMMU/DMA translation with PASID 2) tag IOTLB with PASID 3) PASID cache and its flush For

[PATCH 2/3] intel-iommu: drop VTDBus

2022-01-04 Thread Jason Wang
We introduce VTDBus structure as an intermediate step for searching the address space. This works well with SID based matching/lookup. But when we want to support SID plus PASID based address space lookup, this intermediate steps turns out to be a burden. So the patch simply drops the VTDBus

[PATCH 0/3] PASID support for Intel IOMMU

2022-01-04 Thread Jason Wang
Hi All: This series tries to introduce PASID support for Intel IOMMU. The work is based on the previous scalabe mode support by implement the ECAP_PASID. A new "x-pasid-mode" is introduced to enable this mode. All internal vIOMMU codes were extended to support PASID instead of the current

[PATCH 1/3] intel-iommu: don't warn guest errors when getting rid2pasid entry

2022-01-04 Thread Jason Wang
We use to warn on wrong rid2pasid entry. But this error could be triggered by the guest and could happens during initialization. So let's don't warn in this case. Signed-off-by: Jason Wang --- hw/i386/intel_iommu.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH v4 2/2] linux-user: call set/getscheduler set/getparam directly

2022-01-04 Thread Tonis Tiigi
There seems to be difference in syscall and libc definition of these methods and therefore musl does not implement them (1e21e78bf7). Call syscall directly to ensure the behavior of the libc of user application, not the libc that was used to build QEMU. Signed-off-by: Tonis Tiigi ---

[PATCH] intel-iommu: correctly check passthrough during translation

2022-01-04 Thread Jason Wang
When scsalable mode is enabled, the passthrough more is not determined by the context entry but PASID entry, so switch to use the logic of vtd_dev_pt_enabled() to determine the passthrough mode in vtd_do_iommu_translate(). Signed-off-by: Jason Wang --- hw/i386/intel_iommu.c | 38

[PATCH v4 1/2] linux-user: add sched_getattr support

2022-01-04 Thread Tonis Tiigi
These syscalls are not exposed by glibc. The struct type need to be redefined as it can't be included directly before https://lkml.org/lkml/2020/5/28/810 . sched_attr type can grow in future kernel versions. When client sends values that QEMU does not understand it will return E2BIG with same

[PATCH v4 0/2] linux-user: fixes for sched_ syscalls

2022-01-04 Thread Tonis Tiigi
This patchset improves support for sched_* syscalls under user emulation. The first commit adds support for sched_g/setattr that was previously not implemented. These syscalls are not exposed by glibc. The struct type needs to be redefined as it can't be included directly before

Re: [PATCH v6 15/23] target/riscv: Implement AIA IMSIC interface CSRs

2022-01-04 Thread Frank Chang
Anup Patel 於 2021年12月30日 週四 下午8:53寫道: > From: Anup Patel > > The AIA specification defines IMSIC interface CSRs for easy access > to the per-HART IMSIC registers without using indirect xiselect and > xireg CSRs. This patch implements the AIA IMSIC interface CSRs. > > Signed-off-by: Anup Patel

[RESEND PATCH v3 7/7] hw/core: tcg-cpu-ops.h: Update comments of debug_check_watchpoint()

2022-01-04 Thread Bin Meng
From: Bin Meng This is now used by RISC-V as well. Update the comments. Signed-off-by: Bin Meng Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- (no changes since v1) include/hw/core/tcg-cpu-ops.h | 1 + 1 file changed, 1 insertion(+) diff --git

[RESEND PATCH v3 6/7] target/riscv: cpu: Enable native debug feature

2022-01-04 Thread Bin Meng
From: Bin Meng Turn on native debug feature by default for all CPUs. Signed-off-by: Bin Meng --- Changes in v3: - enable debug feature by default for all CPUs target/riscv/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index

[RESEND PATCH v3 4/7] target/riscv: cpu: Add a config option for native debug

2022-01-04 Thread Bin Meng
From: Bin Meng Add a config option to enable support for native M-mode debug. This is disabled by default and can be enabled with 'debug=true'. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- (no changes since v2) Changes in v2: - change the config option to 'disabled' by default

Re: [PATCH] Set return code on failure

2022-01-04 Thread Jason Wang
On Wed, Jan 5, 2022 at 5:32 AM Patrick Venture wrote: > > > > On Tue, Jan 4, 2022 at 1:18 PM Patrick Venture wrote: >> >> From: Peter Foley >> >> Match the other error handling in this function. > > > Just noticed I didn't fix up the commit title here to match style. Should I > do a PATCH

[PATCH v3 1/7] target/riscv: Add initial support for native debug

2022-01-04 Thread Bin Meng
This adds initial support for the native debug via the Trigger Module, as defined in the RISC-V Debug Specification [1]. Only "Address / Data Match" trigger (type 2) is implemented as of now, which is mainly used for hardware breakpoint and watchpoint. The number of type 2 triggers implemented is

[RESEND PATCH v3 0/7] target/riscv: Initial support for native debug feature via M-mode CSRs

2022-01-04 Thread Bin Meng
This adds initial support for the native debug via the Trigger Module, as defined in the RISC-V Debug Specification [1]. Only "Address / Data Match" trigger (type 2) is implemented as of now, which is mainly used for hardware breakpoint and watchpoint. The number of type 2 triggers implemented

[RESEND PATCH v3 3/7] target/riscv: debug: Implement debug related TCGCPUOps

2022-01-04 Thread Bin Meng
From: Bin Meng Implement .debug_excp_handler, .debug_check_{breakpoint, watchpoint} TCGCPUOps and hook them into riscv_tcg_ops. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- (no changes since v2) Changes in v2: - use 0 instead of GETPC() target/riscv/debug.h | 4 +++

[PATCH v3 7/7] hw/core: tcg-cpu-ops.h: Update comments of debug_check_watchpoint()

2022-01-04 Thread Bin Meng
This is now used by RISC-V as well. Update the comments. Signed-off-by: Bin Meng Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- (no changes since v1) include/hw/core/tcg-cpu-ops.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/core/tcg-cpu-ops.h

[RESEND PATCH v3 5/7] target/riscv: csr: Hook debug CSR read/write

2022-01-04 Thread Bin Meng
From: Bin Meng This adds debug CSR read/write support to the RISC-V CSR RW table. Signed-off-by: Bin Meng --- Changes in v3: - add riscv_trigger_init(), moved from patch #1 to this patch target/riscv/debug.h | 2 ++ target/riscv/cpu.c | 6 + target/riscv/csr.c | 57

[RESEND PATCH v3 2/7] target/riscv: machine: Add debug state description

2022-01-04 Thread Bin Meng
From: Bin Meng Add a subsection to machine.c to migrate debug CSR state. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- (no changes since v2) Changes in v2: - new patch: add debug state description target/riscv/machine.c | 33 + 1 file changed,

[RESEND PATCH v3 0/7] target/riscv: Initial support for native debug feature via M-mode CSRs

2022-01-04 Thread Bin Meng
This adds initial support for the native debug via the Trigger Module, as defined in the RISC-V Debug Specification [1]. Only "Address / Data Match" trigger (type 2) is implemented as of now, which is mainly used for hardware breakpoint and watchpoint. The number of type 2 triggers implemented

[PATCH v3 6/7] target/riscv: cpu: Enable native debug feature

2022-01-04 Thread Bin Meng
Turn on native debug feature by default for all CPUs. Signed-off-by: Bin Meng --- Changes in v3: - enable debug feature by default for all CPUs target/riscv/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index

[RESEND PATCH v3 1/7] target/riscv: Add initial support for native debug

2022-01-04 Thread Bin Meng
From: Bin Meng This adds initial support for the native debug via the Trigger Module, as defined in the RISC-V Debug Specification [1]. Only "Address / Data Match" trigger (type 2) is implemented as of now, which is mainly used for hardware breakpoint and watchpoint. The number of type 2

[PATCH v3 3/7] target/riscv: debug: Implement debug related TCGCPUOps

2022-01-04 Thread Bin Meng
Implement .debug_excp_handler, .debug_check_{breakpoint, watchpoint} TCGCPUOps and hook them into riscv_tcg_ops. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- (no changes since v2) Changes in v2: - use 0 instead of GETPC() target/riscv/debug.h | 4 +++ target/riscv/cpu.c |

[PATCH v3 5/7] target/riscv: csr: Hook debug CSR read/write

2022-01-04 Thread Bin Meng
This adds debug CSR read/write support to the RISC-V CSR RW table. Signed-off-by: Bin Meng --- Changes in v3: - add riscv_trigger_init(), moved from patch #1 to this patch target/riscv/debug.h | 2 ++ target/riscv/cpu.c | 6 + target/riscv/csr.c | 57

[PATCH v3 4/7] target/riscv: cpu: Add a config option for native debug

2022-01-04 Thread Bin Meng
Add a config option to enable support for native M-mode debug. This is disabled by default and can be enabled with 'debug=true'. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- (no changes since v2) Changes in v2: - change the config option to 'disabled' by default

[PATCH v3 2/7] target/riscv: machine: Add debug state description

2022-01-04 Thread Bin Meng
Add a subsection to machine.c to migrate debug CSR state. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis --- (no changes since v2) Changes in v2: - new patch: add debug state description target/riscv/machine.c | 33 + 1 file changed, 33 insertions(+)

[PATCH v3 0/7] target/riscv: Initial support for native debug feature via M-mode CSRs

2022-01-04 Thread Bin Meng
This adds initial support for the native debug via the Trigger Module, as defined in the RISC-V Debug Specification [1]. Only "Address / Data Match" trigger (type 2) is implemented as of now, which is mainly used for hardware breakpoint and watchpoint. The number of type 2 triggers implemented

Re: [PULL 0/4] tcg patch queue

2022-01-04 Thread Richard Henderson
On 1/4/22 4:40 PM, Richard Henderson wrote: The following changes since commit 67e41fe0cfb62e6cdfa659f0155417d17e5274ea: Merge tag 'pull-ppc-20220104' of https://github.com/legoater/qemu into staging (2022-01-04 07:23:27 -0800) are available in the Git repository at: https://gitlab.com

[PATCH v2] FreeBSD: Upgrade to 12.3 release

2022-01-04 Thread Brad Smith
FreeBSD: Upgrade to 12.3 release Note, since libtasn1 was fixed in 12.3 [*], this commit re-enables GnuTLS. [*] https://gitlab.com/gnutls/libtasn1/-/merge_requests/71 Signed-off-by: Brad Smith Tested-by: Thomas Huth Reviewed-by: Warner Losh --- .gitlab-ci.d/cirrus.yml | 5 +

[PATCH v2 1/3] target/riscv: rvv-1.0: Call the correct RVF/RVD check function for widening fp insns

2022-01-04 Thread frank . chang
From: Frank Chang Vector widening floating-point instructions should use require_scale_rvf() instead of require_rvf() to check whether RVF/RVD is enabled. Signed-off-by: Frank Chang --- target/riscv/insn_trans/trans_rvv.c.inc | 12 1 file changed, 8 insertions(+), 4 deletions(-)

[PATCH v2 2/3] target/riscv: rvv-1.0: Call the correct RVF/RVD check function for widening fp/int type-convert insns

2022-01-04 Thread frank . chang
From: Frank Chang vfwcvt.xu.f.v, vfwcvt.x.f.v, vfwcvt.rtz.xu.f.v and vfwcvt.rtz.x.f.v convert single-width floating-point to double-width integer. Therefore, should use require_rvf() to check whether RVF/RVD is enabled. vfwcvt.f.xu.v, vfwcvt.f.x.v convert single-width integer to double-width

[PATCH v2 0/3] Fix RVV calling incorrect RFV/RVD check functions bug

2022-01-04 Thread frank . chang
From: Frank Chang For vector widening and narrowing floating-point instructions, we should use require_scale_rvf() instead of require_rvf() to check whether the correspond RVF/RVD is enabled if either source or destination floating-point operand is double-width of SEW. Otherwise, illegal

[PATCH v2 3/3] target/riscv: rvv-1.0: Call the correct RVF/RVD check function for narrowing fp/int type-convert insns

2022-01-04 Thread frank . chang
From: Frank Chang vfncvt.f.xu.w, vfncvt.f.x.w convert double-width integer to single-width floating-point. Therefore, should use require_rvf() to check whether RVF/RVD is enabled. vfncvt.f.f.w, vfncvt.rod.f.f.w convert double-width floating-point to single-width integer. Therefore, should use

[PATCH v2] ui/vnc.c: Fixed a deadlock bug.

2022-01-04 Thread Rao Lei
The GDB statck is as follows: (gdb) bt 0 __lll_lock_wait (futex=futex@entry=0x56211df20360, private=0) at lowlevellock.c:52 1 0x7f263caf20a3 in __GI___pthread_mutex_lock (mutex=0x56211df20360) at ../nptl/pthread_mutex_lock.c:80 2 0x56211a757364 in qemu_mutex_lock_impl

[PATCH] roms/opensbi: Upgrade from v0.9 to v1.0

2022-01-04 Thread Bin Meng
Upgrade OpenSBI from v0.9 to v1.0 and the pre-built bios images. The v1.0 release includes the following commits: ec5274b platform: implement K210 system reset 5487cf0 include: sbi: Simplify HSM state define names 8df1f9a lib: sbi: Use SBI_HSM_STATE_xyz defines instead of SBI_STATE_xyz defines

[RFC 08/10] vdpa-dev: implement the get_features interface

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Implements the .get_features interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 4f97a7521b..32b3117c4b 100644 --- a/hw/virtio/vdpa-dev.c +++

[RFC 09/10] vdpa-dev: implement the set_status interface

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Implements the .set_status interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 100 ++- 1 file changed, 99 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 32b3117c4b..64649bfb5a

[RFC 10/10] vdpa-dev: mark the device as unmigratable

2022-01-04 Thread Longpeng(Mike)
From: Longpeng The generic vDPA device doesn't support migration currently, so mark it as unmigratable temporarily. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 64649bfb5a..0644aace22

[RFC 06/10] vdpa-dev: implement the unrealize interface

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Implements the .unrealize interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 2d534d837a..4e4dd3d201 100644 ---

[RFC 07/10] vdpa-dev: implement the get_config/set_config interface

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Implements the .get_config and .set_config interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 4e4dd3d201..4f97a7521b 100644 ---

[RFC 03/10] vdpa: add the infrastructure of vdpa-dev

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Add the infrastructure of vdpa-dev (the generic vDPA device), we can add a generic vDPA device as follow: -device vhost-vdpa-device-pci,vdpa-dev=/dev/vhost-vdpa-X Signed-off-by: Longpeng --- hw/virtio/Kconfig| 5 hw/virtio/meson.build| 2 ++

[RFC 05/10] vdpa-dev: implement the realize interface

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Implements the .realize interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 114 +++ include/hw/virtio/vdpa-dev.h | 8 +++ 2 files changed, 122 insertions(+) diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index

[RFC 04/10] vdpa-dev: implement the instance_init/class_init interface

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Implements the .instance_init and the .class_init interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev-pci.c | 80 +++- hw/virtio/vdpa-dev.c | 68 +- include/hw/virtio/vdpa-dev.h | 2 + 3 files

[RFC 02/10] vhost: add 3 commands for vhost-vdpa

2022-01-04 Thread Longpeng(Mike)
From: Longpeng To support generic vdpa deivce, we need add the following ioctls: - GET_VECTORS_NUM: the count of vectors that supported - GET_CONFIG_SIZE: the size of the virtio config space - GET_VQS_NUM: the count of virtqueues that exported Signed-off-by: Longpeng ---

[RFC 01/10] virtio: get class_id and pci device id by the virtio id

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Add helpers to get the "Transitional PCI Device ID" and "class_id" of the deivce which is specificed by the "Virtio Device ID". These helpers will be used to build the generic vDPA device later. Signed-off-by: Longpeng --- hw/virtio/virtio-pci.c | 93

[RFC 00/10] add generic vDPA device support

2022-01-04 Thread Longpeng(Mike)
From: Longpeng Hi guys, This patchset tries to support the generic vDPA device, the previous disscussion can be found here [1]. With the generic vDPA device, QEMU won't need to touch the device types any more, such like vfio. We can use the generic vDPA device as follow: -device

[PULL 1/4] tcg/optimize: Fix folding of vector ops

2022-01-04 Thread Richard Henderson
Bitwise operations are easy to fold, because the operation is identical regardless of element size. But add and sub need extra element size info that is not currently propagated. Fixes: 2f9f08ba43d Cc: qemu-sta...@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/799

[PULL 4/4] common-user: Fix tail calls to safe_syscall_set_errno_tail

2022-01-04 Thread Richard Henderson
For the ABIs in which the syscall return register is not also the first function argument register, move the errno value into the correct place. Fixes: a3310c0397e2 ("linux-user: Move syscall error detection into safe_syscall_base") Reported-by: Laurent Vivier Tested-by: Laurent Vivier

[PULL 3/4] sysemu: Cleanup qemu_run_machine_init_done_notifiers()

2022-01-04 Thread Richard Henderson
From: Xiaoyao Li Remove qemu_run_machine_init_done_notifiers() since no implementation and user. Fixes: f66dc8737c9 ("vl: move all generic initialization out of vl.c") Signed-off-by: Xiaoyao Li Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220104024136.1433545-1-xiaoyao...@intel.com>

[PULL 2/4] linux-user: Fix trivial build error on loongarch64 hosts

2022-01-04 Thread Richard Henderson
From: Philippe Mathieu-Daudé When building using GCC 8.3.0 on loongarch64 (Loongnix) we get: In file included from ../linux-user/signal.c:33: ../linux-user/host/loongarch64/host-signal.h: In function ‘host_signal_write’: ../linux-user/host/loongarch64/host-signal.h:57:9: error: a label

[PULL 0/4] tcg patch queue

2022-01-04 Thread Richard Henderson
The following changes since commit 67e41fe0cfb62e6cdfa659f0155417d17e5274ea: Merge tag 'pull-ppc-20220104' of https://github.com/legoater/qemu into staging (2022-01-04 07:23:27 -0800) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20220104

Re: [PATCH] common-user: Fix tail calls to safe_syscall_set_errno_tail

2022-01-04 Thread Richard Henderson
On 1/4/22 11:04 AM, Richard Henderson wrote: For the ABIs in which the syscall return register is not also the first function argument register, move the errno value into the correct place. Fixes: a3310c0397e2 Reported-by: Laurent Vivier Signed-off-by: Richard Henderson ---

Re: [PATCH] sysemu: Cleanup qemu_run_machine_init_done_notifiers()

2022-01-04 Thread Richard Henderson
On 1/3/22 6:41 PM, Xiaoyao Li wrote: Remove qemu_run_machine_init_done_notifiers() since no implementation and user. Signed-off-by: Xiaoyao Li --- include/sysemu/sysemu.h | 1 - 1 file changed, 1 deletion(-) Queued to tcg-next. Thanks. r~

Re: [PATCH for 7.0 5/5] bsd-user-smoke: Add to build

2022-01-04 Thread Warner Losh
On Tue, Jan 4, 2022 at 4:25 PM Philippe Mathieu-Daudé wrote: > +Paolo for meson > > On 11/27/21 21:18, Warner Losh wrote: > > Add a simple bsd-user smoke test for ensuring bsd-user is minimally > > functional. This runs only when bsd-user has been configured. It adds a > > simple execution of

Re: [PATCH v2] linux-user: Fix trivial build error on loongarch64 hosts

2022-01-04 Thread Richard Henderson
On 1/4/22 1:50 PM, Philippe Mathieu-Daudé wrote: When building using GCC 8.3.0 on loongarch64 (Loongnix) we get: In file included from ../linux-user/signal.c:33: ../linux-user/host/loongarch64/host-signal.h: In function ‘host_signal_write’:

Re: [PATCH 1/2] hw/display/vmware_vga: replace fprintf calls with trace events

2022-01-04 Thread Philippe Mathieu-Daudé
On 1/4/22 19:06, Carwyn Ellis wrote: > Debug output was always being sent to STDERR. > > This has been replaced with trace events. > > Signed-off-by: Carwyn Ellis > --- > hw/display/trace-events | 3 +++ > hw/display/vmware_vga.c | 22 ++ > 2 files changed, 13

Re: [PATCH for 7.0 5/5] bsd-user-smoke: Add to build

2022-01-04 Thread Philippe Mathieu-Daudé
+Paolo for meson On 11/27/21 21:18, Warner Losh wrote: > Add a simple bsd-user smoke test for ensuring bsd-user is minimally > functional. This runs only when bsd-user has been configured. It adds a > simple execution of 'hello world' type binaries for bsd-user. At the > present these are tiny,

Re: [PULL v3 00/15] Build system and KVM changes for 2021-12-23

2022-01-04 Thread Richard Henderson
On 1/4/22 6:57 AM, Paolo Bonzini wrote: The following changes since commit b5a3d8bc9146ba22a25116cb748c97341bf99737: Merge tag 'pull-misc-20220103' of https://gitlab.com/rth7680/qemu into staging (2022-01-03 09:34:41 -0800) are available in the Git repository at:

Re: [PATCH 1/2] tests/tcg/multiarch: Read fp flags before printf

2022-01-04 Thread Richard Henderson
On 1/4/22 2:48 PM, Taylor Simpson wrote: Was Hexagon the only target that needed new ref files? Yep. A curiosity of the guest libc, I guess. r~

Re: [PATCH v2 4/5] RISC-V: Typed CSRs in gdbserver

2022-01-04 Thread Richard Henderson
On 1/4/22 7:51 AM, Konrad Schwarz wrote: +++ b/target/riscv/csr32-op-gdbserver.h ... +++ b/target/riscv/csr64-op-gdbserver.h There is a *lot* of overlap between these two files. Why not add this data to the main csr_ops array? That would put all the info for each csr in one place. +

RE: [PATCH 1/2] tests/tcg/multiarch: Read fp flags before printf

2022-01-04 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Thursday, December 23, 2021 9:56 PM > To: qemu-devel@nongnu.org > Cc: alex.ben...@linaro.org; Taylor Simpson > Subject: [PATCH 1/2] tests/tcg/multiarch: Read fp flags before printf > > We need to read the floating-point flags

Re: [PATCH v2 1/5] hw/arm/virt: Key enablement of highmem PCIe on highmem_ecam

2022-01-04 Thread Marc Zyngier
Hi Eric, On Tue, 04 Jan 2022 15:31:33 +, Eric Auger wrote: > > Hi Marc, > > On 12/27/21 4:53 PM, Marc Zyngier wrote: > > Hi Eric, > > > > Picking this up again after a stupidly long time... > > > > On Mon, 04 Oct 2021 13:00:21 +0100, > > Eric Auger wrote: > >> Hi Marc, > >> > >> On

Re: [PATCH v2 4/5] RISC-V: Typed CSRs in gdbserver

2022-01-04 Thread Alistair Francis
On Wed, Jan 5, 2022 at 1:56 AM Konrad Schwarz wrote: > > GDB target descriptions support typed registers; > such that `info register X' displays not only the hex value of > register `X', but also the individual bitfields the register > comprises (if any), using textual labels if possible. > >

Re: [PATCH v2] linux-user: Fix trivial build error on loongarch64 hosts

2022-01-04 Thread Richard Henderson
On 1/4/22 1:50 PM, Philippe Mathieu-Daudé wrote: When building using GCC 8.3.0 on loongarch64 (Loongnix) we get: In file included from ../linux-user/signal.c:33: ../linux-user/host/loongarch64/host-signal.h: In function ‘host_signal_write’:

Re: [PATCH v2 1/2] linux-user/ppc: deliver SIGTRAP on POWERPC_EXCP_TRAP

2022-01-04 Thread Richard Henderson
On 1/4/22 1:00 PM, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst Handle POWERPC_EXCP_TRAP in cpu_loop to deliver SIGTRAP on tw[i]/td[i]. The si_code comes from do_program_check in the kernel source file arch/powerpc/kernel/traps.c Signed-off-by: Matheus Ferst ---

Re: [PATCH v2 3/5] RISC-V: 'info gmem' to show hypervisor guest -> physical address translations

2022-01-04 Thread Alistair Francis
On Wed, Jan 5, 2022 at 1:55 AM Konrad Schwarz wrote: > > This is analog to the existing 'info mem' command and is implemented > using the same machinery. > > Signed-off-by: Konrad Schwarz Hello and thanks for the patches > --- > hmp-commands-info.hx | 16 + >

Re: [PATCH v2 0/2] Align SiFive PDMA behavior to real hardware

2022-01-04 Thread Alistair Francis
On Tue, Jan 4, 2022 at 4:56 PM Jim Shu wrote: > > HiFive Unmatched PDMA supports high/low 32-bit access of 64-bit > register, but QEMU emulation supports low part access now. Enhance QEMU > emulation to support high 32-bit access. > > Also, permit 4/8-byte valid access in PDMA as we have verified

[PATCH v2] linux-user: Fix trivial build error on loongarch64 hosts

2022-01-04 Thread Philippe Mathieu-Daudé
When building using GCC 8.3.0 on loongarch64 (Loongnix) we get: In file included from ../linux-user/signal.c:33: ../linux-user/host/loongarch64/host-signal.h: In function ‘host_signal_write’: ../linux-user/host/loongarch64/host-signal.h:57:9: error: a label can only be part of a statement

Re: [PATCH 1/3] target/riscv: rvv-1.0: Call the correct RVF/RVD check funtion for widening fp insns

2022-01-04 Thread Alistair Francis
On Wed, Dec 29, 2021 at 12:15 PM wrote: > > From: Frank Chang > > Vector widening floating-point instructions should use > require_scale_rvf() instead of require_rvf() to check whether RVF/RVD is > enabled. Missing Signed off by line Alistair > --- > target/riscv/insn_trans/trans_rvv.c.inc |

Re: [PATCH] net/tap: Set return code on failure

2022-01-04 Thread Philippe Mathieu-Daudé
Cc'ing Daniel On 4/1/22 22:18, Patrick Venture wrote: From: Peter Foley Match the other error handling in this function. Fixes: e7b347d0bf6 ("net: detect errors from probing vnet hdr flag for TAP devices") Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Peter Foley ---

Re: [PATCH] Set return code on failure

2022-01-04 Thread Patrick Venture
On Tue, Jan 4, 2022 at 1:18 PM Patrick Venture wrote: > From: Peter Foley > > Match the other error handling in this function. > Just noticed I didn't fix up the commit title here to match style. Should I do a PATCH RESEND or a new patch, or can you add the "net/tap: " to the title before

[PATCH] Set return code on failure

2022-01-04 Thread Patrick Venture
From: Peter Foley Match the other error handling in this function. Signed-off-by: Peter Foley --- net/tap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/tap.c b/net/tap.c index f716be3e3f..c5cbeaa7a2 100644 --- a/net/tap.c +++ b/net/tap.c @@ -900,6 +900,7 @@ int net_init_tap(const

[PATCH v2 1/2] linux-user/ppc: deliver SIGTRAP on POWERPC_EXCP_TRAP

2022-01-04 Thread matheus . ferst
From: Matheus Ferst Handle POWERPC_EXCP_TRAP in cpu_loop to deliver SIGTRAP on tw[i]/td[i]. The si_code comes from do_program_check in the kernel source file arch/powerpc/kernel/traps.c Signed-off-by: Matheus Ferst --- linux-user/ppc/cpu_loop.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH v2 2/2] tests/tcg/ppc64le: change signal_save_restore_xer to use SIGTRAP

2022-01-04 Thread matheus . ferst
From: Matheus Ferst Now that linux-user delivers the signal on tw, we can change signal_save_restore_xer to use SIGTRAP instead of SIGILL. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Matheus Ferst --- tests/tcg/ppc64le/signal_save_restore_xer.c | 8

[PATCH v2 0/2] linux-user/ppc: Deliver SIGTRAP on tw[i]/td[i]

2022-01-04 Thread matheus . ferst
From: Matheus Ferst In the review of 66c6b40aba1, Richard Henderson suggested[1] using "trap" instead of ".long 0x0" to generate the signal to test XER save/restore behavior. However, linux-user aborts when a trap exception is raised, so we kept the patch with SIGILL. This patch series is a

Re: [PATCH v2 1/5] RISC-V: larger and more consistent register set for 'info registers'

2022-01-04 Thread Richard Henderson
On 1/4/22 7:51 AM, Konrad Schwarz wrote: static const int dump_csrs[] = { + +# if 0 +CSR_USTATUS, +CSR_UIE, +CSR_UTVEC, Adding huge sections of #if 0 code is not acceptable. r~

Re: [PATCH 6/9] target/ppc: powerpc_excp: Preserve MSR_LE bit

2022-01-04 Thread Fabiano Rosas
Fabiano Rosas writes: > We currently clear MSR_LE when copying bits from env->msr to > new_msr. However, for CPUs that do not have LPCR_ILE we always set > new_msr[LE] according to env->msr[LE]. And for CPUs that do have ILE > support we need to check LPCR/HID0 anyway, so there's no need to

Re: [PATCH] tests/docker: Add gentoo-loongarch64-cross image and run cross builds in GitLab

2022-01-04 Thread Richard Henderson
On 1/4/22 10:31 AM, Alex Bennée wrote: +docker-image-gentoo-loongarch64-cross: $(DOCKER_FILES_DIR)/gentoo-loongarch64-cross.docker + $(if $(NOCACHE), \ + $(call quiet-command,

Re: [PATCH] common-user: Fix tail calls to safe_syscall_set_errno_tail

2022-01-04 Thread Laurent Vivier
Le 04/01/2022 à 20:04, Richard Henderson a écrit : For the ABIs in which the syscall return register is not also the first function argument register, move the errno value into the correct place. Fixes: a3310c0397e2 Reported-by: Laurent Vivier Signed-off-by: Richard Henderson ---

Re: [PATCH 0/2] tests/tcg: Fix float_{convs,madds}

2022-01-04 Thread Alex Bennée
Richard Henderson writes: > We didn't read the fp flags early enough, so we got whatever > came out of the guest printf. With careful review of the > hexagon output, we would have seen this long ago. Queued to testing/next, thanks. -- Alex Bennée

Re: [PATCH v2] linux-user: don't adjust base of found hole

2022-01-04 Thread Richard Henderson
On 1/4/22 3:32 AM, Alex Bennée wrote: The pgb_find_hole function goes to the trouble of taking account of both mmap_min_addr and any offset we've applied to decide the starting address of a potential hole. This is especially important for emulating 32bit ARM in a 32bit build as we have applied

Re: [PATCH 0/3] Reorg ppc64 pmu insn counting

2022-01-04 Thread Daniel Henrique Barboza
On 1/4/22 07:32, Alex Bennée wrote: Daniel Henrique Barboza writes: On 1/3/22 12:07, Alex Bennée wrote: Daniel Henrique Barboza writes: On 12/23/21 00:01, Richard Henderson wrote: In contrast to Daniel's version, the code stays in power8-pmu.c, but is better organized to not take so

Re: [PATCH] tests/docker: Add gentoo-loongarch64-cross image and run cross builds in GitLab

2022-01-04 Thread Alex Bennée
WANG Xuerui writes: > Normally this would be based on qemu/debian10 or qemu/ubuntu2004, but > after a week-long struggle, I still cannot build stage2 gcc with the > known-good LoongArch toolchain sources, so I chose the least-resistance > path with Gentoo as base image. As this image is not

Re: [PATCH 01/17] pnv_phb3.c: add unique chassis and slot for pnv_phb3_root_port

2022-01-04 Thread Daniel Henrique Barboza
On 1/3/22 05:24, Cédric Le Goater wrote: On 12/28/21 20:37, Daniel Henrique Barboza wrote: When creating a pnv_phb3_root_port using the command line, the first root port is created successfully, but the second fails with the following error: qemu-system-ppc64: -device

  1   2   3   >