Re: [RFC PATCH v5 2/4] target/riscv: smstateen check for h/senvcfg

2022-06-16 Thread Alistair Francis
On Sat, Jun 4, 2022 at 2:16 AM Mayuresh Chitale wrote: > > Accesses to henvcfg, henvcfgh and senvcfg are allowed > only if corresponding bit in mstateen0/hstateen0 is > enabled. Otherwise an illegal instruction trap is > generated. > > Signed-off-by: Mayuresh Chitale Reviewed-by: Alistair Franci

Re: [RFC PATCH v5 3/4] target/riscv: smstateen check for fcsr

2022-06-16 Thread Alistair Francis
On Sat, Jun 4, 2022 at 2:08 AM Mayuresh Chitale wrote: > > If smstateen is implemented and sstateen0.fcsr is clear > then the floating point operations must return illegal > instruction exception. > > Signed-off-by: Mayuresh Chitale > --- > target/riscv/csr.c | 24 > 1 f

Re: [RFC PATCH v5 4/4] target/riscv: smstateen check for AIA/IMSIC

2022-06-16 Thread Alistair Francis
On Sat, Jun 4, 2022 at 2:15 AM Mayuresh Chitale wrote: > > If smstateen is implemented then accesses to AIA > registers CSRS, IMSIC CSRs and other IMSIC registers > is controlled by setting of corresponding bits in > mstateen/hstateen registers. Otherwise an illegal > instruction trap or virtual i

Re: [PATCH 0/4] Multiple interface support on top of Multi-FD

2022-06-16 Thread Daniel P . Berrangé
On Wed, Jun 15, 2022 at 08:14:26PM +0100, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Fri, Jun 10, 2022 at 05:58:31PM +0530, manish.mishra wrote: > > > > > > On 09/06/22 9:17 pm, Daniel P. Berrangé wrote: > > > > On Thu, Jun 09, 2022 at 07:33:01AM +

[PATCH 1/2] hw/pci-host/pam.c: Fully support RE^WE semantics of i440FX PAM

2022-06-16 Thread Lev Kujawski
The Programmable Attribute Registers (PAM) of QEMU's emulated i440FX chipset now fully support the exclusive Read Enable (RE) and Write Enable (WE) modes by forwarding reads of the applicable PAM region to RAM and writes to the bus or vice versa, respectively. The prior behavior for the RE case wa

[PATCH 2/2] tests/qtest/i440fx-test.c: Enable full test of i440FX PAM operation

2022-06-16 Thread Lev Kujawski
With the prior patch in this series adding support for RE^WE PAM semantics, the '#ifndef BROKEN' segments of test_i440fx_pam can now be enabled. Additionally: - Verify that changing attributes does not affect the initial contents of the PAM region; - Verify that that the first new mask is writte

Re: [PATCH 0/4] Multiple interface support on top of Multi-FD

2022-06-16 Thread Daniel P . Berrangé
On Wed, Jun 15, 2022 at 05:43:28PM +0100, Daniel P. Berrangé wrote: > On Fri, Jun 10, 2022 at 05:58:31PM +0530, manish.mishra wrote: > > > > On 09/06/22 9:17 pm, Daniel P. Berrangé wrote: > > > On Thu, Jun 09, 2022 at 07:33:01AM +, Het Gala wrote: > > > > As of now, the multi-FD feature suppor

Re: New "IndustryStandard" fw_cfg?

