[PATCH v2 1/2] hw/misc: Implementating dummy AST2600 I3C model

2022-01-09 Thread Troy Lee
Introduce a dummy AST2600 I3C model. Aspeed 2600 SDK enables I3C support by default. The I3C driver will try to reset the device controller and setup through device address table register. This dummy model response these register with default value listed on ast2600v10 datasheet chapter 54.2.

[PATCH v2] scsi-generic: replace logical block count of response of READ CAPACITY

2022-01-09 Thread Lin Ma
While using SCSI passthrough, Following scenario makes qemu doesn't realized the capacity change of remote scsi target: 1. online resize the scsi target. 2. issue 'rescan-scsi-bus.sh -s ...' in host. 3. issue 'rescan-scsi-bus.sh -s ...' in vm. In above scenario I used to experienced errors while

Re: [PATCH 2/2] hw: timer: ibex_timer: update/add reg address

2022-01-09 Thread Bin Meng
On Mon, Jan 10, 2022 at 2:13 PM Alistair Francis wrote: > > From: Wilfred Mallawa > > The following changes: > 1. Fixes the incorrectly set CTRL register address. As > per [1] https://docs.opentitan.org/hw/ip/rv_timer/doc/#register-table > > The CTRL register is @ 0x04. > > This was found when

Re: [PATCH v4 11/11] hw/riscv: virt: Add PMU DT node to the device tree

2022-01-09 Thread Bin Meng
On Fri, Jan 7, 2022 at 10:27 AM Atish Patra wrote: > > Qemu virt machine can support few cache events and cycle/instret counters. > It also supports counter overflow for these events. > > Add a DT node so that OpenSBI/Linux kernel is aware of the virt machine > capabilities. There are some dummy

[PATCH v2 2/2] hw/arm/aspeed_ast2600: create i3c instance

2022-01-09 Thread Troy Lee
This patch includes i3c instance in ast2600 soc. v2: Rebase to mainline QEMU Signed-off-by: Troy Lee --- hw/arm/aspeed_ast2600.c | 19 ++- include/hw/arm/aspeed_soc.h | 3 +++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/hw/arm/aspeed_ast2600.c

Re: [PATCH v4 07/11] target/riscv: Support mcycle/minstret write operation

2022-01-09 Thread Bin Meng
On Fri, Jan 7, 2022 at 10:14 AM Atish Patra wrote: > > From: Atish Patra > > mcycle/minstret are actually WARL registers and can be written with any > given value. With SBI PMU extension, it will be used to store a initial > value provided from supervisor OS. The Qemu also need prohibit the

[PULL 10/10] Revert "virtio: introduce macro IRTIO_CONFIG_IRQ_IDX"

2022-01-09 Thread Michael S. Tsirkin
This reverts commit bf1d85c166c19af95dbd27b1faba1d2909732323. --- include/hw/virtio/virtio.h | 3 --- hw/display/vhost-user-gpu.c| 6 -- hw/net/virtio-net.c| 10 ++ hw/virtio/vhost-user-fs.c | 6 -- hw/virtio/vhost-vsock-common.c | 6 --

[PATCH v2 0/2] Aspeed I3C device model

2022-01-09 Thread Troy Lee
This series of patch introduce a dummy implemenation of aspeed i3c model, and it provide just enough information for guest machine. However, the driver probing is still failed, but it will not cause kernel panic. v2: - Split i3c model into i3c and i3c_device - Create 6x i3c devices - Using

[PULL 09/10] Revert "virtio-pci: decouple notifier from interrupt process"

2022-01-09 Thread Michael S. Tsirkin
This reverts commit e3480ef81f6fb61cc9c04e3b5be8b7e84484fc05. --- hw/virtio/virtio-pci.c | 88 +++--- 1 file changed, 31 insertions(+), 57 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 4bdb6e5694..750aa47ec1 100644 ---

[PULL 08/10] Revert "virtio-pci: decouple the single vector from the interrupt process"

2022-01-09 Thread Michael S. Tsirkin
This reverts commit 316011b8a74e777eb3ba03171cd701a291c28867. --- hw/virtio/virtio-pci.c | 163 +++-- 1 file changed, 74 insertions(+), 89 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 7201cf3dc1..4bdb6e5694 100644 ---

Re: [PATCH] virtio-pci: fix up config interrupt handling

2022-01-09 Thread Cédric Le Goater
On 1/9/22 18:49, Michael S. Tsirkin wrote: Fixes a couple of issues with irqfd use by config interrupt: - Rearrange initialization so cleanup happens in the reverse order - Don't use irqfd for config when not in use for data path I am not sure this is a complete fix though: I think we are better

[PULL 05/10] Revert "virtio: add support for configure interrupt"

2022-01-09 Thread Michael S. Tsirkin
This reverts commit 081f864f56307551f59c5e934e3f30a7290d0faa. --- include/hw/virtio/virtio.h | 4 hw/virtio/virtio.c | 29 - 2 files changed, 33 deletions(-) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index

[PULL 04/10] Revert "vhost: add support for configure interrupt"

2022-01-09 Thread Michael S. Tsirkin
This reverts commit f7220a7ce21604a4bc6260ccca4dc9068c1f27f2. --- include/hw/virtio/vhost.h | 4 --- hw/virtio/vhost.c | 76 --- 2 files changed, 80 deletions(-) diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index

