Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-25 Thread Akihiko Odaki
On 2022/04/25 3:45, Christian Schoenebeck wrote: +} +err = chmod(addr.sun_path, mode); I'm not sure if it is fine to have a time window between bind() and chmod(). Do you have some rationale? Good question. QEMU's 9p server is multi-threaded; all 9p requests come in serialized and

[PATCH v6 1/3] aspeed/hace: Support HMAC Key Buffer register.

2022-04-25 Thread Steven Lee
Support HACE28: Hash HMAC Key Buffer Base Address Register. Signed-off-by: Troy Lee Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goater --- hw/misc/aspeed_hace.c | 7 +++ include/hw/misc/aspeed_hace.h | 1 + 2 files changed, 8 insertions(+) diff --git a/hw/misc/aspeed_hace.c

[PATCH v6 2/3] aspeed/hace: Support AST2600 HACE

2022-04-25 Thread Steven Lee
The aspeed ast2600 accumulative mode is described in datasheet ast2600v10.pdf section 25.6.4: 1. Allocating and initiating accumulative hash digest write buffer with initial state. * Since QEMU crypto/hash api doesn't provide the API to set initial state of hash library, and the

[PATCH v6 0/3] aspeed/hace: Support AST2600 HACE

2022-04-25 Thread Steven Lee
This patch series implements ast2600 hace engine with accumulative mode and unit test against to it. Verified with following models - AST2600 with OpenBmc VERSION_ID=2.12.0-dev-660-g4c7b3e692-dirty - check hash verification in uboot and check whether qemu crashed during openbmc web gui

[PATCH v6 3/3] tests/qtest: Add test for Aspeed HACE accumulative mode

2022-04-25 Thread Steven Lee
This add two addition test cases for accumulative mode under sg enabled. The input vector was manually craft with "abc" + bit 1 + padding zeros + L. The padding length depends on algorithm, i.e. SHA512 (1024 bit), SHA256 (512 bit). The result was calculated by command line sha512sum/sha256sum

RE: Backtrace stopped: previous frame identical to this frame (corrupt stack?) , even with fresh qemu and linux build

