Re: [PATCH for-6.1 1/2] docs: Remove stale TODO comments about license and version

2021-07-22 Thread Cleber Rosa
Peter Maydell writes: > Since commits 13f934e79fa and 3a50c8f3067aaf, our HTML docs include a > footer to all pages stating the license and version. We can > therefore delete the TODO comments suggesting we should do that from > our .rst files. > > Signed-off-by: Peter Maydell > --- >

Re: [PATCH for-6.1 2/2] docs: Move licence/copyright from HTML output to rST comments

2021-07-22 Thread Cleber Rosa
Peter Maydell writes: > Our built HTML documentation now has a standard footer which > gives the license for QEMU (and its documentation as a whole). > In almost all pages, we either don't bother to state the > copyright/license for the individual rST sources, or we put > it in an rST comment.

Re: [PATCH-for-6.1 v2] gitlab-ci: Extract OpenSBI job rules and fix 'when' condition

2021-07-22 Thread Cleber Rosa
Philippe Mathieu-Daudé writes: > First, all jobs depending on 'docker-opensbi' job must use at most > all the rules that triggers it. The simplest way to ensure that is > to always use the same rules. Extract all the rules to a reusable > section, and include this section (with the 'extends'

[PATCH v2 0/1] Improve module accelerator error message

2021-07-22 Thread Jose R. Ziviani
v1 -> v2: * Moved the code to module.c * Simplified a lot by using current module DB to get info The main objective is to improve the error message when trying to load a not found/not installed module TCG. For example: $ qemu-system-x86_64 -accel tcg

[PATCH v2 1/1] modules: Improve error message when module is not found

2021-07-22 Thread Jose R. Ziviani
When a module is not found, specially accelerators, QEMU displays a error message that not easy to understand[1]. This patch improves the readability by offering a user-friendly message[2]. This patch also moves the accelerator ops check to runtine (instead of the original g_assert) because it

[PATCH for-6.1 1/2] docs: Remove stale TODO comments about license and version

2021-07-22 Thread Peter Maydell
Since commits 13f934e79fa and 3a50c8f3067aaf, our HTML docs include a footer to all pages stating the license and version. We can therefore delete the TODO comments suggesting we should do that from our .rst files. Signed-off-by: Peter Maydell --- docs/interop/qemu-ga-ref.rst |

Re: [PATCH v2 1/1] hmp: synchronize cpu state for lapic info

2021-07-22 Thread Dongli Zhang
May I get feedback for this bugfix? So far the "info lapic " returns stale data and could not accurate reflect the status in KVM. Thank you very much! Dongli Zhang On 7/1/21 2:40 PM, Dongli Zhang wrote: > While the default "info lapic" always synchronizes cpu state ... > > mon_get_cpu() > ->

Re: Prefetches in buffer_zero_*

2021-07-22 Thread Dr. David Alan Gilbert
* Richard Henderson (richard.hender...@linaro.org) wrote: > On 7/22/21 12:02 AM, Dr. David Alan Gilbert wrote: > > Hi Richard, > >I think you were the last person to fiddle with the prefetching > > in buffer_zero_avx2 and friends; Joe (cc'd) wondered if explicit > > prefetching still made

[PATCH for-6.1 2/2] docs: Move licence/copyright from HTML output to rST comments

2021-07-22 Thread Peter Maydell
Our built HTML documentation now has a standard footer which gives the license for QEMU (and its documentation as a whole). In almost all pages, we either don't bother to state the copyright/license for the individual rST sources, or we put it in an rST comment. There are just three pages which

[PATCH for-6.1 0/2] docs license footer followon cleanups

2021-07-22 Thread Peter Maydell
This patchset makes a couple of followon cleanups now that commits 13f934e79fa and 3a50c8f3067aaf are in master and our HTML documentation has a footer to all pages stating the QEMU license and version: * it removes the TODO comments, because we've now done them * three .rst files were rendering

Re: [PATCH v3 2/5] migration: Make from_dst_file accesses thread-safe

2021-07-22 Thread Peter Xu
On Thu, Jul 22, 2021 at 01:58:38PM -0400, Peter Xu wrote: > Accessing from_dst_file is potentially racy in current code base like below: > > if (s->from_dst_file) > do_something(s->from_dst_file); > > Because from_dst_file can be reset right after the check in another > thread (rp_thread).

Re: [PATCH for-6.1 0/3] docs: Document arm mainstone, kzm, imx25-pdk

2021-07-22 Thread Richard Henderson
On 7/22/21 7:52 AM, Peter Maydell wrote: Peter Maydell (3): docs: Add documentation of Arm 'mainstone' board docs: Add documentation of Arm 'kzm' board docs: Add documentation of Arm 'imx25-pdk' board Reviewed-by: Richard Henderson r~

Re: [PATCH for-6.1 0/2] docs license footer followon cleanups

2021-07-22 Thread Marc-André Lureau
On Thu, Jul 22, 2021 at 11:23 PM Peter Maydell wrote: > This patchset makes a couple of followon cleanups now that > commits 13f934e79fa and 3a50c8f3067aaf are in master and our HTML > documentation has a footer to all pages stating the QEMU license > and version: > * it removes the TODO

Re: [PATCH] MAINTAINERS: Don't list Andrzej Zaborowski for various components

2021-07-22 Thread Richard Henderson
On 7/22/21 8:09 AM, Peter Maydell wrote: Andrzej Zaborowski is listed as an "Odd Fixes" maintainer for the nSeries, Palm and PXA2XX boards, as well as the "Maintained" status Arm 32-bit TCG backend. Andrzej's last email to qemu-devel was back in 2017, and the email before that was all the way

Re: [PATCH for-6.1 v2] machine: Disallow specifying topology parameters as zero

2021-07-22 Thread Cleber Rosa
Yanan Wang writes: > In the SMP configuration, we should either specify a topology > parameter with a reasonable value (equal to or greater than 1) > or just leave it omitted and QEMU will calculate its value. > Configurations which explicitly specify the topology parameters > as zero like

Re: [PATCH v2 03/22] target/loongarch: Add core definition

2021-07-22 Thread Richard Henderson
On 7/20/21 11:52 PM, Song Gao wrote: This patch add target state header, target definitions and initialization routines. Signed-off-by: Song Gao --- target/loongarch/cpu-param.h | 21 target/loongarch/cpu-qom.h | 40 ++ target/loongarch/cpu.c | 293

Re: [PATCH v2 04/22] target/loongarch: Add interrupt handling support

2021-07-22 Thread Richard Henderson
On 7/20/21 11:53 PM, Song Gao wrote: +bool loongarch_cpu_exec_interrupt(CPUState *cs, int interrupt_request) +{ +if (interrupt_request & CPU_INTERRUPT_HARD) { +LoongArchCPU *cpu = LOONGARCH_CPU(cs); +CPULoongArchState *env = >env; + +if

Re: [PATCH v2 05/22] target/loongarch: Add memory management support

2021-07-22 Thread Richard Henderson
On 7/20/21 11:53 PM, Song Gao wrote: This patch introduces one memory-management-related functions - loongarch_cpu_tlb_fill() Signed-off-by: Song Gao --- target/loongarch/cpu.c| 1 + target/loongarch/cpu.h| 9 target/loongarch/tlb_helper.c | 103

Re: [PATCH v2 06/22] target/loongarch: Add main translation routines

2021-07-22 Thread Richard Henderson
On 7/20/21 11:53 PM, Song Gao wrote: +/* General purpose registers moves. */ +void gen_load_gpr(TCGv t, int reg) +{ +if (reg == 0) { +tcg_gen_movi_tl(t, 0); +} else { +tcg_gen_mov_tl(t, cpu_gpr[reg]); +} +} Please have a look at

Re: [PATCH for-6.1 0/1] machine: Disallow specifying topology parameters as zero

2021-07-22 Thread wangyanan (Y)
On 2021/7/22 14:02, Cornelia Huck wrote: On Thu, Jul 22 2021, Yanan Wang wrote: In the SMP configuration, we should either specify a topology parameter with a reasonable value (equal to or greater than 1) or just leave it omitted and QEMU will calculate its value. Configurations which

[PATCH 0/2] acpi: pcihp: fix hotplug when bridge is wired to function > 0

2021-07-22 Thread Igor Mammedov
For full description see 2/2. Tested hotplug on Q35 (see 2/2 for reproducer) and PC (with pci-bridge) machines Igor Mammedov (2): acpi: x86: pcihp: cleanup devfn usage in build_append_pci_bus_devices() acpi: x86: pcihp: add support hotplug on multifunction bridges hw/i386/acpi-build.c |

[PATCH 1/2] acpi: x86: pcihp: cleanup devfn usage in build_append_pci_bus_devices()

2021-07-22 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 17836149fe..b40e284b72 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -374,7 +374,7 @@ static

Re: [PATCH for-6.1?] iotest: Further enhance qemu-img-bitmaps

2021-07-22 Thread Vladimir Sementsov-Ogievskiy
21.07.2021 23:46, Eric Blake wrote: Add a regression test to make sure we detect attempts to use 'qemu-img bitmap' to modify an in-use local file. Suggested-by: Nir Soffer Signed-off-by: Eric Blake --- Sadly, this missed my bitmaps pull request today. If there's any reason to respin that

[PATCH for-6.1? 0/6] mirror: Handle errors after READY cancel

2021-07-22 Thread Max Reitz
Hi, This is a rather complex series with changes that aren’t exactly local to the mirror job, so maybe it’s too complex for 6.1. However, it is a bug fix, and not an insignificant one, though probably not a regression of any kind. Bug report: https://gitlab.com/qemu-project/qemu/-/issues/462

[PATCH for-6.1? 1/6] mirror: Keep s->synced on error

2021-07-22 Thread Max Reitz
An error does not take us out of the READY phase, which is what s->synced signifies. It does of course mean that source and target are no longer in sync, but that is what s->actively_sync is for -- s->synced never meant that source and target are in sync, only that they were at some point (and at

[PATCH v2 2/6] util/oslib-posix: Introduce and use MemsetContext for touch_all_pages()

2021-07-22 Thread David Hildenbrand
Let's minimize the number of global variables to prepare for os_mem_prealloc() getting called concurrently and make the code a bit easier to read. The only consumer that really needs a global variable is the sigbus handler, which will require protection via a mutex in the future either way as we

Re: [PULL 0/3] block bitmaps patches for rc1, 2021-07-21

2021-07-22 Thread Peter Maydell
On Wed, 21 Jul 2021 at 20:49, Eric Blake wrote: > > The following changes since commit e77c8b8b8e933414ef07dbed04e02973fccffeb0: > > Update version for v6.1.0-rc0 release (2021-07-21 17:10:15 +0100) > > are available in the Git repository at: > > https://repo.or.cz/qemu/ericb.git

Re: [PATCH for-6.1 0/1] machine: Disallow specifying topology parameters as zero

2021-07-22 Thread Cornelia Huck
On Thu, Jul 22 2021, Yanan Wang wrote: > In the SMP configuration, we should either specify a topology > parameter with a reasonable value (equal to or greater than 1) > or just leave it omitted and QEMU will calculate its value. > Configurations which explicitly specify the topology parameters

[PATCH v3 05/13] plugins/lockstep: make socket path not positional & parse bool arg

2021-07-22 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- contrib/plugins/lockstep.c | 31 ++- docs/devel/tcg-plugins.rst | 2 +- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 7fd35eb669..a41ffe83fa 100644 ---

Re: [PATCH for-6.2 v2 02/11] machine: Make smp_parse generic enough for all arches

2021-07-22 Thread wangyanan (Y)
On 2021/7/20 0:53, Daniel P. Berrangé wrote: On Mon, Jul 19, 2021 at 11:20:34AM +0800, Yanan Wang wrote: Currently the only difference between smp_parse and pc_smp_parse is the support of multi-dies and the related error reporting code. With an arch compat variable "bool smp_dies_supported", we

Re: [PATCH for-6.2 v2 00/11] machine: smp parsing fixes and improvement

2021-07-22 Thread Pierre Morel
On 7/21/21 2:38 PM, wangyanan (Y) wrote: On 2021/7/20 0:57, Cornelia Huck wrote: On Mon, Jul 19 2021, Yanan Wang wrote: Hi, This is v2 of the series [1] that I have posted to introduce some smp parsing fixes and improvement, much more work has been processed compared to RFC v1. [1]

Re: [PATCH 08/16] whpx nvmm: Drop useless migrate_del_blocker()

2021-07-22 Thread Reinoud Zandijk
On Tue, Jul 20, 2021 at 02:54:00PM +0200, Markus Armbruster wrote: > There is nothing to delete after migrate_add_blocker() failed. Trying > anyway is safe, but useless. Don't. > > Cc: Sunil Muthuswamy > Cc: Kamil Rytarowski > Cc: Reinoud Zandijk > Signed-off-by: Markus Armbruster > --- >

Re: [PATCH v3 2/3] hw/net: e1000e: Correct the initial value of VET register

2021-07-22 Thread Jason Wang
在 2021/7/21 下午12:15, Bin Meng 写道: From: Christina Wang The initial value of VLAN Ether Type (VET) register is 0x8100, as per the manual and real hardware. While Linux e1000e driver always writes VET register to 0x8100, it is not always the case for everyone. Drivers relying on the reset

Re: [PATCH v3 1/3] hw/net: e1000: Correct the initial value of VET register

2021-07-22 Thread Jason Wang
在 2021/7/21 下午12:15, Bin Meng 写道: From: Christina Wang The initial value of VLAN Ether Type (VET) register is 0x8100, as per the manual and real hardware. While Linux e1000 driver always writes VET register to 0x8100, it is not always the case for everyone. Drivers relying on the reset

Re: intermittent hang in qos-test for qemu-system-i386 on 32-bit arm host

2021-07-22 Thread Claudio Fontana
On 7/10/21 3:30 PM, Peter Maydell wrote: > I've noticed recently that intermittently 'make check' will hang on > my aarch32 test system (really an aarch64 box with an aarch32 chroot). > > I think from grep that this must be the vhost-user-blk test. > > Here's the process tree: > > pmaydell

[PATCH] hw/pcie-root-port: Fix hotplug for PCI devices requiring IO

2021-07-22 Thread Marcel Apfelbaum
Q35 has now ACPI hotplug enabled by default for PCI(e) devices. As opposed to native PCIe hotplug, some guests will not assign IO range to pcie-root-ports not supporting native hotplug, resulting into a regression. Fix it by setting the "reserve-io" hint capability of the pcie-root-ports so the

Re: [PATCH v2 0/6] migration/ram: Optimize for virtio-mem via RamDiscardManager

2021-07-22 Thread David Hildenbrand
On 22.07.21 13:29, Dr. David Alan Gilbert wrote: * David Hildenbrand (da...@redhat.com) wrote: virtio-mem exposes a dynamic amount of memory within RAMBlocks by coordinating with the VM. Memory within a RAMBlock can either get plugged and consequently used by the VM, or unplugged and

Re: [PATCH] hw/display: fix virgl reset regression

2021-07-22 Thread Gerd Hoffmann
On Fri, Jul 02, 2021 at 04:32:21PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Before commit 49afbca3b00e8e517d54964229a794b51768deaf ("virtio-gpu: drop > use_virgl_renderer"), use_virgl_renderer was preventing calling GL > functions from non-GL context threads. The

[PATCH 0/3] i386/kvm: Paravirtualized features usage enforcement

2021-07-22 Thread Vitaly Kuznetsov
[I know this is probably too late for 6.1 but maybe the first patch of the series is good as it just adds a missing doc?] By default, KVM doesn't limit the usage of paravirtualized feature (neither native KVM nor Hyper-V) to what was exposed to the guest in CPUIDs making it possible to use all of

[PATCH 2/3] i386: Support KVM_CAP_ENFORCE_PV_FEATURE_CPUID

2021-07-22 Thread Vitaly Kuznetsov
By default, KVM allows the guest to use all currently supported PV features even when they were not announced in guest visible CPUIDs. Introduce a new "kvm-pv-enforce-cpuid" flag to limit the supported feature set to the exposed features. The feature is supported by Linux >= 5.10 and is not

[PATCH 3/3] i386: Support KVM_CAP_HYPERV_ENFORCE_CPUID

2021-07-22 Thread Vitaly Kuznetsov
By default, KVM allows the guest to use all currently supported Hyper-V enlightenments when Hyper-V CPUID interface was exposed, regardless of if some features were not announced in guest visible CPUIDs. hv-enforce-cpuid feature alters this behavior and only allows the guest to use exposed Hyper-V

[PATCH for-6.1? 2/6] job: @force parameter for job_cancel_sync{, _all}()

2021-07-22 Thread Max Reitz
Callers should be able to specify whether they want job_cancel_sync() to force-cancel the job or not. In fact, almost all invocations do not care about consistency of the result and just want the job to terminate as soon as possible, so they should pass force=true. The replication block driver

[PATCH for-6.1? 6/6] iotests: Add mirror-ready-cancel-error test

2021-07-22 Thread Max Reitz
Test what happens when there is an I/O error after a mirror job in the READY phase has been cancelled. Signed-off-by: Max Reitz --- .../tests/mirror-ready-cancel-error | 143 ++ .../tests/mirror-ready-cancel-error.out | 5 + 2 files changed, 148 insertions(+)

[PATCH v2 3/6] util/oslib-posix: Don't create too many threads with small memory or little pages

2021-07-22 Thread David Hildenbrand
Let's limit the number of threads to something sane, especially that - We don't have more threads than the number of pages we have - We don't have threads that initialize small (< 64 MiB) memory Signed-off-by: David Hildenbrand --- util/oslib-posix.c | 12 ++-- 1 file changed, 10

Re: [PATCH 2/2] acpi: x86: pcihp: add support hotplug on multifunction bridges

2021-07-22 Thread Laurent Vivier
On 22/07/2021 12:59, Igor Mammedov wrote: > Commit 17858a1695 (hw/acpi/ich9: Set ACPI PCI hot-plug as default on Q35) > switched PCI hotplug from native to ACPI one by default. > > That however breaks ihotplug on following CLI that used to work: >-nodefaults -machine q35 \ >-device >

[PATCH] nbd/server: Suppress Broken pipe errors on abrupt disconnection

2021-07-22 Thread Richard W.M. Jones
This simple patch suppresses a warning message from qemu-nbd when a client abruptly disconnects. There is a way to work around this in the client (by shutting down the connection properly). Nevertheless the "Broken pipe" error seems unnecessary to me as it does not convey any useful information

[PATCH] nbd/server: Suppress Broken pipe errors on abrupt disconnection

2021-07-22 Thread Richard W.M. Jones
$ rm -f /tmp/sock /tmp/pid $ qemu-img create -f qcow2 /tmp/disk.qcow2 1M $ qemu-nbd -t --format=qcow2 --socket=/tmp/sock --pid-file=/tmp/pid /tmp/disk.qcow2 & $ nbdsh -u 'nbd+unix:///?socket=/tmp/sock' -c 'h.get_size()' qemu-nbd: Disconnect client, due to: Failed to send reply: Unable to write to

Re: [PULL v3 05/19] hw/acpi/ich9: Set ACPI PCI hot-plug as default on Q35

2021-07-22 Thread Igor Mammedov
On Wed, 21 Jul 2021 12:37:40 -0400 "Michael S. Tsirkin" wrote: > On Wed, Jul 21, 2021 at 06:27:33PM +0200, Igor Mammedov wrote: > > On Wed, 21 Jul 2021 12:09:01 -0400 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, Jul 21, 2021 at 05:49:16PM +0200, Laurent Vivier wrote: > > > > On

[PATCH 2/2] acpi: x86: pcihp: add support hotplug on multifunction bridges

2021-07-22 Thread Igor Mammedov
Commit 17858a1695 (hw/acpi/ich9: Set ACPI PCI hot-plug as default on Q35) switched PCI hotplug from native to ACPI one by default. That however breaks ihotplug on following CLI that used to work: -nodefaults -machine q35 \ -device

[PATCH 1/3] docs: Briefly describe KVM PV features

2021-07-22 Thread Vitaly Kuznetsov
KVM PV features don't seem to be documented anywhere, in particular, the fact that some of the features are enabled by default and some are not can only be figured out from the code. Signed-off-by: Vitaly Kuznetsov --- docs/kvm-pv.txt | 92 + 1

[PATCH for-6.1? 5/6] mirror: Check job_is_cancelled() earlier

2021-07-22 Thread Max Reitz
We must check whether the job is force-cancelled early in our main loop, most importantly before any `continue` statement. For example, we used to have `continue`s before our current checking location that are triggered by `mirror_flush()` failing. So, if `mirror_flush()` kept failing,

[PATCH for-6.1? 4/6] job: Add job_cancel_requested()

2021-07-22 Thread Max Reitz
Most callers of job_is_cancelled() actually want to know whether the job is on its way to immediate termination. For example, we refuse to pause jobs that are cancelled; but this only makes sense for jobs that are really actually cancelled. A mirror job that is cancelled during READY with

[PATCH v2 1/6] util/oslib-posix: Support MADV_POPULATE_WRITE for os_mem_prealloc()

2021-07-22 Thread David Hildenbrand
Let's sense support and use it for preallocation. MADV_POPULATE_WRITE does not require a SIGBUS handler, doesn't actually touch page content, and avoids context switches; it is, therefore, faster and easier to handle than our current approach. While MADV_POPULATE_WRITE is, in general, faster than

[PATCH v2 0/6] util/oslib-posix: Support MADV_POPULATE_WRITE for os_mem_prealloc()

2021-07-22 Thread David Hildenbrand
#1 adds support for MADV_POPULATE_WRITE, #2 cleans up the code to avoid global variables and prepare for concurrency, #3 and #4 optimize thread handling, #5 makes os_mem_prealloc() safe to be called from multiple threads concurrently and #6 makes the SIGBUS handler coexist cleanly with the MCE

[PATCH v2 5/6] util/oslib-posix: Support concurrent os_mem_prealloc() invocation

2021-07-22 Thread David Hildenbrand
Add a mutex to protect the SIGBUS case, as we cannot mess concurrently with the sigbus handler and we have to manage the global variable sigbus_memset_context. The MADV_POPULATE_WRITE path can run concurrently. Note that page_mutex and page_cond are shared between concurrent invocations, which

[PATCH v2 4/6] util/oslib-posix: Avoid creating a single thread with MADV_POPULATE_WRITE

2021-07-22 Thread David Hildenbrand
Let's simplify the case when we only want a single thread and don't have to mess with signal handlers. Signed-off-by: David Hildenbrand --- util/oslib-posix.c | 8 1 file changed, 8 insertions(+) diff --git a/util/oslib-posix.c b/util/oslib-posix.c index a1d309d495..1483e985c6 100644

Re: [PATCH for-6.2 v2 05/11] machine: Improve the error reporting of smp parsing

2021-07-22 Thread Andrew Jones
On Thu, Jul 22, 2021 at 04:10:32PM +0800, wangyanan (Y) wrote: > On 2021/7/20 0:53, Andrew Jones wrote: > > On Mon, Jul 19, 2021 at 11:20:37AM +0800, Yanan Wang wrote: > > > We totally have two requirements for a valid SMP configuration: > > s/totally// > > > > > the sum of "sockets * dies *

Re: [PATCH for-6.2 03/23] target/avr: Drop checks for singlestep_enabled

2021-07-22 Thread Michael Rolnik
Reviewed-by: Michael Rolnik Tested-by: Michael Rolnik On Wed, Jul 21, 2021 at 9:00 PM Philippe Mathieu-Daudé wrote: > +Michael/Alex/Pavel > > On 7/21/21 8:41 AM, Richard Henderson wrote: > > GDB single-stepping is now handled generically. > > > > Signed-off-by: Richard Henderson > > --- > >

Re: [PATCH v2 0/6] migration/ram: Optimize for virtio-mem via RamDiscardManager

2021-07-22 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > virtio-mem exposes a dynamic amount of memory within RAMBlocks by > coordinating with the VM. Memory within a RAMBlock can either get > plugged and consequently used by the VM, or unplugged and consequently no > longer used by the VM. Logical unplug

[PATCH for-6.1? 3/6] jobs: Give Job.force_cancel more meaning

2021-07-22 Thread Max Reitz
We largely have two cancel modes for jobs: First, there is actual cancelling. The job is terminated as soon as possible, without trying to reach a consistent result. Second, we have mirror in the READY state. Technically, the job is not really cancelled, but it just is a different completion

Re: [PATCH for-6.2 v2 04/11] machine: Use the computed parameters to calculate omitted cpus

2021-07-22 Thread Andrew Jones
On Thu, Jul 22, 2021 at 12:42:55PM +0800, wangyanan (Y) wrote: > On 2021/7/20 0:42, Andrew Jones wrote: > > On Mon, Jul 19, 2021 at 11:20:36AM +0800, Yanan Wang wrote: > > > Currently we directly calculate the omitted cpus based on the already > > > provided parameters. This makes some cmdlines

[PATCH v2 6/6] util/oslib-posix: Forward SIGBUS to MCE handler under Linux

2021-07-22 Thread David Hildenbrand
Temporarily modifying the SIGBUS handler is really nasty, as we might be unlucky and receive an MCE SIGBUS while having our handler registered. Unfortunately, there is no way around messing with SIGBUS when MADV_POPULATE_WRITE is not applicable or not around. Let's forward SIGBUS that don't

Re: [PATCH] hw/display: fix virgl reset regression

2021-07-22 Thread Marc-André Lureau
Hi On Thu, Jul 22, 2021 at 4:12 PM Gerd Hoffmann wrote: > On Fri, Jul 02, 2021 at 04:32:21PM +0400, marcandre.lur...@redhat.com > wrote: > > From: Marc-André Lureau > > > > Before commit 49afbca3b00e8e517d54964229a794b51768deaf ("virtio-gpu: drop > > use_virgl_renderer"), use_virgl_renderer

Re: [PATCH for-6.2 v2 11/11] tests/unit: Add a unit test for smp parsing

2021-07-22 Thread Andrew Jones
On Thu, Jul 22, 2021 at 02:15:18PM +0800, wangyanan (Y) wrote: > On 2021/7/20 2:57, Andrew Jones wrote: > > On Mon, Jul 19, 2021 at 11:20:43AM +0800, Yanan Wang wrote: > > > Add a QEMU unit test for the parsing of given SMP configuration. > > > Since all the parsing logic is in generic function

Re: [question] Shall we flush ITS tables into guest RAM when shutdown the VM?

2021-07-22 Thread Juan Quintela
Eric Auger wrote: > Hi Dave, > > On 7/6/21 4:19 PM, Dr. David Alan Gilbert wrote: >> * Eric Auger (eric.au...@redhat.com) wrote: ... >> Well, I initially wanted to know more about this scenario to determine >> whether >> a normal shutdown would fall into it. > I think it was

Re: [PATCH for-6.1 0/1] machine: Disallow specifying topology parameters as zero

2021-07-22 Thread Andrew Jones
On Thu, Jul 22, 2021 at 08:02:16AM +0200, Cornelia Huck wrote: > On Thu, Jul 22 2021, Yanan Wang wrote: > > > In the SMP configuration, we should either specify a topology > > parameter with a reasonable value (equal to or greater than 1) > > or just leave it omitted and QEMU will calculate its

Re: [PATCH 1/2] qapi: introduce forwarding visitor

2021-07-22 Thread Markus Armbruster
Paolo Bonzini writes: > This new adaptor visitor takes a single field of the adaptee, and exposes it > with a different name. > > This will be used for QOM alias properties. Alias targets can of course > have a different name than the alias property itself (e.g. a machine's > pflash0 might be

Re: [PATCH v2 1/6] util/oslib-posix: Support MADV_POPULATE_WRITE for os_mem_prealloc()

2021-07-22 Thread David Hildenbrand
On 22.07.21 15:47, Daniel P. Berrangé wrote: On Thu, Jul 22, 2021 at 03:39:50PM +0200, David Hildenbrand wrote: On 22.07.21 15:31, Daniel P. Berrangé wrote: On Thu, Jul 22, 2021 at 02:36:30PM +0200, David Hildenbrand wrote: Let's sense support and use it for preallocation. MADV_POPULATE_WRITE

Re: [PATCH 1/2] qxl: remove assert in qxl_pre_save.

2021-07-22 Thread Dr. David Alan Gilbert
* Gerd Hoffmann (kra...@redhat.com) wrote: > Since commit 551dbd0846d2 ("migration: check pre_save return in > vmstate_save_state") the pre_save hook can fail. So lets finally > use that to drop the guest-triggerable assert in qxl_pre_save(). > > Signed-off-by: Gerd Hoffmann > --- >

Re: [PATCH v2 4/5] migration: Teach QEMUFile to be QIOChannel-aware

2021-07-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > migration uses QIOChannel typed qemufiles. In follow up patches, we'll need > the capability to identify this fact, so that we can get the backing > QIOChannel > from a QEMUFile. > > We can also define types for QEMUFile but so far since we only need to

Re: [PATCH v2 5/5] migration: Move the yank unregister of channel_close out

2021-07-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > It's efficient, but hackish to call yank unregister calls in channel_close(), > especially it'll be hard to debug when qemu crashed with some yank function > leaked. > > Remove that hack, but instead explicitly unregister yank functions at the > places

[PULL 01/15] qemu-config: never call the callback after an error, fix leak

2021-07-22 Thread Paolo Bonzini
Ensure that the callback to qemu_config_foreach is never called upon an error, by moving the invocation before the "out" label. Cc: arm...@redhat.com Fixes: 3770141139 ("qemu-config: parse configuration files to a QDict", 2021-06-04) Signed-off-by: Paolo Bonzini --- util/qemu-config.c | 4 ++--

[PULL 08/15] target/i386: Added consistency checks for CR4

2021-07-22 Thread Paolo Bonzini
From: Lara Lazier All MBZ bits in CR4 must be zero. (APM2 15.5) Added reserved bitmask and added checks in both helper_vmrun and helper_write_crN. Signed-off-by: Lara Lazier Message-Id: <20210721152651.14683-2-laramglaz...@gmail.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.h

[PULL 00/15] Misc bugfix patches for 2021-07-22

2021-07-22 Thread Paolo Bonzini
The following changes since commit 143c2e0432859826c9e8d5b2baa307355f1a5332: Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2021-07-19' into staging (2021-07-19 19:06:05 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream

[PULL 13/15] configure: Allow vnc to get disabled with --without-default-features

2021-07-22 Thread Paolo Bonzini
From: Thomas Huth There's no reason why we should keep VNC enabled when the user specified --without-default-features. Reported-by: Cole Robinson Signed-off-by: Thomas Huth Message-Id: <20210713093155.677589-3-th...@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 2 +-

Re: [PATCH-for-6.1] gitlab-ci: Extract OpenSBI job rules to reusable section

2021-07-22 Thread Daniel P . Berrangé
On Tue, Jul 20, 2021 at 06:48:29PM +0200, Philippe Mathieu-Daudé wrote: > All jobs depending on 'docker-opensbi' job must use at most all > the rules that triggers it. The simplest way to ensure that > is to always use the same rules. Extract all the rules to a > reusable section, and include this

Re: [PATCH 0/2] qapi/qom: use correct field name when getting/setting alias properties

2021-07-22 Thread Paolo Bonzini
On 22/07/21 15:25, Markus Armbruster wrote: Since patch submitters tend to submit code that works for the success case, I like to test a few failure cases before anything else. Gotcha: $ qemu-system-x86_64 -machine pc,pflash0=xxx qemu-system-x86_64: Property 'cfi.pflash01.drive'

Re: [PULL 37/48] usb: build usb-host as module

2021-07-22 Thread Peter Krempa
adding libvirt-list On Thu, Jul 08, 2021 at 17:17:37 +0200, Paolo Bonzini wrote: > From: Gerd Hoffmann > > Drop one more shared library dependency (libusb) from core qemu. > > Signed-off-by: Gerd Hoffmann > Reviewed-by: Jose R. Ziviani > Message-Id:

Re: [PATCH] vl: Parse legacy default_machine_opts

2021-07-22 Thread Anthony PERARD via
On Mon, Jul 12, 2021 at 10:15:52PM -0400, Jason Andryuk wrote: > qemu can't start a xen vm after commit d8fb7d0969d5 > "vl: switch -M parsing to keyval" with: > > $ ./qemu-system-i386 -M xenfv > Unexpected error in object_property_find_err() at ../qom/object.c:1298: > qemu-system-i386: Property

Re: [PATCH for-6.2 v2 11/11] tests/unit: Add a unit test for smp parsing

2021-07-22 Thread wangyanan (Y)
On 2021/7/22 21:12, Andrew Jones wrote: On Thu, Jul 22, 2021 at 02:15:18PM +0800, wangyanan (Y) wrote: On 2021/7/20 2:57, Andrew Jones wrote: On Mon, Jul 19, 2021 at 11:20:43AM +0800, Yanan Wang wrote: Add a QEMU unit test for the parsing of given SMP configuration. Since all the parsing

Re: [PATCH for-6.2 v2 04/11] machine: Use the computed parameters to calculate omitted cpus

2021-07-22 Thread wangyanan (Y)
On 2021/7/22 20:27, Andrew Jones wrote: On Thu, Jul 22, 2021 at 12:42:55PM +0800, wangyanan (Y) wrote: On 2021/7/20 0:42, Andrew Jones wrote: On Mon, Jul 19, 2021 at 11:20:36AM +0800, Yanan Wang wrote: Currently we directly calculate the omitted cpus based on the already provided parameters.

[PULL 09/15] target/i386: Added consistency checks for EFER

2021-07-22 Thread Paolo Bonzini
From: Lara Lazier EFER.SVME has to be set, and EFER reserved bits must be zero. In addition the combinations * EFER.LMA or EFER.LME is non-zero and the processor does not support LM * non-zero EFER.LME and CR0.PG and zero CR4.PAE * non-zero EFER.LME and CR0.PG and zero CR0.PE * non-zero

[PULL 05/15] usb: fix usb-host dependency check

2021-07-22 Thread Paolo Bonzini
From: Gerd Hoffmann Fixes: 90540f3289 ("configure, meson: convert libusb detection to meson", 2021-06-25) Reported-by: Programmingkid Signed-off-by: Gerd Hoffmann Message-Id: <20210721081718.301343-1-kra...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini ---

[PULL 07/15] target/i386: Added V_INTR_PRIO check to virtual interrupts

2021-07-22 Thread Paolo Bonzini
From: Lara Lazier The APM2 states that The processor takes a virtual INTR interrupt if V_IRQ and V_INTR_PRIO indicate that there is a virtual interrupt pending whose priority is greater than the value in V_TPR. Signed-off-by: Lara Lazier Message-Id:

[PULL 14/15] configure: Fix the default setting of the "xen" feature

2021-07-22 Thread Paolo Bonzini
From: Thomas Huth The "xen" variable should either contain "enabled", "disabled" or nothing (for auto detection). But when the user currently runs the configure script with --without-default-features, it gets set to "no" instead. This does not work as expected, the feature will still be enabled

[PULL 12/15] configure: Fix --without-default-features propagation to meson

2021-07-22 Thread Paolo Bonzini
From: Thomas Huth A typo prevents that many features get disabled when the user runs "configure" with the --without-default-features switch. Reported-by: Cole Robinson Signed-off-by: Thomas Huth Message-Id: <20210713093155.677589-2-th...@redhat.com> Signed-off-by: Paolo Bonzini ---

Re: [PATCH for-6.1 v2] machine: Disallow specifying topology parameters as zero

2021-07-22 Thread Daniel P . Berrangé
On Thu, Jul 22, 2021 at 11:43:26PM +0800, Yanan Wang wrote: > In the SMP configuration, we should either specify a topology > parameter with a reasonable value (equal to or greater than 1) > or just leave it omitted and QEMU will calculate its value. > Configurations which explicitly specify the

Re: [PATCH for-6.2 v2 10/11] machine: Split out the smp parsing code

2021-07-22 Thread Andrew Jones
On Thu, Jul 22, 2021 at 02:24:03PM +0800, wangyanan (Y) wrote: > On 2021/7/20 1:20, Andrew Jones wrote: > > On Mon, Jul 19, 2021 at 11:20:42AM +0800, Yanan Wang wrote: > > > We are going to introduce an unit test for the parser smp_parse() > > > in hw/core/machine.c, but now machine.c is only

Re: [question] Shall we flush ITS tables into guest RAM when shutdown the VM?

2021-07-22 Thread Peter Maydell
On Thu, 22 Jul 2021 at 14:19, Juan Quintela wrote: > > Eric Auger wrote: > > Hi Dave, > > > > On 7/6/21 4:19 PM, Dr. David Alan Gilbert wrote: > > That's consistent with what you suggested in the past ans what is logged > > in the commit message of > > > >

Re: [PATCH v2 1/6] util/oslib-posix: Support MADV_POPULATE_WRITE for os_mem_prealloc()

2021-07-22 Thread David Hildenbrand
On 22.07.21 15:31, Daniel P. Berrangé wrote: On Thu, Jul 22, 2021 at 02:36:30PM +0200, David Hildenbrand wrote: Let's sense support and use it for preallocation. MADV_POPULATE_WRITE does not require a SIGBUS handler, doesn't actually touch page content, and avoids context switches; it is,

Re: Disabling TLS address caching to help QEMU on GNU/Linux

2021-07-22 Thread Richard Biener
On Tue, Jul 20, 2021 at 4:54 PM Florian Weimer via Gcc wrote: > > Currently, the GNU/Linux ABI does not really specify whether the thread > pointer (the address of the TCB) may change at a function boundary. > > Traditionally, GCC assumes that the ABI allows caching addresses of > thread-local

Re: [PATCH for-6.1 0/1] machine: Disallow specifying topology parameters as zero

2021-07-22 Thread wangyanan (Y)
On 2021/7/22 21:55, Paolo Bonzini wrote: On 22/07/21 15:37, Andrew Jones wrote: This doesn't mention zero inputs and even implies non-zero inputs. I'm not sure if we need to worry about the odd command line that used zero for some parameters. What do you think? I think I agree as well,

Re: [PATCH for-6.1 0/1] machine: Disallow specifying topology parameters as zero

2021-07-22 Thread Paolo Bonzini
On 22/07/21 16:12, wangyanan (Y) wrote: The smp_parse and pc_smp_parse are going to be converted into a generic parser, and the added sanity-check in this patch will also be tested in an unit test. So is it probably better to keep the check in the parser instead of the caller? The duplication

Re: [PULL 36/40] vl: switch -M parsing to keyval

2021-07-22 Thread Paolo Bonzini
On 22/07/21 10:19, Peter Krempa wrote: This patch breaks detection of certain machine options features in libvirt which were being detected from 'query-command-line-options'. I presume the change simply removed this from the output of query-command-line-options due to the historical cruft how

Re: [PATCH v2 2/5] migration: Make from_dst_file accesses thread-safe

2021-07-22 Thread Peter Xu
On Wed, Jul 21, 2021 at 04:15:27PM -0500, Eric Blake wrote: > On Wed, Jul 21, 2021 at 03:34:06PM -0400, Peter Xu wrote: > > Accessing from_dst_file is potentially racy in current code base like below: > > > > if (s->from_dst_file) > > do_something(s->from_dst_file); > > > > Because

Re: [PATCH v3] migration: clear the memory region dirty bitmap when skipping free pages

2021-07-22 Thread Peter Xu
On Thu, Jul 22, 2021 at 09:57:13AM +, Wang, Wei W wrote: > On Thursday, July 22, 2021 5:48 PM, David Hildenbrand wrote: > > On 22.07.21 10:30, Wei Wang wrote: > > > When skipping free pages to send, their corresponding dirty bits in > > > the memory region dirty bitmap need to be cleared.

Re: [PATCH for-6.2 v2 04/11] machine: Use the computed parameters to calculate omitted cpus

2021-07-22 Thread Andrew Jones
On Thu, Jul 22, 2021 at 10:59:11PM +0800, wangyanan (Y) wrote: > Ok. If we remove the rounding, then the calculation code has to be modified > to be like the following. We have to separately consider the case that cpus > and maxcpus are both omitted (e.g. -smp sockets=16). > > maxcpus = maxcpus >

[PULL 15/15] configure: Let --without-default-features disable vhost-kernel and vhost-vdpa

2021-07-22 Thread Paolo Bonzini
From: Thomas Huth The vhost_kernel and vhost_vdpa variables should be pre-initialized with the $default_feature setting so that these features get disabled when the user runs the configure scripts with --without-default-features. Reported-by: Cole Robinson Signed-off-by: Thomas Huth

Re: [PATCH] hw/display: fix virgl reset regression

2021-07-22 Thread Marc-André Lureau
Hi On Thu, Jul 22, 2021 at 4:51 PM Marc-André Lureau < marcandre.lur...@gmail.com> wrote: > Hi > > On Thu, Jul 22, 2021 at 4:12 PM Gerd Hoffmann wrote: > >> On Fri, Jul 02, 2021 at 04:32:21PM +0400, marcandre.lur...@redhat.com >> wrote: >> > From: Marc-André Lureau >> > >> > Before commit

Re: [PATCH 0/2] qapi/qom: use correct field name when getting/setting alias properties

2021-07-22 Thread Markus Armbruster
Since patch submitters tend to submit code that works for the success case, I like to test a few failure cases before anything else. Gotcha: $ qemu-system-x86_64 -machine pc,pflash0=xxx qemu-system-x86_64: Property 'cfi.pflash01.drive' can't find value 'xxx' The error message is

  1   2   3   >