[PULL 07/10] Revert "vhost: introduce new VhostOps vhost_set_config_call"

2022-01-09 Thread Michael S. Tsirkin
This reverts commit 88062372340d33090b7f089ed3b1a00f530a8914. --- include/hw/virtio/vhost-backend.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h index ff34eb7c8a..81bf3109f8 100644 ---

[PULL 01/10] Revert "virtio-pci: add support for configure interrupt"

2022-01-09 Thread Michael S. Tsirkin
This reverts commit d5d24d859c3957ea1674d0e102f96439cdbfe93a. --- hw/virtio/virtio-pci.h | 4 +- hw/virtio/virtio-pci.c | 92 ++ 2 files changed, 13 insertions(+), 83 deletions(-) diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h index

[PULL 06/10] Revert "vhost-vdpa: add support for config interrupt"

2022-01-09 Thread Michael S. Tsirkin
This reverts commit 634f7c89fbd78f57d00d5d6b39c0ade9df1fe27f. --- hw/virtio/vhost-vdpa.c | 7 --- hw/virtio/trace-events | 1 - 2 files changed, 8 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index ac0cb575fb..04ea43704f 100644 --- a/hw/virtio/vhost-vdpa.c +++

[PULL 02/10] Revert "virtio-mmio: add support for configure interrupt"

2022-01-09 Thread Michael S. Tsirkin
This reverts commit d48185f1a40d4e4ed2fa2873a42b2a5eb8748256. --- hw/virtio/virtio-mmio.c | 27 --- 1 file changed, 27 deletions(-) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index 809132018b..72da12fea5 100644 --- a/hw/virtio/virtio-mmio.c +++

[PULL 00/10] virtio: revert config interrupt changes

2022-01-09 Thread Michael S. Tsirkin
The following changes since commit ca745d2277496464b54fd832c15c45d0227325bb: tests: acpi: Add updated TPM related tables (2022-01-07 19:30:13 -0500) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fetch changes up to

[PULL 03/10] Revert "virtio-net: add support for configure interrupt"

2022-01-09 Thread Michael S. Tsirkin
This reverts commit 497679d51087090d5a22fd265d1b96cf92d49d9d. --- include/net/vhost_net.h | 2 -- hw/net/vhost_net-stub.c | 9 - hw/net/vhost_net.c | 9 - hw/net/virtio-net.c | 4 ++-- 4 files changed, 2 insertions(+), 22 deletions(-) diff --git a/include/net/vhost_net.h

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

