Re: [PATCH] vl: Add -set options to device opts dict when using JSON syntax for -device

2021-12-22 Thread Gerd Hoffmann
On Tue, Dec 21, 2021 at 04:40:28PM +0100, Markus Armbruster wrote: > Paolo Bonzini writes: > > > On 12/21/21 13:58, Markus Armbruster wrote: > >>> Is this a regression? I suspect commit 5dacda5167 "vl: Enable JSON > >>> syntax for -device" (v6.2.0). > >> > >> Obviously not a regression: everyth

Re: [RFC PATCH v3 22/27] hw/loongarch: Add some devices support for 3A5000.

2021-12-22 Thread yangxiaojuan
Hi, Mark On 12/18/2021 06:02 PM, Mark Cave-Ayland wrote: > On 04/12/2021 12:07, Xiaojuan Yang wrote: > >> 1.Add uart,virtio-net,vga and usb for 3A5000. >> 2.Add irq set and map for the pci host. Non pci device >> use irq 0-16, pci device use 16-64. >> 3.Add some unimplented device to emulate gues

[PATCH] tests/qtest/virtio-net-failover: Use g_file_open_tmp() to create temporary file

2021-12-22 Thread Thomas Huth
g_test_rand_int() must not be called before g_test_init(), otherwise the glib will show a "g_rand_int: assertion 'rand != NULL' failed" message in the log. So we could change the order here, but actually, it's safer to use g_file_open_tmp() anyway, so let's use that function now instead. Reported-

Re: [PATCH v5 13/23] target/riscv: Implement AIA mtopi, stopi, and vstopi CSRs

2021-12-22 Thread Anup Patel
On Tue, Dec 21, 2021 at 12:18 PM Alistair Francis wrote: > > On Sat, Dec 11, 2021 at 2:34 PM Anup Patel wrote: > > > > The AIA specification introduces new [m|s|vs]topi CSRs for > > reporting pending local IRQ number and associated IRQ priority. > > > > Signed-off-by: Anup Patel > > --- > > tar

[PATCH v1 0/2] Aspeed I3C device model

2021-12-22 Thread Troy Lee
This series of patch introduce a dummy implemenation of aspeed i3c model, and it provide just enough information for guest machine. However, the driver probing is still failed, but it will not cause kernel panic. Troy Lee (2): hw/misc: Implementating dummy AST2600 I3C model hw/arm/aspeed_ast26

[PATCH v1 2/2] hw/arm/aspeed_ast2600: create i3c instance

2021-12-22 Thread Troy Lee
This patch includes i3c instance in ast2600 soc. Signed-off-by: Troy Lee --- hw/arm/aspeed_ast2600.c | 12 include/hw/arm/aspeed_soc.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c index f2fef9d706..219b025bc2 100644

[PATCH v1 1/2] hw/misc: Implementating dummy AST2600 I3C model

2021-12-22 Thread Troy Lee
Introduce a dummy AST2600 I3C model. Aspeed 2600 SDK enables I3C support by default. The I3C driver will try to reset the device controller and setup through device address table register. This dummy model response these register with default value listed on ast2600v10 datasheet chapter 54.2. I

Re: [PATCH RFC] MAINTAINERS: split out s390x sections

2021-12-22 Thread Halil Pasic
On Tue, 21 Dec 2021 17:11:58 +0100 Cornelia Huck wrote: > Any objections if I move the sections as outlined above and keep the > acks I already have? No objections here! Regards, Halil

Re: [PULL 31/53] KVM: x86: believe what KVM says about WAITPKG

2021-12-22 Thread Chenyi Qiang
On 7/7/2020 12:41 AM, Paolo Bonzini wrote: Currently, QEMU is overriding KVM_GET_SUPPORTED_CPUID's answer for the WAITPKG bit depending on the "-overcommit cpu-pm" setting. This is a bad idea because it does not even check if the host supports it, but it can be done in x86_cpu_realizefn just

Re: [PATCH] vl: Add -set options to device opts dict when using JSON syntax for -device

2021-12-22 Thread Damien Hedde
On 12/22/21 09:22, Gerd Hoffmann wrote: On Tue, Dec 21, 2021 at 04:40:28PM +0100, Markus Armbruster wrote: Paolo Bonzini writes: On 12/21/21 13:58, Markus Armbruster wrote: Is this a regression? I suspect commit 5dacda5167 "vl: Enable JSON syntax for -device" (v6.2.0). Obviously not a

Re: [PATCH 1/8] target/ppc: Print out literal exception names in logs

2021-12-22 Thread Fabiano Rosas
Cédric Le Goater writes: > It facilitates reading the logs when mask CPU_LOG_INT is activated. We > should do the same for error codes. > > Cc: Fabiano Rosas > Signed-off-by: Cédric Le Goater Reviewed-by: Fabiano Rosas

