RE: [PATCH 0/7] Fix some memleaks caused by ptimer_init

2020-12-09 Thread ganqixin
Kindly ping! Hi all, These patches are waiting for review. Could someone help me check them? Thanks, Gan Qixin > -Original Message- > From: ganqixin > Sent: Friday, November 27, 2020 3:18 PM > To: qemu-...@nongnu.org; qemu-devel@nongnu.org > Cc: peter.mayd...@linaro.org; Chenqun

[RFC PATCH v2 1/3] vfio: Move the saving of the config space to the right place in VFIO migration

2020-12-09 Thread Shenming Lu
On ARM64 the VFIO SET_IRQS ioctl is dependent on the VM interrupt setup, if the restoring of the VFIO PCI device config space is before the VGIC, an error might occur in the kernel. So we move the saving of the config space to the non-iterable process, so that it will be called after the VGIC

[RFC PATCH v2 3/3] vfio: Avoid disabling and enabling vectors repeatedly in VFIO migration

2020-12-09 Thread Shenming Lu
Different from the normal situation when the guest starts, we can know the max unmasked vetctor (at the beginning) after msix_load() in VFIO migration. So in order to avoid ineffectively disabling and enabling vectors repeatedly, let's allocate all needed vectors first and then enable these

[RFC PATCH v2 0/3] vfio: Some fixes and optimizations for VFIO migration

2020-12-09 Thread Shenming Lu
This patch set includes two fixes and one optimization for VFIO migration as blew: Patch 1-2: - Fix two ordering problems in migration. Patch 3: - Optimize the enabling process of the MSI-X vectors in migration. Thanks, Shenming Shenming Lu (3): vfio: Move the saving of the config space to

[RFC PATCH v2 2/3] vfio: Set the priority of the VFIO VM state change handler explicitly

2020-12-09 Thread Shenming Lu
In the VFIO VM state change handler, VFIO devices are transitioned in the _SAVING state, which should keep them from sending interrupts. Then we can save the pending states of all interrupts in the GIC VM state change handler (on ARM). So we have to set the priority of the VFIO VM state change

Re: [PATCH 3/3] net: checksum: Introduce fine control over checksum type