2022-01-09 Thread Michael S. Tsirkin
On Mon, Jan 10, 2022 at 06:27:05AM +, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: > > > > -Original Message- > > From: Michael S. Tsirkin [mailto:m...@redhat.com] > > Sent: Monday, January 10, 2022 1:43 PM > > To: Longpeng (Mike, Cloud Infrastructure Service

Re: [PATCH v3 7/7] target/riscv: rvk: expose zbk* and zk* properties

2022-01-09 Thread Alistair Francis
On Fri, Dec 31, 2021 at 12:32 AM liweiwei wrote: > > Signed-off-by: liweiwei > Signed-off-by: wangjunqiang > --- > target/riscv/cpu.c | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c > index 961c5f4334..6575ec8cfa 100644 > ---

Re: [PATCH v4 10/12] target/riscv: Add kvm_riscv_get/put_regs_timer

2022-01-09 Thread Alistair Francis
On Mon, Jan 10, 2022 at 11:54 AM Yifei Jiang via wrote: > > Add kvm_riscv_get/put_regs_timer to synchronize virtual time context > from KVM. > > To set register of RISCV_TIMER_REG(state) will occur a error from KVM > on kvm_timer_state == 0. It's better to adapt in KVM, but it doesn't matter >

Re: [PATCH v4 08/12] target/riscv: Handle KVM_EXIT_RISCV_SBI exit

2022-01-09 Thread Alistair Francis
On Mon, Jan 10, 2022 at 11:49 AM Yifei Jiang via wrote: > > Use char-fe to handle console sbi call, which implement early > console io while apply 'earlycon=sbi' into kernel parameters. > > Signed-off-by: Yifei Jiang > Signed-off-by: Mingwang Li > Reviewed-by: Anup Patel Reviewed-by: Alistair

Re: [PULL SUBSYSTEM qemu-pseries] pseries: Update SLOF firmware image

2022-01-09 Thread Cédric Le Goater
On 1/10/22 06:04, Alexey Kardashevskiy wrote: The following changes since commit 0625c7760d5451d7436ef0738f763c6bb5141919: target/ppc: do not call hreg_compute_hflags() in helper_store_mmcr0() (2022-01-04 07:55:35 +0100) are available in the Git repository at:

Re: [PATCH v4 04/11] target/riscv: pmu: Make number of counters configurable

2022-01-09 Thread Alistair Francis
On Fri, Jan 7, 2022 at 12:19 PM Atish Patra wrote: > > The RISC-V privilege specification provides flexibility to implement > any number of counters from 29 programmable counters. However, the QEMU > implements all the counters. > > Make it configurable through pmu config parameter which now will

Re: [PATCH] softmmu/device_tree: Silence compiler warning with --enable-sanitizers

2022-01-09 Thread Alistair Francis
On Fri, Jan 7, 2022 at 11:41 PM Thomas Huth wrote: > > If I configure my build with --enable-sanitizers, my GCC (v8.5.0) > complains: > > .../softmmu/device_tree.c: In function ‘qemu_fdt_add_path’: > .../softmmu/device_tree.c:560:18: error: ‘retval’ may be used uninitialized > in this function

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

2022-01-09 Thread longpeng2--- via
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Monday, January 10, 2022 1:43 PM > To: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > > Cc: stefa...@redhat.com; jasow...@redhat.com; sgarz...@redhat.com; > coh...@redhat.com;

Re: [PATCH 2/2] hw: timer: ibex_timer: update/add reg address

2022-01-09 Thread Alistair Francis
On Mon, Jan 10, 2022 at 4:13 PM Alistair Francis wrote: > > From: Wilfred Mallawa > > The following changes: > 1. Fixes the incorrectly set CTRL register address. As > per [1] https://docs.opentitan.org/hw/ip/rv_timer/doc/#register-table > > The CTRL register is @ 0x04. > > This was found when

Re: [PATCH 1/2] riscv: opentitan: fixup plic stride len

2022-01-09 Thread Alistair Francis
On Mon, Jan 10, 2022 at 4:13 PM Alistair Francis wrote: > > From: Wilfred Mallawa > > The following change was made to rectify incorrectly set stride length > on the PLIC. Where it should be 32bit and not 24bit (0x18). This was > discovered whilst attempting to fix a bug where a timer_interrupt

Re: [PATCH v2 0/2] Introduce camera subsystem

2022-01-09 Thread zhenwei pi
Hi, Peter & Daniel Sorry about that I'm not clear enough to add a new subsystem into QEMU, could you give me more hint? On 1/6/22 4:53 PM, zhenwei pi wrote: v1 -> v2: [missing CC qemu-devel@nongnu.org, resend] Separate v1 patch set into 2 parts: Introduce camera subsystem (this

Re: [PATCH] hw: timer: ibex_timer: Fixup reading w/o register

2022-01-09 Thread Alistair Francis
On Mon, Jan 10, 2022 at 3:16 PM Alistair Francis wrote: > > From: Wilfred Mallawa > > This change fixes a bug where a write only register is read. > As per https://docs.opentitan.org/hw/ip/rv_timer/doc/#register-table > the 'INTR_TEST0' register is write only. > > Signed-off-by: Wilfred Mallawa

[PATCH 1/2] riscv: opentitan: fixup plic stride len

2022-01-09 Thread Alistair Francis
From: Wilfred Mallawa The following change was made to rectify incorrectly set stride length on the PLIC. Where it should be 32bit and not 24bit (0x18). This was discovered whilst attempting to fix a bug where a timer_interrupt was not serviced on TockOS-OpenTitan. Signed-off-by: Wilfred

[PATCH 2/2] hw: timer: ibex_timer: update/add reg address

2022-01-09 Thread Alistair Francis
From: Wilfred Mallawa The following changes: 1. Fixes the incorrectly set CTRL register address. As per [1] https://docs.opentitan.org/hw/ip/rv_timer/doc/#register-table The CTRL register is @ 0x04. This was found when attempting to fixup a bug where a timer_interrupt was not serviced on

Re: [PATCH] hw: timer: ibex_timer: Fixup reading w/o register

2022-01-09 Thread Bin Meng
On Mon, Jan 10, 2022 at 1:16 PM Alistair Francis wrote: > > From: Wilfred Mallawa > > This change fixes a bug where a write only register is read. > As per https://docs.opentitan.org/hw/ip/rv_timer/doc/#register-table > the 'INTR_TEST0' register is write only. > > Signed-off-by: Wilfred Mallawa

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

2022-01-09 Thread Michael S. Tsirkin
On Wed, Jan 05, 2022 at 08:58:51AM +0800, 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". ton of typos here. > These helpers will be used to build the generic vDPA

[PATCH] hw: timer: ibex_timer: Fixup reading w/o register

2022-01-09 Thread Alistair Francis
From: Wilfred Mallawa This change fixes a bug where a write only register is read. As per https://docs.opentitan.org/hw/ip/rv_timer/doc/#register-table the 'INTR_TEST0' register is write only. Signed-off-by: Wilfred Mallawa --- hw/timer/ibex_timer.c | 14 +-

[PULL SUBSYSTEM qemu-pseries] pseries: Update SLOF firmware image

2022-01-09 Thread Alexey Kardashevskiy
The following changes since commit 0625c7760d5451d7436ef0738f763c6bb5141919: target/ppc: do not call hreg_compute_hflags() in helper_store_mmcr0() (2022-01-04 07:55:35 +0100) are available in the Git repository at: g...@github.com:aik/qemu.git tags/qemu-slof-20220110 for you to fetch

[PULL 08/13] net/vmnet: add vmnet backends to qapi/net

2022-01-09 Thread Jason Wang
From: Vladislav Yaroshchuk The vmnet framework is an API for virtual machines to read and write packets. The API allows a Guest OS interface to be in host mode or shared mode. Interfaces in host mode can communicate with the native host system and other interfaces running in host mode. In

[PULL 07/13] net/vmnet: add vmnet dependency and customizable option

2022-01-09 Thread Jason Wang
From: Vladislav Yaroshchuk Signed-off-by: Vladislav Yaroshchuk Signed-off-by: Jason Wang --- meson.build | 4 meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 3 files changed, 9 insertions(+) diff --git a/meson.build b/meson.build index

[PULL 11/13] net/vmnet: implement bridged mode (vmnet-bridged)

2022-01-09 Thread Jason Wang
From: Vladislav Yaroshchuk Signed-off-by: Vladislav Yaroshchuk Signed-off-by: Jason Wang --- net/vmnet-bridged.m | 98 + 1 file changed, 92 insertions(+), 6 deletions(-) diff --git a/net/vmnet-bridged.m b/net/vmnet-bridged.m index

[PULL 13/13] net/vmnet: update MAINTAINERS list

2022-01-09 Thread Jason Wang
From: Vladislav Yaroshchuk Signed-off-by: Vladislav Yaroshchuk Signed-off-by: Jason Wang --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index c98a61c..638d129 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2641,6 +2641,11 @@ W:

[PULL 09/13] net/vmnet: implement shared mode (vmnet-shared)

2022-01-09 Thread Jason Wang
From: Vladislav Yaroshchuk Interaction with vmnet.framework in different modes differs only on configuration stage, so we can create common `send`, `receive`, etc. procedures and reuse them. vmnet.framework supports iov, but writing more than one iov into vmnet interface fails with

Re: [PATCH qemu] spapr: Force 32bit when resetting a core

2022-01-09 Thread David Gibson
On Mon, Jan 10, 2022 at 01:52:06PM +1100, Alexey Kardashevskiy wrote: > > > On 08/01/2022 00:39, Greg Kurz wrote: > > On Fri, 7 Jan 2022 23:19:03 +1100 > > David Gibson wrote: > > > > > On Fri, Jan 07, 2022 at 12:57:47PM +0100, Greg Kurz wrote: > > > > On Fri, 7 Jan 2022 18:24:23 +1100 > > > >

[PULL 06/13] net/filter: Optimize filter_send to coroutine

2022-01-09 Thread Jason Wang
From: Rao Lei This patch is to improve the logic of QEMU main thread sleep code in qemu_chr_write_buffer() where it can be blocked and can't run other coroutines during COLO IO stress test. Our approach is to put filter_send() in a coroutine. In this way, filter_send() will call

[PULL 10/13] net/vmnet: implement host mode (vmnet-host)

2022-01-09 Thread Jason Wang
From: Vladislav Yaroshchuk Signed-off-by: Vladislav Yaroshchuk Signed-off-by: Jason Wang --- net/vmnet-host.c | 93 1 file changed, 87 insertions(+), 6 deletions(-) diff --git a/net/vmnet-host.c b/net/vmnet-host.c index

[PULL 04/13] net/colo-compare.c: Optimize compare order for performance

2022-01-09 Thread Jason Wang
From: Zhang Chen COLO-compare use the glib function g_queue_find_custom to dump another VM's networking packet to compare. But this function always start find from the queue->head(here is the newest packet), It will reduce the success rate of comparison. So this patch reversed the order of the

[PULL 03/13] net: Fix uninitialized data usage

2022-01-09 Thread Jason Wang
From: Peter Foley e.g. 1109 15:16:20.151506 Uninitialized bytes in ioctl_common_pre at offset 0 inside [0x7ffc516af9b8, 4) 1109 15:16:20.151659 ==588974==WARNING: MemorySanitizer: use-of-uninitialized-value 1109 15:16:20.312923 #0 0x5639b88acb21 in tap_probe_vnet_hdr_len

[PULL 12/13] net/vmnet: update qemu-options.hx

2022-01-09 Thread Jason Wang
From: Vladislav Yaroshchuk Signed-off-by: Vladislav Yaroshchuk Signed-off-by: Jason Wang --- qemu-options.hx | 25 + 1 file changed, 25 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index ec90505..81dd34f 100644 --- a/qemu-options.hx +++

[PULL 05/13] net/colo-compare.c: Update the default value comments

2022-01-09 Thread Jason Wang
From: Zhang Chen Make the comments consistent with the REGULAR_PACKET_CHECK_MS. Signed-off-by: Zhang Chen Signed-off-by: Jason Wang --- net/colo-compare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 216de5a..62554b5 100644

[PULL 01/13] hw/net/vmxnet3: Log guest-triggerable errors using LOG_GUEST_ERROR

2022-01-09 Thread Jason Wang
From: Philippe Mathieu-Daudé The "Interrupt Cause" register (VMXNET3_REG_ICR) is read-only. Write accesses are ignored. Log them with as LOG_GUEST_ERROR instead of aborting: [R +0.239743] writeq 0xe0002031 0x46291a5a55460800 ERROR:hw/net/vmxnet3.c:1819:vmxnet3_io_bar1_write: code should not

[PULL 02/13] net/tap: Set return code on failure

2022-01-09 Thread Jason Wang
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: Patrick Venture Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Peter Foley Signed-off-by: Jason Wang --- net/tap.c | 1

[PULL 00/13] Net patches

2022-01-09 Thread Jason Wang
The following changes since commit df722e33d5da26ea8604500ca8f509245a0ea524: Merge tag 'bsd-user-arm-pull-request' of gitlab.com:bsdimp/qemu into staging (2022-01-08 09:37:59 -0800) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you

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

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

Re: [PATCH qemu] spapr: Force 32bit when resetting a core

2022-01-09 Thread Alexey Kardashevskiy
On 08/01/2022 00:39, Greg Kurz wrote: On Fri, 7 Jan 2022 23:19:03 +1100 David Gibson wrote: On Fri, Jan 07, 2022 at 12:57:47PM +0100, Greg Kurz wrote: On Fri, 7 Jan 2022 18:24:23 +1100 Alexey Kardashevskiy wrote: "PowerPC Processor binding to IEEE 1275" says in "8.2.1. Initial Register

Re: [RFC PATCH v4 00/30] Add LoongArch softmmu support.

2022-01-09 Thread yangxiaojuan
Hi, Xuerui Thank you for all you advice, I will modify the target part carefully. Xiaojuan On 01/09/2022 05:26 PM, WANG Xuerui wrote: > Hi Xiaojuan, > > I've just finished reviewing the first part (target modifications) as I'm not > familiar with QEMU device emulation. You may have to

Re: [PATCH v10 00/10]vhost-vdpa: add support for configure interrupt

2022-01-09 Thread Cindy Lu
On Mon, Jan 10, 2022 at 10:37 AM Jason Wang wrote: > On Mon, Jan 10, 2022 at 9:37 AM Cindy Lu wrote: > > > > > > > > > > On Mon, Jan 10, 2022 at 1:56 AM Michael S. Tsirkin > wrote: > >> > >> On Fri, Nov 05, 2021 at 12:48:17AM +0800, Cindy Lu wrote: > >> > these patches add the support for

Re: [PATCH v10 00/10]vhost-vdpa: add support for configure interrupt

2022-01-09 Thread Jason Wang
On Mon, Jan 10, 2022 at 9:37 AM Cindy Lu wrote: > > > > > On Mon, Jan 10, 2022 at 1:56 AM Michael S. Tsirkin wrote: >> >> On Fri, Nov 05, 2021 at 12:48:17AM +0800, Cindy Lu wrote: >> > these patches add the support for configure interrupt >> > >> > These codes are all tested in vp-vdpa (support

Re: [RFC PATCH v3 22/27] hw/loongarch: Add some devices support for 3A5000.

2022-01-09 Thread yangxiaojuan
Hi, Mark On 12/23/2021 06:52 PM, Mark Cave-Ayland wrote: > On 22/12/2021 08:26, yangxiaojuan wrote: > >> Hi, Mark >> >> On 12/18/2021 06:02 PM, Mark Cave-Ayland wrote: >>> On 04/12/2021 12:07, Xiaojuan Yang wrote: >>> 1.Add uart,virtio-net,vga and usb for 3A5000. 2.Add irq set and map

Re: [PATCH v3 8/8] target/ppc: Set the correct endianness for powernv memory dumps

2022-01-09 Thread David Gibson
On Fri, Jan 07, 2022 at 07:26:01PM -0300, Fabiano Rosas wrote: > We use the endianness of interrupts to determine which endianness to > use for the guest kernel memory dump. For machines that support HILE > (powernv8 and up) we have been always generating big endian dump > files. > > This patch

Re: [PATCH] hw/sensor: Add SB-TSI Temperature Sensor Interface

2022-01-09 Thread Patrick Venture
On Fri, Jan 7, 2022 at 7:04 PM Patrick Venture wrote: > From: Hao Wu > > SB Temperature Sensor Interface (SB-TSI) is an SMBus compatible > interface that reports AMD SoC's Ttcl (normalized temperature), > and resembles a typical 8-pin remote temperature sensor's I2C interface > to BMC. > > This

Re: [PATCH] softmmu/device_tree: Silence compiler warning with --enable-sanitizers

2022-01-09 Thread wangyanan (Y)
On 2022/1/8 4:18, Richard Henderson wrote: On 1/7/22 5:38 AM, Thomas Huth wrote: diff --git a/softmmu/device_tree.c b/softmmu/device_tree.c index 3965c834ca..9e96f5ecd5 100644 --- a/softmmu/device_tree.c +++ b/softmmu/device_tree.c @@ -564,7 +564,7 @@ int qemu_fdt_add_path(void *fdt, const

Re: [PATCH] softmmu/device_tree: Silence compiler warning with --enable-sanitizers

2022-01-09 Thread wangyanan (Y)
On 2022/1/7 21:38, Thomas Huth wrote: If I configure my build with --enable-sanitizers, my GCC (v8.5.0) complains: .../softmmu/device_tree.c: In function ‘qemu_fdt_add_path’: .../softmmu/device_tree.c:560:18: error: ‘retval’ may be used uninitialized in this function

[PATCH v4 05/12] target/riscv: Implement kvm_arch_put_registers

2022-01-09 Thread Yifei Jiang via
Put GPR CSR and FP registers to kvm by KVM_SET_ONE_REG ioctl Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis Reviewed-by: Anup Patel --- target/riscv/kvm.c | 104 - 1 file changed, 103 insertions(+), 1

[PATCH v4 11/12] target/riscv: Implement virtual time adjusting with vm state changing

2022-01-09 Thread Yifei Jiang via
We hope that virtual time adjusts with vm state changing. When a vm is stopped, guest virtual time should stop counting and kvm_timer should be stopped. When the vm is resumed, guest virtual time should continue to count and kvm_timer should be restored. Signed-off-by: Yifei Jiang Signed-off-by:

[PATCH v4 06/12] target/riscv: Support start kernel directly by KVM

2022-01-09 Thread Yifei Jiang via
Get kernel and fdt start address in virt.c, and pass them to KVM when cpu reset. Add kvm_riscv.h to place riscv specific interface. In addition, PLIC is created without M-mode PLIC contexts when KVM is enabled. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis

[PATCH v4 10/12] target/riscv: Add kvm_riscv_get/put_regs_timer

2022-01-09 Thread Yifei Jiang via
Add kvm_riscv_get/put_regs_timer to synchronize virtual time context from KVM. To set register of RISCV_TIMER_REG(state) will occur a error from KVM on kvm_timer_state == 0. It's better to adapt in KVM, but it doesn't matter that adaping in QEMU. Signed-off-by: Yifei Jiang Signed-off-by:

[PATCH v4 09/12] target/riscv: Add host cpu type

2022-01-09 Thread Yifei Jiang via
'host' type cpu is set isa to RV32 or RV64 simply, more isa info will obtain from KVM in kvm_arch_init_vcpu() Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis Reviewed-by: Anup Patel --- target/riscv/cpu.c | 15 +++ target/riscv/cpu.h | 1 + 2

[PATCH v4 12/12] target/riscv: Support virtual time context synchronization

2022-01-09 Thread Yifei Jiang via
Add virtual time context description to vmstate_kvmtimer. After cpu being loaded, virtual time context is updated to KVM. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Anup Patel Reviewed-by: Alistair Francis --- target/riscv/machine.c | 30 ++

[PATCH v4 08/12] target/riscv: Handle KVM_EXIT_RISCV_SBI exit

2022-01-09 Thread Yifei Jiang via
Use char-fe to handle console sbi call, which implement early console io while apply 'earlycon=sbi' into kernel parameters. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Anup Patel --- target/riscv/kvm.c | 42 -

[PATCH v4 07/12] target/riscv: Support setting external interrupt by KVM

2022-01-09 Thread Yifei Jiang via
When KVM is enabled, set the S-mode external interrupt through kvm_riscv_set_irq function. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis Reviewed-by: Anup Patel --- target/riscv/cpu.c | 6 +- target/riscv/kvm-stub.c | 5 +

Re: [PATCH v10 00/10]vhost-vdpa: add support for configure interrupt

2022-01-09 Thread Cindy Lu
On Mon, Jan 10, 2022 at 1:56 AM Michael S. Tsirkin wrote: > On Fri, Nov 05, 2021 at 12:48:17AM +0800, Cindy Lu wrote: > > these patches add the support for configure interrupt > > > > These codes are all tested in vp-vdpa (support configure interrupt) > > vdpa_sim (not support configure

[PATCH v4 02/12] target/riscv: Add target/riscv/kvm.c to place the public kvm interface

2022-01-09 Thread Yifei Jiang via
Add target/riscv/kvm.c to place kvm_arch_* function needed by kvm/kvm-all.c. Meanwhile, add kvm support in meson.build file. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis Reviewed-by: Anup Patel --- meson.build | 2 + target/riscv/kvm.c

[PATCH v4 01/12] update-linux-headers: Add asm-riscv/kvm.h

2022-01-09 Thread Yifei Jiang via
Add asm-riscv/kvm.h for RISC-V KVM. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Acked-by: Alistair Francis Reviewed-by: Anup Patel --- linux-headers/asm-riscv/kvm.h | 128 ++ 1 file changed, 128 insertions(+) create mode 100644

[PATCH v4 03/12] target/riscv: Implement function kvm_arch_init_vcpu

2022-01-09 Thread Yifei Jiang via
Get isa info from kvm while kvm init. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis Reviewed-by: Anup Patel --- target/riscv/kvm.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/target/riscv/kvm.c

[PATCH v4 00/12] Add riscv kvm accel support

2022-01-09 Thread Yifei Jiang via
This series adds both riscv32 and riscv64 kvm support, and implements migration based on riscv. Because of RISC-V KVM has been merged into the Linux master, so this series are changed from RFC to patch. Several steps to use this: 1. Build emulation $ ./configure --target-list=riscv64-softmmu $

[PATCH v4 04/12] target/riscv: Implement kvm_arch_get_registers

2022-01-09 Thread Yifei Jiang via
Get GPR CSR and FP registers from kvm by KVM_GET_ONE_REG ioctl. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis Reviewed-by: Anup Patel --- target/riscv/kvm.c | 112 - 1 file changed, 111 insertions(+), 1

RE: [PATCH v3 08/12] target/riscv: Handle KVM_EXIT_RISCV_SBI exit

2022-01-09 Thread Jiangyifei via
> -Original Message- > From: Alistair Francis [mailto:alistai...@gmail.com] > Sent: Thursday, January 6, 2022 6:04 AM > To: Jiangyifei > Cc: qemu-devel@nongnu.org Developers ; open > list:RISC-V ; kvm-ri...@lists.infradead.org; open > list:Overall ; libvir-l...@redhat.com; Anup Patel > ;

RE: [PATCH v3 06/12] target/riscv: Support start kernel directly by KVM

2022-01-09 Thread Jiangyifei via
> -Original Message- > From: Anup Patel [mailto:a...@brainfault.org] > Sent: Thursday, December 23, 2021 2:04 PM > To: Jiangyifei > Cc: QEMU Developers ; open list:RISC-V > ; kvm-ri...@lists.infradead.org; KVM General > ; libvir-l...@redhat.com; Anup Patel > ; Palmer Dabbelt ; Alistair >

Re: [PATCH v4 11/11] hw/riscv: virt: Add PMU DT node to the device tree

2022-01-09 Thread Atish Patra
On Fri, Jan 7, 2022 at 6:46 AM Philippe Mathieu-Daudé wrote: > > On 7/1/22 01:48, Atish Patra wrote: > > Qemu virt machine can support few cache events and cycle/instret counters. > > It also supports counter overflow for these events. > > > > Add a DT node so that OpenSBI/Linux kernel is aware

Re: [PATCH v8 00/18] Adding partial support for 128-bit riscv target

2022-01-09 Thread Alistair Francis
On Fri, Jan 7, 2022 at 7:02 AM Frédéric Pétrot wrote: > > This series of patches provides partial 128-bit support for the riscv > target architecture, namely RVI and RVM, with minimal csr support. > > Thanks for the reviews and advices. > > v8: > - rebase on riscv-to-apply.next > > v7: > - code

[PATCH] net/dump.c: Suppress spurious compiler warning

2022-01-09 Thread Philipp Tomsich
Compiling with gcc version 11.2.0 (Ubuntu 11.2.0-13ubuntu1) results in a (spurious) warning: In function ‘dump_receive_iov’, inlined from ‘filter_dump_receive_iov’ at ../net/dump.c:157:5: ../net/dump.c:89:9: error: ‘writev’ specified size 18446744073709551600 exceeds maximum object

[PATCH v1 2/2] target/riscv: Add XVentanaCondOps custom extension

2022-01-09 Thread Philipp Tomsich
This adds support for the XVentanaCondOps custom extension (vendor-defined by Ventana Micro Systems), which is documented at https://github.com/ventanamicro/ventana-custom-extensions/releases/download/v1.0.0/ventana-custom-extensions-v1.0.0.pdf Given that the CUSTOM-3 opcode space is shared

[PATCH v1 1/2] decodetree: Add an optional predicate-function for decoding

2022-01-09 Thread Philipp Tomsich
This adds the possibility to specify a predicate-function that is called as part of decoding in multi-patterns; it is intended for use-cases (such as vendor-defined instructions in RISC-V) where the same bitpattern may decode into different functions depending on the overall configuration of the

Re: New arm alignment issue with 6.2.0 - bisected to single revision

2022-01-09 Thread Mark Watson
On Thu, 6 Jan 2022 at 18:09, Peter Maydell wrote: > On Wed, 29 Dec 2021 at 20:15, Mark Watson wrote: > > I'm seeing a repeatable alignment exception running m68k system mode on > armv7l (arm cortex a9) following this commit: > > "fa947a667fceab02f9f85fc99f54aebcc9ae6b51 is the first bad commit

Re: [PULL v3 12/55] virtio-pci: add support for configure interrupt

2022-01-09 Thread Volker Rümelin
Am 09.01.22 um 19:54 schrieb Volker Rümelin: Am 09.01.22 um 19:01 schrieb Michael S. Tsirkin: On Sun, Jan 09, 2022 at 06:52:28PM +0100, Volker Rümelin wrote: Am 09.01.22 um 17:11 schrieb Michael S. Tsirkin: On Sun, Jan 09, 2022 at 07:17:30AM +0100, Volker Rümelin wrote: Hi, From: Cindy Lu

Re: [PULL v3 12/55] virtio-pci: add support for configure interrupt

2022-01-09 Thread Volker Rümelin
Am 09.01.22 um 19:01 schrieb Michael S. Tsirkin: On Sun, Jan 09, 2022 at 06:52:28PM +0100, Volker Rümelin wrote: Am 09.01.22 um 17:11 schrieb Michael S. Tsirkin: On Sun, Jan 09, 2022 at 07:17:30AM +0100, Volker Rümelin wrote: Hi, From: Cindy Lu Add support for configure interrupt, The

Re: [PATCH v14 16/26] target/loongarch: Add disassembler

2022-01-09 Thread Richard Henderson
On 1/9/22 1:25 AM, WANG Xuerui wrote: +static inline int shl_2(DisasContext *ctx, int x) +{ +    return x * 4; Although "<< 2" has the same effect as "* 4" here, isn't "<< 2" better in matching the function name? Yes, good point. r~

Re: [PATCH v14 02/26] target/loongarch: Add core definition

2022-01-09 Thread Richard Henderson
On 1/9/22 1:25 AM, WANG Xuerui wrote: +#define TARGET_PAGE_BITS 14 Aren't we capable of page sizes up to 64KiB? Minimal feasible page size is indeed 16KiB though (due to cache aliasing, although 4KiB pages are supported in hardware, they don't work in practice). You must use the minimal page

Re: [PULL v3 12/55] virtio-pci: add support for configure interrupt

2022-01-09 Thread Michael S. Tsirkin
On Sun, Jan 09, 2022 at 06:52:28PM +0100, Volker Rümelin wrote: > Am 09.01.22 um 17:11 schrieb Michael S. Tsirkin: > > On Sun, Jan 09, 2022 at 07:17:30AM +0100, Volker Rümelin wrote: > > > Hi, > > > > > > > From: Cindy Lu > > > > > > > > Add support for configure interrupt, The process is used

Re: [PATCH v10 00/10]vhost-vdpa: add support for configure interrupt

2022-01-09 Thread Michael S. Tsirkin
On Fri, Nov 05, 2021 at 12:48:17AM +0800, Cindy Lu wrote: > these patches add the support for configure interrupt > > These codes are all tested in vp-vdpa (support configure interrupt) > vdpa_sim (not support configure interrupt), virtio tap device > > test in virtio-pci bus and virtio-mmio bus

Re: [PULL v3 12/55] virtio-pci: add support for configure interrupt

2022-01-09 Thread Volker Rümelin
Am 09.01.22 um 17:11 schrieb Michael S. Tsirkin: On Sun, Jan 09, 2022 at 07:17:30AM +0100, Volker Rümelin wrote: Hi, From: Cindy Lu Add support for configure interrupt, The process is used kvm_irqfd_assign to set the gsi to kernel. When the configure notifier was signal by host, qemu will

[PATCH] virtio-pci: fix up config interrupt handling

2022-01-09 Thread Michael S. Tsirkin
Fixes a couple of issues with irqfd use by config interrupt: - Rearrange initialization so cleanup happens in the reverse order - Don't use irqfd for config when not in use for data path I am not sure this is a complete fix though: I think we are better off limiting the effect to vdpa devices with

[RFC PATCH v2 4/6] hvf: Make hvf_get_segments() / hvf_put_segments() local

2022-01-09 Thread Philippe Mathieu-Daudé
Both hvf_get_segments/hvf_put_segments() functions are only used within x86hvf.c: do not declare them as public API. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/hvf/x86hvf.h | 2 -- target/i386/hvf/x86hvf.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git

[RFC PATCH v2 0/6] host: Support macOS 12

2022-01-09 Thread Philippe Mathieu-Daudé
Few patches to be able to build QEMU on macOS 12 (Monterey). This basically consists of adapting deprecated APIs. I am not sure about these APIs, so tagging as RFC. I couldn't succeed to adapt the Cocoa code. CI job added to avoid bitrotting (ignoring the Objective C deprecation warning).

Re: [PATCH v10 00/10]vhost-vdpa: add support for configure interrupt

2022-01-09 Thread Michael S. Tsirkin
On Fri, Nov 05, 2021 at 12:48:17AM +0800, Cindy Lu wrote: > these patches add the support for configure interrupt > > These codes are all tested in vp-vdpa (support configure interrupt) > vdpa_sim (not support configure interrupt), virtio tap device > > test in virtio-pci bus and virtio-mmio bus

Re: [PATCH 00/15] reduce audio playback latency

2022-01-09 Thread Volker Rümelin
On Donnerstag, 6. Januar 2022 10:21:47 CET Volker Rümelin wrote: This patch series reduces the playback latency for audio backends, in some cases significantly. For PulseAudio, the audio buffer is also moved from the QEMU side to the PulseAudio server side. This improves the drop-out safety for

[RFC PATCH v2 3/6] block/file-posix: Remove a deprecation warning on macOS 12

2022-01-09 Thread Philippe Mathieu-Daudé
When building on macOS 12 we get: block/file-posix.c:3335:18: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations] kernResult = IOMasterPort( MACH_PORT_NULL, ); ^~~~ IOMainPort Use IOMainPort

[RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12

2022-01-09 Thread Philippe Mathieu-Daudé
When building on macOS 12 we get: audio/coreaudio.c:50:5: error: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Werror,-Wdeprecated-declarations] kAudioObjectPropertyElementMaster ^

[PATCH v2 1/6] configure: Allow passing extra Objective C compiler flags

2022-01-09 Thread Philippe Mathieu-Daudé
We can pass C/CPP/LD flags via CFLAGS/CXXFLAGS/LDFLAGS environment variables, or via configure --extra-cflags / --extra-cxxflags / --extra-ldflags options. Provide similar behavior for Objective C: use existing flags from $OBJCFLAGS, or passed via --extra-objcflags. Signed-off-by: Philippe

[RFC PATCH v2 5/6] hvf: Remove deprecated hv_vcpu_flush() calls

2022-01-09 Thread Philippe Mathieu-Daudé
When building on macOS 12, we get: In file included from ../target/i386/hvf/hvf.c:59: ../target/i386/hvf/vmx.h:174:5: error: 'hv_vcpu_flush' is deprecated: first deprecated in macOS 11.0 - This API has no effect and always returns HV_UNSUPPORTED [-Werror,-Wdeprecated-declarations]

  1   2   >