[PATCH qemu master] hw/misc/aspeed_pwm: fix typo

2021-12-22 Thread Troy Lee
Typo found during developing. Fixes: 70b3f1a34d3c ("hw/misc: Add basic Aspeed PWM model") Signed-off-by: Troy Lee --- hw/misc/aspeed_pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/aspeed_pwm.c b/hw/misc/aspeed_pwm.c index 8ebab5dcef..dbf9634da3 100644 --- a/hw/

Re: [PATCH] vl: Add -set options to device opts dict when using JSON syntax for -device

2021-12-22 Thread Gerd Hoffmann
Hi, > > Simliar: configure stuff not supported by libvirt: > > > > > > > > > > > > > > There will always be a gap between qemu and libvirt, even if most of > > them are temporary only (while developing a new feature). I think we > > need some way to deal with this kind of

[PATCH RFC v2] MAINTAINERS: split out s390x sections

2021-12-22 Thread Cornelia Huck
Split out some more specialized devices etc., so that we can build smarter lists of people to be put on cc: in the future. Reviewed-by: Philippe Mathieu-Daudé Acked-by: David Hildenbrand Acked-by: Christian Borntraeger Acked-by: Thomas Huth Acked-by: Halil Pasic Signed-off-by: Cornelia Huck

[PATCH 2/2] multifd: cleanup the function multifd_send_thread

2021-12-22 Thread Li Zhang
Cleanup multifd_send_thread Signed-off-by: Li Zhang --- migration/multifd.c | 82 ++--- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 4ec40739e0..7888d71bfe 100644 --- a/migration/multifd.c

[PATCH 0/2] multifd: cleanup some source code

2021-12-22 Thread Li Zhang
When looking into the multifd source code, some of them can be improved. This patchset is to cleanup the functions multifd_channel_connect and multfd_send_thead. The functions are tested without any errors. Li Zhang (2): multifd: cleanup the function multifd_channel_connect multifd: cleanu

[PATCH 1/2] multifd: cleanup the function multifd_channel_connect

2021-12-22 Thread Li Zhang
Cleanup multifd_channel_connect Signed-off-by: Li Zhang --- migration/multifd.c | 49 ++--- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 212be1ed04..4ec40739e0 100644 --- a/migration/multif

[PULL 0/9] qtest fixes and improvements

2021-12-22 Thread Thomas Huth
Hi! The following changes since commit 8c5f94cd4182753959c8be8de415120dc879d8f0: Merge tag 'pull-loong-20211221-2' of https://gitlab.com/rth7680/qemu into staging (2021-12-21 13:30:35 -0800) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-request-2021-1

[PULL 4/9] MAINTAINERS: Update COLO Proxy section

2021-12-22 Thread Thomas Huth
From: Zhang Chen Signed-off-by: Zhang Chen Message-Id: <20211221080400.1492980-1-chen.zh...@intel.com> Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5

[PULL 1/9] failover: Silence warning messages during qtest

2021-12-22 Thread Thomas Huth
From: Laurent Vivier virtio-net-failover test tries several device combinations that produces some expected warnings. These warning can be confusing, so we disable them during the qtest sequence. Reported-by: Thomas Huth Signed-off-by: Laurent Vivier Message-Id: <20211220145314.390697-1-lviv..

[PULL 2/9] tests/qtest/boot-serial-test: Silence the warning about deprecated sga device

2021-12-22 Thread Thomas Huth
When running the qtests, there are currently a bunch of warnings about the deprecated sga device during the boot-serial-test. Switch to "-M graphics=off" to silence these warnings. Message-Id: <20211220164042.397028-1-th...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Hend

[PULL 7/9] tests/qtest/cdrom-test: Check whether devices are available before using them

2021-12-22 Thread Thomas Huth
Downstream users might want to disable legacy devices in their binaries, so we should not blindly assume that they are available. Add some proper checks before using them. Message-Id: <20211220081054.151515-4-th...@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/cdrom-test.c | 60

[PULL 3/9] tests/qtest: Make the filter tests independent from a specific NIC

2021-12-22 Thread Thomas Huth
These filter tests need a NIC, no matter which one, so they use a common NIC by default. However, these common NIC models might not always have been compiled into the QEMU target binary, so assuming that a certain NIC is available is a bad idea. Since the exact type of NIC does not really matter fo

[PULL 5/9] tests/qtest: Add a function that checks whether a device is available

2021-12-22 Thread Thomas Huth
Devices might not always be compiled into the QEMU target binaries. We already have the libqos framework that is good for handling such situations, but some of the qtests are not a real good fit for the libqos framework. Let's add a qtest_has_device() function for such tests instead. Message-Id: <

