[PATCH v4 5/6] target/riscv: add support for zhinx/zhinxmin

2022-01-12 Thread Weiwei Li
- update extension check REQUIRE_ZHINX_OR_ZFH and REQUIRE_ZFH_OR_ZFHMIN_OR_ZHINX_OR_ZHINXMIN - update half float point register read/write - disable nanbox_h check Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson --- target/riscv/fpu_helper.c

Re: [PATCH] ui/cocoa: capture screencast with AVAssetWriter

2022-01-12 Thread Chen Zhang
Granted that this patch might not fit for main branch, I hope this snippet could help someone in need. Screen cast feature shipped with macOS does support screen recording, but only for whole screen or selected rectangle, not for a selected window like photo capture feature. And pixels are not

[Q] arm: SVE accesses at EL0 is broken with E2H+TGE?

2022-01-12 Thread Zenghui Yu via
Hi, I've just exercised the SVE emulation in QEMU with | `qemu-system-aarch64 -M virt,virtualization=on,gic-version=3 \ | -cpu max -accel tcg [...]` Since QEMU sets ID_AA64MMFR1_EL1.VH for -cpu max, the Linux guest I use was booting with VHE enabled and running with E2H+TGE. But I've then seen

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

2022-01-12 Thread Peter Xu
On Wed, Jan 05, 2022 at 12:19:43PM +0800, Jason Wang wrote: > 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 +++

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

2022-01-12 Thread Peter Xu
On Wed, Jan 05, 2022 at 12:19:44PM +0800, Jason Wang wrote: > 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 t

Re: [PATCH] softmmu/device_tree: Remove redundant pointer assignment

2022-01-12 Thread Alistair Francis
On Tue, Jan 11, 2022 at 1:28 PM Yanan Wang via wrote: > > The pointer assignment "const char *p = path;" in function > qemu_fdt_add_path is unnecessary. Let's remove it and just > use the "path" passed in. No functional change. > > Suggested-by: Richard Henderson > Signed-off-by: Yanan Wang Rev

Re: [PATCH v5 13/13] target/riscv: enable riscv kvm accel

2022-01-12 Thread Alistair Francis
On Wed, Jan 12, 2022 at 6:25 PM Yifei Jiang via wrote: > > Add riscv kvm support in meson.build file. > > Signed-off-by: Yifei Jiang > Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis Alistair > --- > meson.build | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/meson.build

Re: [PATCH v5 06/13] target/riscv: Support start kernel directly by KVM

2022-01-12 Thread Anup Patel
On Wed, Jan 12, 2022 at 1:43 PM Yifei Jiang wrote: > > 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

Re: [PATCH v5 13/13] target/riscv: enable riscv kvm accel

2022-01-12 Thread Anup Patel
On Wed, Jan 12, 2022 at 1:44 PM Yifei Jiang wrote: > > Add riscv kvm support in meson.build file. > > Signed-off-by: Yifei Jiang > Signed-off-by: Mingwang Li Looks good to me. Reviewed-by: Anup Patel Regards, Anup > --- > meson.build | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git

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

