Re: qemu direct kernel boot on LoongArch

2024-09-05 Thread Jason A. Donenfeld
On Thu, Sep 5, 2024 at 5:16 PM Thomas Weißschuh wrote: > > On 2024-09-05 17:07:22+, Jason A. Donenfeld wrote: > > On Thu, Sep 5, 2024 at 5:05 PM Thomas Weißschuh wrote: > > > > > > On 2024-09-05 16:53:55+, Jason A. Donenfeld wrote: > > > > On Thu, Sep 05, 2024 at 07:25:05AM +0200, Thomas

Re: [PATCH v7 0/6] plugins: access values during a memory read/write

2024-09-05 Thread Alex Bennée
Pierrick Bouvier writes: > This series allows plugins to know which value is read/written during a memory > access. > > For every memory access, we know copy this value before calling mem callbacks, > and those can query it using new API function: > - qemu_plugin_mem_get_value Queued to patches

Re: [PATCH v3 0/2] plugins: add plugin API to read guest memory

2024-09-05 Thread Alex Bennée
Rowan Hart writes: > This patch adds one API function to the QEMU plugin API > > bool qemu_plugin_read_memory_vaddr(vaddr, GByteArray *, size_t); > > The API allows reading memory from an arbitrary guest virtual > address, which is useful for many things but the motivating examples > are: Queued

Re: [PATCH 0/1] plugins: add API to read guest CPU memory from hwaddr

2024-09-05 Thread Alex Bennée
Rowan Hart writes: > This patch adds a single API function which allows reading from a guest > CPU physical address. > > I don't know of a good way to add a self-contained test for this feature > to tests/tcg/plugins, but I did come up with a small test case to > demonstrate the functionality usi

[PATCH] hw/loongarch: virt: pass random seed to fdt

2024-09-05 Thread Jason A. Donenfeld
If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to initialize early. Set this using the usual guest random number generation function. This is the same procedure that's done in b91b6b5a2c ("hw/microblaze: pass random seed to fdt"), e4b4f0b71c ("hw/riscv: virt: pass random seed

Re: [PATCH v2 1/4] KVM: Dynamic sized kvm memslots array

2024-09-05 Thread Juraj Marcin
Hi Peter, On Thu, Sep 5, 2024 at 12:35 AM Peter Xu wrote: > > Zhiyi reported an infinite loop issue in VFIO use case. The cause of that > was a separate discussion, however during that I found a regression of > dirty sync slowness when profiling. > > Each KVMMemoryListerner maintains an array of

Re: qemu direct kernel boot on LoongArch

2024-09-05 Thread Jason A. Donenfeld
On Thu, Sep 05, 2024 at 04:54:41PM +0200, Jason A. Donenfeld wrote: > On Thu, Sep 05, 2024 at 02:11:32PM +0800, maobibo wrote: > > > > > > On 2024/9/5 下午1:25, Thomas Weißschuh wrote: > > > On 2024-09-05 06:04:12+, Jason A. Donenfeld wrote: > > >> On Thu, Sep 5, 2024 at 5:45 AM maobibo wrote:

Re: [PATCH v2 01/19] qapi: Smarter camel_to_upper() to reduce need for 'prefix'

2024-09-05 Thread Daniel P . Berrangé
On Thu, Sep 05, 2024 at 07:59:13AM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Wed, Sep 04, 2024 at 01:18:18PM +0200, Markus Armbruster wrote: > >> camel_to_upper() converts its argument from camel case to upper case > >> with '_' between words. Used for generated enume

Re: [RFC PATCH v2 0/5] vhost-user: Add SHMEM_MAP/UNMAP requests

2024-09-05 Thread Stefan Hajnoczi
On Tue, Jul 16, 2024 at 10:21:35AM +0900, David Stevens wrote: > On Fri, Jul 12, 2024 at 2:47 PM Michael S. Tsirkin wrote: > > > > On Fri, Jul 12, 2024 at 11:06:49AM +0900, David Stevens wrote: > > > On Thu, Jul 11, 2024 at 7:56 PM Alyssa Ross wrote: > > > > > > > > Adding David Stevens, who impl

Re: [PATCH v2 1/4] KVM: Dynamic sized kvm memslots array