[PULL 9/9] tests/qtest/virtio-net-failover: Use g_file_open_tmp() to create temporary file

2021-12-22 Thread Thomas Huth
g_test_rand_int() must not be called before g_test_init(), otherwise the glib will show a "g_rand_int: assertion 'rand != NULL' failed" message in the log. So we could change the order here, but actually, it's safer to use g_file_open_tmp() anyway, so let's use that function now instead. Reported-

Re: [PATCH] intel-iommu: correctly check passthrough during translation

2021-12-22 Thread Peter Xu
On Wed, Dec 22, 2021 at 02:39:56PM +0800, Jason Wang wrote: > When scsalable mode is enabled, the passthrough more is not determined > by the context entry but PASID entry, so switch to use the logic of > vtd_dev_pt_enabled() to determine the passthrough mode in > vtd_do_iommu_translate(). > > Sig

[PATCH 0/3] qsd: Add --daemonize; and add job quit tests

2021-12-22 Thread Hanna Reitz
Hi, This series began as an attempt to write a reproducer for the following case: You have a mirror job in READY state with a target that’s slow. There is still a lot of data to be written (because of active I/O in the guest). You quit qemu, and you expect quitting to be reasonably quic

[PULL 6/9] tests/qtest: Improve endianness-test to work with missing machines and devices

2021-12-22 Thread Thomas Huth
The users might have built QEMU with less machines or without the i82378 superio device. Add some checks to the endianess-test so that it is able to deal with such stripped down QEMU versions, too. Message-Id: <20211220081054.151515-3-th...@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/

[PULL 8/9] tests/qtest/boot-order-test: Check whether machines are available

2021-12-22 Thread Thomas Huth
Machines might not always be compiled into the QEMU binary, so we should skip the test instead of failing if it is not available. Message-Id: <20211220081054.151515-5-th...@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/boot-order-test.c | 5 + 1 file changed, 5 insertions(+) diff -

[PATCH 1/3] qsd: Add pre-init argument parsing pass

2021-12-22 Thread Hanna Reitz
We want to add a --daemonize argument to QSD's command line. This will require forking the process before we do any complex initialization steps, like setting up the block layer or QMP. Therefore, we must scan the command line for it long before our current process_options() call. Instead of add

[PATCH 2/3] qsd: Add --daemonize

2021-12-22 Thread Hanna Reitz
This option does basically the same as --fork does for qemu-nbd: - We fork off a child process - The child process is daemonized (closing its stdin and stdout) - stderr of the child is routed through the parent, so the parent can see errors and adjust its exit code accordingly - Once the child cl

[PATCH 3/3] iotests/185: Add post-READY quit tests

2021-12-22 Thread Hanna Reitz
185 tests quitting qemu while a block job is active. It does not specifically test quitting qemu while a mirror or active commit job is in its READY phase. Add two test cases for this, where we respectively mirror or commit to an external QSD instance, which provides a throttled block device. qe

Re: [PATCH v2 3/3] ui: Fix gtk/gl when the scaled virtual console does not fit the window

2021-12-22 Thread Marc-André Lureau
Hi On Wed, Dec 22, 2021 at 4:11 AM Alexander Orzechowski < orzechowski.alexan...@gmail.com> wrote: > gtk/gl was incorrectly always rendering as if the 'Zoom to Fit' was > always checked even if it wasn't. This is now using logic closer > to what is being used for the existing cairo code paths. >

[PATCH v16] qapi: introduce 'x-query-x86-cpuid' QMP command.

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
From: Valeriy Vdovin Introducing new QMP command 'query-x86-cpuid'. This command can be used to get virtualized cpu model info generated by QEMU during VM initialization in the form of cpuid representation. Diving into more details about virtual CPU generation: QEMU first parses '-cpu' command l

Re: [PATCH v2 5/5] ui/input-legacy: pass horizontal scroll information

2021-12-22 Thread Marc-André Lureau
Hi On Wed, Dec 22, 2021 at 5:31 AM Dmitry Petrov wrote: > This code seems to be used by vmport hack, passing these values allows > to implement horizontal scroll support even when using vmport. > In case it's not supported horizontal scroll will act as a vertical one. > > Signed-off-by: Dmitry P

[PATCH 0/8] Re-write PPC64 PMU instruction count using TCG Ops

2021-12-22 Thread Daniel Henrique Barboza
Hi, Two days ago Richard Henderson reported test failures with Avocado and powernv8/9 due to timeouts [1]. The culprit ended up to be commit , a commit where I introduced PMU instruction counting for TCG PPC64. For a reason that is still unclear to me these Avocado powernv tests are suffering a h