2022-04-25 Thread Chan Kim
Hello, I hope somebody could check this case. It’s easily reproducible for anybody working with qemu and arm64 linux. I returned to this problem and made another observation.(showing the back-trace is really broken). In another incident of breakpoint at function __driver_attach, (right

Re: [PATCH v5 2/3] aspeed/hace: Support AST2600 HACE

2022-04-25 Thread Steven Lee
The 04/25/2022 21:46, Cédric Le Goater wrote: > On 4/22/22 07:19, Steven Lee wrote: > > +/** > > + * Check whether the request contains padding message. > > + * > > + * @param s aspeed hace state object > > + * @param iov iov of current request > > + * @param req_len

Re: [PATCH 0/9] 9pfs: Add 9pfs support for Windows host

2022-04-25 Thread Bin Meng
+Mark On Mon, Apr 25, 2022 at 10:27 PM Bin Meng wrote: > > At present there is no Windows support for 9p file system. > This series adds initial Windows support for 9p file system. > > 'local' file system backend driver is supported on Windows, > including open, read, write, close, rename,

Re: [PATCH qemu v7 03/14] target/riscv: rvv: Early exit when vstart >= vl

2022-04-25 Thread Alistair Francis
On Wed, Mar 30, 2022 at 8:39 PM ~eopxd wrote: > > From: eopXD > > According to v-spec (section 5.4): > When vstart ≥ vl, there are no body elements, and no elements are > updated in any destination vector register group, including that > no tail elements are updated with agnostic values. > >

Re: [PATCH v3] target/riscv: Fix incorrect PTE merge in walk_pte

2022-04-25 Thread Alistair Francis
On Sun, Apr 24, 2022 at 7:59 AM Ralf Ramsauer wrote: > > Two non-subsequent PTEs can be mapped to subsequent paddrs. In this > case, walk_pte will erroneously merge them. > > Enforce the split up, by tracking the virtual base address. > > Let's say we have the mapping: > 0x8120 -> 0x89623000

Re: [PATCH v2 29/43] target/loongarch: Add timer related instructions support.

2022-04-25 Thread Richard Henderson
On 4/25/22 02:10, Xiaojuan Yang wrote: This includes: -RDTIME{L/H}.W -RDTIME.D Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/disas.c | 3 ++ target/loongarch/helper.h | 2 ++ target/loongarch/insn_trans/trans_extra.c.inc

[PATCH v5 21/21] tests: Add postcopy preempt tests

2022-04-25 Thread Peter Xu
Four tests are added for preempt mode: - Postcopy plain - Postcopy recovery - Postcopy tls - Postcopy tls+recovery Signed-off-by: Peter Xu --- tests/qtest/migration-test.c | 54 1 file changed, 54 insertions(+) diff --git

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

2022-04-25 Thread Peter Xu
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 --- migration/channel.c | 10 ++ migration/migration.c | 8

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

2022-04-25 Thread Peter Xu
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, otherwise it'll cause double-free. The thing is

[PATCH v5 18/21] migration: Enable TLS for preempt channel

2022-04-25 Thread Peter Xu
This patch is based on the async preempt channel creation. It continues wiring up the new channel with TLS handshake to destionation when enabled. Note that only the src QEMU needs such operation; the dest QEMU does not need any change for TLS support due to the fact that all channels are

[PATCH v5 20/21] tests: Add postcopy tls recovery migration test

2022-04-25 Thread Peter Xu
It's easy to build this upon the postcopy tls test. Rename the old postcopy recovery test to postcopy/recovery/plain. Signed-off-by: Peter Xu --- tests/qtest/migration-test.c | 33 ++--- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git

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

2022-04-25 Thread Peter Xu
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 postcopy_preempt_wait_channel() is introduced, allowing

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

2022-04-25 Thread Peter Xu
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. Signed-off-by: Peter Xu --- migration/migration.c | 2 ++

[PATCH v5 11/21] migration: Postcopy preemption preparation on channel creation

2022-04-25 Thread Peter Xu
Create a new socket for postcopy to be prepared to send postcopy requested pages via this specific channel, so as to not get blocked by precopy pages. A new thread is also created on dest qemu to receive data from this new channel based on the ram_load_postcopy() routine. The

[PATCH v5 19/21] tests: Add postcopy tls migration test

2022-04-25 Thread Peter Xu
We just added TLS tests for precopy but not postcopy. Add the corresponding test for vanilla postcopy. Rename the vanilla postcopy to "postcopy/plain" because all postcopy tests will only use unix sockets as channel. Signed-off-by: Peter Xu --- tests/qtest/migration-test.c | 50

[PATCH v5 10/21] migration: Add postcopy-preempt capability

2022-04-25 Thread Peter Xu
Firstly, postcopy already preempts precopy due to the fact that we do unqueue_page() first before looking into dirty bits. However that's not enough, e.g., when there're host huge page enabled, when sending a precopy huge page, a postcopy request needs to wait until the whole huge page that is

[PATCH v5 09/21] tests: ensure migration status isn't reported as failed

2022-04-25 Thread Peter Xu
From: Daniel P. Berrangé Various methods in the migration test call 'query_migrate' to fetch the current status and then access a particular field. Almost all of these cases expect the migration to be in a non-failed state. In the case of 'wait_for_migration_pass' in particular, if the status is

[PATCH v5 12/21] migration: Postcopy preemption enablement

2022-04-25 Thread Peter Xu
This patch enables postcopy-preempt feature. It contains two major changes to the migration logic: (1) Postcopy requests are now sent via a different socket from precopy background migration stream, so as to be isolated from very high page request delays. (2) For huge page enabled

[PATCH v5 13/21] migration: Postcopy recover with preempt enabled

2022-04-25 Thread Peter Xu
To allow postcopy recovery, the ram fast load (preempt-only) dest QEMU thread needs similar handling on fault tolerance. When ram_load_postcopy() fails, instead of stopping the thread it halts with a semaphore, preparing to be kicked again when recovery is detected. A mutex is introduced to make

[PATCH v5 08/21] tests: add multifd migration tests of TLS with x509 credentials

2022-04-25 Thread Peter Xu
From: Daniel P. Berrangé This validates that we correctly handle multifd migration success and failure scenarios when using TLS with x509 certificates. There are quite a few different scenarios that matter in relation to hostname validation, but we skip a couple as we can assume that the

[PATCH v5 01/21] tests: fix encoding of IP addresses in x509 certs

2022-04-25 Thread Peter Xu
From: Daniel P. Berrangé We need to encode just the address bytes, not the whole struct sockaddr data. Add a test case to validate that we're matching on SAN IP addresses correctly. Signed-off-by: Daniel P. Berrangé --- tests/unit/crypto-tls-x509-helpers.c | 16 +---

[PATCH v5 05/21] tests: convert XBZRLE migration test to use common helper

2022-04-25 Thread Peter Xu
From: Daniel P. Berrangé Most of the XBZRLE migration test logic is common with the rest of the precopy tests, so it can use the helper with just one small tweak. Signed-off-by: Daniel P. Berrangé --- tests/qtest/migration-test.c | 67 ++-- 1 file changed, 25

[PATCH v5 06/21] tests: convert multifd migration tests to use common helper

2022-04-25 Thread Peter Xu
From: Daniel P. Berrangé Most of the multifd migration test logic is common with the rest of the precopy tests, so it can use the helper without difficulty. The only exception of the multifd cancellation test which tries to run multiple migrations in a row. Signed-off-by: Daniel P. Berrangé

[PATCH v5 04/21] tests: add migration tests of TLS with x509 credentials

2022-04-25 Thread Peter Xu
From: Daniel P. Berrangé This validates that we correctly handle migration success and failure scenarios when using TLS with x509 certificates. There are quite a few different scenarios that matter in relation to hostname validation. Signed-off-by: Daniel P. Berrangé --- meson.build

[PATCH v5 07/21] tests: add multifd migration tests of TLS with PSK credentials

2022-04-25 Thread Peter Xu
From: Daniel P. Berrangé This validates that we correctly handle multifd migration success and failure scenarios when using TLS with pre shared keys. Signed-off-by: Daniel P. Berrangé --- tests/qtest/migration-test.c | 60 +--- 1 file changed, 56 insertions(+),

[PATCH v5 03/21] tests: add migration tests of TLS with PSK credentials

2022-04-25 Thread Peter Xu
From: Daniel P. Berrangé This validates that we correctly handle migration success and failure scenarios when using TLS with pre shared keys. Signed-off-by: Daniel P. Berrangé --- tests/qtest/meson.build | 7 +- tests/qtest/migration-test.c| 159

[PATCH v5 00/21] migration: Postcopy Preemption

2022-04-25 Thread Peter Xu
This is v5 of postcopy preempt series. It can also be found here: https://github.com/xzpeter/qemu/tree/postcopy-preempt RFC: https://lore.kernel.org/qemu-devel/20220119080929.39485-1-pet...@redhat.com V1: https://lore.kernel.org/qemu-devel/20220216062809.57179-1-pet...@redhat.com V2:

[PATCH v5 02/21] tests: add more helper macros for creating TLS x509 certs

2022-04-25 Thread Peter Xu
From: Daniel P. Berrangé These macros are more suited to the general consumers of certs in the test suite, where we don't need to exercise every single possible permutation. Signed-off-by: Daniel P. Berrangé --- tests/unit/crypto-tls-x509-helpers.h | 53 1 file

Re: Live Migration ToDo

2022-04-25 Thread Peter Xu
On Tue, Apr 26, 2022 at 02:17:41AM +0300, Artyom wrote: > Yes, the original postcopy paper ( > https://kartikgopalan.github.io/publications/hines09postcopy_osr.pdf) > suggests optimizations. For example, prepaging uses hints from the VM's > page access patterns to reduce both the number of major

Re: [PULL 00/14] Block patches

2022-04-25 Thread Richard Henderson
On 4/25/22 07:08, Hanna Reitz wrote: The following changes since commit 754f756cc4c6d9d14b7230c62b5bb20f9d655888: Merge tag 'pull-target-arm-20220422-1' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2022-04-22 08:03:18 -0700) are available in the Git repository at:

Re: Live Migration ToDo

2022-04-25 Thread Artyom
Yes, the original postcopy paper ( https://kartikgopalan.github.io/publications/hines09postcopy_osr.pdf) suggests optimizations. For example, prepaging uses hints from the VM's page access patterns to reduce both the number of major network faults and the duration of the migration phase. After

Re: [PATCH v2 25/43] target/loongarch: Add LoongArch CSR instruction

2022-04-25 Thread Richard Henderson
On 4/25/22 02:10, Xiaojuan Yang wrote: +static void output_r_csr(DisasContext *ctx, arg_r_csr *a, + const char *mnemonic) +{ +output(ctx, mnemonic, "r%d, %d # %s", a->rd, a->csr, csr_names[a->csr]); +} + +static void output_rr_csr(DisasContext *ctx, arg_rr_csr *a, +

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-25 Thread Alex Williamson
On Mon, 25 Apr 2022 22:23:05 +0200 Eric Auger wrote: > Hi Alex, > > On 4/23/22 12:09 AM, Alex Williamson wrote: > > [Cc +libvirt folks] > > > > On Thu, 14 Apr 2022 03:46:52 -0700 > > Yi Liu wrote: > > > >> With the introduction of iommufd[1], the linux kernel provides a generic > >>

Re: Live Migration ToDo

2022-04-25 Thread Peter Xu
On Tue, Apr 26, 2022 at 01:39:58AM +0300, Artyom wrote: > Thank you for your response. Yes, I would like to work on some task, and > eventually I would like to use it as my student project. For example, it > might be possible to implement the technique from the article Post-Copy, > Hines, 2009:

Re: [PATCH v2 20/43] target/loongarch: Add basic vmstate description of CPU.

2022-04-25 Thread Richard Henderson
On 4/25/22 02:10, Xiaojuan Yang wrote: +VMSTATE_UINT64(env.CSR_CPUID, LoongArchCPU), Again, using cpu->cpu_index. r~

Re: Live Migration ToDo

2022-04-25 Thread Artyom
Thank you for your response. Yes, I would like to work on some task, and eventually I would like to use it as my student project. For example, it might be possible to implement the technique from the article Post-Copy, Hines, 2009: demand paging, active push, prepaging and dynamic self-ballooning.

Re: [PATCH v2 19/43] target/loongarch: Add CSRs definition

2022-04-25 Thread Richard Henderson
On 4/25/22 02:10, Xiaojuan Yang wrote: +uint64_t CSR_CPUID; This should not exist; we're using cpu->cpu_index. r~

Re: [PATCH v2 23/43] target/loongarch: Add LoongArch interrupt and exception handle

2022-04-25 Thread Richard Henderson
On 4/25/22 02:10, Xiaojuan Yang wrote: Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/cpu.c | 229 +++ target/loongarch/cpu.h | 2 + target/loongarch/internals.h | 2 + 3 files changed, 233 insertions(+)

Re: [PATCH v2] Only advertise aio=io_uring if support is actually available

2022-04-25 Thread Eric Blake
On Mon, Apr 25, 2022 at 12:19:08PM +0100, Daniel P. Berrangé wrote: > On Fri, Apr 22, 2022 at 03:30:46PM -0500, Eric Blake wrote: > > On Thu, Apr 21, 2022 at 02:27:55PM -0500, Eric Blake wrote: > > > On Thu, Apr 21, 2022 at 06:50:48PM +0200, Dirk Müller wrote: > > > > Change --help output for aio

[PATCH v9 4/7] migration: Add migrate_use_tls() helper

2022-04-25 Thread Leonardo Bras
A lot of places check parameters.tls_creds in order to evaluate if TLS is in use, and sometimes call migrate_get_current() just for that test. Add new helper function migrate_use_tls() in order to simplify testing for TLS usage. Signed-off-by: Leonardo Bras Reviewed-by: Juan Quintela

[PATCH v9 7/7] multifd: Implement zero copy write in multifd migration (multifd-zero-copy)

2022-04-25 Thread Leonardo Bras
Implement zero copy send on nocomp_send_write(), by making use of QIOChannel writev + flags & flush interface. Change multifd_send_sync_main() so flush_zero_copy() can be called after each iteration in order to make sure all dirty pages are sent before a new iteration is started. It will also

[PATCH v9 6/7] multifd: Send header packet without flags if zero-copy-send is enabled

2022-04-25 Thread Leonardo Bras
Since d48c3a0445 ("multifd: Use a single writev on the send side"), sending the header packet and the memory pages happens in the same writev, which can potentially make the migration faster. Using channel-socket as example, this works well with the default copying mechanism of sendmsg(), but

[PATCH v9 1/7] QIOChannel: Add flags on io_writev and introduce io_flush callback

2022-04-25 Thread Leonardo Bras
Add flags to io_writev and introduce io_flush as optional callback to QIOChannelClass, allowing the implementation of zero copy writes by subclasses. How to use them: - Write data using qio_channel_writev*(...,QIO_CHANNEL_WRITE_FLAG_ZERO_COPY), - Wait write completion with qio_channel_flush().

[PATCH v9 3/7] migration: Add zero-copy-send parameter for QMP/HMP for Linux

2022-04-25 Thread Leonardo Bras
Add property that allows zero-copy migration of memory pages on the sending side, and also includes a helper function migrate_use_zero_copy_send() to check if it's enabled. No code is introduced to actually do the migration, but it allow future implementations to enable/disable this feature. On

[PATCH v9 0/7] MSG_ZEROCOPY + multifd

2022-04-25 Thread Leonardo Bras
This patch series intends to enable MSG_ZEROCOPY in QIOChannel, and make use of it for multifd migration performance improvement, by reducing cpu usage. Patch #1 creates new callbacks for QIOChannel, allowing the implementation of zero copy writing. Patch #2 implements io_writev flags and

[PATCH v9 5/7] multifd: multifd_send_sync_main now returns negative on error

2022-04-25 Thread Leonardo Bras
Even though multifd_send_sync_main() currently emits error_reports, it's callers don't really check it before continuing. Change multifd_send_sync_main() to return -1 on error and 0 on success. Also change all it's callers to make use of this change and possibly fail earlier. (This change is

[PATCH v9 2/7] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-04-25 Thread Leonardo Bras
For CONFIG_LINUX, implement the new zero copy flag and the optional callback io_flush on QIOChannelSocket, but enables it only when MSG_ZEROCOPY feature is available in the host kernel, which is checked on qio_channel_socket_connect_sync() qio_channel_socket_flush() was implemented by counting

Re: [PATCH v2 10/42] i386: Rewrite vector shift helper

2022-04-25 Thread Richard Henderson
On 4/24/22 15:01, Paul Brook wrote: Rewrite the vector shift helpers in preperation for AVX support (3 operand form and 256 bit vectors). For now keep the existing two operand interface. No functional changes to existing helpers. Signed-off-by: Paul Brook --- target/i386/ops_sse.h | 250

Re: [PATCH v2 08/42] i386: Add ZMM_OFFSET macro

2022-04-25 Thread Richard Henderson
On 4/24/22 15:01, Paul Brook wrote: Add a convenience macro to get the address of an xmm_regs element within CPUX86State. This was originally going to be the basis of an implementation that broke operations into 128 bit chunks. I scrapped that idea, so this is now a purely cosmetic change. But

Re: [PATCH v2 07/42] Enforce VEX encoding restrictions

2022-04-25 Thread Richard Henderson
On 4/24/22 15:01, Paul Brook wrote: Add CHECK_AVX* macros, and use them to validate VEX encoded AVX instructions All AVX instructions require both CPU and OS support, this is encapsulated by HF_AVX_EN. Some also require specific values in the VEX.L and VEX.V fields. Some (mostly integer

Re: [PATCH v2 07/42] Enforce VEX encoding restrictions

2022-04-25 Thread Richard Henderson
On 4/24/22 15:01, Paul Brook wrote: +/* + * VEX encodings require AVX + * Allow legacy SSE encodings even if AVX not enabled + */ +#define CHECK_AVX(s) do { \ +if ((s->prefix & PREFIX_VEX) \ +&& !(env->hflags & HF_AVX_EN_MASK)) \ +goto illegal_op; \ +} while (0)

[PATCH] error-report: Fix GDateTime usage

2022-04-25 Thread Eric Farman
According to the glib manual: - g_date_time_new_from_unix_utc() takes a parameter of the number of SECONDS since the unix epoch - g_get_real_time() returns the number of MICROSECONDS since the unix epoch Rather than convert the latter with G_USECS_PER_SEC, use the convenient

Re: [PATCH v2 06/42] i386: Add CHECK_NO_VEX

2022-04-25 Thread Richard Henderson
On 4/24/22 15:01, Paul Brook wrote: +/* VEX prefix not allowed */ +#define CHECK_NO_VEX(s) do { \ +if (s->prefix & PREFIX_VEX) \ +goto illegal_op; \ +} while (0) Make the do/while align, and add the required braces for the if, per coding style. r~

Re: [PATCH v2 06/42] i386: Add CHECK_NO_VEX

2022-04-25 Thread Richard Henderson
On 4/24/22 15:01, Paul Brook wrote: Reject invalid VEX encodings on MMX instructions. Signed-off-by: Paul Brook --- target/i386/tcg/translate.c | 26 ++ 1 file changed, 26 insertions(+) Reviewed-by: Richard Henderson r~

Re: [PULL 0/3] Block patches

2022-04-25 Thread Richard Henderson
On 4/25/22 01:48, Stefan Hajnoczi wrote: The following changes since commit 9c125d17e9402c232c46610802e5931b3639d77b: Merge tag 'pull-tcg-20220420' of https://gitlab.com/rth7680/qemu into staging (2022-04-20 16:43:11 -0700) are available in the Git repository at:

Re: [PATCH v5 00/13] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-04-25 Thread Sean Christopherson
On Mon, Apr 25, 2022, Andy Lutomirski wrote: > > > On Mon, Apr 25, 2022, at 6:40 AM, Chao Peng wrote: > > On Sun, Apr 24, 2022 at 09:59:37AM -0700, Andy Lutomirski wrote: > >> > > >> > >> 2. Bind the memfile to a VM (or at least to a VM technology). Now it's in > >> the initial state

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-25 Thread Eric Auger
Hi Alex, On 4/23/22 12:09 AM, Alex Williamson wrote: > [Cc +libvirt folks] > > On Thu, 14 Apr 2022 03:46:52 -0700 > Yi Liu wrote: > >> With the introduction of iommufd[1], the linux kernel provides a generic >> interface for userspace drivers to propagate their DMA mappings to kernel >> for

Re: [PATCH v3 for-7.1] vfio/common: remove spurious tpm-crb-cmd misalignment warning

2022-04-25 Thread Alex Williamson
On Wed, 23 Mar 2022 21:31:19 +0100 Eric Auger wrote: > The CRB command buffer currently is a RAM MemoryRegion and given > its base address alignment, it causes an error report on > vfio_listener_region_add(). This region could have been a RAM device > region, easing the detection of such safe

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-25 Thread Eric Auger
Hi Kevin, On 4/18/22 10:49 AM, Tian, Kevin wrote: >> From: Liu, Yi L >> Sent: Thursday, April 14, 2022 6:47 PM >> >> With the introduction of iommufd[1], the linux kernel provides a generic >> interface for userspace drivers to propagate their DMA mappings to kernel >> for assigned devices. This

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-25 Thread Eric Auger
Hi, On 4/18/22 2:09 PM, Yi Liu wrote: > Hi Kevin, > > On 2022/4/18 16:49, Tian, Kevin wrote: >>> From: Liu, Yi L >>> Sent: Thursday, April 14, 2022 6:47 PM >>> >>> With the introduction of iommufd[1], the linux kernel provides a >>> generic >>> interface for userspace drivers to propagate their

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-25 Thread Eric Auger
Hi Nicolin, On 4/19/22 5:26 AM, Nicolin Chen wrote: > On Sun, Apr 17, 2022 at 12:30:40PM +0200, Eric Auger wrote: > - More tests >>> I did a quick test on my ARM64 platform, using "iommu=smmuv3" >>> string. The behaviors are different between using default and >>> using legacy "iommufd=off".

Re: [PATCH 05/10] libqtest: split QMP part in libqmp

2022-04-25 Thread Thomas Huth
On 22/04/2022 10.36, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau This will help moving QAPI/QMP in a common subproject. Signed-off-by: Marc-André Lureau --- tests/qtest/libqmp.h | 50 +++ tests/qtest/libqtest.h | 29 +--- tests/qtest/libqmp.c

Re: [PATCH 04/10] tests: move libqtest.h back under qtest/

2022-04-25 Thread Thomas Huth
On 22/04/2022 10.36, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Since commit a2ce7dbd917 ("meson: convert tests/qtest to meson"), libqtest.h is under libqos/ directory, while libqtest.c is still in qtest/. Move back to its original location to avoid mixing with libqos/.

Re: [qemu.qmp PATCH 01/12] fork qemu.qmp from qemu.git

2022-04-25 Thread John Snow
On Mon, Apr 25, 2022, 6:37 AM Daniel P. Berrangé wrote: > On Fri, Apr 22, 2022 at 02:49:29PM -0400, John Snow wrote: > > Split python/ from qemu.git, using these commands: > > > > > git subtree split -P python/ -b python-split-v3 > > > mkdir ~/src/tmp > > > cd ~/src/tmp > > > git clone

Re: Live Migration ToDo

2022-04-25 Thread Peter Xu
Hi, On Mon, Apr 25, 2022 at 01:41:27PM +0300, Artyom wrote: > Hello! I would like to see a list of suggestions/ideas/tickets for > improving live migration (especially performance and algorithms). There is > a page https://wiki.qemu.org/ToDo/LiveMigration, but it has not been > updated for a long

[PATCH] Hexagon (tests/tcg/hexagon) reference file for float_convd

2022-04-25 Thread Taylor Simpson
The test is in tests/tcg/multiarch/float_convd.c Signed-off-by: Taylor Simpson --- tests/tcg/hexagon/float_convd.ref | 988 ++ 1 file changed, 988 insertions(+) create mode 100644 tests/tcg/hexagon/float_convd.ref diff --git a/tests/tcg/hexagon/float_convd.ref

Re: [qemu.qmp PATCH 04/12] update project URLs

2022-04-25 Thread John Snow
On Mon, Apr 25, 2022, 6:56 AM Daniel P. Berrangé wrote: > On Fri, Apr 22, 2022 at 02:49:32PM -0400, John Snow wrote: > > Point to this library's URLs instead of the entire project's. > > > > Signed-off-by: John Snow > > --- > > setup.cfg | 4 ++-- > > 1 file changed, 2 insertions(+), 2

Re: [qemu.qmp PATCH 02/12] update maintainer metadata

2022-04-25 Thread John Snow
On Mon, Apr 25, 2022, 6:55 AM Daniel P. Berrangé wrote: > On Fri, Apr 22, 2022 at 02:49:30PM -0400, John Snow wrote: > > Modify "QEMU Developer Team" to "QEMU Project", as this matches the > > spelling we use for the collective on gitlab.com/qemu-project. > > > > Add myself as the principal

Re: [PATCH v8 00/17] vfio-user server in QEMU

2022-04-25 Thread Jag Raman
> On Apr 25, 2022, at 6:32 AM, Stefan Hajnoczi wrote: > > On Tue, Apr 19, 2022 at 04:44:05PM -0400, Jagannathan Raman wrote: >> This is v8 of the server side changes to enable vfio-user in QEMU. >> >> Thank you very much for reviewing the last revision of this series! > > I posted some

Re: [PATCH v8 15/17] vfio-user: handle device interrupts

2022-04-25 Thread Jag Raman
> On Apr 25, 2022, at 6:27 AM, Stefan Hajnoczi wrote: > > On Tue, Apr 19, 2022 at 04:44:20PM -0400, Jagannathan Raman wrote: >> +static MSIMessage vfu_object_msi_prepare_msg(PCIDevice *pci_dev, >> + unsigned int vector) >> +{ >> +MSIMessage msg;

Re: [PATCH v8 14/17] vfio-user: handle PCI BAR accesses

2022-04-25 Thread Jag Raman
> On Apr 25, 2022, at 6:05 AM, Stefan Hajnoczi wrote: > > On Tue, Apr 19, 2022 at 04:44:19PM -0400, Jagannathan Raman wrote: >> +static size_t vfu_object_bar_rw(PCIDevice *pci_dev, int pci_bar, >> +hwaddr bar_offset, char * const buf, >> +

Re: [PATCH v8 13/17] vfio-user: handle DMA mappings

2022-04-25 Thread Jag Raman
> On Apr 25, 2022, at 5:56 AM, Stefan Hajnoczi wrote: > > On Tue, Apr 19, 2022 at 04:44:18PM -0400, Jagannathan Raman wrote: >> +static void dma_unregister(vfu_ctx_t *vfu_ctx, vfu_dma_info_t *info) >> +{ >> +VfuObject *o = vfu_get_private(vfu_ctx); >> +AddressSpace *dma_as = NULL; >>

Re: [PATCH v8 12/17] vfio-user: IOMMU support for remote device

2022-04-25 Thread Jag Raman
> On Apr 25, 2022, at 5:38 AM, Stefan Hajnoczi wrote: > > On Wed, Apr 20, 2022 at 11:15:16AM +, Jag Raman wrote: >> >> >>> On Apr 19, 2022, at 4:45 PM, Jag Raman wrote: >>> >>> Assign separate address space for each device in the remote processes. >>> >>> Signed-off-by: Elena

Re: [PATCH v2 03/42] Add AVX_EN hflag

2022-04-25 Thread Richard Henderson
On 4/24/22 15:01, Paul Brook wrote: Add a new hflag bit to determine whether AVX instructions are allowed Signed-off-by: Paul Brook --- target/i386/cpu.h| 3 +++ target/i386/helper.c | 12 target/i386/tcg/fpu_helper.c | 1 + 3 files changed, 16

Re: [PATCH v8 12/17] vfio-user: IOMMU support for remote device

2022-04-25 Thread Jag Raman
> On Apr 25, 2022, at 5:31 AM, Stefan Hajnoczi wrote: > > On Tue, Apr 19, 2022 at 04:44:17PM -0400, Jagannathan Raman wrote: >> +static AddressSpace *remote_iommu_find_add_as(PCIBus *pci_bus, >> + void *opaque, int devfn) >> +{ >> +RemoteIommu

Re: [PULL 0/6] Kraxel 20220425 patches

2022-04-25 Thread Richard Henderson
://git.kraxel.org/qemu tags/kraxel-20220425-pull-request for you to fetch changes up to ef798418a3037434951002d0afc5f3d919e294db: avocado/vnc: add test_change_listen (2022-04-22 13:43:28 +0200) vnc: add display-update monitor command. screendump

Re: [PATCH 00/18] RFC: Remove deprecated audio features

2022-04-25 Thread Mark Cave-Ayland
On 25/04/2022 09:21, Martin Kletzander wrote: I wanted to deal with https://bugzilla.redhat.com/2043498 and I got a suggesstion that removing deprecated features could actually make it easier to propagate the error. In the end (last patch) it turns out the error is still just reported with

Re: [PATCH v2 34/43] hw/intc: Add LoongArch extioi interrupt controller(EIOINTC)

2022-04-25 Thread Mark Cave-Ayland
On 25/04/2022 10:10, Xiaojuan Yang wrote: This patch realize the EIOINTC interrupt controller. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/intc/Kconfig| 3 + hw/intc/loongarch_extioi.c | 483 + hw/intc/meson.build

Re: [PATCH v2 02/42] i386: DPPS rounding fix

2022-04-25 Thread Richard Henderson
On 4/24/22 15:01, Paul Brook wrote: The DPPS (Dot Product) instruction is defined to first sum pairs of intermediate results, then sum those values to get the final result. i.e. (A+B)+(C+D) We incrementally sum the results, i.e. ((A+B)+C)+D, which can result in incorrect rouding. For

Re: [PATCH v2 01/42] i386: pcmpestr 64-bit sign extension bug

2022-04-25 Thread Richard Henderson
On 4/24/22 15:01, Paul Brook wrote: The abs1 function in ops_sse.h only works sorrectly when the result fits in a signed int. This is fine most of the time because we're only dealing with byte sized values. However pcmp_elen helper function uses abs1 to calculate the absolute value of a cpu

Re: [RFC 00/18] vfio: Adopt iommufd

2022-04-25 Thread Alex Williamson
On Mon, 25 Apr 2022 11:10:14 +0100 Daniel P. Berrangé wrote: > On Fri, Apr 22, 2022 at 04:09:43PM -0600, Alex Williamson wrote: > > [Cc +libvirt folks] > > > > On Thu, 14 Apr 2022 03:46:52 -0700 > > Yi Liu wrote: > > > > > With the introduction of iommufd[1], the linux kernel provides a

[PATCH 6/9] hw/9pfs: Update 9p-synth.c for Windows build

2022-04-25 Thread Bin Meng
From: Guohuai Shi This updates 9p synth backend driver for Windows build. Funtionalities are not tested as test cases do not run on Windows at present. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- hw/9pfs/9p-synth.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

Re: [PATCH v5 00/13] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-04-25 Thread Andy Lutomirski
On Mon, Apr 25, 2022, at 6:40 AM, Chao Peng wrote: > On Sun, Apr 24, 2022 at 09:59:37AM -0700, Andy Lutomirski wrote: >> >> >> 2. Bind the memfile to a VM (or at least to a VM technology). Now it's in >> the initial state appropriate for that VM. >> >> For TDX, this completely bypasses

Re: [PATCH] nvme: fix bit buckets

2022-04-25 Thread Keith Busch
On Mon, Apr 25, 2022 at 11:59:30AM +0200, Klaus Jensen wrote: > The approach is neat and simple, but I don't think it has the intended > effect. The memory region addr is just left at 0x0, so we just end up > with mapping that directly into the qsg and in my test setup, this > basically does DMA

Re: Signing QEMU up for GitLab for Open Source?

2022-04-25 Thread Daniel P . Berrangé
On Mon, Apr 25, 2022 at 01:53:28PM +0100, Alex Bennée wrote: > > Stefan Hajnoczi writes: > > > [[PGP Signed Part:Undecided]] > > Hi, > > QEMU needs to enroll in GitLab for Open Source before July 1st to > > receive 50,000 CI/CD pipeline minutes and GitLab Ultimate features: > > > >

[PATCH 9/9] hw/9p: win32: Translate Windows error number to Linux value

2022-04-25 Thread Bin Meng
From: Guohuai Shi Some of Windows error numbers have different value from Linux ones. For example, ENOTEMPTY is defined to 39 in Linux, but is defined to 41 in Windows. So deleting a directory from a Linux guest on top of QEMU from a Windows host complains: # rmdir tmp rmdir: 'tmp': Unknown

Re: [PATCH v2] target/ppc: Fix BookE debug interrupt generation

2022-04-25 Thread Cédric Le Goater
On 4/25/22 16:16, Lucas Mateus Martins Araujo e Castro wrote: On 20/04/2022 22:17, Bin Meng wrote: From: Bin Meng Per E500 core reference manual [1], chapter 8.4.4 "Branch Taken Debug Event" and chapter 8.4.5 "Instruction Complete Debug Event": "A branch taken debug event occurs if both

Re: [PATCH 17/18] audio: Remove unused can_be_default

2022-04-25 Thread Daniel P . Berrangé
On Mon, Apr 25, 2022 at 10:22:00AM +0200, Martin Kletzander wrote: > Since there is no fallback mechanism and default-guessing this is now > not used and can be safely removed. > > Signed-off-by: Martin Kletzander > --- > audio/alsaaudio.c | 1 - > audio/audio_int.h | 1 - >

[PATCH 7/9] fsdev: Enable 'local' file system driver backend for Windows

2022-04-25 Thread Bin Meng
From: Guohuai Shi Only 'local' file system driver will be supported for Windows host. 'proxy' or 'synth' are not supported. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- fsdev/qemu-fsdev.c | 2 ++ fsdev/meson.build | 1 + 2 files changed, 3 insertions(+) diff --git

Re: [PATCH 16/18] audio: Remove legacy audio environment variables and options

2022-04-25 Thread Daniel P . Berrangé
On Mon, Apr 25, 2022 at 10:21:59AM +0200, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > audio/audio.c | 13 - > audio/audio.h | 1 - > audio/audio_legacy.c| 555 > audio/meson.build

[PATCH qemu 9/9] target/riscv: rvv: Add mask agnostic for vector permutation instructions

2022-04-25 Thread ~eopxd
From: Yueh-Ting (eop) Chen Signed-off-by: eop Chen Reviewed-by: Frank Chang --- target/riscv/insn_trans/trans_rvv.c.inc | 1 + target/riscv/vector_helper.c| 34 +++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git

[PATCH 5/9] hw/9pfs: Add a 'local' file system backend driver for Windows

2022-04-25 Thread Bin Meng
From: Guohuai Shi Add a 9p local file system backend driver to support Windows, including open, read, write, close, rename, remove, etc. All security models are supported. The mapped (mapped-xattr) security model is implemented using NTFS Alternate Data Stream (ADS) so the 9p export path shall

[PATCH 4/9] fsdev: Add missing definitions for Windows in file-op-9p.h

2022-04-25 Thread Bin Meng
From: Guohuai Shi Add uid_t, gid_t and struct statfs definitions, which are currently missing from Windows headers, but are required when we add 9p file system support for Windows in later patches. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- fsdev/file-op-9p.h | 33

Re: [PATCH] hw/crypto: add Allwinner sun4i-ss crypto device

2022-04-25 Thread Daniel P . Berrangé
On Mon, Apr 25, 2022 at 03:03:11PM +0200, LABBE Corentin wrote: > diff --git a/crypto/hash-nettle.c b/crypto/hash-nettle.c > index 1ca1a41062..b9342b4fe1 100644 > --- a/crypto/hash-nettle.c > +++ b/crypto/hash-nettle.c > @@ -26,10 +26,22 @@ > #include > #include > > +#ifndef

[PATCH 8/9] meson.build: Turn on virtfs for Windows host

2022-04-25 Thread Bin Meng
From: Guohuai Shi Enable virtfs configuration option for Windows host. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- meson.build | 10 +- hw/9pfs/meson.build | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index

  1   2   3   >