2024-09-05 Thread Peter Xu
On Thu, Sep 05, 2024 at 05:32:46PM +0200, Juraj Marcin wrote: > Hi Peter, Hi, Juraj, [...] > > unsigned int kvm_get_max_memslots(void) > > { > > KVMState *s = KVM_STATE(current_accel()); > > @@ -193,15 +247,20 @@ unsigned int kvm_get_free_memslots(void) > > /* Called with KVMMemoryListen

Re: qemu direct kernel boot on LoongArch

2024-09-05 Thread Thomas Weißschuh
On 2024-09-05 17:18:07+, Jason A. Donenfeld wrote: > On Thu, Sep 5, 2024 at 5:16 PM Thomas Weißschuh wrote: > > > > On 2024-09-05 17:07:22+, Jason A. Donenfeld wrote: > > > On Thu, Sep 5, 2024 at 5:05 PM Thomas Weißschuh wrote: > > > > > > > > On 2024-09-05 16:53:55+, Jason A. Donenfe

Re: [PATCH v2 01/19] qapi: Smarter camel_to_upper() to reduce need for 'prefix'

2024-09-05 Thread Peter Xu
On Thu, Sep 05, 2024 at 04:52:36PM +0100, Daniel P. Berrangé wrote: > On Thu, Sep 05, 2024 at 07:59:13AM +0200, Markus Armbruster wrote: > > Daniel P. Berrangé writes: > > > > > On Wed, Sep 04, 2024 at 01:18:18PM +0200, Markus Armbruster wrote: > > >> camel_to_upper() converts its argument from c

Re: [PATCH v11 08/11] vfio/migration: Implement VFIO migration protocol v2

2024-09-05 Thread Avihai Horon
On 05/09/2024 18:17, Peter Xu wrote: External email: Use caution opening links or attachments On Thu, Sep 05, 2024 at 02:41:09PM +0300, Avihai Horon wrote: On 04/09/2024 19:16, Peter Xu wrote: External email: Use caution opening links or attachments On Wed, Sep 04, 2024 at 06:41:03PM +030

Re: [PATCH v11 08/11] vfio/migration: Implement VFIO migration protocol v2

2024-09-05 Thread Peter Xu
On Thu, Sep 05, 2024 at 07:07:28PM +0300, Avihai Horon wrote: > > So I wonder why stop-size can change from a driver, and whether that can be > > reported in a more predictable fashion. Otherwise I see little point in > > providing both stop-size and precopy-size, otherwise we'll always add them >

Re: [PULL v1 00/12] Xen queue

2024-09-05 Thread Peter Maydell
On Wed, 4 Sept 2024 at 17:15, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > The following changes since commit e638d685ec2a0700fb9529cbd1b2823ac4120c53: > > Open 9.2 development tree (2024-09-03 09:18:43 -0700) > > are available in the Git repository at: > > https://gitlab.com/ed

Re: [PULL 11/63] hw/virtio: move stubs out of stubs/

2024-09-05 Thread Paolo Bonzini
On Sat, Aug 3, 2024 at 4:29 AM Michael Tokarev wrote: > > 23.04.2024 18:08, Paolo Bonzini wrote: > > Since the virtio memory device stubs are needed exactly when the > > Kconfig symbol is not enabled, they can be placed in hw/virtio/ and > > conditionalized on CONFIG_VIRTIO_MD. > > > > Signed-off-

Re: [RFC PATCH v2 0/5] vhost-user: Add SHMEM_MAP/UNMAP requests

2024-09-05 Thread Stefan Hajnoczi
On Tue, Sep 03, 2024 at 10:42:34AM +0200, Albert Esteve wrote: > Hello all, > > Sorry, I have been a bit disconnected from this thread as I was on > vacations and then had to switch tasks for a while. > > I will try to go through all comments and address them for the first > non-RFC drop of this

Re: [PATCH v11 08/11] vfio/migration: Implement VFIO migration protocol v2

2024-09-05 Thread Avihai Horon
On 05/09/2024 19:23, Peter Xu wrote: External email: Use caution opening links or attachments On Thu, Sep 05, 2024 at 07:07:28PM +0300, Avihai Horon wrote: So I wonder why stop-size can change from a driver, and whether that can be reported in a more predictable fashion. Otherwise I see lit

Re: [RFC PATCH v2 1/5] vhost-user: Add VIRTIO Shared Memory map request

2024-09-05 Thread Stefan Hajnoczi
On Tue, Sep 03, 2024 at 01:54:12PM +0200, Albert Esteve wrote: > On Tue, Sep 3, 2024 at 11:54 AM Albert Esteve wrote: > > > > > > > On Thu, Jul 11, 2024 at 9:45 AM Stefan Hajnoczi > > wrote: > > > >> On Fri, Jun 28, 2024 at 04:57:06PM +0200, Albert Esteve wrote: > >> > Add SHMEM_MAP/UNMAP reques

Re: [PATCH v2 09/17] migration/multifd: Device state transfer support - receive side

2024-09-05 Thread Avihai Horon
On 27/08/2024 20:54, Maciej S. Szmigiero wrote: External email: Use caution opening links or attachments From: "Maciej S. Szmigiero" Add a basic support for receiving device state via multifd channels - channels that are shared with RAM transfers. To differentiate between a device state an

[PATCH 1/1] migration: improve migration_throttle tracepoint

2024-09-05 Thread Denis V. Lunev
Right now this tracepoint is just saying that the guest has been throttled, but this is not that good for debugging purposes. We should also know how much the guest is throttled in order to understand consequences for the guest behaviour. The patch moves the tracepoint from migration_trigger_throt

[PATCH 0/2] tests/qtest: Fix problems running with make vm-build-openbsd

2024-09-05 Thread Peter Maydell
I noticed that 'make vm-build-openbsd' had bitrotted a bit: * two tests for the stm32l4x5 forgot a qtest_quit(), which meant they would pass all their subtests but then timeout because the underlying QEMU process never exited * the ahci-test timeout was a bit aggressive This patchset fixes

[PATCH 2/2] tests/qtest: Bump timeout on ahci-test

2024-09-05 Thread Peter Maydell
On my OpenBSD VM test system, the ahci-test sometimes hits its 60 second timeout. It has 75 subtests and allowing at least two seconds per subtest seems reasonable. Bump it to 150s. Signed-off-by: Peter Maydell --- tests/qtest/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/tests

[PATCH 1/2] tests/qtest: Add missing qtest_quit() to stm32 tests

2024-09-05 Thread Peter Maydell
In the dm163-test and stm32l4x5_usart-test, a couple of subtests are missing the qtest_quit() call. The effect of this is that on hosts other than Linux and FreeBSD the test will timeout after executing all the tests: 242/845 qemu:qtest+qtest-arm / qtest-arm/dm163-test

Re: [PATCH 1/2] tests/qtest: Add missing qtest_quit() to stm32 tests

2024-09-05 Thread Daniel P . Berrangé
On Thu, Sep 05, 2024 at 05:55:53PM +0100, Peter Maydell wrote: > In the dm163-test and stm32l4x5_usart-test, a couple of subtests are > missing the qtest_quit() call. The effect of this is that on hosts > other than Linux and FreeBSD the test will timeout after executing > all the tests: > > 242/

Re: [PATCH 2/2] tests/qtest: Bump timeout on ahci-test

2024-09-05 Thread Daniel P . Berrangé
On Thu, Sep 05, 2024 at 05:55:54PM +0100, Peter Maydell wrote: > On my OpenBSD VM test system, the ahci-test sometimes hits its 60 second > timeout. It has 75 subtests and allowing at least two seconds per > subtest seems reasonable. Bump it to 150s. > > Signed-off-by: Peter Maydell > --- > test

Re: [PATCH v2] crypto: run qcrypto_pbkdf2_count_iters in a new thread

2024-09-05 Thread Daniel P . Berrangé
On Wed, Sep 04, 2024 at 08:52:30PM -0300, Tiago Pasqualini wrote: > CPU time accounting in the kernel has been demonstrated to have a > sawtooth pattern[1][2]. This can cause the getrusage system call to > not be as accurate as we are expecting, which can cause this calculation > to stall. > > The

Re: [PULL 13/16] target/riscv: Restrict semihosting to TCG

2024-09-05 Thread Thomas Huth
On 22/07/2024 13.04, Alex Bennée wrote: From: Philippe Mathieu-Daudé Semihosting currently uses the TCG probe_access API. To prepare for encoding the TCG dependency in Kconfig, do not enable it unless TCG is available. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Reviewe

Re: [RFC V1 0/6] Live update: cpr-transfer

2024-09-05 Thread Peter Xu
On Tue, Aug 20, 2024 at 12:29:07PM -0400, Steven Sistare wrote: > I still go back to my original statement: -incoming-cpr has equal or greater > "specification complexity" than -cpr-uri. It is not simpler, and comes with > restrictions. I'm ok with it, as long as Dan and others are ok. I rememb

Re: [PATCH 1/1] migration: improve migration_throttle tracepoint

2024-09-05 Thread Peter Xu
On Thu, Sep 05, 2024 at 06:51:46PM +0200, Denis V. Lunev via wrote: > Right now this tracepoint is just saying that the guest has been > throttled, but this is not that good for debugging purposes. We should > also know how much the guest is throttled in order to understand > consequences for the g

Re: [PATCH 1/1] migration: improve migration_throttle tracepoint

2024-09-05 Thread Denis V. Lunev
On 9/5/24 19:52, Peter Xu wrote: On Thu, Sep 05, 2024 at 06:51:46PM +0200, Denis V. Lunev via wrote: Right now this tracepoint is just saying that the guest has been throttled, but this is not that good for debugging purposes. We should also know how much the guest is throttled in order to under

[PATCH v2 4/7] ebpf: add formal error reporting to all APIs

2024-09-05 Thread Daniel P . Berrangé
The eBPF code is currently reporting error messages through trace events. Trace events are fine for debugging, but they are not to be considered the primary error reporting mechanism, as their output is inaccessible to callers. This adds an "Error **errp" parameter to all methods which have import

[PATCH v2 0/7] Report fatal errors from failure with pre-opened eBPF RSS FDs

2024-09-05 Thread Daniel P . Berrangé
The virtio-net code for eBPF RSS is still ignoring errors when failing to load the eBPF RSS program passed in by the mgmt app via pre-opened FDs. This series re-factors the eBPF common code so that it actually reports using "Error" objects. Then it makes virtio-net treat a failure to load pre-open

[PATCH v2 2/7] ebpf: drop redundant parameter checks in static methods

2024-09-05 Thread Daniel P . Berrangé
Various static methods have checks on their parameters which were already checked immediately before the method was invoked. Drop these redundat checks to simplify the following commit which adds formal error reporting. Signed-off-by: Daniel P. Berrangé --- ebpf/ebpf_rss.c | 32 +

[PATCH v2 5/7] hw/net: report errors from failing to use eBPF RSS FDs

2024-09-05 Thread Daniel P . Berrangé
If the user/mgmt app passed in a set of pre-opened FDs for eBPF RSS, then it is expecting QEMU to use them. Any failure to do so must be considered a fatal error and propagated back up the stack, otherwise deployment mistakes will not be detectable in a prompt manner. When not using pre-opened FDs,

[PATCH v2 6/7] ebpf: improve trace event coverage to all key operations

2024-09-05 Thread Daniel P . Berrangé
The existing error trace event is renamed to have a name prefix matching its source file & to remove the redundant first arg that adds no useful information. Signed-off-by: Daniel P. Berrangé --- ebpf/ebpf_rss.c | 19 +++ ebpf/trace-events | 4 2 files changed, 23 inserti

[PATCH v2 1/7] hw/net: fix typo s/epbf/ebpf/ in virtio-net

2024-09-05 Thread Daniel P . Berrangé
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel P. Berrangé --- hw/net/virtio-net.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index ed33a32877..055fce1d78 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio

[PATCH v2 3/7] ebpf: improve error trace events

2024-09-05 Thread Daniel P . Berrangé
A design pattern of trace_foo_error("descriptive string") is undesirable because it does not allow for filtering trace events based on the error scenario. Split eBPF error trace event into three separate events to address this filtering need. Signed-off-by: Daniel P. Berrangé --- ebpf/ebpf_

[PATCH v2 7/7] hw/net: improve tracing of eBPF RSS setup

2024-09-05 Thread Daniel P . Berrangé
This adds more trace events to key eBPF RSS setup operations, and also distinguishes events from multiple NIC instances. Signed-off-by: Daniel P. Berrangé --- hw/net/trace-events | 8 +--- hw/net/virtio-net.c | 9 ++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/n

[PATCH] hw/i386: define _AS_LATEST() macros for machine types

2024-09-05 Thread Daniel P . Berrangé
Follow the other architecture targets by adding extra macros for defining a versioned machine type as the latest. This reduces the size of the changes when introducing new machine types at the start of each release cycle. Signed-off-by: Daniel P. Berrangé --- hw/i386/pc_piix.c| 11 +-

Re: [PATCH 1/1] migration: improve migration_throttle tracepoint

2024-09-05 Thread Peter Xu
On Thu, Sep 05, 2024 at 08:00:54PM +0200, Denis V. Lunev wrote: > On 9/5/24 19:52, Peter Xu wrote: > > On Thu, Sep 05, 2024 at 06:51:46PM +0200, Denis V. Lunev via wrote: > > > Right now this tracepoint is just saying that the guest has been > > > throttled, but this is not that good for debugging

Re: [PATCH v11 08/11] vfio/migration: Implement VFIO migration protocol v2

2024-09-05 Thread Peter Xu
On Thu, Sep 05, 2024 at 07:45:43PM +0300, Avihai Horon wrote: > > Does it also mean then that the currently reported stop-size - precopy-size > > will be very close to the constant non-iterable data size? > > It's not constant, while the VM is running it can change. I wonder how heavy is VFIO_DEV

Re: [PATCH for-9.2] hw: add compat machines for 9.2

2024-09-05 Thread Daniel P . Berrangé
On Fri, Aug 16, 2024 at 11:47:16AM +0100, Daniel P. Berrangé wrote: > On Fri, Aug 16, 2024 at 12:37:23PM +0200, Cornelia Huck wrote: > > Add 9.2 machine types for arm/i440fx/m68k/q35/s390x/spapr. > > > > Signed-off-by: Cornelia Huck > > --- > > hw/arm/virt.c | 9 - > > hw/c

Re: [PATCH] hvf: arm: Allow creating VMs with > 63GB of RAM on macOS 15+

2024-09-05 Thread Danny Canter
Forgot to leave a trail here :). V2 is posted https://lists.gnu.org/archive/html/qemu-devel/2024-08/msg04016.html Thanks again for review Peter! > On Aug 13, 2024, at 2:31 AM, Peter Maydell wrote: > > On Mon, 12 Aug 2024 at 23:18, Danny Canter wrote: >> On Aug 12, 2024, at 10:52 AM, Peter May

[PATCH] ci: migration: Don't run python tests in the compat job

2024-09-05 Thread Fabiano Rosas
The vmstate-checker-script test has a bug that makes it flaky. It was also committed by mistake and will be removed. Since the migration-compat job takes the tests from the build-previous job instead of the current HEAD, neither a fix or a removal of the test will take effect for this release. Di

Re: [PATCH for-9.2] hw: add compat machines for 9.2

2024-09-05 Thread Peter Maydell
On Thu, 5 Sept 2024 at 19:22, Daniel P. Berrangé wrote: > > On Fri, Aug 16, 2024 at 11:47:16AM +0100, Daniel P. Berrangé wrote: > > On Fri, Aug 16, 2024 at 12:37:23PM +0200, Cornelia Huck wrote: > > > Add 9.2 machine types for arm/i440fx/m68k/q35/s390x/spapr. > > > > > > Signed-off-by: Cornelia Hu

Re: [PATCH] ci: migration: Don't run python tests in the compat job

2024-09-05 Thread Thomas Huth
On 05/09/2024 20.54, Fabiano Rosas wrote: The vmstate-checker-script test has a bug that makes it flaky. It was also committed by mistake and will be removed. Since the migration-compat job takes the tests from the build-previous job instead of the current HEAD, neither a fix or a removal of the

[PATCH 1/8] tests/qtest/migration: Add a check for the availability of the "pc" machine

2024-09-05 Thread Thomas Huth
The test_vcpu_dirty_limit is the only test that does not check for the availability of the machine before starting the test, so it fails when QEMU has been configured with --without-default-devices. Add a check for the "pc" machine type to fix it. Reviewed-by: Fabiano Rosas Signed-off-by: Thomas

[PATCH 2/8] tests/qtest/cdrom-test: Improve the machine detection in the cdrom test

2024-09-05 Thread Thomas Huth
When configuring QEMU with the --without-default-devices switch, these tests are currently failing since they assume that the "pc" and "q35" machines are always available. Add some proper checks to make the test work without these machines, too. Signed-off-by: Thomas Huth --- tests/qtest/cdrom-t

[PATCH 0/8] Allow check-qtest with "--without-default-devices"

2024-09-05 Thread Thomas Huth
With these fixes in place the qtests now work when QEMU has been configured with "--without-default-devices". The final patch enables most targets in the related test in the CI. The riscv patch is necessary for fixing a build failure that occurs when compiling this target without the default devic

[PATCH 4/8] tests/qtest/hd-geo-test: Check for availability of "pc" machine before using it

2024-09-05 Thread Thomas Huth
In case QEMU has been configured with "--without-default-devices", the "pc" machine type might be missing in the binary. We should check for its availability before using it. Signed-off-by: Thomas Huth --- tests/qtest/hd-geo-test.c | 71 +-- 1 file changed, 38

[PATCH 3/8] tests/qtest/boot-order-test: Make the machine name mandatory in this test

2024-09-05 Thread Thomas Huth
Let's make sure that we always pass a machine name to the test_boot_orders() function, so we can check whether the machine is available in the binary and skip the test in case it is not included in the build. Signed-off-by: Thomas Huth --- tests/qtest/boot-order-test.c | 4 ++-- 1 file changed,

[PATCH 7/8] Revert "target/riscv: Restrict semihosting to TCG"

2024-09-05 Thread Thomas Huth
This reverts commit 10425887ba54241be1ce97f8935fc320332b531c. Using "imply" instead of "select" is causing a build failure: /usr/bin/ld: libqemu-riscv32-softmmu.a.p/target_riscv_cpu_helper.c.o: in function `riscv_cpu_do_interrupt': .../qemu/target/riscv/cpu_helper.c:1678:(.text+0x2214): undefi

[PATCH 6/8] tests/qtest: Disable numa-test if the default machine is not available

2024-09-05 Thread Thomas Huth
The numa-test needs a default machine in the target binary to work successfully, so don't try to run this test if the corresponding machine has not been enabled, e.g. when QEMU has been configured with "--without-default-devices". Signed-off-by: Thomas Huth --- tests/qtest/meson.build | 6 --

[PATCH 5/8] tests/qtest/meson.build: Add more CONFIG switches checks for the x86 tests

2024-09-05 Thread Thomas Huth
When configuring QEMU with "--without-default-devices", currently a lot of the x86 qtests are failing since they silently assume that a certain device or the i440fx pc machine is available. Add more checks for CONFIG switches here to not run those tests in case the corresponding device is not avail

[PATCH 8/8] .gitlab-ci.d/buildtest: Build most targets in the build-without-defaults job

2024-09-05 Thread Thomas Huth
Now that all the qtests are able to deal with builds that use the "--without-default-devices" configuration switch, we can add all targets to the build-without-defaults job. But to avoid burning too much CI cycles in this job, exclude some targets where we already have similar test coverage by a re

Re: [RFC PATCH v2 5/5] vhost_user: Implement mem_read/mem_write handlers

2024-09-05 Thread Stefan Hajnoczi
On Wed, Sep 04, 2024 at 03:01:06PM +0200, Albert Esteve wrote: > On Thu, Jul 11, 2024 at 10:55 AM Stefan Hajnoczi > wrote: > > > On Fri, Jun 28, 2024 at 04:57:10PM +0200, Albert Esteve wrote: > > > Implement function handlers for memory read and write > > > operations. > > > > > > Signed-off-by:

[PATCH v2 1/1] system: improve migration debug

2024-09-05 Thread Denis V. Lunev
Right now migration_throttle() tracepoint lacks very important important information, i.e. no one could easily say how much the guest is throttled. This makes difficult to debug guest quality of service during migration. This patch adds one more tracepoint into cpu_throttle_set() which is actually

Re: [PATCH] ci: migration: Don't run python tests in the compat job

2024-09-05 Thread Peter Xu
On Thu, Sep 05, 2024 at 03:54:45PM -0300, Fabiano Rosas wrote: > The vmstate-checker-script test has a bug that makes it flaky. It was > also committed by mistake and will be removed. > > Since the migration-compat job takes the tests from the build-previous > job instead of the current HEAD, neit

Re: [PATCH] ci: migration: Don't run python tests in the compat job

2024-09-05 Thread Peter Xu
On Thu, Sep 05, 2024 at 09:05:51PM +0200, Thomas Huth wrote: > On 05/09/2024 20.54, Fabiano Rosas wrote: > > The vmstate-checker-script test has a bug that makes it flaky. It was > > also committed by mistake and will be removed. > > > > Since the migration-compat job takes the tests from the buil

Re: [PATCH] ci: migration: Don't run python tests in the compat job

2024-09-05 Thread Fabiano Rosas
Peter Xu writes: > On Thu, Sep 05, 2024 at 03:54:45PM -0300, Fabiano Rosas wrote: >> The vmstate-checker-script test has a bug that makes it flaky. It was >> also committed by mistake and will be removed. >> >> Since the migration-compat job takes the tests from the build-previous >> job instead

Re: [PATCH 5/5] target/loongarch/tcg: Add hardware page table walker support

2024-09-05 Thread Richard Henderson
On 9/5/24 01:27, gaosong wrote: How about adding a variable to determine if tlb needs to be modified? like this: @@ -248,7 +250,7 @@ hwaddr loongarch_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) int prot; if (get_physical_address(env, &phys_addr, &prot, addr, MMU_DATA_LOAD, - 

Re: [PATCH v2 1/1] util/util/cpuinfo-riscv.c: fix riscv64 build on musl libc

2024-09-05 Thread Richard Henderson
On 9/5/24 08:06, Milan P. Stanić wrote: build fails on musl libc (alpine linux) with this error: ../util/cpuinfo-riscv.c: In function 'cpuinfo_init': ../util/cpuinfo-riscv.c:63:21: error: '__NR_riscv_hwprobe' undeclared (first use in this function); did you mean 'riscv_hwprobe'? 63 |

Re: [PATCH 7/8] Revert "target/riscv: Restrict semihosting to TCG"

2024-09-05 Thread Peter Maydell
On Thu, 5 Sept 2024 at 20:16, Thomas Huth wrote: > > This reverts commit 10425887ba54241be1ce97f8935fc320332b531c. > > Using "imply" instead of "select" is causing a build failure: > > /usr/bin/ld: libqemu-riscv32-softmmu.a.p/target_riscv_cpu_helper.c.o: in > function `riscv_cpu_do_interrupt': >

Re: [PATCH] ci: migration: Don't run python tests in the compat job

2024-09-05 Thread Peter Maydell
On Thu, 5 Sept 2024 at 20:34, Fabiano Rosas wrote: > > Peter Xu writes: > > > On Thu, Sep 05, 2024 at 03:54:45PM -0300, Fabiano Rosas wrote: > >> The vmstate-checker-script test has a bug that makes it flaky. It was > >> also committed by mistake and will be removed. > >> > >> Since the migration

[PATCH v6 2/8] crypto: Support SHA384 hash when using glib

2024-09-05 Thread Dorjoy Chowdhury
QEMU requires minimum glib version 2.66.0 as per the root meson.build file and per glib documentation[1] G_CHECKSUM_SHA384 is available since 2.51. [1] https://docs.gtk.org/glib/enum.ChecksumType.html Reviewed-by: Daniel P. Berrangé Signed-off-by: Dorjoy Chowdhury --- crypto/hash-glib.c | 2 +-

[PATCH v6 0/8] AWS Nitro Enclave emulation support

2024-09-05 Thread Dorjoy Chowdhury
This is v6 submission for AWS Nitro Enclave emulation in QEMU. From the QEMU side the implementation for nitro enclaves is complete. v5 is at: https://lists.gnu.org/archive/html/qemu-devel/2024-08/msg03251.html Changes in v6: - updated MAINTAINERS in the commit that introduced eif.c, eif.h fi

[PATCH v6 8/8] docs/nitro-enclave: Documentation for nitro-enclave machine type

2024-09-05 Thread Dorjoy Chowdhury
Signed-off-by: Dorjoy Chowdhury --- MAINTAINERS| 1 + docs/system/i386/nitro-enclave.rst | 78 ++ 2 files changed, 79 insertions(+) create mode 100644 docs/system/i386/nitro-enclave.rst diff --git a/MAINTAINERS b/MAINTAINERS index e06aa4a5d7.

[PATCH v6 6/8] hw/core: Add Enclave Image Format (EIF) related helpers

2024-09-05 Thread Dorjoy Chowdhury
An EIF (Enclave Image Format)[1] file is used to boot an AWS nitro enclave[2] virtual machine. The EIF file contains the necessary kernel, cmdline, ramdisk(s) sections to boot. Some helper functions have been introduced for extracting the necessary sections from an EIF file and then writing them t

[PATCH v6 7/8] machine/nitro-enclave: New machine type for AWS Nitro Enclaves

2024-09-05 Thread Dorjoy Chowdhury
AWS nitro enclaves[1] is an Amazon EC2[2] feature that allows creating isolated execution environments, called enclaves, from Amazon EC2 instances which are used for processing highly sensitive data. Enclaves have no persistent storage and no external networking. The enclave VMs are based on the Fi

[PATCH v6 4/8] tests/lcitool: Update libvirt-ci and add libcbor dependency

2024-09-05 Thread Dorjoy Chowdhury
libcbor dependecy is necessary for adding virtio-nsm and nitro-enclave machine support in the following commits. libvirt-ci has already been updated with the dependency upstream and this commit updates libvirt-ci submodule in QEMU to latest upstream. Also the libcbor dependency has been added to te

[PATCH v6 1/8] crypto: Define macros for hash algorithm digest lengths

2024-09-05 Thread Dorjoy Chowdhury
Reviewed-by: Daniel P. Berrangé Signed-off-by: Dorjoy Chowdhury --- crypto/hash.c | 14 +++--- include/crypto/hash.h | 8 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/crypto/hash.c b/crypto/hash.c index b0f8228bdc..8087f5dae6 100644 --- a/crypto/hash.

Re: [PATCH v2 1/1] util/util/cpuinfo-riscv.c: fix riscv64 build on musl libc

2024-09-05 Thread Peter Maydell
On Thu, 5 Sept 2024 at 20:44, Richard Henderson wrote: > > On 9/5/24 08:06, Milan P. Stanić wrote: > > build fails on musl libc (alpine linux) with this error: > > > > ../util/cpuinfo-riscv.c: In function 'cpuinfo_init': > > ../util/cpuinfo-riscv.c:63:21: error: '__NR_riscv_hwprobe' undeclared >

[PATCH v6 5/8] device/virtio-nsm: Support for Nitro Secure Module device

2024-09-05 Thread Dorjoy Chowdhury
Nitro Secure Module (NSM)[1] device is used in AWS Nitro Enclaves[2] for stripped down TPM functionality like cryptographic attestation. The requests to and responses from NSM device are CBOR[3] encoded. This commit adds support for NSM device in QEMU. Although related to AWS Nitro Enclaves, the v

[PATCH v6 3/8] crypto: Introduce x509 utils

2024-09-05 Thread Dorjoy Chowdhury
An utility function for getting fingerprint from X.509 certificate has been introduced. Implementation only provided using gnutls. Signed-off-by: Dorjoy Chowdhury --- crypto/meson.build | 4 ++ crypto/x509-utils.c | 75 + include/crypto/x509-

Re: [PATCH v5 7/8] machine/nitro-enclave: New machine type for AWS Nitro Enclaves

2024-09-05 Thread Dorjoy Chowdhury
On Thu, Aug 29, 2024 at 2:15 PM Daniel P. Berrangé wrote: > > On Wed, Aug 28, 2024 at 09:50:25PM +0600, Dorjoy Chowdhury wrote: > > Hi Daniel, > > > > On Wed, Aug 28, 2024 at 9:39 PM Daniel P. Berrangé > > wrote: > > > > > > On Thu, Aug 22, 2024 at 09:08:48PM +0600, Dorjoy Chowdhury wrote: > > >

Re: [PATCH v5 0/8] AWS Nitro Enclave emulation support

2024-09-05 Thread Dorjoy Chowdhury
Thanks for reviewing. I have now posted a v6 https://lists.gnu.org/archive/html/qemu-devel/2024-09/msg00823.html Regards, Dorjoy

Re: nested-smmuv3 topic, Sep 2024

2024-09-05 Thread Nicolin Chen
Hi Shameer, Thanks for the reply! On Thu, Sep 05, 2024 at 12:55:52PM +, Shameerali Kolothum Thodi wrote: > > The main takeaway from the discussion is to > > 1) Turn the vSMMU module into a pluggable one, like intel-iommu > > 2) Move the per-SMMU pxb bus and device auto-assign into libvirt > >

[RFC PATCH 0/2] qtest: Log verbosity changes

2024-09-05 Thread Fabiano Rosas
Hi, This series silences QEMU stderr unless the QTEST_LOG variable is set and silences -qtest-log unless both QTEST_LOG and gtest's --verbose flag is passed. This was motivated by Peter Maydell's ask to suppress deprecation warn_report messages from the migration-tests and by my own frustration o

[RFC PATCH 2/2] tests/qtest: Mute -qtest-log

2024-09-05 Thread Fabiano Rosas
Make the -qtest-log be conditional on the --verbose flag, along with the existing QTEST_LOG to avoid noisy qtest_memread() messages. Those are particularly annoying for migration-test because all tests read guest memory at the end and the QMP messages get lost in a flood of: [R +1.096069] read 0x6

[RFC PATCH 1/2] tests/qtest: Mute QEMU stderr

2024-09-05 Thread Fabiano Rosas
Make QEMU stderr conditional on the QTEST_LOG variable. For the /x86/cpuid/parsing-plus-minus test, which traps the stderr, to continue working set the QTEST_LOG variable from inside the subprocess. Signed-off-by: Fabiano Rosas --- tests/qtest/libqtest.c | 6 -- tests/qtest/tes

Re: [External] Re: [PATCH v9 3/5] migration: Add migration parameters for QATzip

2024-09-05 Thread Yichen Wang
On Wed, Sep 4, 2024 at 11:11 PM Prasad Pandit wrote: > > On Sat, 31 Aug 2024 at 04:58, Yichen Wang wrote: > > +/* > > + * 1: best speed, ... 9: best compress ratio > > + * There is some nuance here. Refer to QATzip documentation to understand > > + * the mapping of QATzip levels to standard defla

Re: [PATCH v2 1/3] hw: Remove unused inclusion of hw/char/serial.h

2024-09-05 Thread Alistair Francis
On Thu, Sep 5, 2024 at 5:40 PM Bernhard Beschow wrote: > > Reviewed-by: Mark Cave-Ayland > Signed-off-by: Bernhard Beschow Acked-by: Alistair Francis Alistair > --- > hw/char/riscv_htif.c | 1 - > hw/ppc/prep.c| 1 - > hw/riscv/sifive_e.c | 1 - > hw/riscv/sifive_u.c | 1 - > 4 fi

Re: [PATCH v3 00/14] Add support for vector

2024-09-05 Thread Alistair Francis
On Thu, Sep 5, 2024 at 12:29 AM LIU Zhiwei wrote: > > From: TANG Tiancheng Can you please mention RISC-V in the cover letter title. Otherwise it's not obvious that this is RISC-V specific Alistair > > This patch set introduces support for the RISC-V vector extension > in TCG backend for RISC-V

Re: [PATCH v4 02/17] bsd-user: Add RISC-V CPU execution loop and syscall handling

2024-09-05 Thread Alistair Francis
On Wed, Aug 28, 2024 at 7:53 PM Ajeet Singh wrote: > > From: Mark Corbin > > Implemented the RISC-V CPU execution loop, including handling various > exceptions and system calls. The loop continuously executes CPU > instructions,processes exceptions, and handles system calls by invoking > FreeBSD

Re: [PATCH v4 2/2] target/riscv: Add textra matching condition for the triggers

2024-09-05 Thread Alistair Francis
On Mon, Aug 26, 2024 at 12:48 PM Alvin Chang via wrote: Your From is still wrong > > According to RISC-V Debug specification, the optional textra32 and > textra64 trigger CSRs can be used to configure additional matching > conditions for the triggers. For example, if the textra.MHSELECT field >

Re: [PATCH v6 0/5] target/riscv: Add Smrnmi support.

2024-09-05 Thread Alistair Francis
On Mon, Sep 2, 2024 at 5:14 PM Tommy Wu wrote: > > This patchset added support for Smrnmi Extension in RISC-V. Thanks! Can you please include a link to the exact spec version used for this? We have had issues where there are multiple conflicting ratified versions of a spec, so we are trying to

Re: [PATCH v6 4/5] target/riscv: Add Smrnmi mnret instruction.

2024-09-05 Thread Alistair Francis
On Mon, Sep 2, 2024 at 5:14 PM Tommy Wu wrote: > > This patch adds a new instruction `mnret`. `mnret` is an M-mode-only > instruction that uses the values in `mnepc` and `mnstatus` to return to the > program counter, privilege mode, and virtualization mode of the > interrupted context. > > Signed-

Re: [PATCH v2 1/1] util/util/cpuinfo-riscv.c: fix riscv64 build on musl libc

2024-09-05 Thread Alistair Francis
On Fri, Sep 6, 2024 at 1:08 AM Milan P. Stanić wrote: > > build fails on musl libc (alpine linux) with this error: > > ../util/cpuinfo-riscv.c: In function 'cpuinfo_init': > ../util/cpuinfo-riscv.c:63:21: error: '__NR_riscv_hwprobe' undeclared (first > use in this function); did you mean 'riscv_h

Re: qemu direct kernel boot on LoongArch

2024-09-05 Thread maobibo
On 2024/9/5 下午11:49, Jason A. Donenfeld wrote: On Thu, Sep 05, 2024 at 04:54:41PM +0200, Jason A. Donenfeld wrote: On Thu, Sep 05, 2024 at 02:11:32PM +0800, maobibo wrote: On 2024/9/5 下午1:25, Thomas Weißschuh wrote: On 2024-09-05 06:04:12+, Jason A. Donenfeld wrote: On Thu, Sep 5, 20

Re: qemu direct kernel boot on LoongArch

2024-09-05 Thread maobibo
On 2024/9/6 上午12:03, Thomas Weißschuh wrote: On 2024-09-05 17:18:07+, Jason A. Donenfeld wrote: On Thu, Sep 5, 2024 at 5:16 PM Thomas Weißschuh wrote: On 2024-09-05 17:07:22+, Jason A. Donenfeld wrote: On Thu, Sep 5, 2024 at 5:05 PM Thomas Weißschuh wrote: On 2024-09-05 16:53:5

Re: [PATCH v2 1/1] util/util/cpuinfo-riscv.c: fix riscv64 build on musl libc

2024-09-05 Thread Alistair Francis
On Fri, Sep 6, 2024 at 1:08 AM Milan P. Stanić wrote: > > build fails on musl libc (alpine linux) with this error: > > ../util/cpuinfo-riscv.c: In function 'cpuinfo_init': > ../util/cpuinfo-riscv.c:63:21: error: '__NR_riscv_hwprobe' undeclared (first > use in this function); did you mean 'riscv_h

Re: [PATCH] vhost-user: add NEED_REPLY flag

2024-09-05 Thread luzhixing12345
Signed-off-by: luzhixing12345 >On Mon, Aug 12, 2024 at 12:53:19PM GMT, 陆知行 wrote: >>Hi, can someone review this patch? >>I find requests which call vhost_user_get_u64 does not set NEED_REPLY flag > >Can you provide an example to trigger this issue? > >Also, with this change all calls to vhost_us

Re: [PATCH v2] docs: fix vhost-user protocol doc

2024-09-05 Thread luzhixing12345
Hi, can someone help review this patch? Signed-off-by: luzhixing12345

[PATCH 2/2] hw/loongarch/virt: Add FDT table support with acpi ged pm register

2024-09-05 Thread Bibo Mao
ACPI ged is used for power management on LoongArch virt platform, in general it is parsed from acpi table. However if system boot directly from elf kernel, no UEFI bios is provided and acpi table cannot be used also. Here acpi ged pm register is exposed with FDT table, it is compatbile with syscon

[PATCH 1/2] acpi: ged: Add macro for acpi ged sleep register

2024-09-05 Thread Bibo Mao
Macro definition is added for acpi ged sleep register, so that ged emulation driver can use this, also it can be used in FDT table if ged is exposed with FDT table. Signed-off-by: Bibo Mao --- hw/acpi/generic_event_device.c | 6 +++--- include/hw/acpi/generic_event_device.h | 3 +++ 2 fi

[PATCH 0/2] Add FDT table support with acpi ged pm register

2024-09-05 Thread Bibo Mao
ACPI ged is used for power management on LoongArch virt platform, in general it is parsed from acpi table. However if system boot directly from elf kernel, no UEFI bios is provided and acpi table cannot be used also. Here acpi ged pm register is exposed with FDT table, it is compatbile with syscon

Re: [PATCH 01/11 v2] target/riscv: Add CLIC CSR mintstatus

2024-09-05 Thread Alistair Francis
On Tue, Aug 20, 2024 at 2:11 AM Ian Brockbank wrote: > > From: Ian Brockbank > > CSR mintstatus holds the active interrupt level for each supported > privilege mode. sintstatus, and user, uintstatus, provide restricted > views of mintstatus. > > Signed-off-by: Ian Brockbank > Signed-off-by: LIU

Re: [PATCH 00/11 v2] RISC-V: support CLIC v0.9 specification

2024-09-05 Thread Alistair Francis
On Tue, Aug 20, 2024 at 2:08 AM Ian Brockbank wrote: > > [Resubmission now the merge is correct] > > This patch set gives an implementation of "RISC-V Core-Local Interrupt > Controller(CLIC) Version 0.9-draft-20210217". It comes from [1], where > you can find the pdf format or the source code. Ca

Re: [PATCH 02/11 v2] target/riscv: Update CSR xintthresh in CLIC mode

2024-09-05 Thread Alistair Francis
On Tue, Aug 20, 2024 at 2:11 AM Ian Brockbank wrote: > > From: Ian Brockbank > > The interrupt-level threshold (xintthresh) CSR holds an 8-bit field > for the threshold level of the associated privilege mode. > > For horizontal interrupts, only the ones with higher interrupt levels > than the thr

<    1   2   3   >