[PATCH 2/8] target/ppc/power8-pmu-insn-cnt: add pmu_inc_pmc5()

2021-12-22 Thread Daniel Henrique Barboza
The first PMC to be counted using exclusively TCG ops will be PMC5. pmu_inc_pmc5() will always be called inside pmu_count_insns() since it's able to avoid incrementing PMC5 by checking for MMCR0_FC56 beforehand. Note that we've already checked that MMCR0_FC is cleared at this point via ctx->pmu_in

[PATCH 3/8] target/ppc/power8-pmu-insn-cnt: add pmu_inc_pmc1()

2021-12-22 Thread Daniel Henrique Barboza
pmu_inc_pmc1() will use TCG Ops to increment the PMC1 counter when it's counting PM_INST_CMPL events. At this moment we're supporting two values of MMCR1_PMC1SEL for this event: 0x02 and 0xFE. This function, and all the soon to be added PMC2-4 insn count functions, does not check if MMCR0_FC14 is

[PATCH 1/8] target/ppc: introduce power8-pmu-insn-cnt.c.inc

2021-12-22 Thread Daniel Henrique Barboza
We're going to add a significant amount of TCG ops code for instruction counting, eventually getting rid of the 'helper_insn_inc' helper entirely. Create a new file to avoid putting even more stuff on the already crowded target/ppc/translate.c. Signed-off-by: Daniel Henrique Barboza --- target/

[PATCH 4/8] target/ppc/power8-pmu-insn-cnt: add pmu_inc_pmc2()

2021-12-22 Thread Daniel Henrique Barboza
Add PMC2 PM_INST_CMPL count with TCG Ops. Signed-off-by: Daniel Henrique Barboza --- target/ppc/power8-pmu-insn-cnt.c.inc | 32 1 file changed, 32 insertions(+) diff --git a/target/ppc/power8-pmu-insn-cnt.c.inc b/target/ppc/power8-pmu-insn-cnt.c.inc index 3661fb002

[PATCH 7/8] target/ppc/power8-pmu-insn-cnt: add pmu_check_overflow()

2021-12-22 Thread Daniel Henrique Barboza
pmu_check_overflow() will verify for overflow in the PMC1-5 counters, firing a performance monitor alert if an overflow happened with the proper MMCR0 bits set. The alert is fired by using helper_pmu_overflow(). Signed-off-by: Daniel Henrique Barboza --- target/ppc/helper.h |

[PATCH 6/8] target/ppc/power8-pmu-insn-cnt.c: add pmu_inc_pmc4()

2021-12-22 Thread Daniel Henrique Barboza
pmu_inc_pmc4() will count both PM_INST_CMPL and PM_RUN_INST_CMPL. Signed-off-by: Daniel Henrique Barboza --- target/ppc/power8-pmu-insn-cnt.c.inc | 60 1 file changed, 60 insertions(+) diff --git a/target/ppc/power8-pmu-insn-cnt.c.inc b/target/ppc/power8-pmu-insn-c

[PATCH 5/8] target/ppc/power8-pmu-insn-cnt: add pmu_inc_pmc3()

2021-12-22 Thread Daniel Henrique Barboza
Add PMC3 PM_INST_CMPL count with TCG Ops. Signed-off-by: Daniel Henrique Barboza --- target/ppc/power8-pmu-insn-cnt.c.inc | 32 1 file changed, 32 insertions(+) diff --git a/target/ppc/power8-pmu-insn-cnt.c.inc b/target/ppc/power8-pmu-insn-cnt.c.inc index be0e2dc3b

[PATCH 8/8] target/ppc/power8-pmu.c: remove helper_insns_inc()

2021-12-22 Thread Daniel Henrique Barboza
After moving all the instruction counting to TCG Ops code this helper is not needed anymore. Signed-off-by: Daniel Henrique Barboza --- target/ppc/helper.h | 1 - target/ppc/power8-pmu-insn-cnt.c.inc | 4 -- target/ppc/power8-pmu.c | 60 ---

Re: [PATCH v2 1/5] ps2: Initial horizontal scroll support

2021-12-22 Thread Marc-André Lureau
Hi On Wed, Dec 22, 2021 at 5:27 AM Dmitry Petrov wrote: > v2: > - Patch is split into a sequence > - value is clamped to 31 for horizontal scroll > > This patch introduces horizontal scroll support for the ps/2 > mouse. > > The patch is based on the previous work > by Brad Jorsch done in 201

[PATCH] ui/dbus: fix buffer-overflow detected by ASAN