2022-01-12 Thread Peter Xu
On Wed, Jan 05, 2022 at 12:19:45PM +0800, Jason Wang wrote: > @@ -1725,11 +1780,16 @@ static bool vtd_do_iommu_translate(VTDAddressSpace > *vtd_as, PCIBus *bus, > cc_entry->context_cache_gen = s->context_cache_gen; > } > > +/* Try to fetch slpte form IOTLB */ > +if ((pasid

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

2022-01-12 Thread Alistair Francis
On Thu, Jan 13, 2022 at 1:42 AM Philipp Tomsich wrote: > > Alistair, > > Do you (and the other RISC-V custodians of target/riscv) have any opinion on > this? > We can go either way — and it boils down to a style and process question. Sorry, it's a busy week! I had a quick look over this series

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

2022-01-12 Thread Jason Wang
On Thu, Jan 13, 2022 at 11:35 AM Peter Xu wrote: > > On Wed, Jan 05, 2022 at 12:19:43PM +0800, Jason Wang wrote: > > 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. > > > > Si

Re: [PATCH v7 1/5] QIOChannel: Add flags on io_writev and introduce io_flush callback

2022-01-12 Thread Peter Xu
On Thu, Jan 06, 2022 at 07:13:38PM -0300, Leonardo Bras wrote: > diff --git a/io/channel.c b/io/channel.c > index e8b019dc36..904855e16e 100644 > --- a/io/channel.c > +++ b/io/channel.c > @@ -67,12 +67,13 @@ ssize_t qio_channel_readv_full(QIOChannel *ioc, > } > > > -ssize_t qio_channel_writev_

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

2022-01-12 Thread Peter Xu
On Thu, Jan 13, 2022 at 02:16:35PM +0800, Jason Wang wrote: > On Thu, Jan 13, 2022 at 11:35 AM Peter Xu wrote: > > > > On Wed, Jan 05, 2022 at 12:19:43PM +0800, Jason Wang wrote: > > > We use to warn on wrong rid2pasid entry. But this error could be > > > triggered by the guest and could happens d

Re: [PATCH] hw/i386: Add the possibility to disable the 'isapc' machine

2022-01-12 Thread Thomas Huth
On 07/01/2022 19.54, Philippe Mathieu-Daudé wrote: On 1/7/22 17:07, Thomas Huth wrote: We already have a CONFIG_ISAPC switch - but we're not using it yet. Add some "#ifdefs" to make it possible to disable this machine now. Signed-off-by: Thomas Huth --- hw/i386/pc_piix.c| 5 - t

Re: [PATCH] configure: do not create roms/seabios/config.mak if SeaBIOS not present

2022-01-12 Thread Thomas Huth
On 07/01/2022 12.47, Paolo Bonzini wrote: If roms/seabios/Makefile is not present, the configure script is not creating the roms/seabios directory anymore (commit 5dce7b8d8c, "configure: remove DIRS", 2021-12-18); thus, creating roms/seabios/config.mak fails. The easiest thing to do is to not cr

Re: [PATCH v7 2/5] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-01-12 Thread Peter Xu
On Thu, Jan 06, 2022 at 07:13:39PM -0300, Leonardo Bras wrote: > @@ -558,15 +575,26 @@ static ssize_t qio_channel_socket_writev(QIOChannel > *ioc, > memcpy(CMSG_DATA(cmsg), fds, fdsize); > } > > +if (flags & QIO_CHANNEL_WRITE_FLAG_ZERO_COPY) { > +sflags = MSG_ZEROCOPY;

Re: [PATCH v7 3/5] migration: Add zero-copy parameter for QMP/HMP for Linux

2022-01-12 Thread Peter Xu
On Thu, Jan 06, 2022 at 07:13:40PM -0300, Leonardo Bras wrote: > Add property that allows zero-copy migration of memory pages, > and also includes a helper function migrate_use_zero_copy() to check > if it's enabled. > > No code is introduced to actually do the migration, but it allow > future imp

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

2022-01-12 Thread Michael S. Tsirkin
On Wed, Jan 05, 2022 at 12:19:43PM +0800, Jason Wang wrote: > 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 +++

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

2022-01-12 Thread Michael S. Tsirkin
On Thu, Jan 13, 2022 at 11:35:19AM +0800, Peter Xu wrote: > On Wed, Jan 05, 2022 at 12:19:43PM +0800, Jason Wang wrote: > > 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. > >

Re: [PATCH v7 4/5] migration: Add migrate_use_tls() helper

2022-01-12 Thread Peter Xu
On Thu, Jan 06, 2022 at 07:13:41PM -0300, Leonardo Bras wrote: > void migration_channel_process_incoming(QIOChannel *ioc) > { > -MigrationState *s = migrate_get_current(); > Error *local_err = NULL; > > trace_migration_set_incoming_channel( > ioc, object_get_typename(OBJE

Re: [PATCH v7 5/5] multifd: Implement zero copy write in multifd migration (multifd-zero-copy)

2022-01-12 Thread Peter Xu
On Thu, Jan 06, 2022 at 07:13:42PM -0300, Leonardo Bras wrote: > Implement zero copy on nocomp_send_write(), by making use of QIOChannel > writev + flags & flush interface. > > Change multifd_send_sync_main() so it can distinguish each iteration sync from > the setup and the completion, so a flush

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

2022-01-12 Thread Michael S. Tsirkin
On Thu, Jan 13, 2022 at 01:06:09PM +0800, Peter Xu wrote: > On Wed, Jan 05, 2022 at 12:19:45PM +0800, Jason Wang wrote: > > @@ -1725,11 +1780,16 @@ static bool vtd_do_iommu_translate(VTDAddressSpace > > *vtd_as, PCIBus *bus, > > cc_entry->context_cache_gen = s->context_cache_gen; > >

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

2022-01-12 Thread Thomas Huth
On 10/01/2022 10.35, Philippe Mathieu-Daudé wrote: Hi Patrick, On 1/8/22 04:04, 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

Re: [PATCH] sgx: Move sgx object from /machine/unattached to /machine

2022-01-12 Thread Yang Zhong
Hi Daniel, On Wed, Jan 12, 2022 at 10:11:35AM +, Daniel P. Berrangé wrote: > On Wed, Jan 12, 2022 at 11:55:17AM -0500, Yang Zhong wrote: > > When Libvirt start, it get the vcpu's unavailable-features from > > /machine/unattached/device[0] path by qom-get command, but in SGX > > guest, since th

Re: [RFC PATCH v3 7/7] gitlab-ci: Support macOS 12 via cirrus-run

2022-01-12 Thread Thomas Huth
On 10/01/2022 14.10, Philippe Mathieu-Daudé wrote: Add support for macOS 12 build on Cirrus-CI, similarly to commit 0e103a65ba1 ("gitlab: support for ... macOS 11 via cirrus-run"). Update the lcitool repository to get the macos12 mappings, and generate the vars file by calling 'make lcitool-refr

Re: [PATCH] softmmu/device_tree: Remove redundant pointer assignment

2022-01-12 Thread Thomas Huth
On 11/01/2022 04.27, Yanan Wang wrote: The pointer assignment "const char *p = path;" in function qemu_fdt_add_path is unnecessary. Let's remove it and just use the "path" passed in. No functional change. Suggested-by: Richard Henderson Signed-off-by: Yanan Wang --- Based on: softmmu/device_tr

Re: [PATCH v6 20/23] hw/intc: Add RISC-V AIA IMSIC device emulation

2022-01-12 Thread Frank Chang
Anup Patel 於 2021年12月30日 週四 下午9:00寫道: > From: Anup Patel > > The RISC-V AIA (Advanced Interrupt Architecture) defines a new > interrupt controller for MSIs (message signal interrupts) called > IMSIC (Incoming Message Signal Interrupt Controller). The IMSIC > is per-HART device and also suppport

Re: [PATCH v6 04/23] target/riscv: Improve delivery of guest external interrupts

2022-01-12 Thread Frank Chang
Anup Patel 於 2021年12月30日 週四 下午8:48寫道: > From: Anup Patel > > The guest external interrupts from an interrupt controller are > delivered only when the Guest/VM is running (i.e. V=1). This means > any guest external interrupt which is triggered while the Guest/VM > is not running (i.e. V=0) will b

<    1   2   3   4