2022-06-16 Thread Gerd Hoffmann
Hi, > After re-read and re-think, I think the problem is better to state as: we > need an interface for QEMU to tell OVMF how much memory it needs to accept, > from [Minimum to All]. So for the case that user wants to boot an > partial-enabled confidential VMs (like current Linux TDX and SNP gue

[PULL 03/21] qmp: add filtering of statistics by target vCPU

2022-06-16 Thread Paolo Bonzini
Introduce a simple filtering of statistics, that allows to retrieve statistics for a subset of the guest vCPUs. This will be used for example by the HMP monitor, in order to retrieve the statistics for the currently selected CPU. Example: { "execute": "query-stats", "arguments": { "target":

[PATCH] tests/vm: do not specify -bios option

2022-06-16 Thread Paolo Bonzini
When running from the build tree, the executable is able to find the BIOS on its own; when running from the source tree, a firmware blob should already be installed and there is no guarantee that the one in the source tree works with the QEMU that is being used for the installation. Just remove th

[PULL 04/21] cutils: add functions for IEC and SI prefixes

2022-06-16 Thread Paolo Bonzini
Extract the knowledge of IEC and SI prefixes out of size_to_str and freq_to_str, so that it can be reused when printing statistics. Signed-off-by: Paolo Bonzini --- include/qemu/cutils.h| 18 ++ tests/unit/test-cutils.c | 52 util/cutils.c

[PULL 01/21] qmp: Support for querying stats

2022-06-16 Thread Paolo Bonzini
From: Mark Kanda Gathering statistics is important for development, for monitoring and for performance measurement. There are tools such as kvm_stat that do this and they rely on the _user_ knowing the interesting data points rather than the tool (which can treat them as opaque). The commands i

[PULL 06/21] qmp: add filtering of statistics by provider

2022-06-16 Thread Paolo Bonzini
Allow retrieving the statistics from a specific provider only. This can be used in the future by HMP commands such as "info sync-profile" or "info profile". The next patch also adds filter-by-provider capabilities to the HMP equivalent of query-stats, "info stats". Example: { "execute": "query-s

[PULL 00/21] Statistics, preconfig and cleanup patches for 2022-06-16

2022-06-16 Thread Paolo Bonzini
The following changes since commit debd0753663bc89c86f5462a53268f2e3f680f60: Merge tag 'pull-testing-next-140622-1' of https://github.com/stsquad/qemu into staging (2022-06-13 21:10:57 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for

[PULL 05/21] hmp: add basic "info stats" implementation

2022-06-16 Thread Paolo Bonzini
From: Mark Kanda Add an HMP command to retrieve statistics collected at run-time. The command will retrieve and print either all VM-level statistics, or all vCPU-level statistics for the currently selected CPU. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Paolo Bonzini --- hmp-commands-

[PULL 15/21] configure: update list of preserved environment variables

2022-06-16 Thread Paolo Bonzini
INSTALL and LIBTOOL are not used anymore, but OBJCFLAGS is new and was not listed. Signed-off-by: Paolo Bonzini --- configure | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/configure b/configure index 4b12a8094c..d41c7eddff 100755 --- a/configure +++ b/configure @@ -2722,1

[PULL 07/21] hmp: add filtering of statistics by provider

2022-06-16 Thread Paolo Bonzini
Allow the user to request statistics for a single provider of interest. Extracted from a patch by Mark Kanda. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Paolo Bonzini --- hmp-commands-info.hx | 7 --- monitor/hmp-cmds.c | 39 --- 2 files change

[PULL 09/21] hmp: add filtering of statistics by name

2022-06-16 Thread Paolo Bonzini
Allow the user to request only a specific subset of statistics. This can be useful when working on a feature or optimization that is known to affect that statistic. Example: (qemu) info stats vcpu halt_poll_fail_ns provider: kvm halt_poll_fail_ns (cumulative, ns): 0 In case multiple

[PULL 02/21] kvm: Support for querying fd-based stats

2022-06-16 Thread Paolo Bonzini
From: Mark Kanda Add support for querying fd-based KVM stats - as introduced by Linux kernel commit: cb082bfab59a ("KVM: stats: Add fd-based API to read binary stats data") This allows the user to analyze the behavior of the VM without access to debugfs. Signed-off-by: Mark Kanda Signed-off-b

[PULL 14/21] virtio-mmio: cleanup reset

2022-06-16 Thread Paolo Bonzini
Make virtio_mmio_soft_reset reset the virtio device, which is performed by both the "soft" and the "hard" reset; and then call virtio_mmio_soft_reset from virtio_mmio_reset to emphasize that the latter is a superset of the former. Signed-off-by: Paolo Bonzini --- hw/virtio/virtio-mmio.c | 17 +++

[PULL 10/21] block: add more commands to preconfig mode

2022-06-16 Thread Paolo Bonzini
Of the block device commands, those that are available outside system emulators do not require a fully constructed machine by definition. Allow running them before machine initialization has concluded. Of the ones that are available inside system emulation, allow querying the PR managers, and sett

[PULL 08/21] qmp: add filtering of statistics by name

2022-06-16 Thread Paolo Bonzini
Allow retrieving only a subset of statistics. This can be useful for example in order to plot a subset of the statistics many times a second: KVM publishes ~40 statistics for each vCPU on x86; retrieving and serializing all of them would be useless. Another use will be in HMP in the following pat

[PULL 11/21] s390x: simplify virtio_ccw_reset_virtio

2022-06-16 Thread Paolo Bonzini
Call virtio_bus_reset instead of virtio_reset, so that the function need not receive the VirtIODevice. Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini --- hw/s390x/virtio-ccw.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s39

[PULL 17/21] tests/vm: allow running tests in an unconfigured source tree

2022-06-16 Thread Paolo Bonzini
tests/vm/Makefile.include used to assume that it could run in an unconfigured source tree, and Cirrus CI relies on that. It was however broken by commit f4c66f1705 ("tests: use tests/venv to run basevm.py-based scripts", 2022-06-06), which co-opted the virtual environment being used by avocado tes

[PULL 12/21] virtio-mmio: stop ioeventfd on legacy reset

2022-06-16 Thread Paolo Bonzini
If the queue PFN is set to zero on a virtio-mmio device, the device is reset. In that case however the virtio_bus_stop_ioeventfd function was not called; add it so that the behavior is similar to when status is set to 0. Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini --- hw/virtio/virt

Corrupted display changing screen colour depth in qemu-system-ppc/MacOS

2022-06-16 Thread Mark Cave-Ayland
Hi all, Howard pointed me off-list to a corrupted screen display issue experienced when changing the screen colour depth in MacOS under qemu-system-ppc. I was able to reproduce it here, and noticed from the output that the issue was likely due to the host display not updating its depth accordi

[PULL 16/21] configure: cleanup -fno-pie detection

2022-06-16 Thread Paolo Bonzini
Place it only inside the 'if test "$pie" = "no"' conditional. Since commit 43924d1e53 ("pc-bios/optionrom: detect -fno-pie", 2022-05-12), the PIE options are detected independently by pc-bios/optionrom/Makefile, and the CFLAGS_NOPIE/LDFLAGS_NOPIE variables are not used anymore. Reviewed-by: Richa

[PULL 13/21] virtio: stop ioeventfd on reset

2022-06-16 Thread Paolo Bonzini
All calls to virtio_bus_reset are preceded by virtio_bus_stop_ioeventfd, move the call in virtio_bus_reset: that makes sense and clarifies that the vdc->reset function is called with ioeventfd already stopped. Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini --- hw/s390x/virtio-ccw.c |

[PULL 18/21] build: fix check for -fsanitize-coverage-allowlist

2022-06-16 Thread Paolo Bonzini
From: Alexander Bulekov The existing check has two problems: 1. Meson uses a private directory for the get_supported_arguments check. ./instrumentation-filter does not exist in that private directory (it is copied into the root of the build-directory). 2. fsanitize-coverage-allowlist is unused w

[PULL 20/21] meson: put cross compiler info in a separate section

2022-06-16 Thread Paolo Bonzini
While at it, remove a dead assignment and simply inline the value of the "target" variable, which is used just once. Signed-off-by: Paolo Bonzini --- meson.build | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index fe5d6632fb..0458b6

[PULL 21/21] build: include pc-bios/ part in the ROMS variable

2022-06-16 Thread Paolo Bonzini
Include the full path in TARGET_DIR, so that messages from sub-Makefiles are clearer. Also, prepare for possibly building firmware outside pc-bios/ from the Makefile, Signed-off-by: Paolo Bonzini --- Makefile | 12 +--- configure | 6 +++--- 2 files changed, 8 insertions(+), 10 deleti

[PULL 19/21] q35:Enable TSEG only when G_SMRAME and TSEG_EN both enabled

2022-06-16 Thread Paolo Bonzini
From: Zhenzhong Duan According to spec: "TSEG Enable (T_EN): Enabling of SMRAM memory for Extended SMRAM space only. When G_SMRAME = 1 and TSEG_EN = 1, the TSEG is enabled to appear in the appropriate physical address space. Note that once D_LCK is set, this bit becomes read only." Changed to ma

Re: [PATCH v6 0/7] cutils: Introduce bundle mechanism

2022-06-16 Thread Paolo Bonzini
On 6/15/22 21:27, Paolo Bonzini wrote: Thanks for prototyping this, I think this is appealing.  I'll take a look later at using meson introspection info to build the preinstall layout. Something like this: diff --git a/meson.build b/meson.build index 0458b69cdf..17023d511a 100644 --- a/meso

Re: [PATCH] tests/vm: do not specify -bios option

2022-06-16 Thread Daniel P . Berrangé
On Thu, Jun 16, 2022 at 10:30:25AM +0200, Paolo Bonzini wrote: > When running from the build tree, the executable is able to find > the BIOS on its own; when running from the source tree, a firmware > blob should already be installed and there is no guarantee that > the one in the source tree works

[PATCH] block/rbd: support driver-specific reopen

2022-06-16 Thread Raphael Pour
Hello everyone, what do you think? Tell me if something needs to be clarified or improved. Raphael OpenPGP_0xCDB1EBB785C5EB7E.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature

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

2022-06-16 Thread Jason A. Donenfeld
Hi Alistair, On Thu, Jun 16, 2022 at 12:32:36PM +1000, Alistair Francis wrote: > Applied to riscv-to-apply.next with the full stop removed Great, thanks. Just wondering: am I looking in the right repo? I don't see it here: https://github.com/alistair23/qemu/commits/riscv-to-apply.next Jason

[PATCH v2 2/2] tests/qtest/i440fx-test.c: Enable full test of i440FX PAM operation

2022-06-16 Thread Lev Kujawski
With the prior patch in this series adding support for RE^WE PAM semantics, the '#ifndef BROKEN' segments of test_i440fx_pam can now be enabled. Additionally: - Verify that changing attributes does not affect the initial contents of the PAM region; - Verify that that the first new mask is writte

[PATCH v2 1/2] hw/pci-host/pam.c: Fully support RE^WE semantics of i440FX PAM

2022-06-16 Thread Lev Kujawski
The Programmable Attribute Registers (PAM) of QEMU's emulated i440FX chipset now fully support the exclusive Read Enable (RE) and Write Enable (WE) modes by forwarding reads of the applicable PAM region to RAM and writes to the bus or vice versa, respectively. The prior behavior for the RE case wa

Re: [PATCH] tests/vm: do not specify -bios option

2022-06-16 Thread Paolo Bonzini
On 6/16/22 10:44, Daniel P. Berrangé wrote: On Thu, Jun 16, 2022 at 10:30:25AM +0200, Paolo Bonzini wrote: When running from the build tree, the executable is able to find the BIOS on its own; when running from the source tree, a firmware blob should already be installed and there is no guarante

Re: [PATCH 0/4] Multiple interface support on top of Multi-FD

2022-06-16 Thread manish.mishra
On 16/06/22 1:46 pm, Daniel P. Berrangé wrote: On Wed, Jun 15, 2022 at 08:14:26PM +0100, Dr. David Alan Gilbert wrote: * Daniel P. Berrangé (berra...@redhat.com) wrote: On Fri, Jun 10, 2022 at 05:58:31PM +0530, manish.mishra wrote: On 09/06/22 9:17 pm, Daniel P. Berrangé wrote: On Thu, Jun

[PATCH 3/8] migration: Add vmstate part of migration stream

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin Now we can disable and enable vmstate part by stream_content parameter. Signed-off-by: Nikita Lapshin --- migration/migration.c | 10 -- migration/savevm.c| 15 +++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/migration/migration.

[PATCH 7/8] migration: analyze-migration script changed

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin This script is used for RAM capabilities test. But it cannot work in case of no vm description in migration stream. So new flag is added to allow work this script with ram-only migration stream. Signed-off-by: Nikita Lapshin --- scripts/analyze-migration.py | 19 ++

Re: [PATCH v4 5/7] 9pfs: fix 'Twalk' to only send error if no component walked

2022-06-16 Thread Greg Kurz
On Wed, 15 Jun 2022 18:36:46 +0200 Christian Schoenebeck wrote: > On Mittwoch, 15. Juni 2022 17:52:49 CEST Greg Kurz wrote: > > On Tue, 15 Mar 2022 11:08:39 +0100 > > > > Christian Schoenebeck wrote: > > > Current implementation of 'Twalk' request handling always sends an > > > 'Rerror' > > >

[PATCH 4/8] migration: Add dirty-bitmaps part of migration stream

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin This patch enables and disable dirty-bitmaps in migration stream. Signed-off-by: Nikita Lapshin --- migration/migration.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index bbf9b6aad1..ad789915ce 10

[PATCH 2/8] migration: should_skip() implemented

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin For next changes it is convenient to make all decisions about sections skipping in one function. Signed-off-by: Nikita Lapshin --- migration/savevm.c | 54 -- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/migrat

[PATCH 6/8] migration: Add RAM part of migration stream

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin 'ram' parameter enable RAM sections in migration stream. If it isn't specified it will be skipped. Signed-off-by: Nikita Lapshin --- migration/migration.c | 17 - migration/migration.h | 1 + migration/ram.c | 6 ++ 3 files changed, 23 insertion

[PATCH 0/8] New parameter for migration stream

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin We want to implement exteranl bg-snapshot tool for saving RAM. For this it is important to be able manage migration stream because tool has no idea about non-RAM part and how to parse it. This paramter provides gurantee about migration content. Now there are 4 parts of migra

[PATCH 4/8] igration: Add dirty-bitmaps part of migration stream

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin This patch enables and disable dirty-bitmaps in migration stream. Signed-off-by: Nikita Lapshin --- migration/migration.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index bbf9b6aad1..ad789915ce 10

[PATCH 5/8] Add block part of migration stream

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin This patch enables and disable block in migration stream. Signed-off-by: Nikita Lapshin --- migration/migration.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index ad789915ce..d81f3c6891 100644 ---

[PATCH v3 03/17] migration: Add vmstate part of migration stream

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin Now we can disable and enable vmstate part by stream_content parameter. Signed-off-by: Nikita Lapshin --- migration/migration.c | 10 -- migration/savevm.c| 15 +++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/migration/migration.

[PATCH 1/8] migration: Implemented new parameter stream_content

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin This new optional parameter contains inormation about migration stream parts to be sent (such as RAM, block, bitmap). This looks better than using capabilities to solve problem of dividing migration stream. Signed-off-by: Nikita Lapshin --- migration/migration.c | 47 +

[PATCH v3 00/17] migration/snapshot: External snapshot utility

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin Changes v2 -> v3 * Refactored tool code to decrease duplications of migration code. * Used sequential migration for saving which means that vmstate will be send first and only after that ram part will be sent. For this purpose stream-content-list paramter was used. *

[PATCH v3 04/17] migration: Add dirty-bitmaps part of migration stream

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin This patch enables and disable dirty-bitmaps in migration stream. Signed-off-by: Nikita Lapshin --- migration/migration.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index bbf9b6aad1..ad789915ce 10

[PATCH 8/8] migration: Test for RAM and vmstate parts

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin All other parts works just like existed capabilities. Thus there is no need to make new tests. Though RAM and vmstate are new so here is new test for that parts. Signed-off-by: Nikita Lapshin --- .../tests/migrate-ram-stream-content-test | 96 +++ .../t

[PATCH v3 05/17] migration: Add block part of migration stream

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin This patch enables and disable block in migration stream. Signed-off-by: Nikita Lapshin --- migration/migration.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index ad789915ce..d81f3c6891 100644 ---

[PATCH v3 10/17] migration/snapshot: Build changes for qemu-snapshot-tool

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin Tool uses part of migration code thus new lib with stubs for migration code is added here. Signed-off-by: Nikita Lapshin --- meson.build | 18 ++ migration/meson.build | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/meson.

[PATCH 5/8] migration: Add block part of migration stream

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin This patch enables and disable block in migration stream. Signed-off-by: Nikita Lapshin --- migration/migration.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index ad789915ce..d81f3c6891 100644 ---

[PATCH v3 07/17] migration: analyze-migration script changed

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin This script is used for RAM capabilities test. But it cannot work in case of no vm description in migration stream. So new flag is added to allow work this script with ram-only migration stream. Signed-off-by: Nikita Lapshin --- scripts/analyze-migration.py | 19 ++

Re: [PATCH 5/8] Add block part of migration stream

2022-06-16 Thread Nikita
Sorry, that one wasn't supposed to be sent.

[PATCH v3 14/17] migration/snpashot: Implement API for RAMBlock

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin Implemented RAMBlock is used for managing ram block from VM. This structure is close to existing RAMBlock in migration but has few differences. May be it should be replaced with existing RAMBlock it can lead to lots of reuses. Signed-off-by: Nikita Lapshin --- migration/q

[PATCH v3 01/17] migration: Implemented new parameter stream_content

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin This new optional parameter contains inormation about migration stream parts to be sent (such as RAM, block, bitmap). This looks better than using capabilities to solve problem of dividing migration stream. Signed-off-by: Nikita Lapshin --- migration/migration.c | 47 +

[PATCH v3 08/17] migration: Test for RAM and vmstate parts

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin All other parts works just like existed capabilities. Thus there is no need to make new tests. Though RAM and vmstate are new so here is new test for that parts. Signed-off-by: Nikita Lapshin --- .../tests/migrate-ram-stream-content-test | 96 +++ .../t

[PATCH v3 02/17] migration: should_skip() implemented

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin For next changes it is convenient to make all decisions about sections skipping in one function. Signed-off-by: Nikita Lapshin --- migration/savevm.c | 54 -- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/migrat

[PATCH v3 06/17] migration: Add RAM part of migration stream

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin 'ram' parameter enable RAM sections in migration stream. If it isn't specified it will be skipped. Signed-off-by: Nikita Lapshin --- migration/migration.c | 17 - migration/migration.h | 1 + migration/ram.c | 6 ++ 3 files changed, 23 insertion

[PATCH v3 11/17] migration/qemu-file: Fix qemu_ftell() for non-writable file

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin qemu_ftell() will return wrong value for non-writable QEMUFile. This happens due to call qemu_fflush() inside qemu_ftell(), this function won't flush if file is readable. Signed-off-by: Nikita Lapshin --- migration/qemu-file.c | 3 ++- 1 file changed, 2 insertions(+), 1 de

[PATCH v3 12/17] migration/snapshot: Move RAM_SAVE_FLAG_xxx defines to migration/ram.h

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin Move RAM_SAVE_FLAG_xxx defines from migration/ram.c to migration/ram.h Signed-off-by: Nikita Lapshin --- migration/ram.c | 16 migration/ram.h | 16 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/migration/ram.c b/migrati

[PATCH v3 09/17] migration/snapshot: Introduce qemu-snapshot tool

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin Execution environment, command-line argument parsing, usage/version info etc. Signed-off-by: Nikita Lapshin --- include/qemu-snapshot.h | 65 ++ migration/qemu-snapshot.c | 57 + qemu-snapshot.c | 433 ++ 3 files ch

Re: [PATCH] tests/vm: do not specify -bios option

2022-06-16 Thread Daniel P . Berrangé
On Thu, Jun 16, 2022 at 12:14:01PM +0200, Paolo Bonzini wrote: > On 6/16/22 10:44, Daniel P. Berrangé wrote: > > On Thu, Jun 16, 2022 at 10:30:25AM +0200, Paolo Bonzini wrote: > > > When running from the build tree, the executable is able to find > > > the BIOS on its own; when running from the sou

[PATCH v3 13/17] migration/snapshot: Block layer support in qemu-snapshot

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin This commit enables few functions to simplify block layer work for qemu-snapshot tool. Signed-off-by: Nikita Lapshin --- include/qemu-snapshot.h | 3 + migration/meson.build| 1 + migration/qemu-snapshot-io.c | 112 +++ 3 fi

[PATCH v3 15/17] migration/snapshot: Save part implement

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin Snapshot save are done in two stages. First tool save vmstate part. It must be guaranteed that tool will get vmstate part only. This is because tool won't parse this stream and will just save it non-modified. Second stage is ram sending. Also it must be guarantee that ram pa

Re: [PATCH v2 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-16 Thread Klaus Jensen
On Jun 15 22:49, Jinhao Fan wrote: > Implement Doorbel Buffer Config command (Section 5.7 in NVMe Spec 1.3) > and Shadow Doorbel buffer & EventIdx buffer handling logic (Section 7.13 > in NVMe Spec 1.3). For queues created before the Doorbell Buffer Config > command, the nvme_dbbuf_config function

Re: [PATCH] tests/vm: do not specify -bios option

2022-06-16 Thread Daniel P . Berrangé
On Thu, Jun 16, 2022 at 10:30:25AM +0200, Paolo Bonzini wrote: > When running from the build tree, the executable is able to find > the BIOS on its own; when running from the source tree, a firmware > blob should already be installed and there is no guarantee that > the one in the source tree works

[PULL 5/7] 9pfs: fix 'Twalk' to only send error if no component walked

2022-06-16 Thread Christian Schoenebeck
Current implementation of 'Twalk' request handling always sends an 'Rerror' response if any error occured. The 9p2000 protocol spec says though: " If the first element cannot be walked for any reason, Rerror is returned. Otherwise, the walk will return an Rwalk message containing nwqid qids

[PATCH v3 16/17] migration/snapshot: Precopy load implemented

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin Load snapshot from qcow2 file. This part also work only with ram part and send vmstate part as it was saved previously without parsing. Here also migration code was reused but now it is savevm part. Tool replace ram handlers as it did before in tool save part but now it is a

Re: [PATCH 1/8] migration: Implemented new parameter stream_content

2022-06-16 Thread Daniel P . Berrangé
On Thu, Jun 16, 2022 at 01:19:57PM +0300, nikita.laps...@openvz.org wrote: > From: Nikita Lapshin > > This new optional parameter contains inormation about migration > stream parts to be sent (such as RAM, block, bitmap). This looks > better than using capabilities to solve problem of dividing >

[PATCH v3 17/17] migration/snapshot: Postcopy load implemented

2022-06-16 Thread nikita . lapshin
From: Nikita Lapshin It is a modified load part from previous patch. Implemented new rp listen thread for snapshot-tool. Also implemented functions for starting postcopy. This mode can be turned on by specifying --postcopy flag. Signed-off-by: Nikita Lapshin --- include/qemu-snapshot.h |

Re: [PATCH v4 0/7] 9pfs: fix 'Twalk' protocol violation

2022-06-16 Thread Christian Schoenebeck
On Dienstag, 15. März 2022 11:10:25 CEST Christian Schoenebeck wrote: > Currently the implementation of 'Twalk' does not behave exactly as specified > by the 9p2000 protocol specification. Actual fix is patch 5; see the > description of that patch for details of what this overall fix and series > i

[PULL 7/7] tests/9pfs: check fid being unaffected in fs_walk_2nd_nonexistent

2022-06-16 Thread Christian Schoenebeck
Extend previously added test case by checking that fid was unaffected by 'Twalk' request (i.e. when 2nd path component of request being invalid). Do that by subsequently sending a 'Tgetattr' request with the fid previously used for 'Twalk'; that 'Tgetattr' request should return an 'Rlerror' respons

[PULL 0/7] 9p queue 2022-06-16

2022-06-16 Thread Christian Schoenebeck
The following changes since commit 9ac873a46963098441be920ef7a2eaf244a3352d: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2022-06-15 09:47:24 -0700) are available in the Git repository at: https://github.com/cschoenebeck/qemu.git tags/pull-9

[PULL 4/7] 9pfs: refactor 'name_idx' -> 'nwalked' in v9fs_walk()

2022-06-16 Thread Christian Schoenebeck
The local variable 'name_idx' is used in two loops in function v9fs_walk(). Let the first loop use its own variable 'nwalked' instead, which we will use in subsequent patch as the number of (requested) path components successfully walked by background I/O thread. Signed-off-by: Christian Schoenebe

Re: [PATCH 0/4] hw/nvme: add support for TP4084

2022-06-16 Thread Klaus Jensen
On Jun 8 03:28, Niklas Cassel via wrote: > Hello there, > > considering that Linux v5.19-rc1 is out which includes support for > NVMe TP4084: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/nvme/host/core.c?id=354201c53e61e493017b15327294b0c8ab522d69 > > I tho

[PULL 1/7] tests/9pfs: walk to non-existent dir

2022-06-16 Thread Christian Schoenebeck
Expect ENOENT Rlerror response when trying to walk to a non-existent directory. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz Based-on: Message-Id: <1f5aa50ace3ba3861ea31e367518282065a6.1647339025.git.qemu_...@crudebyte.com> --- tests/qtest/virtio-9p-test.c | 30

[PULL 6/7] tests/9pfs: guard recent 'Twalk' behaviour fix

2022-06-16 Thread Christian Schoenebeck
Previous 9p patch fixed 'Twalk' request handling, which was previously not behaving as specified by the 9p2000 protocol spec. This patch adds a new test case which guards the new 'Twalk' behaviour in question. More specifically: it sends a 'Twalk' request where the 1st path component is valid, whe

[PULL 3/7] tests/9pfs: compare QIDs in fs_walk_none() test

2022-06-16 Thread Christian Schoenebeck
Extend previously added fs_walk_none() test by comparing the QID of the root fid with the QID of the cloned fid. They should be equal. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz Message-Id: <5bbe9c6931b4600a9a23742f5ff2d38c1188237d.1647339025.git.qemu_...@crudebyte.com> --- te

[PULL 2/7] tests/9pfs: Twalk with nwname=0

2022-06-16 Thread Christian Schoenebeck
Send Twalk request with nwname=0. In this case no QIDs should be returned by 9p server; this is equivalent to walking to dot. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz Message-Id: --- tests/qtest/virtio-9p-test.c | 22 ++ 1 file changed, 22 insertions(+)

Re: [PATCH V8 06/39] cpr: reboot mode

2022-06-16 Thread Daniel P . Berrangé
On Wed, Jun 15, 2022 at 07:51:53AM -0700, Steve Sistare wrote: > Provide the cpr-save and cpr-load functions for live update. These save and > restore VM state, with minimal guest pause time, so that qemu may be updated > to a new version in between. > > cpr-save stops the VM and saves vmstate to

Re: [QEMU PATCH v2 1/6] tests/acpi: allow SSDT changes

2022-06-16 Thread Igor Mammedov
On Mon, 30 May 2022 11:40:42 +0800 Robert Hoo wrote: > Signed-off-by: Robert Hoo > Reviewed-by: Jingqi Liu Reviewed-by: Igor Mammedov > --- > tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tests/qtest/bios-tables-test-allowed-diff.h

Re: [PATCH v3 11/17] migration/qemu-file: Fix qemu_ftell() for non-writable file

2022-06-16 Thread Daniel P . Berrangé
On Thu, Jun 16, 2022 at 01:28:05PM +0300, nikita.laps...@openvz.org wrote: > From: Nikita Lapshin > > qemu_ftell() will return wrong value for non-writable QEMUFile. > This happens due to call qemu_fflush() inside qemu_ftell(), this > function won't flush if file is readable. Well the return val

Re: [PATCH v2 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-16 Thread Jinhao Fan
> On Jun 16, 2022, at 6:40 PM, Klaus Jensen wrote: > > This wont work for drivers that *do* rely on updating the buffer for > admin queues, so we should read it regardless of the value of the queue > id (since we are now updating it through the "Keith Hack^TM"). Sure. Sorry I forgot to update th

[PATCH] hw/i386/postcard.c: New ISA POST card device

2022-06-16 Thread Lev Kujawski
Move the ioport80 memory functionality within hw/i386/pc.c into a new ISA POST card device capable of being instantiated at different ports. Emulate actual i440FX hardware by storing the value written to the port, regardless of the presence of a POST card, a behavior relied upon by firmware for th

Re: [QEMU PATCH v2 3/6] acpi/nvdimm: NVDIMM _DSM Spec supports revision 2

2022-06-16 Thread Igor Mammedov
On Mon, 30 May 2022 11:40:44 +0800 Robert Hoo wrote: > The Intel Optane PMem DSM Interface, Version 2.0 [1], is the up-to-date > spec for NVDIMM _DSM definition, which supports revision_id == 2. > > Nevertheless, Rev.2 of NVDIMM _DSM has no functional change on those Label > Data _DSM Functions,

Re: Corrupted display changing screen colour depth in qemu-system-ppc/MacOS

2022-06-16 Thread Gerd Hoffmann
On Thu, Jun 16, 2022 at 09:54:46AM +0100, Mark Cave-Ayland wrote: > Hi all, > > Howard pointed me off-list to a corrupted screen display issue experienced > when changing the screen colour depth in MacOS under qemu-system-ppc. I was > able to reproduce it here, and noticed from the output that the

[PATCH v17 02/13] linux-user: Add LoongArch signal support

2022-06-16 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- linux-user/loongarch64/signal.c| 312 + linux-user/loongarch64/target_signal.h | 13 ++ 2 files changed, 325 insertions(+) create mode 100644 linux-user/loongarch64/signal.c create mode 100644 linux-user/

[PATCH v17 01/13] linux-user: Add LoongArch generic header files

2022-06-16 Thread Song Gao
This includes: - sockbits.h - target_errno_defs.h - target_fcntl.h - termbits.h - target_resource.h - target_structs.h Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: WANG Xuerui --- linux-user/loongarch64/s

[PATCH v17 04/13] linux-user: Add LoongArch syscall support

2022-06-16 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- linux-user/loongarch64/syscall_nr.h | 312 linux-user/loongarch64/target_syscall.h | 48 linux-user/syscall_defs.h | 6

[PATCH v17 03/13] linux-user: Add LoongArch elf support

2022-06-16 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- linux-user/elfload.c| 91 + linux-user/loongarch64/target_elf.h | 12 2 files changed, 103 insertions(+) create mode 100

[PATCH v17 00/13] Add LoongArch linux-user emulation support

2022-06-16 Thread Song Gao
Hi All, This series add support linux-user emulation. As the LoongArch kernel had merged into 5.19-rc1, you can see the latest kernel at https://kernel.org Need review patches: 0002-linux-user-Add-LoongArch-signal-support.patch 0007-target-loongarch-remove-badaddr-from-CPULoongArch.patch 0

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

2022-06-16 Thread Alistair Francis
On Thu, Jun 16, 2022 at 8:01 PM Jason A. Donenfeld wrote: > > Hi Alistair, > > On Thu, Jun 16, 2022 at 12:32:36PM +1000, Alistair Francis wrote: > > Applied to riscv-to-apply.next with the full stop removed > > Great, thanks. Just wondering: am I looking in the right repo? I don't > see it here: h

[PATCH v17 11/13] target/loongarch: Adjust functions and structure to support user-mode

2022-06-16 Thread Song Gao
Some functions and member of the structure are different with softmmu-mode So we need adjust them to support user-mode. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- target/loongarch/cpu.c| 21 ++- target/loongarch/cpu.h| 6 +++

[PATCH v17 13/13] target/loongarch: Update README

2022-06-16 Thread Song Gao
Add linux-user emulation introduction Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/README | 39 +-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/target/loongarch/README b/target/lo

  1   2   3   >