2020-12-09 Thread Cédric Le Goater
Hello ! > diff --git a/hw/net/ftgmac100.c b/hw/net/ftgmac100.c > index 782ff19..fbae1f1 100644 > --- a/hw/net/ftgmac100.c > +++ b/hw/net/ftgmac100.c > @@ -573,7 +573,15 @@ static void ftgmac100_do_tx(FTGMAC100State *s, uint32_t > tx_ring, > } > > if (flags &

Re: [RFC v9 01/32] accel/tcg: split CpusAccel into three TCG variants

2020-12-09 Thread Alex Bennée
Claudio Fontana writes: > split up the CpusAccel tcg_cpus into three TCG variants: > > tcg_cpus_rr (single threaded, round robin cpus) > tcg_cpus_icount (same as rr, but with instruction counting enabled) > tcg_cpus_mttcg (multi-threaded cpus) > > diff --git a/accel/tcg/tcg-cpus-mttcg.c

Re: [RFC v9 00/22] i386 cleanup

2020-12-09 Thread Paolo Bonzini
On 08/12/20 23:15, Claudio Fontana wrote: On 12/8/20 9:00 PM, Philippe Mathieu-Daudé wrote: On 12/8/20 8:48 PM, Claudio Fontana wrote: v8 -> v9: move additional methods to CPUClass->tcg_ops do_unaligned_access, transaction_failed and do_interrupt. do_interrupt is a bit tricky, as the same

Re: [RFC v9 03/32] accel/tcg: rename tcg-cpus functions to match module name

2020-12-09 Thread Alex Bennée
Claudio Fontana writes: > Signed-off-by: Claudio Fontana > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Richard Henderson > --- > accel/tcg/tcg-cpus-icount.c | 24 ++-- > accel/tcg/tcg-cpus-icount.h | 6 +-- > accel/tcg/tcg-cpus-mttcg.c | 10 ++--- > accel/tcg/tcg-cpus-rr.c

Re: [PATCH 14/17] target/mips: Declare gen_msa/_branch() in 'translate.h'

2020-12-09 Thread Philippe Mathieu-Daudé
Hi Richard, On 12/9/20 1:03 AM, Richard Henderson wrote: > On 12/8/20 6:01 PM, Richard Henderson wrote: >> On 12/8/20 5:56 PM, Richard Henderson wrote: >>> On 12/7/20 6:36 PM, Philippe Mathieu-Daudé wrote: Make gen_msa() and gen_msa_branch() public declarations so we can keep calling

Re: [RFC v9 06/32] i386: move hax accel files into hax/

2020-12-09 Thread Alex Bennée
Claudio Fontana writes: > Signed-off-by: Claudio Fontana Reviewed-by: Alex Bennée -- Alex Bennée

[Bug 1907427] [NEW] Build on sparc64 fails with "undefined reference to `fdt_check_full'"

2020-12-09 Thread John Paul Adrian Glaubitz
Public bug reported: Trying to build QEMU on sparc64 fails with: [4648/8435] c++ -o qemu-system-ppc64 qemu-system-ppc64.p/softmmu_main.c.o libcommon.fa.p/ui_vnc-auth-sasl.c.o libcommon.fa.p/migration_colo-failover.c.o libcommon.fa.p/hw_input_vhost-user-input.c.o

Re: [RFC v9 05/32] i386: move whpx accel files into whpx/

2020-12-09 Thread Alex Bennée
Claudio Fontana writes: > Signed-off-by: Claudio Fontana > --- > MAINTAINERS | 5 + > target/i386/meson.build | 5 + > target/i386/whpx/meson.build | 4 > target/i386/{ => whpx}/whp-dispatch.h | 0 > target/i386/{ =>

Re: [RFC v9 07/32] i386: hvf: remove stale MAINTAINERS entry for old hvf stubs

2020-12-09 Thread Alex Bennée
Claudio Fontana writes: > Signed-off-by: Claudio Fontana > Reviewed-by: Roman Bolshakov Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 1/1] Avoid migration if guest is in postmigrated status

2020-12-09 Thread David Edmondson
On Wednesday, 2020-12-09 at 07:20:29 GMT, Li Zhang wrote: > This patch is to avoid executing migrations twice, which causes > coredump. After the migration has been completed, guest is in postmigrated > status on source host and the block device is inactive. If executing > migration again, it

[PATCH] ppc/translate: Fix need_access_type for non MMU_64

2020-12-09 Thread Stephane Duverger
The 64bits MMU variants have POWERPC_MMU_64 flag and POWERPC_MMU_64B is a specific one (POWERPC_MMU_32B with flag POWERPC_MMU_64). As a consequence, the original test ignored POWERPC_MMU_32B too. The commit 5f2a625452 targeted hash64 mmu version. And indeed the 'mmu-hash64.c' does not use

[PULL 11/13] gitlab-ci: Move user-static test across to gitlab

2020-12-09 Thread Thomas Huth
From: Philippe Mathieu-Daudé Similarly to commit 8cdb2cef3f1, move the user-static test to GitLab. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201108204535.2319870-11-phi...@redhat.com> Reviewed-by: Wainer dos Santos Moschetta Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 7

[PULL 09/13] gitlab-ci: Split CONFIGURE_ARGS one argument per line for build-disabled

2020-12-09 Thread Thomas Huth
From: Philippe Mathieu-Daudé We will keep adding/removing options to our 'configure' script, so for easier maintainability it makes sense to have CONFIGURE_ARGS declared as one option per line. This way we can review diff easily (or rebase/cherry-pick). No logical change. Signed-off-by:

Re: [RFC v9 09/32] i386: move cpu dump out of helper.c into cpu-dump.c

2020-12-09 Thread Alex Bennée
Claudio Fontana writes: > Signed-off-by: Claudio Fontana Reviewed-by: Alex Bennée -- Alex Bennée

[PATCH v6 3/4] migration: support UFFD write fault processing in ram_save_iterate()

2020-12-09 Thread Andrey Gruzdev via
In this particular implementation the same single migration thread is responsible for both normal linear dirty page migration and procesing UFFD page fault events. Processing write faults includes reading UFFD file descriptor, finding respective RAM block and saving faulting page to the migration

Re: [PATCH v3 2/2] hw/block/nvme: add simple copy command

2020-12-09 Thread Klaus Jensen
On Dec 9 07:13, Keith Busch wrote: > On Tue, Dec 08, 2020 at 09:33:39AM +0100, Klaus Jensen wrote: > > +static uint16_t nvme_copy(NvmeCtrl *n, NvmeRequest *req) > > +{ > > > > > +for (i = 0; i < nr; i++) { > > +uint32_t _nlb = le16_to_cpu(range[i].nlb) + 1; > > +if (_nlb >

Re: [PATCH 2/4] target/mips: Don't use clock_get_ns() in clock period calculation

2020-12-09 Thread Luc Michel
On 12/8/20 7:15 PM, Peter Maydell wrote: Currently the MIPS code uses the old clock_get_ns() API to calculate a time length in nanoseconds: cpu->cp0_count_rate * clock_get_ns(MIPS_CPU(cpu)->clock) This relies on the clock having a period which is an exact number of nanoseconds. Switch to the

Re: [PATCH 1/4] clock: Introduce clock_ticks_to_ns()

2020-12-09 Thread Luc Michel
On 12/9/20 12:39 AM, Richard Henderson wrote: On 12/8/20 12:15 PM, Peter Maydell wrote: The clock_get_ns() API claims to return the period of a clock in nanoseconds. Unfortunately since it returns an integer and a clock's period is represented in units of 2^-32 nanoseconds, the result is often

Re: [PATCH 3/4] clock: Remove clock_get_ns()

2020-12-09 Thread Luc Michel
On 12/8/20 7:15 PM, Peter Maydell wrote: Remove the now-unused clock_get_ns() API and the CLOCK_PERIOD_TO_NS() macro that only it was using. Signed-off-by: Peter Maydell Reviewed-by: Luc Michel --- docs/devel/clocks.rst | 17 + include/hw/clock.h| 6 -- 2

Re: [PATCH 4/4] clock: Define and use new clock_display_freq()

2020-12-09 Thread Luc Michel
On 12/8/20 7:15 PM, Peter Maydell wrote: It's common to want to print a human-readable indication of a clock's frequency. Provide a utility function in the clock API to return a string which is a displayable representation of the frequency, and use it in qdev-monitor.c. Before: (qemu) info

Re: [PATCH] s390x: pv: Fence additional unavailable SCLP facilities for PV guests

2020-12-09 Thread Janosch Frank
On 12/8/20 5:19 PM, David Hildenbrand wrote: > On 08.12.20 17:11, Christian Borntraeger wrote: >> >> >> On 08.12.20 15:55, David Hildenbrand wrote: >>> On 08.12.20 14:29, Christian Borntraeger wrote: On 04.12.20 09:36, Janosch Frank wrote: > There's no VSIE support for a

Re: [RFC v9 18/32] cpu: Move synchronize_from_tb() to tcg_ops

2020-12-09 Thread Philippe Mathieu-Daudé
On 12/8/20 8:48 PM, Claudio Fontana wrote: > From: Eduardo Habkost > > Signed-off-by: Eduardo Habkost > [claudio: wrapped in CONFIG_TCG] > Signed-off-by: Claudio Fontana > Reviewed-by: Philippe Mathieu-Daudé > --- ... > diff --git a/include/hw/core/tcg-cpu-ops.h

Re: [RFC PATCH 00/27] vDPA software assisted live migration

2020-12-09 Thread Jason Wang
- Original Message - > On Fri, Nov 20, 2020 at 07:50:38PM +0100, Eugenio Pérez wrote: > > This series enable vDPA software assisted live migration for vhost-net > > devices. This is a new method of vhost devices migration: Instead of > > relay on vDPA device's dirty logging capability, SW

Re: [RFC v9 24/32] cpu: move cc->transaction_failed to tcg_ops

2020-12-09 Thread Philippe Mathieu-Daudé
On 12/8/20 8:48 PM, Claudio Fontana wrote: > Signed-off-by: Claudio Fontana > --- ... > diff --git a/include/hw/core/tcg-cpu-ops.h b/include/hw/core/tcg-cpu-ops.h > index 6b9b72e785..0cc0927738 100644 > --- a/include/hw/core/tcg-cpu-ops.h > +++ b/include/hw/core/tcg-cpu-ops.h Missing (for

Re: [RFC v9 08/32] i386: move TCG accel files into tcg/

2020-12-09 Thread Alex Bennée
Claudio Fontana writes: > Signed-off-by: Claudio Fontana > --- > target/i386/meson.build | 14 +- > target/i386/{ => tcg}/bpt_helper.c | 0 > target/i386/{ => tcg}/cc_helper.c | 0 > target/i386/{ => tcg}/excp_helper.c | 0 > target/i386/{ => tcg}/fpu_helper.c

Re: [PATCH] file-posix: detect the lock using the real file

2020-12-09 Thread Daniel P . Berrangé
On Tue, Dec 08, 2020 at 03:38:22PM +0100, Kevin Wolf wrote: > Am 08.12.2020 um 13:59 hat Li Feng geschrieben: > > This patch addresses this issue: > > When accessing a volume on an NFS filesystem without supporting the file > > lock, > > tools, like qemu-img, will complain "Failed to lock byte

[PULL 00/13] Gitlab-CI and test patches

2020-12-09 Thread Thomas Huth
Hi Peter, The following changes since commit 553032db17440f8de011390e5a1cfddd13751b0b: Update version for v5.2.0 release (2020-12-08 15:55:19 +) are available in the Git repository at: https://gitlab.com/huth/qemu.git tags/pull-request-2020-12-09 for you to fetch changes up to

[PULL 07/13] tests/qtest/fuzz-test: Quit test_lp1878642 once done

2020-12-09 Thread Thomas Huth
From: Philippe Mathieu-Daudé Missed in fd250172842 ("qtest: add a reproducer for LP#1878642"). Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201201191026.4149955-2-phi...@redhat.com> Reviewed-by: Li Qiang Signed-off-by: Thomas Huth ---

[PULL 04/13] gitlab-ci: Add KVM s390x cross-build jobs

2020-12-09 Thread Thomas Huth
From: Philippe Mathieu-Daudé Cross-build s390x target with only KVM accelerator enabled. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201207131503.3858889-5-phi...@redhat.com> Signed-off-by: Thomas Huth --- .gitlab-ci.d/crossbuilds.yml | 7 ++- 1 file

[PULL 06/13] test-qga: fix a resource leak in test_qga_guest_get_osinfo()

2020-12-09 Thread Thomas Huth
From: Alex Chen The fixture->fd is created in fixture_setup() and, likewise, needs to be closed in fixture_tear_down(). Reported-by: Euler Robot Signed-off-by: Alex Chen Reviewed-by: Li Qiang Reviewed-by: Marc-André Lureau Message-Id: <20201125102403.57709-1-alex.c...@huawei.com>

[PULL 10/13] gitlab-ci: Update 'build-disabled' to cover all configurable options

2020-12-09 Thread Thomas Huth
From: Philippe Mathieu-Daudé Add these missing options to the 'build-disabled' job: --disable-auth-pam (commit 8953caf3cd38) --disable-gcrypt (commit 91bfcdb01d48) --disable-keyring (commit 54e7aac05624) --disable-libudev (commit

[PULL 08/13] fuzz: avoid double-fetches by default

2020-12-09 Thread Thomas Huth
From: Alexander Bulekov The generic fuzzer can find double-fetch bugs. However: * We currently have no good way of producing qemu-system reproducers for double-fetch bugs. Even if we can get developers to run the binary-blob reproducers with the qemu-fuzz builds, we currently don't have a

[PULL 13/13] hw/m68k/mcf5206: Don't leak IRQs in mcf5206_mbar_realize()

2020-12-09 Thread Thomas Huth
From: Peter Maydell Coverity points out that the realize function for the TYPE_MCF5206_MBAR device leaks the IRQ array it allocates with qemu_allocate_irqs(). Keep a pointer to it in the device state struct to avoid the leak. (Since it needs to stay around for the life of the simulation there is

Re: [PATCH v11 00/13] hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set

2020-12-09 Thread Klaus Jensen
Hi Dmitry, By and large, this looks OK to me. There are still some issues here and there, and some comments of mine that you did not address, but I will follow up with patches to fix that. Let's get this merged. It looks like the nvme-next you rebased on is slightly old and missing two commits:

[PATCH v6 1/4] migration: introduce 'background-snapshot' migration capability

2020-12-09 Thread Andrey Gruzdev via
Add new capability to 'qapi/migration.json' schema. Update migrate_caps_check() to validate enabled capability set against introduced one. Perform checks for required kernel features and compatibility with guest memory backends. Signed-off-by: Andrey Gruzdev Reviewed-by: Peter Xu ---

Re: [RFC v9 00/22] i386 cleanup

2020-12-09 Thread Alex Bennée
no-re...@patchew.org writes: > Patchew URL: https://patchew.org/QEMU/20201208194839.31305-1-cfont...@suse.de/ > > > > Hi, > > This series seems to have some coding style problems. See output below for > more information: Also replicated in: https://gitlab.com/stsquad/qemu/-/jobs/899057106 >

Re: [PATCH v2 1/3] docs: generate qemu-storage-daemon-qmp-ref(7) man page

2020-12-09 Thread Stefan Hajnoczi
On Tue, Oct 06, 2020 at 12:22:55PM +0200, Kevin Wolf wrote: > Am 10.09.2020 um 16:43 hat Stefan Hajnoczi geschrieben: > > Although qemu-storage-daemon QMP commands are identical to QEMU QMP > > commands they are a subset. Generate a manual page of just the commands > > supported by

Re: [RFC v9 02/32] accel/tcg: split tcg_start_vcpu_thread

2020-12-09 Thread Alex Bennée
Claudio Fontana writes: > after the initial split into 3 tcg variants, we proceed to also > split tcg_start_vcpu_thread. > > We actually split it in 2 this time, since the icount variant > just uses the round robin function. > > Suggested-by: Richard Henderson > Signed-off-by: Claudio Fontana

Re: [RFC v9 04/32] i386: move kvm accel files into kvm/

2020-12-09 Thread Alex Bennée
Claudio Fontana writes: > Signed-off-by: Claudio Fontana Reviewed-by: Alex Bennée -- Alex Bennée

Re: [RFC v9 19/32] cpu: Move cpu_exec_* to tcg_ops

2020-12-09 Thread Philippe Mathieu-Daudé
On 12/8/20 8:48 PM, Claudio Fontana wrote: > From: Eduardo Habkost > > Signed-off-by: Eduardo Habkost > [claudio: wrapped in CONFIG_TCG] > Signed-off-by: Claudio Fontana > Reviewed-by: Philippe Mathieu-Daudé > --- ... > diff --git a/include/hw/core/tcg-cpu-ops.h

Re: [PATCH] smbios: entry-point-type option

2020-12-09 Thread Daniel P . Berrangé
On Tue, Dec 08, 2020 at 04:20:23PM -0500, Eduardo Habkost wrote: > Add command-line option that lets the SMBIOS entry point type to > be configured. > > SMBIOS 3.0 support is necessary to allow us to support more > than 720 VCPUs in x86_64, due to SMBIOS 2.1 table size limits. > > Note that it's

[PULL 05/13] gitlab-ci: Add Xen cross-build jobs

2020-12-09 Thread Thomas Huth
From: Philippe Mathieu-Daudé Cross-build ARM and X86 targets with only Xen accelerator enabled. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201207131503.3858889-6-phi...@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- .gitlab-ci.d/crossbuilds.yml | 14

[PULL 03/13] gitlab-ci: Introduce 'cross_accel_build_job' template

2020-12-09 Thread Thomas Huth
From: Philippe Mathieu-Daudé Introduce a job template to cross-build accelerator specific jobs (enable a specific accelerator, disabling the others). The specific accelerator is selected by the $ACCEL environment variable (default to KVM). Extra options such disabling other accelerators are

[PULL 01/13] gitlab-ci: Document 'build-tcg-disabled' is a KVM X86 job

2020-12-09 Thread Thomas Huth
From: Philippe Mathieu-Daudé Document what this job cover (build X86 targets with KVM being the single accelerator available). Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201207131503.3858889-2-phi...@redhat.com> Signed-off-by: Thomas Huth ---

[PULL 02/13] gitlab-ci: Replace YAML anchors by extends (cross_system_build_job)

2020-12-09 Thread Thomas Huth
From: Philippe Mathieu-Daudé 'extends' is an alternative to using YAML anchors and is a little more flexible and readable. See: https://docs.gitlab.com/ee/ci/yaml/#extends More importantly it allows exploding YAML jobs. Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Thomas Huth

[PULL 12/13] gitlab-ci: Move coroutine tests across to gitlab

2020-12-09 Thread Thomas Huth
From: Philippe Mathieu-Daudé Similarly to commit 8cdb2cef3f1, move the coroutine tests to GitLab. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201108204535.2319870-13-phi...@redhat.com> Reviewed-by: Wainer dos Santos Moschetta [thuth: Replaced Travis by Gitlab-CI in comment]

Re: [PATCH 1/1] Avoid migration if guest is in postmigrated status

2020-12-09 Thread Li Zhang
Thanks for telling me that. I didn't notice this patch. I just caught this error when I used it and read the source code, it should be fixed. Thanks Li On Wed, Dec 9, 2020 at 5:23 PM David Edmondson wrote: > On Wednesday, 2020-12-09 at 07:20:29 GMT, Li Zhang wrote: > > > This patch is to avoid

[PATCH v6 0/4] migration: UFFD write-tracking migration/snapshots

2020-12-09 Thread Andrey Gruzdev via
This patch series is a kind of 'rethinking' of Denis Plotnikov's ideas he's implemented in his series '[PATCH v0 0/4] migration: add background snapshot'. Currently the only way to make (external) live VM snapshot is using existing dirty page logging migration mechanism. The main problem is that

[PATCH v6 2/4] migration: introduce UFFD-WP low-level interface helpers

2020-12-09 Thread Andrey Gruzdev via
Glue code to the userfaultfd kernel implementation. Querying feature support, createing file descriptor, feature control, memory region registration, IOCTLs on registered registered regions. Signed-off-by: Andrey Gruzdev Reviewed-by: Peter Xu --- include/exec/memory.h | 1 +

[PATCH v6 4/4] migration: implementation of background snapshot thread

2020-12-09 Thread Andrey Gruzdev via
Introducing implementation of 'background' snapshot thread which in overall follows the logic of precopy migration while internally utilizes completely different mechanism to 'freeze' vmstate at the start of snapshot creation. This mechanism is based on userfault_fd with wr-protection support and

[PATCH 3/3] sev: update sev-inject-launch-secret to make gpa optional

2020-12-09 Thread James Bottomley
If the gpa isn't specified, it's value is extracted from the OVMF properties table located below the reset vector (and if this doesn't exist, an error is returned). OVMF has defined the GUID for the SEV secret area as 4c2eb361-7d9b-4cc3-8081-127c90d3d294 and the format of the is: | where both

Re: [PATCH 1/2] virtio-blk: Acquire context while switching them on dataplane start

2020-12-09 Thread Kevin Wolf
Am 09.12.2020 um 17:51 hat Sergio Lopez geschrieben: > On Mon, Dec 07, 2020 at 04:37:53PM +0100, Kevin Wolf wrote: > > Am 04.12.2020 um 17:53 hat Sergio Lopez geschrieben: > > > On dataplane start, acquire the new AIO context before calling > > > 'blk_set_aio_context', releasing it immediately

Re: [RFC v9 27/32] accel: replace struct CpusAccel with AccelOpsClass

2020-12-09 Thread Claudio Fontana
On 12/9/20 1:54 PM, Alex Bennée wrote: > > Claudio Fontana writes: > >> centralize the registration of the cpus.c module >> accelerator operations in accel/accel-softmmu.c >> >> Signed-off-by: Claudio Fontana > >> diff --git a/accel/tcg/tcg-cpus.c b/accel/tcg/tcg-cpus.c >> index

Re: [PATCH 1/6] spapr: Add an "spapr" property to sPAPR CPU core

2020-12-09 Thread Greg Kurz
On Wed, 9 Dec 2020 18:34:31 +0100 Philippe Mathieu-Daudé wrote: > On 12/9/20 6:00 PM, Greg Kurz wrote: > > The sPAPR CPU core device can only work with pseries machine types. > > This is currently checked in the realize function with a dynamic > > cast of qdev_get_machine(). Some other places

[PATCH v2 4/4] qtest/pvpanic: Test panic option that allows VM to continue

2020-12-09 Thread Alejandro Jimenez
Test the scenario where the -action panic=none parameter is used to signal that the VM must continue executing after a guest panic occurs. Suggested-by: Paolo Bonzini Signed-off-by: Alejandro Jimenez --- tests/qtest/pvpanic-test.c | 26 +- 1 file changed, 25

[PULL v2 07/65] virtio: reset device on bad guest index in virtio_load()

2020-12-09 Thread Michael S. Tsirkin
From: John Levon If we find a queue with an inconsistent guest index value, explicitly mark the device as needing a reset - and broken - via virtio_error(). There's at least one driver implementation - the virtio-win NetKVM driver - that is able to handle a VIRTIO_CONFIG_S_NEEDS_RESET

[PULL v2 11/65] acpi: Extract crs build form acpi_build.c

2020-12-09 Thread Michael S. Tsirkin
From: Yubo Miao Extract crs build form acpi_build.c, the function could also be used to build the crs for pxbs for arm. The resources are composed by two parts: 1. The bar space of pci-bridge/pcie-root-ports 2. The resources needed by devices behind PXBs. The base and limit of memory/io are

[PULL v2 19/65] failover: primary bus is only used once, and where it is set

2020-12-09 Thread Michael S. Tsirkin
From: Juan Quintela Just remove the struct member. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-5-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-net.h | 1 - hw/net/virtio-net.c| 8 2

[PULL v2 01/65] vhost-user-scsi: Fix memleaks in vus_proc_req()

2020-12-09 Thread Michael S. Tsirkin
From: Alex Chen The 'elem' is allocated memory in vu_queue_pop(), and its memory should be freed in all error branches after vu_queue_pop(). In addition, in order to free the 'elem' memory outside of while(1) loop, move the definition of 'elem' to the beginning of vus_proc_req(). Reported-by:

[PULL v2 26/65] failover: remove standby_id variable

2020-12-09 Thread Michael S. Tsirkin
From: Juan Quintela We can calculate it, and we only use it once anyways. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-12-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-net.h | 1 - hw/net/virtio-net.c

[PULL v2 09/65] fw_cfg: Refactor extra pci roots addition

2020-12-09 Thread Michael S. Tsirkin
From: Jiahui Cen Extract extra pci roots addition from pc machine, which could be used by other machines. In order to make uefi get the extra roots, it is necessary to write extra roots into fw_cfg. And only if the uefi knows there are extra roots, the config spaces of devices behind the root

[PULL v2 34/65] failover: simplify qdev_device_add() failover case

2020-12-09 Thread Michael S. Tsirkin
From: Juan Quintela Just put allthe logic inside the same if. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-20-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- softmmu/qdev-monitor.c | 11 ++- 1 file changed, 6 insertions(+),

[PULL v2 40/65] failover: Caller of this two functions already have primary_dev

2020-12-09 Thread Michael S. Tsirkin
From: Juan Quintela Pass it as an argument. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-26-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 27 ++- 1 file changed, 14 insertions(+), 13

[PULL v2 43/65] hw: add compat machines for 6.0

2020-12-09 Thread Michael S. Tsirkin
From: Cornelia Huck Add 6.0 machine types for arm/i440fx/q35/s390x/spapr. Signed-off-by: Cornelia Huck Message-Id: <20201109173928.1001764-1-coh...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[PULL v2 41/65] failover: simplify failover_unplug_primary

2020-12-09 Thread Michael S. Tsirkin
From: Juan Quintela We can calculate device just once. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-27-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 25 ++--- 1 file changed, 10

[PULL v2 36/65] failover: make sure that id always exist

2020-12-09 Thread Michael S. Tsirkin
From: Juan Quintela We check that it exist at device creation time, so we don't have to check anywhere else. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-22-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c| 3

[PULL v2 18/65] failover: Use always atomics for primary_should_be_hidden

2020-12-09 Thread Michael S. Tsirkin
From: Juan Quintela Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-4-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c

[PULL v2 29/65] failover: simplify virtio_net_find_primary()

2020-12-09 Thread Michael S. Tsirkin
From: Juan Quintela a - is_my_primary() never sets one error b - If we return 1, primary_device_id is always set Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-15-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c |

[PULL v2 32/65] failover: virtio_net_connect_failover_devices() does nothing

2020-12-09 Thread Michael S. Tsirkin
From: Juan Quintela It just calls virtio_net_find_primary(), so just update the callers. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-18-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 17 ++--- 1

Re: [PATCH 1/6] spapr: Add an "spapr" property to sPAPR CPU core

2020-12-09 Thread Philippe Mathieu-Daudé
On 12/9/20 6:53 PM, Philippe Mathieu-Daudé wrote: > On 12/9/20 6:42 PM, Greg Kurz wrote: >> On Wed, 9 Dec 2020 18:34:31 +0100 >> Philippe Mathieu-Daudé wrote: >> >>> On 12/9/20 6:00 PM, Greg Kurz wrote: The sPAPR CPU core device can only work with pseries machine types. This is

[PULL v2 58/65] tests/acpi: allow expected files change

2020-12-09 Thread Michael S. Tsirkin
From: Igor Mammedov Change that will be introduced by following patch: @@ -557,6 +557,7 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPCDSDT", 0x0001) CINS, 1, CRMV, 1, CEJ0, 1, +CEJF, 1, Offset

[PULL v2 37/65] failover: remove failover_find_primary_device() error parameter

2020-12-09 Thread Michael S. Tsirkin
From: Juan Quintela It can never give one error. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-23-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-)

[PULL v2 51/65] contrib/vhost-user-blk: avoid g_return_val_if() input validation

2020-12-09 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Do not validate input with g_return_val_if(). This API is intended for checking programming errors and is compiled out with -DG_DISABLE_CHECKS. Use an explicit if statement for input validation so it cannot accidentally be compiled out. Suggested-by: Markus Armbruster

Re: [PATCH v1 2/6] gitlab: include aarch64-softmmu and ppc64-softmmu cross-system-build

2020-12-09 Thread Richard Henderson
On 12/9/20 11:08 AM, Thomas Huth wrote: > On 09/12/2020 18.00, Alex Bennée wrote: >> Otherwise we miss coverage of KVM support in the cross build. To >> balance it out add cris-softmmu and ppc-softmmu to the exclude list >> which do get coverage elsewhere. > > Could you maybe add arm-softmmu to

Re: [PATCH v5 0/2] MTE support for KVM guest

2020-12-09 Thread Richard Henderson
On 12/9/20 9:27 AM, Catalin Marinas wrote: > On Wed, Dec 09, 2020 at 01:25:18PM +, Marc Zyngier wrote: >> Would this syscall operate on the guest address space? Or on the VMM's >> own mapping? ... > Whatever is easier for the VMM, I don't think it matters as long as the > host kernel can get

Re: [RFC PATCH v2 1/3] vfio: Move the saving of the config space to the right place in VFIO migration

2020-12-09 Thread Alex Williamson
On Wed, 9 Dec 2020 13:29:47 +0100 Cornelia Huck wrote: > On Wed, 9 Dec 2020 16:09:17 +0800 > Shenming Lu wrote: > > > On ARM64 the VFIO SET_IRQS ioctl is dependent on the VM interrupt > > setup, if the restoring of the VFIO PCI device config space is > > before the VGIC, an error might occur

Re: [RFC PATCH 13/27] vhost: Send buffers to device

2020-12-09 Thread Eugenio Perez Martin
On Tue, Dec 8, 2020 at 9:16 AM Stefan Hajnoczi wrote: > > On Fri, Nov 20, 2020 at 07:50:51PM +0100, Eugenio Pérez wrote: > > -static inline bool vhost_vring_should_kick(VhostShadowVirtqueue *vq) > > +static bool vhost_vring_should_kick_rcu(VhostShadowVirtqueue *vq) > > "vhost_vring_" is a

Re: [PATCH] virtio-pmem: add trace events

2020-12-09 Thread David Hildenbrand
On 17.11.20 12:57, Pankaj Gupta wrote: > This patch adds trace events for virtio-pmem functionality. > Adding trace events for virtio pmem request, reponse and host > side fsync functionality. > > Signed-off-by: Pankaj Gupta > --- > hw/virtio/trace-events | 5 + > hw/virtio/virtio-pmem.c |

Re: [RFC v9 27/32] accel: replace struct CpusAccel with AccelOpsClass

2020-12-09 Thread Claudio Fontana
On 12/9/20 7:30 PM, Alex Bennée wrote: > > Claudio Fontana writes: > >> On 12/9/20 1:54 PM, Alex Bennée wrote: >>> >>> Claudio Fontana writes: >>> centralize the registration of the cpus.c module accelerator operations in accel/accel-softmmu.c Signed-off-by: Claudio Fontana

Re: [PATCH v2 08/10] softmmu/physmem: Extend ram_block_discard_(require|disable) by two discard types

2020-12-09 Thread David Hildenbrand
[...] >> +/* Disable only uncoordinated disards. */ > s/disards/discards Thanks! [...] >> >> bool ram_block_discard_is_required(void) >> { >> -return qatomic_read(_block_discard_requirers); >> +return qatomic_read(_block_discard_requirers) || >> +

Re: [PATCH v5 0/2] MTE support for KVM guest

2020-12-09 Thread Richard Henderson
On 12/9/20 12:39 PM, Catalin Marinas wrote: >> I would have thought that the best way is to use TCO, so that we don't have >> to >> have dual mappings (and however many MB of extra page tables that might >> imply). > > The problem appears when the VMM wants to use MTE itself (e.g. linked >

Re: [PATCH 1/6] spapr: Add an "spapr" property to sPAPR CPU core

2020-12-09 Thread Greg Kurz
On Wed, 9 Dec 2020 13:26:17 -0500 Eduardo Habkost wrote: > On Wed, Dec 09, 2020 at 07:11:40PM +0100, Philippe Mathieu-Daudé wrote: > [...] > > @@ -200,7 +199,7 @@ static void spapr_cpu_core_reset(DeviceState *dev) > > int i; > > > > for (i = 0; i < cc->nr_threads;

[PATCH] fuzz: map all BARs and enable PCI devices

2020-12-09 Thread Alexander Bulekov
Prior to this patch, the fuzzer found inputs to map PCI device BARs and enable the device. While it is nice that the fuzzer can do this, it added significant overhead, since the fuzzer needs to map all the BARs (regenerating the memory topology), at the start of each input. With this patch, we do

Re: [PATCH v4 2/4] block: add bdrv_co_delete_file_noerr

2020-12-09 Thread Maxim Levitsky
On Wed, 2020-12-09 at 18:34 +0100, Alberto Garcia wrote: > On Wed 09 Dec 2020 05:44:39 PM CET, Maxim Levitsky wrote: > > +void coroutine_fn bdrv_co_delete_file_noerr(BlockDriverState *bs) > > +{ > > +Error *local_err = NULL; > > + > > +if (!bs) { > > +return; > > +} > > + > > +

[RFC 2/8] s390x/pci: MSI-X isn't strictly required for passthrough

2020-12-09 Thread Matthew Rosato
s390 PCI currently disallows PCI devices without the MSI-X capability. However, this fence doesn't make sense for passthrough devices. Move the check to only fence emulated devices (e.g., virtio). Signed-off-by: Matthew Rosato Reviewed-by: Pierre Morel --- hw/s390x/s390-pci-bus.c | 14

[PATCH v5 4/4] block: qcow2: remove the created file on initialization error

2020-12-09 Thread Maxim Levitsky
If the qcow initialization fails, we should remove the file if it was already created, to avoid leaving stale files around. We already do this for luks raw images. Signed-off-by: Maxim Levitsky Reviewed-by: Alberto Garcia --- block/qcow2.c | 6 -- 1 file changed, 4 insertions(+), 2

Re: [PATCH RFC] qemu co-mutex crash / question

2020-12-09 Thread Vladimir Sementsov-Ogievskiy
09.12.2020 15:32, Vladimir Sementsov-Ogievskiy wrote: Hi all! I have a coredump of our qemu branch, based on rhev-2.12.0-44.el7_8.2, which in turn is based on v2.12.0.. And don't have any kind of reproduce. The backtrace: #0 aio_co_schedule (ctx=0x0, co=0x55dd539fa340) at

Re: [PATCH RFC] qemu co-mutex crash / question

2020-12-09 Thread Vladimir Sementsov-Ogievskiy
09.12.2020 15:32, Vladimir Sementsov-Ogievskiy wrote: test-aio-multithread: ../util/qemu-coroutine-lock.c:197: qemu_co_mutex_wake: Assertion `mutex == co->wait_on_mutex' failed. Thread 18 "test-aio-multit" received signal SIGABRT, Aborted. [Switching to Thread 0x7fffe5ffb700 (LWP

Re: [PATCH] configure: replace --enable/disable-git-update with --with-git-submodules

2020-12-09 Thread Dan Streetman
Hi, just a ping to try to keep this alive, does the patch look ok? I can rebase it on the latest git if so (and if needed) On Fri, Oct 16, 2020 at 4:39 PM Dan Streetman wrote: > > Replace the --enable-git-update and --disable-git-update configure params > with the param

Re: [RFC v9 18/32] cpu: Move synchronize_from_tb() to tcg_ops

2020-12-09 Thread Eduardo Habkost
On Wed, Dec 09, 2020 at 10:50:29AM +, Alex Bennée wrote: > > Claudio Fontana writes: > > > From: Eduardo Habkost > > > > Signed-off-by: Eduardo Habkost > > [claudio: wrapped in CONFIG_TCG] > > Signed-off-by: Claudio Fontana > > Reviewed-by: Philippe Mathieu-Daudé > > --- [...] > > @@

Re: [RFC PATCH 05/27] vhost: Add hdev->dev.sw_lm_vq_handler

2020-12-09 Thread Eugenio Perez Martin
On Mon, Dec 7, 2020 at 5:52 PM Stefan Hajnoczi wrote: > > On Fri, Nov 20, 2020 at 07:50:43PM +0100, Eugenio Pérez wrote: > > Only virtio-net honors it. > > > > Signed-off-by: Eugenio Pérez > > --- > > include/hw/virtio/vhost.h | 1 + > > hw/net/virtio-net.c | 39

Re: [PATCH v2 09/15] target/riscv: fpu_helper: Match function defs in HELPER macros

2020-12-09 Thread Richard Henderson
On 12/8/20 4:56 PM, Alistair Francis wrote: > The helper functions defined in helper.h specify that the argument is of > type target_long. Let's change the implementation to match the header > definition. Given that these are riscv64 specific, you could alternately change the header definition.

Re: [RFC PATCH 04/27] vhost: add vhost_kernel_set_vring_enable

2020-12-09 Thread Stefan Hajnoczi
On Wed, Dec 09, 2020 at 01:00:19PM +0100, Eugenio Perez Martin wrote: > On Mon, Dec 7, 2020 at 5:43 PM Stefan Hajnoczi wrote: > > > > On Fri, Nov 20, 2020 at 07:50:42PM +0100, Eugenio Pérez wrote: > > > Signed-off-by: Eugenio Pérez > > > --- > > > hw/virtio/vhost-backend.c | 29

Re: [PULL 00/66] pc,pci,virtio: fixes, cleanups

2020-12-09 Thread Peter Maydell
On Wed, 9 Dec 2020 at 14:37, Peter Maydell wrote: > > On Tue, 8 Dec 2020 at 19:33, Michael S. Tsirkin wrote: > > > > The following changes since commit 553032db17440f8de011390e5a1cfddd13751b0b: > > > > Update version for v5.2.0 release (2020-12-08 15:55:19 +) > > > > are available in the

Re: [PATCH 5/8] riscv: Add semihosting support [v13]

2020-12-09 Thread Keith Packard via
Kito Cheng writes: > Hi Keith: > > Thanks for the patch, I've verified with newlib semihosting support > which is contributed by Craig Blackmore from embecosm, > and I would like to add semihosting to user mode, do you mind add this > patch into this patch series? I tried to add that already,

  1   2   3   4   >