sbsa board boot with neoverse-n1

2022-05-12 Thread Itaru Kitayama
Richard, I'm wondering what options you use to bring up sbsa board with neoverse-n1 as I am only able to do it with cortex-a57, no other CPU types works. Itaru.

Re: [PATCH 2/2] hw: aspeed: Init all UART's with serial devices

2022-05-12 Thread Cédric Le Goater
On 5/13/22 06:02, Peter Delevoryas wrote: Usually, QEMU users just provide one serial device on the command line, either through "-nographic" or "-serial stdio -display none", or just using VNC and popping up a window. We try to match what the user expects, which is to connect the first (and

Re: [PATCH 1/2] hw: aspeed: Add missing UART's

2022-05-12 Thread Cédric Le Goater
On 5/13/22 06:02, Peter Delevoryas wrote: This adds the missing UART memory and IRQ mappings for the AST2400, AST2500, AST2600, and AST1030. This also includes the new UART interfaces added in the AST2600 and AST1030 from UART6 to UART13. The addresses and interrupt numbers for these two later

[PATCH 1/2] hw: aspeed: Add missing UART's

2022-05-12 Thread Peter Delevoryas
This adds the missing UART memory and IRQ mappings for the AST2400, AST2500, AST2600, and AST1030. This also includes the new UART interfaces added in the AST2600 and AST1030 from UART6 to UART13. The addresses and interrupt numbers for these two later chips are identical. Signed-off-by: Peter

[PATCH 0/2] hw: aspeed: Init all UART's with serial devices

2022-05-12 Thread Peter Delevoryas
CC'ing Zev and OpenBMC since this was motivated by a problem Zev had there: https://lore.kernel.org/openbmc/ynzgnwjkydmuu...@hatter.bewilderbeest.net/ This series adds all the missing UART's in the Aspeed chips, and initializes them all with serial devices (even if there is no peer character

[PATCH 2/2] hw: aspeed: Init all UART's with serial devices

2022-05-12 Thread Peter Delevoryas
Usually, QEMU users just provide one serial device on the command line, either through "-nographic" or "-serial stdio -display none", or just using VNC and popping up a window. We try to match what the user expects, which is to connect the first (and usually only) serial device to the UART a board

Re: Re: [PATCH v5 1/9] virtio-crypto: header update

2022-05-12 Thread zhenwei pi
Hi, Daniel Something I do in my local branch(for the v6 series): - [PATCH v5 1/9] virtio-crypto: header update - [PATCH v5 3/9] crypto: Introduce akcipher crypto class Add 'Reviewed-by: Daniel P. Berrangé ' - [PATCH v5 4/9] crypto: add ASN.1 DER decoder - [PATCH v5 7/9] test/crypto: Add test

Re: [PATCH v5 2/4] virtio: get class_id and pci device id by the virtio id

2022-05-12 Thread longpeng2--- via
在 2022/5/12 14:56, Michael S. Tsirkin 写道: On Thu, May 12, 2022 at 02:21:01PM +0800, Longpeng(Mike) wrote: From: Longpeng Add helpers to get the "Transitional PCI Device ID" and "class_id" of the device specified by the "Virtio Device ID". These helpers will be used to build the generic

Re: [PATCH v5 3/4] vdpa: add vdpa-dev support

2022-05-12 Thread longpeng2--- via
在 2022/5/12 22:36, Stefano Garzarella 写道: On Thu, May 12, 2022 at 02:21:02PM +0800, Longpeng(Mike) wrote: From: Longpeng Supports vdpa-dev, we can use the deivce directly: -M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \ vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x

Re: [PATCH v3 3/3] target/riscv: Add vstimecmp support

2022-05-12 Thread Atish Kumar Patra
On Wed, May 11, 2022 at 9:48 PM Anup Patel wrote: > > On Tue, May 10, 2022 at 3:03 AM Atish Patra wrote: > > > > vstimecmp CSR allows the guest OS or to program the next guest timer > > interrupt directly. Thus, hypervisor no longer need to inject the > > timer interrupt to the guest if

Re: [PATCH qemu v3 00/10] Add mask agnostic behavior for rvv instructions

2022-05-12 Thread Weiwei Li
在 2022/5/12 下午4:55, ~eopxd 写道: According to v-spec, mask agnostic behavior can be either kept as undisturbed or set elements' bits to all 1s. To distinguish the difference of mask policies, QEMU should be able to simulate the mask agnostic behavior as "set mask elements' bits to all 1s".

Re: [PATCH] hw: aspeed_soc: Initialize all UART's with serial devices

2022-05-12 Thread Peter Delevoryas
> On May 12, 2022, at 5:37 PM, Peter Delevoryas wrote: > > Usually, QEMU users just provide one serial device on the command line, > either through "-nographic" or "-serial stdio -display none", or just using > VNC and popping up a window. We try to match what the user expects, which is > to

Re: [PATCH 2/2] coroutine: Revert to constant batch size

2022-05-12 Thread 成川 弘樹
I'm not sure how much testing is expected for "Tested-by". If just checking my perspective is enough, yes. But I did not check that this patch fixes the problem of excessive resource consumption. On 2022/05/12 21:50, Philippe Mathieu-Daudé wrote: Hi Hiroki, On Thu, May 12, 2022 at 8:57 AM

Re: [RFC PATCH v4 14/36] i386/tdx: Implement user specified tsc frequency

2022-05-12 Thread Xiaoyao Li
On 5/13/2022 2:04 AM, Isaku Yamahata wrote: On Thu, May 12, 2022 at 11:17:41AM +0800, Xiaoyao Li wrote: Reuse "-cpu,tsc-frequency=" to get user wanted tsc frequency and pass it to KVM_TDX_INIT_VM. Besides, sanity check the tsc frequency to be in the legal range and legal granularity

Re: [RFC PATCH v4 24/36] i386/tdx: Add TDVF memory via KVM_TDX_INIT_MEM_REGION

2022-05-12 Thread Xiaoyao Li
On 5/13/2022 2:34 AM, Isaku Yamahata wrote: On Thu, May 12, 2022 at 11:17:51AM +0800, Xiaoyao Li wrote: From: Isaku Yamahata TDVF firmware (CODE and VARS) needs to be added/copied to TD's private memory via KVM_TDX_INIT_MEM_REGION, as well as TD HOB and TEMP memory. Signed-off-by: Isaku

Re: [RFC PATCH v4 10/36] i386/kvm: Move architectural CPUID leaf generation to separate helper

2022-05-12 Thread Xiaoyao Li
On 5/13/2022 1:48 AM, Isaku Yamahata wrote: On Thu, May 12, 2022 at 11:17:37AM +0800, Xiaoyao Li wrote: diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index b434feaa6b1d..5c7972f617e8 100644 --- a/target/i386/kvm/kvm_i386.h +++ b/target/i386/kvm/kvm_i386.h @@ -24,6

[PATCH] hw: aspeed_soc: Initialize all UART's with serial devices

2022-05-12 Thread Peter Delevoryas
Usually, QEMU users just provide one serial device on the command line, either through "-nographic" or "-serial stdio -display none", or just using VNC and popping up a window. We try to match what the user expects, which is to connect the first (and usually only) serial device to the UART a board

Re: [RFC PATCH v4 09/36] KVM: Introduce kvm_arch_pre_create_vcpu()

2022-05-12 Thread Xiaoyao Li
On 5/13/2022 1:50 AM, Isaku Yamahata wrote: On Thu, May 12, 2022 at 11:17:36AM +0800, Xiaoyao Li wrote: Introduce kvm_arch_pre_create_vcpu(), to perform arch-dependent work prior to create any vcpu. This is for i386 TDX because it needs call TDX_INIT_VM before creating any vcpu. Because

[RFC PATCH 9/9] iotests: use tests/venv for running tests

2022-05-12 Thread John Snow
Essentially, this: (A) adjusts the python binary to be the one found in the venv (which is a symlink to the python binary chosen at configure time) (B) adds a new VIRTUAL_ENV export variable (C) changes PATH to front-load the venv binary directory. If the venv directory isn't found, raise a

[RFC PATCH 7/9] tests: add check-venv to build-tcg-disabled CI recipe

2022-05-12 Thread John Snow
Signed-off-by: John Snow --- .gitlab-ci.d/buildtest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 0aea7ab84c2..5c6201847f1 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -245,6 +245,7 @@

[RFC PATCH 3/9] tests: install "qemu" namespace package into venv

2022-05-12 Thread John Snow
This patch adds the "qemu" namespace package to the $build/tests/venv directory. It does so in "editable" mode, which means that changes to the source python directory will actively be reflected by the venv. This patch also then removes any sys.path hacking from the avocado test scripts directly.

[RFC PATCH 8/9] iotests: fix source directory location

2022-05-12 Thread John Snow
If you invoke the check script from outside of the tests/qemu-iotests directory, the directories initialized as source_iotests and build_iotests will be incorrect. We can use the location of the source file itself to be more accurate. (I don't know if this is actually *used*, but what was there

[RFC PATCH 2/9] tests: add "TESTS_PYTHON" variable to Makefile

2022-05-12 Thread John Snow
This is a convenience feature: $(PYTHON) points to the Python executable we were instructed to use by the configure script. We use that Python to create a virtual environment with the "check-venv" target in tests/Makefile.include. $(TESTS_PYTHON) points to the Python executable belonging to the

[RFC PATCH 6/9] tests: add check-venv as a dependency of check and check-block

2022-05-12 Thread John Snow
This patch is being front-loaded before iotests actually relies on the tests/venv being created in order to preserve bisectability. Problems I am aware of here (There are a lot, sorry): - I am not sure the right place to express this dependency, so I did it in tests/Makefile.include. It seems

[RFC PATCH 1/9] python: update for mypy 0.950

2022-05-12 Thread John Snow
typeshed (included in mypy) recently updated to improve the typing for WriteTransport objects. I was working around this, but now there's a version where I shouldn't work around it. Unfortunately this creates some minor ugliness if I want to support both pre- and post-0.950 versions. For now, for

[RFC PATCH 5/9] tests: use tests/venv to run basevm.py-based scripts

2022-05-12 Thread John Snow
This patch co-opts the virtual environment being used by avocado tests to also run the basevm.py tests. This is being done in preparation for for the qemu.qmp package being removed from qemu.git. As part of the change, remove any sys.path() hacks and treat "qemu" as a normal third-party import.

[RFC PATCH 0/9] tests: run python tests under the build/tests/venv environment

2022-05-12 Thread John Snow
RFC: This is a very early, crude attempt at switching over to an external Python package dependency for QMP. This series does not actually make the switch in and of itself, but instead just switches to the paradigm of using a venv in general to install the QEMU python packages instead of using

[RFC PATCH 4/9] tests: silence pip upgrade warnings during venv creation

2022-05-12 Thread John Snow
Turn off the nag warning coaxing us to upgrade pip. It's not really that interesting to see in CI logs, and as long as nothing is broken -- nothing is broken. Signed-off-by: John Snow --- tests/Makefile.include | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 4/7] block: Make bdrv_co_pwrite() take a const buffer

2022-05-12 Thread Alberto Faria
It does not mutate the buffer. Signed-off-by: Alberto Faria --- include/block/block_int-io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/block/block_int-io.h b/include/block/block_int-io.h index bb454200e5..d4d3bed783 100644 --- a/include/block/block_int-io.h +++

[PATCH 6/7] block: Implement bdrv_{pread, pwrite, pwrite_zeroes}() using generated_co_wrapper

2022-05-12 Thread Alberto Faria
Signed-off-by: Alberto Faria --- block/io.c | 41 include/block/block-io.h | 15 +-- 2 files changed, 9 insertions(+), 47 deletions(-) diff --git a/block/io.c b/block/io.c index 78a289192e..ecd1c2a53c 100644 --- a/block/io.c +++

[PATCH 7/7] block: Add bdrv_co_pwrite_sync()

2022-05-12 Thread Alberto Faria
Also convert bdrv_pwrite_sync() to being implemented using generated_co_wrapper. Signed-off-by: Alberto Faria --- block/io.c | 5 +++-- include/block/block-io.h | 8 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/block/io.c b/block/io.c index

[PATCH 5/7] block: Make 'bytes' param of bdrv_co_{pread, pwrite, preadv, pwritev}() an int64_t

2022-05-12 Thread Alberto Faria
For consistency with other I/O functions, and in preparation to implement bdrv_{pread,pwrite}() using generated_co_wrapper. unsigned int fits in int64_t, so all callers remain correct. Signed-off-by: Alberto Faria --- block/coroutines.h | 4 ++-- include/block/block_int-io.h | 4 ++--

[PATCH 1/7] block: Add a 'flags' param to bdrv_{pread, pwrite, pwrite_sync}()

2022-05-12 Thread Alberto Faria
For consistency with other I/O functions, and in preparation to implement them using generated_co_wrapper. Callers were updated using this Coccinelle script: @@ expression child, offset, buf, bytes; @@ - bdrv_pread(child, offset, buf, bytes) + bdrv_pread(child, offset, buf, bytes, 0)

[PATCH 2/7] block: Change bdrv_{pread, pwrite, pwrite_sync}() param order

2022-05-12 Thread Alberto Faria
Swap 'buf' and 'bytes' around for consistency with bdrv_co_{pread,pwrite}(), and in preparation to implement these functions using generated_co_wrapper. Callers were updated using this Coccinelle script: @@ expression child, offset, buf, bytes, flags; @@ - bdrv_pread(child, offset, buf,

[PATCH 3/7] block: Make bdrv_{pread,pwrite}() return 0 on success

2022-05-12 Thread Alberto Faria
They currently return the value of their 'bytes' parameter on success. Make them return 0 instead, for consistency with other I/O functions and in preparation to implement them using generated_co_wrapper. This also makes it clear that short reads/writes are not possible. The few callers that

[PATCH 0/7] Implement bdrv_{pread, pwrite, pwrite_sync, pwrite_zeroes}() using generated_co_wrapper

2022-05-12 Thread Alberto Faria
Start by making the interfaces of analogous non-coroutine and coroutine functions consistent with each other, then implement the non-coroutine ones using generated_co_wrapper. For the bdrv_pwrite_sync() case, also add the missing bdrv_co_pwrite_sync() function. Alberto Faria (7): block: Add a

Re: [PATCH 2/9] vfio: Fix compilation errors caused by VFIO migration v1 deprecation

2022-05-12 Thread Jason Gunthorpe
On Thu, May 12, 2022 at 03:11:40PM -0600, Alex Williamson wrote: > On Thu, 12 May 2022 15:25:32 -0300 > Jason Gunthorpe wrote: > > > On Thu, May 12, 2022 at 11:57:10AM -0600, Alex Williamson wrote: > > > > @@ -767,9 +767,10 @@ static void vfio_migration_state_notifier(Notifier > > > >

Re: [RFC PATCH 1/2] target/ppc: Add invalid imz, isi and snan to do_float_check_status()

2022-05-12 Thread Richard Henderson
On 5/12/22 12:42, Víctor Colombo wrote: Make do_float_check_status also handle some invalid exceptions: imz, isi and snan. The idea is to try to concentrate the handling of all fp exceptions in do_float_check_status. For this RFC, move only the 3 exceptions stated above. I chose to create new

Re: [PULL 00/27] Misc patches for 2022-05-12

2022-05-12 Thread Richard Henderson
On 5/12/22 10:24, Paolo Bonzini wrote: The following changes since commit ec11dc41eec5142b4776db1296972c6323ba5847: Merge tag 'pull-misc-2022-05-11' of git://repo.or.cz/qemu/armbru into staging (2022-05-11 09:00:26 -0700) are available in the Git repository at:

Re: [PATCH 2/9] vfio: Fix compilation errors caused by VFIO migration v1 deprecation

2022-05-12 Thread Alex Williamson
On Thu, 12 May 2022 15:25:32 -0300 Jason Gunthorpe wrote: > On Thu, May 12, 2022 at 11:57:10AM -0600, Alex Williamson wrote: > > > @@ -767,9 +767,10 @@ static void vfio_migration_state_notifier(Notifier > > > *notifier, void *data) > > > case MIGRATION_STATUS_CANCELLED: > > > case

Re: [PATCH v5 17/21] migration: Export tls-[creds|hostname|authz] params to cmdline too

2022-05-12 Thread Peter Xu
On Thu, May 12, 2022 at 08:05:45PM +0100, Daniel P. Berrangé wrote: > > > @@ -4372,12 +4375,9 @@ static void migration_class_init(ObjectClass > > > *klass, void *data) > > > static void migration_instance_finalize(Object *obj) > > > { > > > MigrationState *ms = MIGRATION_OBJ(obj); > > > -

[RFC PATCH 1/2] target/ppc: Add invalid imz, isi and snan to do_float_check_status()

2022-05-12 Thread Víctor Colombo
Make do_float_check_status also handle some invalid exceptions: imz, isi and snan. The idea is to try to concentrate the handling of all fp exceptions in do_float_check_status. For this RFC, move only the 3 exceptions stated above. I chose to create new '*_defer' helpers to propose a gradual

[RFC PATCH 0/2] target/ppc: Propose rework in fp exception handling

2022-05-12 Thread Víctor Colombo
Hello everyone! I would like to propose a rework on the fpscr exceptions in fpu_helper.c. Today, we have: do_float_check_status() dealing with Overflow, Underflow, and Inexact; and other helpers for the invalid exceptions (like float_invalid_op_vximz(), float_invalid_op_vxisi()), including some

Re: [PATCH v3 0/9] VDIV/VMOD Implementation

2022-05-12 Thread Lucas Mateus Martins Araujo e Castro
ping On 20/04/2022 16:40, Lucas Mateus Castro(alqotel) wrote: From: "Lucas Mateus Castro (alqotel)" This patch series is an implementation of the vector divide, vector divide extended and vector modulo instructions from PowerISA 3.1 The first patch are Matheus' patch, used here since the

[RFC PATCH 2/2] target/ppc: Rely on do_float_check_status for VSX_MADD invalid excepts

2022-05-12 Thread Víctor Colombo
Make necessary changes for Multiply-Add instructions to use the proposed reworked exceptions handling in do_float_check_status. This should allow for cleaner code, not requiring the helper to check multiple exceptions in its body. Signed-off-by: Víctor Colombo --- target/ppc/fpu_helper.c | 5

Re: [RFC PATCH v4 14/36] i386/tdx: Implement user specified tsc frequency

2022-05-12 Thread Isaku Yamahata
On Thu, May 12, 2022 at 11:17:41AM +0800, Xiaoyao Li wrote: > Reuse "-cpu,tsc-frequency=" to get user wanted tsc frequency and pass it > to KVM_TDX_INIT_VM. > > Besides, sanity check the tsc frequency to be in the legal range and > legal granularity (required by TDX module). Just to make it

Re: [PATCH v5 17/21] migration: Export tls-[creds|hostname|authz] params to cmdline too

2022-05-12 Thread Daniel P . Berrangé
On Thu, May 12, 2022 at 07:03:13PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > It's useful for specifying tls credentials all in the cmdline (along with > > the -object tls-creds-*), especially for debugging purpose. > > > > The trick here is we must remember

Re: [PATCH v5 17/21] migration: Export tls-[creds|hostname|authz] params to cmdline too

2022-05-12 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > It's useful for specifying tls credentials all in the cmdline (along with > the -object tls-creds-*), especially for debugging purpose. > > The trick here is we must remember to not free these fields again in the > finalize() function of migration object,

Re: [PATCH 2/9] vfio: Fix compilation errors caused by VFIO migration v1 deprecation

2022-05-12 Thread Jason Gunthorpe
On Thu, May 12, 2022 at 11:57:10AM -0600, Alex Williamson wrote: > > @@ -767,9 +767,10 @@ static void vfio_migration_state_notifier(Notifier > > *notifier, void *data) > > case MIGRATION_STATUS_CANCELLED: > > case MIGRATION_STATUS_FAILED: > > bytes_transferred = 0; > > -

Re: [RFC PATCH v4 23/36] i386/tdx: Setup the TD HOB list

2022-05-12 Thread Isaku Yamahata
On Thu, May 12, 2022 at 11:17:50AM +0800, Xiaoyao Li wrote: > The TD HOB list is used to pass the information from VMM to TDVF. The TD > HOB must include PHIT HOB and Resource Descriptor HOB. More details can > be found in TDVF specification and PI specification. > > Build the TD HOB in TDX's

Re: [PULL V3 08/15] vhost: Shadow virtqueue buffers forwarding

2022-05-12 Thread Eugenio Perez Martin
On Thu, May 12, 2022 at 5:48 PM Peter Maydell wrote: > > On Tue, 15 Mar 2022 at 06:14, Jason Wang wrote: > > > > From: Eugenio Pérez > > > > Initial version of shadow virtqueue that actually forward buffers. There > > is no iommu support at the moment, and that will be addressed in future > >

[PATCH 5/6] hw/virtio: Replace g_memdup() by g_memdup2()

2022-05-12 Thread Eugenio Pérez
From: Philippe Mathieu-Daudé Per https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538 The old API took the size of the memory to duplicate as a guint, whereas most memory functions take memory sizes as a gsize. This made it easy to accidentally pass a gsize

[PATCH] hw/riscv: virt: Avoid double FDT platform node

2022-05-12 Thread Dylan Reid
When starting the virt machine with `-machine virt,aia=aplic-imsic`, both the imsic and aplic init code will add platform fdt nodes by calling `platform_bus_add_all_fdt_nodes`. This leads to an error at startup: ``` qemu_fdt_add_subnode: Failed to create subnode /platform@400: FDT_ERR_EXISTS

Re: [PATCH v2] hw: m25p80: allow write_enable latch get/set

2022-05-12 Thread Peter Delevoryas
> On May 11, 2022, at 10:25 PM, Cédric Le Goater wrote: > > Hello Iris, > > [ Fixing Thomas email ] > > On 5/12/22 02:54, Iris Chen via wrote: >> The write_enable latch property is not currently exposed. >> This commit makes it a modifiable property using get/set methods. >> Signed-off-by:

Re: [RFC PATCH v4 36/36] docs: Add TDX documentation

2022-05-12 Thread Isaku Yamahata
On Thu, May 12, 2022 at 11:18:03AM +0800, Xiaoyao Li wrote: > Add docs/system/i386/tdx.rst for TDX support, and add tdx in > confidential-guest-support.rst > > Signed-off-by: Xiaoyao Li > --- > docs/system/confidential-guest-support.rst | 1 + > docs/system/i386/tdx.rst |

[PATCH 1/6] vhost: Track descriptor chain in private at SVQ

2022-05-12 Thread Eugenio Pérez
The device could have access to modify them, and it definitely have access when we implement packed vq. Harden SVQ maintaining a private copy of the descriptor chain. Other fields like buffer addresses are already maintained sepparatedly. Signed-off-by: Eugenio Pérez ---

[PATCH 2/6] vhost: Fix device's used descriptor dequeue

2022-05-12 Thread Eugenio Pérez
Only the first one of them were properly enqueued back. Fixes: 100890f7ca ("vhost: Shadow virtqueue buffers forwarding") Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git

Re: [RFC PATCH v4 10/36] i386/kvm: Move architectural CPUID leaf generation to separate helper

2022-05-12 Thread Isaku Yamahata
On Thu, May 12, 2022 at 11:17:37AM +0800, Xiaoyao Li wrote: > diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h > index b434feaa6b1d..5c7972f617e8 100644 > --- a/target/i386/kvm/kvm_i386.h > +++ b/target/i386/kvm/kvm_i386.h > @@ -24,6 +24,10 @@ > #define

Re: [PATCH 0/9] vfio/migration: Implement VFIO migration protocol v2

2022-05-12 Thread Alex Williamson
On Thu, 12 May 2022 18:43:11 +0300 Avihai Horon wrote: > Hello, > > Following VFIO migration protocol v2 acceptance in kernel, this series > implements VFIO migration according to the new v2 protocol and replaces > the now deprecated v1 implementation. Let's not bottleneck others waiting on a

[PATCH 0/6] Shadow VirtQueue Fixes

2022-05-12 Thread Eugenio Pérez
Random fixes found while developing control virtqueue + multiqueue but the last one, found by coverity. The previous one is a patch created by Philippe Mathieu-Daudé , send as a RFC in another series but already acked. All but Philippe's ones are bugs non-triggable, since there is still no

Re: [PATCH qemu] spapr: Use address from elf parser for kernel address

2022-05-12 Thread Daniel Henrique Barboza
On 5/4/22 03:55, Alexey Kardashevskiy wrote: tl;dr: This allows Big Endian zImage booting via -kernel + x-vof=on. QEMU loads the kernel at 0x40 by default which works most of the time as Linux kernels are relocatable, 64bit and compiled with "-pie" (position independent code). This works

Re: [RFC PATCH v4 24/36] i386/tdx: Add TDVF memory via KVM_TDX_INIT_MEM_REGION

2022-05-12 Thread Isaku Yamahata
On Thu, May 12, 2022 at 11:17:51AM +0800, Xiaoyao Li wrote: > From: Isaku Yamahata > > TDVF firmware (CODE and VARS) needs to be added/copied to TD's private > memory via KVM_TDX_INIT_MEM_REGION, as well as TD HOB and TEMP memory. > > Signed-off-by: Isaku Yamahata > Signed-off-by: Xiaoyao Li

[PATCH 6/6] vhost: Fix element in vhost_svq_add failure

2022-05-12 Thread Eugenio Pérez
Coverity rightly reports that is not free in that case. Fixes: Coverity CID 1487559 Fixes: 100890f7ca ("vhost: Shadow virtqueue buffers forwarding") Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c | 8 1 file changed, 8 insertions(+) diff --git

Re: [PATCH 2/9] vfio: Fix compilation errors caused by VFIO migration v1 deprecation

2022-05-12 Thread Alex Williamson
On Thu, 12 May 2022 18:43:13 +0300 Avihai Horon wrote: > VFIO migration protocol v1 was deprecated and as part of it some of the > uAPI definitions were renamed. This caused compilation errors. > Fix them. > > Signed-off-by: Avihai Horon > --- > hw/vfio/common.c| 6 +++--- >

Re: [PATCH v5 15/21] migration: Parameter x-postcopy-preempt-break-huge

2022-05-12 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Add a parameter that can conditionally disable the "break sending huge > page" behavior in postcopy preemption. By default it's enabled. > > It should only be used for debugging purposes, and we should never remove > the "x-" prefix. This is actually a

[PATCH 4/6] vdpa: Fix index calculus at vhost_vdpa_svqs_start

2022-05-12 Thread Eugenio Pérez
With the introduction of MQ the index of the vq needs to be calculated with the device model vq_index. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang --- hw/virtio/vhost-vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/vhost-vdpa.c

Re: [RFC PATCH v4 06/36] i386/tdx: Get tdx_capabilities via KVM_TDX_CAPABILITIES

2022-05-12 Thread Isaku Yamahata
On Thu, May 12, 2022 at 11:17:33AM +0800, Xiaoyao Li wrote: > KVM provides TDX capabilities via sub command KVM_TDX_CAPABILITIES of > IOCTL(KVM_MEMORY_ENCRYPT_OP). Get the capabilities when initializing > TDX context. It will be used to validate user's setting later. > > Besides, introduce the

Re: [RFC PATCH v4 09/36] KVM: Introduce kvm_arch_pre_create_vcpu()

2022-05-12 Thread Isaku Yamahata
On Thu, May 12, 2022 at 11:17:36AM +0800, Xiaoyao Li wrote: > Introduce kvm_arch_pre_create_vcpu(), to perform arch-dependent > work prior to create any vcpu. This is for i386 TDX because it needs > call TDX_INIT_VM before creating any vcpu. Because "11/36 i386/tdx: Initialize TDX before

Re: [RFC PATCH v2 3/7] target/ppc: Implemented pmxvi*ger* instructions

2022-05-12 Thread Lucas Mateus Martins Araujo e Castro
On 08/05/2022 00:48, Richard Henderson wrote: On 5/6/22 07:18, Lucas Mateus Castro(alqotel) wrote: +{ +    arg_MMIRR_XX3 m; +    m.xa = a->xa; +    m.xb = a->xb; +    m.xt = a->xt; +    m.pmsk = 0xFF; +    m.ymsk = 0xF; +    m.xmsk = 0xF; +    return do_ger_MMIRR_XX3(ctx, , helper);   } Is

Re: [PATCH v5 16/21] migration: Add helpers to detect TLS capability

2022-05-12 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Add migrate_tls_enabled() to detect whether TLS is configured. > > Add migrate_channel_requires_tls() to detect whether the specific channel > requires TLS. > > No functional change intended. > > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan

[PATCH 3/6] vdpa: Fix bad index calculus at vhost_vdpa_get_vring_base

2022-05-12 Thread Eugenio Pérez
Fixes: 6d0b222666 ("vdpa: Adapt vhost_vdpa_get_vring_base to SVQ") Acked-by: Jason Wang Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index a30510ed17..493269b0b5

[PULL 27/27] vmxcap: add tertiary execution controls

2022-05-12 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- scripts/kvm/vmxcap | 17 + 1 file changed, 17 insertions(+) diff --git a/scripts/kvm/vmxcap b/scripts/kvm/vmxcap index f140040104..ce27f5e635 100755 --- a/scripts/kvm/vmxcap +++ b/scripts/kvm/vmxcap @@ -23,6 +23,7 @@

Re: [PATCH v5 14/21] migration: Create the postcopy preempt channel asynchronously

2022-05-12 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > This patch allows the postcopy preempt channel to be created > asynchronously. The benefit is that when the connection is slow, we won't > take the BQL (and potentially block all things like QMP) for a long time > without releasing. > > A function

[PULL 23/27] coroutine-lock: qemu_co_queue_restart_all is a coroutine-only qemu_co_enter_all

2022-05-12 Thread Paolo Bonzini
qemu_co_queue_restart_all is basically the same as qemu_co_enter_all but without a QemuLockable argument. That's perfectly fine, but only as long as the function is marked coroutine_fn. If used outside coroutine context, qemu_co_queue_wait will attempt to take the lock and that is just broken:

[PULL 21/27] coroutine-lock: qemu_co_queue_next is a coroutine-only qemu_co_enter_next

2022-05-12 Thread Paolo Bonzini
qemu_co_queue_next is basically the same as qemu_co_enter_next but without a QemuLockable argument. That's perfectly fine, but only as long as the function is marked coroutine_fn. If used outside coroutine context, qemu_co_queue_wait will attempt to take the lock and that is just broken: if you

[PULL 26/27] vl: make machine type deprecation a warning

2022-05-12 Thread Paolo Bonzini
error_report should generally be followed by a failure; if we can proceed anyway, that is just a warning and should be communicated properly to the user with warn_report. Reviewed-by: Markus Armbruster Message-Id: <20220511175043.27327-1-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini ---

[PULL 20/27] net: slirp: allow CFI with libslirp >= 4.7

2022-05-12 Thread Paolo Bonzini
slirp 4.7 introduces a new CFI-friendly timer callback that does not pass function pointers within libslirp as callbacks for timers. Check the version number and, if it is new enough, allow using CFI even with a system libslirp. Reviewed-by: Samuel Thibault Reviewed-by: Marc-André Lureau

[PULL 22/27] coroutine-lock: introduce qemu_co_queue_enter_all

2022-05-12 Thread Paolo Bonzini
Because qemu_co_queue_restart_all does not release the lock, it should be used only in coroutine context. Introduce a new function that, like qemu_co_enter_next, does release the lock, and use it whenever qemu_co_queue_restart_all was used outside coroutine context. Signed-off-by: Paolo Bonzini

[PULL 19/27] net: slirp: add support for CFI-friendly timer API

2022-05-12 Thread Paolo Bonzini
libslirp 4.7 introduces a CFI-friendly version of the .timer_new callback. The new callback replaces the function pointer with an enum; invoking the callback is done with a new function slirp_handle_timer. Support the new API so that CFI can be made compatible with using a system libslirp.

[PULL 25/27] meson: link libpng independent of vnc

2022-05-12 Thread Paolo Bonzini
From: Kshitij Suri Currently png support is dependent on vnc for linking object file to libpng. This commit makes the parameter independent of vnc as it breaks system emulator with --disable-vnc unless --disable-png is added. Fixes: 9a0a119a38 ("Added parameter to take screenshot with

[PULL 13/27] machine: add mem compound property

2022-05-12 Thread Paolo Bonzini
Make -m syntactic sugar for a compound property "-machine mem.{size,max-size,slots}". The new property does not have the magic conversion to megabytes of unsuffixed arguments, and also does not understand that "0" means the default size (you have to leave it out to get the default). This means

[PULL 18/27] net: slirp: switch to slirp_new

2022-05-12 Thread Paolo Bonzini
Replace slirp_init with slirp_new, so that a more recent cfg.version can be specified. The function appeared in version 4.1.0. Signed-off-by: Paolo Bonzini --- meson.build | 2 +- net/slirp.c | 27 +-- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git

[PULL 24/27] vhost-backend: do not depend on CONFIG_VHOST_VSOCK

2022-05-12 Thread Paolo Bonzini
The vsock callbacks .vhost_vsock_set_guest_cid and .vhost_vsock_set_running are the only ones to be conditional on #ifdef CONFIG_VHOST_VSOCK. This is different from any other device-dependent callbacks like .vhost_scsi_set_endpoint, and it also broke when CONFIG_VHOST_VSOCK was changed to a

[PULL 17/27] net: slirp: introduce a wrapper struct for QemuTimer

2022-05-12 Thread Paolo Bonzini
This struct will be extended in the next few patches to support the new slirp_handle_timer() call. For that we need to store an additional "int" for each SLIRP timer, in addition to the cb_opaque. Reviewed-by: Samuel Thibault Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini ---

[PULL 11/27] machine: use QAPI struct for boot configuration

2022-05-12 Thread Paolo Bonzini
As part of converting -boot to a property with a QAPI type, define the struct and use it throughout QEMU to access boot configuration. machine_boot_parse takes care of doing the QemuOpts->QAPI conversion by hand, for now. Signed-off-by: Paolo Bonzini Message-Id:

[PULL 16/27] slirp: bump submodule past 4.7 release

2022-05-12 Thread Paolo Bonzini
Version 4.7 of slirp provides a new timer API that works better with CFI, together with several other improvements: * Allow disabling the internal DHCP server !22 * Support Unix sockets in hostfwd !103 * IPv6 DNS proxying support !110 * bootp: add support for UEFI HTTP boot !111 and bugfixes.

[PULL 12/27] machine: add boot compound property

2022-05-12 Thread Paolo Bonzini
Make -boot syntactic sugar for a compound property "-machine boot.{order,menu,...}". machine_boot_parse is replaced by the setter for the property. Signed-off-by: Paolo Bonzini Message-Id: <20220414165300.555321-3-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 100

[PULL 07/27] hw/xen/xen_pt: Resolve igd_passthrough_isa_bridge_create() indirection

2022-05-12 Thread Paolo Bonzini
From: Bernhard Beschow Now that igd_passthrough_isa_bridge_create() is implemented within the xen context it may use Xen* data types directly and become xen_igd_passthrough_isa_bridge_create(). This resolves an indirection. Signed-off-by: Bernhard Beschow Acked-by: Anthony PERARD Message-Id:

[PULL 14/27] machine: make memory-backend a link property

2022-05-12 Thread Paolo Bonzini
Handle HostMemoryBackend creation and setting of ms->ram entirely in machine_run_board_init. Signed-off-by: Paolo Bonzini Message-Id: <20220414165300.555321-5-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 70 ++---

[PULL 15/27] machine: move more memory validation to Machine object

2022-05-12 Thread Paolo Bonzini
This allows setting memory properties without going through vl.c, and have them validated just the same. Signed-off-by: Paolo Bonzini Message-Id: <20220414165300.555321-6-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 21 +++-- softmmu/vl.c | 17

[PULL 06/27] hw/xen/xen_pt: Confine igd-passthrough-isa-bridge to XEN

2022-05-12 Thread Paolo Bonzini
From: Bernhard Beschow igd-passthrough-isa-bridge is only requested in xen_pt but was implemented in pc_piix.c. This caused xen_pt to dependend on i386/pc which is hereby resolved. Signed-off-by: Bernhard Beschow Acked-by: Anthony PERARD Message-Id: <20220326165825.30794-2-shen...@gmail.com>

[PULL 10/27] tests/qtest/libqos: Add generic pci host bridge in arm-virt machine

2022-05-12 Thread Paolo Bonzini
From: Eric Auger Up to now the virt-machine node contains a virtio-mmio node. However no driver produces any PCI interface node. Hence, PCI tests cannot be run with aarch64 binary. Add a GPEX driver node that produces a pci interface node. This latter then can be consumed by all the pci tests.

[PULL 04/27] checkpatch: fix g_malloc check

2022-05-12 Thread Paolo Bonzini
Use the string equality operator "eq", and ensure that $1 is defined by using "(try|)" instead of "(try)?". The alternative "((?:try)?)" is longer and less readable. Signed-off-by: Paolo Bonzini --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PULL 03/27] target/i386: do not consult nonexistent host leaves

2022-05-12 Thread Paolo Bonzini
When cache_info_passthrough is requested, QEMU passes the host values of the cache information CPUID leaves down to the guest. However, it blindly assumes that the CPUID leaf exists on the host, and this cannot be guaranteed: for example, KVM has recently started to synthesize AMD leaves up to

[PULL 09/27] tests/qtest/libqos: Skip hotplug tests if pci root bus is not hotpluggable

2022-05-12 Thread Paolo Bonzini
From: Eric Auger ARM does not not support hotplug on pcie.0. Add a flag on the bus which tells if devices can be hotplugged and skip hotplug tests if the bus cannot be hotplugged. This is a temporary solution to enable the other pci tests on aarch64. Signed-off-by: Eric Auger Acked-by: Thomas

[PULL 08/27] tests/qtest/libqos/pci: Introduce pio_limit

2022-05-12 Thread Paolo Bonzini
From: Eric Auger At the moment the IO space limit is hardcoded to QPCI_PIO_LIMIT = 0x1. When accesses are performed to a bar, the base address of this latter is compared against the limit to decide whether we perform an IO or a memory access. On ARM, we cannot keep this PIO limit as the

[PULL 02/27] pc-bios/optionrom: compile with -Wno-array-bounds

2022-05-12 Thread Paolo Bonzini
Avoids the following bogus warning: pvh_main.c: In function ‘pvh_load_kernel’: pvh_main.c:101:42: warning: array subscript 0 is outside array bounds of ‘uint16_t[0]’ {aka ‘short unsigned int[]’} [-Warray-bounds] 101 | uint32_t ebda_paddr = ((uint32_t)*((uint16_t *)EBDA_BASE_ADDR)) <<

[PULL 01/27] pc-bios/optionrom: detect -fno-pie

2022-05-12 Thread Paolo Bonzini
Do not rely on the detection that was done in the configure script, since in the future we may want to cross-compile this file. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- configure | 1 - pc-bios/optionrom/Makefile | 3 ++- 2 files changed, 2

[PULL 05/27] meson: Make mremap() detecting works correctly

2022-05-12 Thread Paolo Bonzini
From: Juan Quintela Without this (at least in Fedora 35) it don't detect mremap() correctly. Signed-off-by: Juan Quintela Message-Id: <20220502131119.2345-1-quint...@redhat.com> [Also switch the LEGACY_RDMA_REG_MR test to cc.links, otherwise Debian fails to build. - Paolo] Signed-off-by:

[PULL 00/27] Misc patches for 2022-05-12

2022-05-12 Thread Paolo Bonzini
The following changes since commit ec11dc41eec5142b4776db1296972c6323ba5847: Merge tag 'pull-misc-2022-05-11' of git://repo.or.cz/qemu/armbru into staging (2022-05-11 09:00:26 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to

  1   2   3   >