2021-12-22 Thread marcandre . lureau
From: Marc-André Lureau On the last added dbus patch, I left a tiny BO: ==441487==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61125a70 at pc 0x7f0817bb764c bp 0x7ffde672ae60 sp 0x7ffde672ae58 WRITE of size 8 at 0x61125a70 thread T0 #0 0x7f0817bb764b in dbus_vc_class_i

[PATCH 1/2] [crypto] Load all certificates in X509 CA file

2021-12-22 Thread Henry Kleynhans
From: Henry Kleynhans Some CA files may contain multiple intermediaries and roots of trust. These may not fit into the hard-coded limit of 16. Extend the validation code to allocate enough space to load all of the certificates present in the CA file and ensure they are cleaned up. Signed-off-by

[PATCH 2/2] [crypto] Only verify CA certs in chain of trust

2021-12-22 Thread Henry Kleynhans
From: Henry Kleynhans The CA file provided to qemu may contain CA certificates which do not form part of the chain of trust for the specific certificate we are sanity checking. This patch changes the sanity checking from validating every CA certificate to only checking the CA certificates which

Re: [PATCH v2 1/5] ps2: Initial horizontal scroll support

2021-12-22 Thread Dmitry Petrov
Hi Marc-André, Thank you for the comments! The reason of adding the support there was because I've been working on horizontal scroll support for another os (serenity os - https://github.com/SerenityOS/serenity/pull/11246) and wanted to make sure that any changes I made worked fine and ps/2 mouse

[PATCH] tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it

2021-12-22 Thread Thomas Huth
The lsi53c895a SCSI controller might have been disabled in the target binary, so let's check for its availability first before using it. Signed-off-by: Thomas Huth --- tests/qtest/hd-geo-test.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/qtest/hd-geo-test.c

[PATCH] tests/qtest/test-x86-cpuid-compat: Check for machines before using them

2021-12-22 Thread Thomas Huth
The user might have disabled the pc-i440fx machine type (or it's older versions, like done in downstream RHEL) in the QEMU binary, so let's better check whether the machine types are available before using them. Signed-off-by: Thomas Huth --- tests/qtest/test-x86-cpuid-compat.c | 85

Re: [PATCH 2/2] [crypto] Only verify CA certs in chain of trust

2021-12-22 Thread Henry Kleynhans
Hi Daniel, This patch tightens the CA verification code to only check the issuer chain of the client cert. I think this will still not catch expired/invalid certs if the client and server certs have different issuer chains; so maybe this too is not quite the correct fix. Let me know what you

[PATCH v2 1/4] block-backend: blk_root(): drop const specifier on return type

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
We'll need get non-const child pointer for graph modifications in further commits. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/block-backend.h | 2 +- block/block-backend.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sysemu/block-bac

[PATCH RFC v2 0/4] blockdev-replace

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Hi all! v2: 1. Let's start with minimal functionality: replace only one specific child. 2. Explicit type of parent: qdev / export / driver Hmm, 'driver' is for BlockDriverState.. Any better idea? I don't want to call it "node" or even "block-node", as finally, devices and exports are kind of no

[PATCH v2 4/4] qapi: add blockdev-replace command

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Add a command that can replace bs in following BdrvChild structures: - qdev blk root child - block-export blk root child - any child BlockDriverState selected by child-name Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block.json | 61 +

[PATCH v2 2/4] block/export: add blk_by_export_id()

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/block-backend.h | 1 + block/export/export.c | 18 ++ 2 files changed, 19 insertions(+) diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 904d70f49c..250c7465a5 100644 --- a/

[PATCH v2 3/4] block: make bdrv_find_child() function public

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
To be reused soon. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block_int.h | 1 + block.c | 13 + blockdev.c| 14 -- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/block/block_int.h b/include/b

Re: [PATCH qemu] s390x/css: fix PMCW invalid mask

2021-12-22 Thread Cornelia Huck
On Thu, Dec 16 2021, Nico Boehr wrote: > Previously, we required bits 5, 6 and 7 to be zero (0x07 == 0b111). But, > as per the principles of operation, bit 5 is ignored in MSCH and bits 0, > 1, 6 and 7 need to be zero. > > As both PMCW_FLAGS_MASK_INVALID and ioinst_schib_valid() are only used > b

[PULL 0/3] Block patches

2021-12-22 Thread Hanna Reitz
The following changes since commit 8c5f94cd4182753959c8be8de415120dc879d8f0: Merge tag 'pull-loong-20211221-2' of https://gitlab.com/rth7680/qemu into staging (2021-12-21 13:30:35 -0800) are available in the Git repository at: https://gitlab.com/hreitz/qemu.git tags/pull-block-2021-12-22 f

[PULL 1/3] iotests/testrunner.py: add doc string for run_test()

2021-12-22 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We are going to modify these methods and will add more documentation in further commit. As a preparation add basic documentation. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <2021120313.2780098-2-vsement...@virtuozzo.com> Reviewed-by: John Snow

[PULL 3/3] iotests: check: multiprocessing support

2021-12-22 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy Add -j parameter, to run tests in several jobs simultaneously. For realization - simply utilize multiprocessing.Pool class. Notes: 1. Of course, tests can't run simultaneously in same TEST_DIR. So, use subdirectories TEST_DIR/testname/ and SOCK_DIR/testnam

[PULL 2/3] iotests/testrunner.py: move updating last_elapsed to run_tests

2021-12-22 Thread Hanna Reitz
From: Vladimir Sementsov-Ogievskiy We are going to use do_run_test() in multiprocessing environment, where we'll not be able to change original runner object. Happily, the only thing we change is that last_elapsed and it's simple to do it in run_tests() instead. All other accesses to self in do_

[PATCH v3 00/19] Make image fleecing more usable

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
v3: Rebase on master, small qapi docs improvements suggested by Markus There several improvements to fleecing scheme: 1. support bitmap in copy-before-write filter 2. introduce fleecing block driver, which opens the door for a lot of image fleecing improvements. See "block: introduce fleec

[PATCH v3 01/19] block/block-copy: move copy_bitmap initialization to block_copy_state_new()

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
We are going to complicate bitmap initialization in the further commit. And in future, backup job will be able to work without filter (when source is immutable), so we'll need same bitmap initialization in copy-before-write filter and in backup job. So, it's reasonable to do it in block-copy. Note

[PATCH v3 03/19] block/block-copy: block_copy_state_new(): add bitmap parameter

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
This will be used in the following commit to bring "incremental" mode to copy-before-write filter. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 2 +- block/block-copy.c | 14 -- block/copy-before-write.c | 2 +- 3 files changed, 14 insertion

[PATCH v3 07/19] block/dirty-bitmap: introduce bdrv_dirty_bitmap_status()

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Add a convenient function similar with bdrv_block_status() to get status of dirty bitmap. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h | 2 ++ include/qemu/hbitmap.h | 11 +++ block/dirty-bitmap.c | 6 ++ util/hbitmap.c |

[PATCH v3 08/19] block/reqlist: add reqlist_wait_all()

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Add function to wait for all intersecting requests. To be used in the further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/reqlist.h | 8 block/reqlist.c | 8 2 files changed, 16 insertions(+) diff --git a/include/block/reqlist.h b/include/bloc

[PATCH v3 04/19] block/copy-before-write: add bitmap open parameter

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
This brings "incremental" mode to copy-before-write filter: user can specify bitmap so that filter will copy only "dirty" areas. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 10 +- block/copy-before-write.c | 30 +- 2 files chang

[PATCH v3 17/19] block: blk_root(): return non-const pointer

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
In the following patch we'll want to pass blk children to block-copy. Const pointers are not enough. So, return non const pointer from blk_root(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/block-backend.h | 2 +- block/block-backend.c | 2 +- 2 files changed, 2 inse

[PATCH v3 02/19] block/dirty-bitmap: bdrv_merge_dirty_bitmap(): add return value

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
That simplifies handling failure in existing code and in further new usage of bdrv_merge_dirty_bitmap(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h| 2 +- block/dirty-bitmap.c| 9 +++-- block/monitor/bitmap-qmp-cmds.c | 5 + 3 files chang

[PATCH v3 05/19] block/block-copy: add block_copy_reset()

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Split block_copy_reset() out of block_copy_reset_unallocated() to be used separately later. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 1 + block/block-copy.c | 21 + 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/in

[PATCH v3 14/19] iotests/image-fleecing: add test-case for fleecing format node

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/image-fleecing | 67 -- tests/qemu-iotests/tests/image-fleecing.out | 76 - 2 files changed, 122 insertions(+), 21 deletions(-) diff --git a/tests/qemu-iotests/tests/image-fleecing b

[PATCH v3 10/19] block: introduce fleecing block driver

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Introduce a new driver, that works in pair with copy-before-write to improve fleecing. Without fleecing driver, old fleecing scheme looks as follows: [guest] | |root v [copy-before-write] -> [temp.qcow2] <--- [nbd export] | target | |file |backin

[PATCH v3 11/19] block/copy-before-write: support fleecing block driver

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
The last step to make new fleecing scheme work (see block/fleecing.h for descritption) is to update copy-before-write filter: If we detect that unfiltered target child is fleecing block driver, we do: - initialize shared FleecingState - activate fleecing block driver with it - do guest write sy

[PATCH v3 18/19] qapi: backup: add immutable-source parameter

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
We are on the way to implement internal-backup with fleecing scheme, which includes backup job copying from fleecing block driver node (which is target of copy-before-write filter) to final target of backup. This job doesn't need own filter, as fleecing block driver node is a kind of snapshot, it's

[PATCH v3 06/19] block: intoduce reqlist

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Split intersecting-requests functionality out of block-copy to be reused in copy-before-write filter. Note: while being here, fix tiny typo in MAINTAINERS. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/reqlist.h | 67 +++ block/block-copy.c | 116 ++

[PATCH v3 13/19] block/copy-before-write: use write-unchanged in fleecing mode

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
As announced in previous commit, we need use write-unchanged operations for fleecing, so that fleecing client may unshare writes if needed. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/copy-before-write.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a

[PATCH v3 15/19] iotests.py: add qemu_io_pipe_and_status()

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Add helper that returns both status and output, to be used in the following commit Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 4 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 83bfedb902.

[PATCH v3 12/19] block/block-copy: add write-unchanged mode

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
We are going to implement push backup with fleecing scheme. This means that backup job will be a fleecing user and therefore will not need separate copy-before-write filter. Instead it will consider source as constant unchanged drive. Of course backup will want to unshare writes on source for this

Re: [PATCH 1/8] target/ppc: introduce power8-pmu-insn-cnt.c.inc

2021-12-22 Thread Cédric Le Goater
On 12/22/21 14:45, Daniel Henrique Barboza wrote: We're going to add a significant amount of TCG ops code for instruction counting, eventually getting rid of the 'helper_insn_inc' helper entirely. Create a new file to avoid putting even more stuff on the already crowded target/ppc/translate.c.

[PATCH v3 09/19] block: introduce FleecingState class

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
FleecingState represents state shared between copy-before-write filter and upcoming fleecing block driver. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/fleecing.h | 135 ++ block/fleecing.c | 182 ++ MAINTAINE

[PATCH v3 16/19] iotests/image-fleecing: add test case with bitmap

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Note that reads zero areas (not dirty in the bitmap) fails, that's correct. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/image-fleecing | 32 ++-- tests/qemu-iotests/tests/image-fleecing.out | 84 + 2 files changed, 108 insertions(+), 8 del

[PATCH v3 19/19] iotests/image-fleecing: test push backup with fleecing

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Add test for push backup with fleecing: - start fleecing with copy-before-write filter - start a backup job from temporary fleecing node to actual backup target Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/image-fleecing | 121 ++-- tests/qem

Re: [PATCH 1/8] target/ppc: introduce power8-pmu-insn-cnt.c.inc

2021-12-22 Thread Daniel Henrique Barboza
On 12/22/21 15:00, Cédric Le Goater wrote: On 12/22/21 14:45, Daniel Henrique Barboza wrote: We're going to add a significant amount of TCG ops code for instruction counting, eventually getting rid of the 'helper_insn_inc' helper entirely. Create a new file to avoid putting even more stuff o

Re: [PATCH 3/5] ppc/pnv: Remove the PHB4 "device-id" property

2021-12-22 Thread Daniel Henrique Barboza
On 12/22/21 03:38, Cédric Le Goater wrote: It's unused. Signed-off-by: Cédric Le Goater --- Reviewed-by: Daniel Henrique Barboza include/hw/pci-host/pnv_phb4.h | 2 -- hw/pci-host/pnv_phb4.c | 1 - hw/pci-host/pnv_phb4_pec.c | 3 --- 3 files changed, 6 deletions(-) dif

Re: [PATCH 2/5] ppc/pnv: Remove PHB4 reset handler

2021-12-22 Thread Daniel Henrique Barboza
On 12/22/21 03:38, Cédric Le Goater wrote: The PHB4 reset handler was preparing ground for PHB5 to set appropriately the device id. We don't need it for the PHB4 since the device id is already set in the root port complex. PH5 will introduce its own. "device-id" property is now useless. It sh

Re: [PATCH 1/5] ppc/pnv: Change the maximum of PHB3 devices for Power8NVL

2021-12-22 Thread Daniel Henrique Barboza
On 12/22/21 03:38, Cédric Le Goater wrote: The POWER8 processors with a NVLink logic unit have 4 PHB3 devices per chip. Signed-off-by: Cédric Le Goater --- Reviewed-by: Daniel Henrique Barboza hw/ppc/pnv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/pnv

Re: [PULL 0/9] qtest fixes and improvements

2021-12-22 Thread Richard Henderson
On 12/22/21 3:32 AM, Thomas Huth wrote: Hi! The following changes since commit 8c5f94cd4182753959c8be8de415120dc879d8f0: Merge tag 'pull-loong-20211221-2' of https://gitlab.com/rth7680/qemu into staging (2021-12-21 13:30:35 -0800) are available in the Git repository at: https://gitla

[RFC PATCH 0/2] accel/tcg: replace phys_pc with asid in TB htable key

2021-12-22 Thread Oleg Vasilev
See last patch in series. Oleg Vasilev (2): target/arm: move regime_ttbr helper accel/tcg: replace phys_pc with asid in TB htable key accel/tcg/cpu-exec.c | 38 accel/tcg/tb-hash.h | 4 ++-- accel/tcg/translate-all.c| 7 +++-

[RFC PATCH 1/2] target/arm: move regime_ttbr helper

2021-12-22 Thread Oleg Vasilev
From: Oleg Vasilev Now it is available for other files to use. CC: qemu-...@nongnu.org Signed-off-by: Oleg Vasilev Signed-off-by: Oleg Vasilev --- target/arm/helper.c| 17 - target/arm/internals.h | 17 + 2 files changed, 17 insertions(+), 17 deletions(-)

Re: [PATCH 5/5] ppc/pnv: Attach PHB4 root port device when defaults are enabled

2021-12-22 Thread Daniel Henrique Barboza
On 12/22/21 03:38, Cédric Le Goater wrote: This cleanups the PHB4 model a bit more since the root port is an independent device and it will ease our task when adding user created PHB4s. Signed-off-by: Cédric Le Goater --- Reviewed-by: Daniel Henrique Barboza include/hw/pci-host/pnv_ph

[RFC PATCH 2/2] accel/tcg: replace phys_pc with asid in TB htable key

2021-12-22 Thread Oleg Vasilev
From: Oleg Vasilev Using a physical pc requires to translate address every time next block needs to be found and executed. This also contaminates TLB with code-related records. Instead, I suggest we introduce an architecture-specific address space identifier, and use it to distinguish between di

Re: [PATCH 4/5] ppc/pnv: Attach PHB3 root port device when defaults are enabled

2021-12-22 Thread Daniel Henrique Barboza
On 12/22/21 03:38, Cédric Le Goater wrote: This cleanups the PHB3 model a bit more since the root port is an independent device and it will ease our task when adding user created PHB3s. Signed-off-by: Cédric Le Goater --- Reviewed-by: Daniel Henrique Barboza include/hw/pci-host/pnv_ph

Re: [PATCH 0/5] ppc/pnv: Preliminary cleanups before user created PHBs

2021-12-22 Thread Daniel Henrique Barboza
On 12/22/21 03:38, Cédric Le Goater wrote: Hello, There are the last cleanups preparing ground for PHBs created on the command line and possibly libvirt support. As a note to whoever wants to give this series a go: I'm working in more fixes and cleanups on top of these patches. I'm planni

Re: [PATCH 2/2] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER

2021-12-22 Thread Philippe Mathieu-Daudé
On 12/22/21 08:05, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> Do not list vhost-user-blk in BlockExportType >> when CONFIG_VHOST_USER_BLK_SERVER is disabled. >> >> Fixes: 90fc91d50b7 ("convert vhost-user-blk server to block export API") > > My immediate reaction was "what exa

Re: [PATCH v2 1/7] linux-user/nios2: Properly emulate EXCP_TRAP

2021-12-22 Thread Laurent Vivier
Le 21/12/2021 à 03:50, Richard Henderson a écrit : The real kernel has to load the instruction and extract the imm5 field; for qemu, modify the translator to do this. The use of R_AT for this in cpu_loop was a bug. Handle the other trap numbers as per the kernel's trap_table. Reviewed-by: Alex

[PULL 3/7] nbd/client-connection: improve error message of cancelled attempt

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- nbd/client-connection.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/nbd/client-connection.c b/nbd/client-connection.c index 722998c985..2bda42641d 100644 --- a/nbd/client-connection.c +++

[PULL 0/7] NBD patches

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
The following changes since commit 2bf40d0841b942e7ba12953d515e62a436f0af84: Merge tag 'pull-user-20211220' of https://gitlab.com/rth7680/qemu into staging (2021-12-20 13:20:07 -0800) are available in the Git repository at: https://src.openvz.org/scm/~vsementsov/qemu.git tags/pull-nbd-2021-

[PULL 4/7] iotests.py: add qemu_tool_popen()

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Split qemu_tool_popen() from qemu_tool_pipe_and_status() to be used separately. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Nikita Lapshin --- tests/qemu-iotests/iotests.py | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/iotests

[PULL 2/7] nbd/client-connection: nbd_co_establish_connection(): return real error

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
The only caller of nbd_do_establish_connection() that uses errp is nbd_open(). The only way to cancel this call is through open_timer timeout. And for this case, user will be more interested in description of last failed connect rather than in "Connection attempt cancelled by other operation". So,

  1   2   >