Re: [Virtio-fs] [PATCH] virtiofsd: make the debug log timestamp on stderr more human-readable

2020-12-09 Thread Laszlo Ersek
On 12/08/20 17:57, Vivek Goyal wrote: > On Tue, Dec 08, 2020 at 06:50:43AM +0100, Laszlo Ersek wrote: >> The current timestamp format doesn't help me visually notice small jumps >> in time ("small" as defined on human scale, such as a few seconds or a few >> ten seconds). Replace it with a local ti

[PATCH v2] bugfix: hostmem: Free host_nodes list right after visited

2020-12-09 Thread Keqian Zhu
In host_memory_backend_get_host_nodes, we build host_nodes list and output it to v (a StringOutputVisitor) but forget to free the list. This fixes the memory leak. The memory leak stack: Direct leak of 32 byte(s) in 2 object(s) allocated from: #0 0xfffda30b3393 in __interceptor_calloc (/usr/

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

2020-12-09 Thread Keith Packard via
Kito Cheng writes: > Hi Keith: > > Thanks for your reply, but it seems like we need some more modification in > linux-user/riscv/cpu_loop.c to enable that, I guess I should post that in > mail > rather than attachment :) Ah, I completely missed the attachment! So sorry. That applies cleanly on

Re: [PATCH v1 6/6] gitlab: add --without-default-features build

2020-12-09 Thread Thomas Huth
On 09/12/2020 19.32, Alex Bennée wrote: > > Thomas Huth writes: > >> On 09/12/2020 18.00, Alex Bennée wrote: >>> Signed-off-by: Alex Bennée >>> --- >>> .gitlab-ci.yml | 7 +++ >>> 1 file changed, 7 insertions(+) >>> >>> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml >>> index 878d114d40..f87

Re: [PATCH] kvm: Take into account the unaligned section size when preparing bitmap

2020-12-09 Thread Zenghui Yu
On 2020/12/10 5:09, Peter Xu wrote: On Wed, Dec 09, 2020 at 10:33:41AM +0800, Zenghui Yu wrote: Hi Peter, Thanks for having a look at it. On 2020/12/8 23:16, Peter Xu wrote: Hi, Zenghui, On Tue, Dec 08, 2020 at 07:40:13PM +0800, Zenghui Yu wrote: The kernel KVM_CLEAR_DIRTY_LOG interface has

Re: [PATCH 6/6] target/ppc: Add mce_req_event() handler to PPCVirtualHypervisorClass

2020-12-09 Thread David Gibson
On Wed, Dec 09, 2020 at 06:00:52PM +0100, Greg Kurz wrote: > kvm_handle_nmi() directly calls spapr_mce_req_event() which is machine > level code. Apart from being ugly, this forces spapr_mce_req_event() > to rely on qdev_get_machine() to get a pointer to the machine state. > This is a bit unfortuna

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

2020-12-09 Thread David Gibson
On Wed, Dec 09, 2020 at 01:26:17PM -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_thr

Re: [PATCH for-6.0] spapr: Allow memory unplug to always succeed

2020-12-09 Thread David Gibson
On Tue, Dec 08, 2020 at 10:06:09AM +0100, Greg Kurz wrote: > On Tue, 8 Dec 2020 15:30:04 +1100 > David Gibson wrote: > > > On Mon, Dec 07, 2020 at 02:37:04PM +0100, Greg Kurz wrote: > > > It is currently impossible to hot-unplug a memory device between > > > machine reset and CAS. > > > > > > (q

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

2020-12-09 Thread Kito Cheng
Hi Keith: Thanks for your reply, but it seems like we need some more modification in linux-user/riscv/cpu_loop.c to enable that, I guess I should post that in mail rather than attachment :) Patch here: >From 2f1eb5825a6dda177d3289106970eab05cb08445 Mon Sep 17 00:00:00 2001 From: Kito Cheng Dat

Re: [PATCH 4/6] spapr: Don't use qdev_get_machine() in spapr_msi_write()

2020-12-09 Thread David Gibson
On Wed, Dec 09, 2020 at 06:00:50PM +0100, Greg Kurz wrote: > spapr_phb_realize() passes the sPAPR machine state as opaque data > for the I/O callbacks: > > memory_region_init_io(&sphb->msiwindow, OBJECT(sphb), &spapr_msi_ops, spapr, >

Re: [PATCH 5/6] spapr: Pass sPAPR machine state to some RTAS events handling functions

2020-12-09 Thread David Gibson
On Wed, Dec 09, 2020 at 06:00:51PM +0100, Greg Kurz wrote: > Some functions in hw/ppc/spapr_events.c get a pointer to the machine > state using qdev_get_machine(). Convert them to get it from their > caller when possible. > > Signed-off-by: Greg Kurz Applied to ppc-for-6.0. > --- > hw/ppc/spap

Re: [PATCH 1/1] spapr.c: set a 'kvm-type' default value instead of relying on NULL

2020-12-09 Thread David Gibson
On Tue, Dec 08, 2020 at 12:32:46PM -0300, Daniel Henrique Barboza wrote: > > > On 12/8/20 11:33 AM, Greg Kurz wrote: > > Hi Daniel, > > > > On Tue, 8 Dec 2020 10:45:36 -0300 > > Daniel Henrique Barboza wrote: > > > > > spapr_kvm_type() is considering 'vm_type=NULL' as a valid input, where > >

Re: [PATCH 3/6] spapr: Pass sPAPR machine state down to spapr_pci_switch_vga()

2020-12-09 Thread David Gibson
On Wed, Dec 09, 2020 at 06:00:49PM +0100, Greg Kurz wrote: > This allows to drop a user of qdev_get_machine(). > > Signed-off-by: Greg Kurz Applied to ppc-for-6.0. > --- > include/hw/ppc/spapr.h | 2 +- > hw/ppc/spapr_hcall.c | 7 --- > hw/ppc/spapr_pci.c | 3 +-- > 3 files changed,

Re: [PATCH 0/2] target/ppc: Fix detection of 64-bit MMU models

2020-12-09 Thread David Gibson
On Wed, Dec 09, 2020 at 06:35:34PM +0100, Greg Kurz wrote: > Stephane Duverger posted a patch to fix a miscomputation of the > 'need_access_type' flag in ppc_tr_init_disas_context(), which can > cause QEMU to abort with 32-bit CPUs. > > This series contains an extended version of Stephane's patch

Re: [PATCH] kvm: Take into account the unaligned section size when preparing bitmap

2020-12-09 Thread Zenghui Yu
On 2020/12/10 10:53, zhukeqian wrote: On 2020/12/10 10:08, Peter Xu wrote: Keqian, On Thu, Dec 10, 2020 at 09:46:06AM +0800, zhukeqian wrote: Hi, I see that if start or size is not PAGE aligned, it also clears areas which beyond caller's expectation, so do we also need to consider this? A

Re: [PATCH v2 3/4] qmp: Allow setting -action parameters on the fly

2020-12-09 Thread Alejandro Jimenez
On 12/9/2020 4:43 PM, Paolo Bonzini wrote: On 09/12/20 18:52, Alejandro Jimenez wrote: +# Set the action that will be taken by the emulator in response to a guest +# event. +# +# @pair: a @RunStateAction type that describes an event|action pair. +# +# Returns: Nothing on success. +# +# Since

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

2020-12-09 Thread Shenming Lu
On 2020/12/9 20:45, Cornelia Huck wrote: > On Wed, 9 Dec 2020 16:09:18 +0800 > Shenming Lu wrote: > >> 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 interrup

Re: [PATCH] kvm: Take into account the unaligned section size when preparing bitmap

2020-12-09 Thread zhukeqian
On 2020/12/10 10:08, Peter Xu wrote: > Keqian, > > On Thu, Dec 10, 2020 at 09:46:06AM +0800, zhukeqian wrote: >> Hi, >> >> I see that if start or size is not PAGE aligned, it also clears areas >> which beyond caller's expectation, so do we also need to consider this? > > Could you elaborate? >

Re: [PATCH v2 2/4] vl: Add option to avoid stopping VM upon guest panic

2020-12-09 Thread Paolo Bonzini
On 09/12/20 18:52, Alejandro Jimenez wrote: -vm_stop(RUN_STATE_GUEST_PANICKED); + +if (pause_on_panic) { +qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE, +!!info, info); +vm_stop(RUN_STATE_GUEST_PANICKED); +} else { +

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 Shenming Lu
On 2020/12/10 2:34, Alex Williamson wrote: > 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 sp

Re: [PATCH] kvm: Take into account the unaligned section size when preparing bitmap

2020-12-09 Thread Peter Xu
Keqian, On Thu, Dec 10, 2020 at 09:46:06AM +0800, zhukeqian wrote: > Hi, > > I see that if start or size is not PAGE aligned, it also clears areas > which beyond caller's expectation, so do we also need to consider this? Could you elaborate? If start_delta != 0, kvm_log_clear_one_slot() should

Re: [PATCH] kvm: Take into account the unaligned section size when preparing bitmap

2020-12-09 Thread zhukeqian
Hi, I see that if start or size is not PAGE aligned, it also clears areas which beyond caller's expectation, so do we also need to consider this? Thanks, Keqian On 2020/12/9 10:33, Zenghui Yu wrote: > Hi Peter, > > Thanks for having a look at it. > > On 2020/12/8 23:16, Peter Xu wrote: >> Hi,

Re: [PATCH v12 08/19] multi-process: define MPQemuMsg format and transmission functions

2020-12-09 Thread Elena Ufimtseva
On Mon, Dec 07, 2020 at 05:18:46PM +0400, Marc-André Lureau wrote: > Hi > > On Wed, Dec 2, 2020 at 12:25 AM Jagannathan Raman > wrote: > > > From: Elena Ufimtseva > > > > Defines MPQemuMsg, which is the message that is sent to the remote > > process. This message is sent over QIOChannel and is

Re: [PATCH 1/1] target-riscv: support QMP dump-guest-memory

2020-12-09 Thread Alistair Francis
On Mon, Nov 30, 2020 at 7:32 PM Yifei Jiang wrote: > > Add the support needed for creating prstatus elf notes. Now elf notes > only contains user_regs. This allows us to use QMP dump-guest-memory. > > Signed-off-by: Yifei Jiang > Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis Alista

Re: [PATCH v2 0/5] SCSI: fix transfer limits for SCSI passthrough

2020-12-09 Thread Paolo Bonzini
On 09/12/20 15:03, no-re...@patchew.org wrote: Patchew URL: https://patchew.org/QEMU/20201209135355.561745-1-mlevi...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20201209135355.561745-1-mlevi...@redhat

Re: [PATCH v1 3/6] configure: add --without-default-features

2020-12-09 Thread Paolo Bonzini
On 09/12/20 18:00, Alex Bennée wrote: By default QEMU enables a lot of features if it can probe and find the support libraries. It also enables a bunch of features by default. This patch adds the ability to build --without-default-features which can be paired with a --without-default-devices for

Re: [PATCH v2 14/15] target/riscv: csr: Remove compile time XLEN checks

2020-12-09 Thread Alistair Francis
On Wed, Dec 9, 2020 at 9:34 AM Richard Henderson wrote: > > On 12/8/20 4:56 PM, Alistair Francis wrote: > > @@ -1053,11 +1077,11 @@ static int read_htimedelta(CPURISCVState *env, int > > csrno, target_ulong *val) > > return -RISCV_EXCP_ILLEGAL_INST; > > } > > > > -#if defined(TARGET

Re: [PATCH v2 11/15] target/riscv: Specify the XLEN for CPUs

2020-12-09 Thread Alistair Francis
On Wed, Dec 9, 2020 at 8:03 AM Richard Henderson wrote: > > On 12/8/20 4:56 PM, Alistair Francis wrote: > > +#ifdef TARGET_RISCV64 > > +static void rv64_sifive_u_cpu_init(Object *obj) > > { > > CPURISCVState *env = &RISCV_CPU(obj)->env; > > -set_misa(env, RVXLEN | RVI | RVM | RVA | RVF |

Re: [PATCH v2 10/15] target/riscv: Add a riscv_cpu_is_32bit() helper function

2020-12-09 Thread Alistair Francis
On Wed, Dec 9, 2020 at 7:59 AM Richard Henderson wrote: > > On 12/8/20 4:56 PM, Alistair Francis wrote: > > +bool riscv_cpu_is_32bit(CPURISCVState *env) > > +{ > > +if (env->misa & RV64) { > > +return false; > > +} > > + > > +return true; > > Is this ever going to more than > >

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

2020-12-09 Thread Alistair Francis
On Wed, Dec 9, 2020 at 7:57 AM Richard Henderson wrote: > > 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 ri

Re: [PATCH v2 05/15] hw/riscv: boot: Remove compile time XLEN checks

2020-12-09 Thread Alistair Francis
On Wed, Dec 9, 2020 at 7:51 AM Richard Henderson wrote: > > On 12/8/20 4:56 PM, Alistair Francis wrote: > > +if (riscv_is_32_bit(machine)) { > > +dinfo.magic = cpu_to_le32(FW_DYNAMIC_INFO_MAGIC_VALUE); > > +dinfo.version = cpu_to_le32(FW_DYNAMIC_INFO_VERSION); > > +dinf

Re: [PATCH v2 1/4] vl: Add an -action option to respond to guest events

2020-12-09 Thread Paolo Bonzini
On 09/12/20 18:52, Alejandro Jimenez wrote: -static int no_reboot; +int no_reboot; int no_shutdown = 0; Since you are at it, please move these globals to the new file. Paolo

Re: [PATCH v2 3/4] qmp: Allow setting -action parameters on the fly

2020-12-09 Thread Paolo Bonzini
On 09/12/20 18:52, Alejandro Jimenez wrote: +# Set the action that will be taken by the emulator in response to a guest +# event. +# +# @pair: a @RunStateAction type that describes an event|action pair. +# +# Returns: Nothing on success. +# +# Since: 6.0 +# +# Example: +# +# -> { "execute": "set-

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

2020-12-09 Thread Peter Maydell
On Wed, 9 Dec 2020 at 18:06, 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 Git repository at: > > git://git.kernel.org/pub/scm/virt/kvm/mst/qe

Re: [PATCH v12 16/19] multi-process: Synchronize remote memory

2020-12-09 Thread Marc-André Lureau
On Wed, Dec 9, 2020 at 8:20 PM Jag Raman wrote: > > > > On Dec 8, 2020, at 8:57 AM, Marc-André Lureau < > marcandre.lur...@gmail.com> wrote: > > > > Hi > > > > On Wed, Dec 2, 2020 at 12:23 AM Jagannathan Raman > wrote: > > Add memory-listener object which is used to keep the view of the RAM > >

[Bug 1818937] Re: Crash with HV_ERROR on macOS host

2020-12-09 Thread Mathieu Boisvert
Same here. Also on macOS host: $ qemu-system-x86_64 -machine type=q35,accel=hvf \ -cpu max \ -smp 2 \ -hda ubuntu.qcow2 \ -cdrom ./ubuntu-20.04.1-desktop-amd64.iso \ -m 2G \ -vga virtio \ -usb \ -device usb-tablet \ -display default,show-cursor=on qemu-system-x86_64: Error: HV_ERROR [1]77

Re: [PATCH] kvm: Take into account the unaligned section size when preparing bitmap

2020-12-09 Thread Peter Xu
On Wed, Dec 09, 2020 at 10:33:41AM +0800, Zenghui Yu wrote: > Hi Peter, > > Thanks for having a look at it. > > On 2020/12/8 23:16, Peter Xu wrote: > > Hi, Zenghui, > > > > On Tue, Dec 08, 2020 at 07:40:13PM +0800, Zenghui Yu wrote: > > > The kernel KVM_CLEAR_DIRTY_LOG interface has align requir

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

2020-12-09 Thread Eduardo Habkost
On Wed, Dec 09, 2020 at 09:24:36PM +0100, Greg Kurz wrote: > 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 > > > *

[RFC 5/8] s390x/pci: Fix memory_region_access_valid call

2020-12-09 Thread Matthew Rosato
In pcistb_service_handler, a call is made to validate that the memory region can be accessed. However, the call is made using the entire length of the pcistb operation, which can be larger than the allowed memory access size (8). Since we already know that the provided buffer is a multiple of 8,

[RFC 0/8] s390x/pci: Fixing s390 vfio-pci ISM support

2020-12-09 Thread Matthew Rosato
Today, ISM devices are completely disallowed for vfio-pci passthrough as QEMU rejects the device due to an (inappropriate) MSI-X check. Removing this fence, however, reveals additional deficiencies in the s390x PCI interception layer that prevent ISM devices from working correctly. Namely, ISM blo

[RFC 1/8] linux-headers: update against 5.10-rc7

2020-12-09 Thread Matthew Rosato
Placeholder commit to pull in changes from "vfio-pci/zdev: Pass the relaxed alignment flag" and "vfio-pci/zdev: Introduce the PCISTB vfio region" Signed-off-by: Matthew Rosato --- include/standard-headers/asm-x86/kvm_para.h| 1 + .../infiniband/hw/vmw_pvrdma/pvrdma_verbs.h| 2 +

[Bug 1907497] [NEW] [OSS-Fuzz] Issue 28435 qemu:qemu-fuzz-i386-target-generic-fuzz-intel-hda: Stack-overflow in ldl_le_dma

2020-12-09 Thread Alexander Bulekov
Public bug reported: affects qemu === Reproducer (build with --enable-sanitizers) === cat << EOF | ./qemu-system-i386 -machine q35 -nodefaults \ -device intel-hda,id=hda0 -device hda-output,bus=hda0.0 \ -device hda-micro,bus=hda0.0 -device hda-duplex,bus=hda0.0 \ -qtest stdio outl 0xcf8 0x8

Re: [PATCH v3] tests/acceptance: test hot(un)plug of ccw devices

2020-12-09 Thread Willian Rampazzo
On 12/8/20 9:28 AM, Cornelia Huck wrote: Hotplug a virtio-net-ccw device, and then hotunplug it again. Signed-off-by: Cornelia Huck --- v2->v3: - do the dmesg cleanout and waiting for messages properly [Thomas] Wainer: I dropped your r-b, as there had been too many changes for me to b

[PATCH v5 3/4] crypto: luks: use bdrv_co_delete_file_noerr

2020-12-09 Thread Maxim Levitsky
This refactoring is now possible thanks to this function. Signed-off-by: Maxim Levitsky Reviewed-by: Alberto Garcia --- block/crypto.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/block/crypto.c b/block/crypto.c index b3a5275132..1d30fde38e 100644 --- a/b

[RFC 8/8] s390x/pci: PCILG via the vfio zPCI I/O region

2020-12-09 Thread Matthew Rosato
For ISM devices, use the vfio region to handle intercepted PCILG instructions. This will allow read I/Os intercepted from the guest to be performed as single operations that ensure the same non-MIO PCI instruction is used on the host as specified in the guest. Signed-off-by: Matthew Rosato ---

[PATCH v5 2/4] block: add bdrv_co_delete_file_noerr

2020-12-09 Thread Maxim Levitsky
This function wraps bdrv_co_delete_file for the common case of removing a file, which was just created by format driver, on an error condition. It hides the -ENOTSUPP error, and reports all other errors otherwise. Signed-off-by: Maxim Levitsky Reviewed-by: Alberto Garcia --- block.c

[RFC 7/8] s390x/pci: PCISTB via the vfio zPCI I/O region

2020-12-09 Thread Matthew Rosato
For ISM devices, use the vfio region to handle intercepted PCISTB instructions. This region will allow large block I/O instructions intercepted from the guest to be performed as a single I/O instruction on the host. This ensure that proper write patterns that are expected by the underlying device

[RFC 4/8] s390x/pci: Introduce the ZpciOps structure

2020-12-09 Thread Matthew Rosato
As inftrastructure to introduce different PCI instruction handlers, introduce the ZpciOps structure to contain function pointers for the handlers. Add default handlers for the PCISTG, PCILG and PCISTB instructions. Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-bus.c | 3 + hw/s

[PATCH v5 1/4] crypto: luks: Fix tiny memory leak

2020-12-09 Thread Maxim Levitsky
When the underlying block device doesn't support the bdrv_co_delete_file interface, an 'Error' object was leaked. Signed-off-by: Maxim Levitsky Reviewed-by: Alberto Garcia --- block/crypto.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/crypto.c b/block/crypto.c index aef5a5721a..

[RFC 3/8] s390x/pci: fix pcistb length

2020-12-09 Thread Matthew Rosato
In pcistb_service_call, we are grabbing 8 bits from a guest register to indicate the length of the store operation -- but per the architecture the length is actually defined by 13 bits of the guest register. Signed-off-by: Matthew Rosato Reviewed-by: Pierre Morel --- hw/s390x/s390-pci-inst.c |

[PATCH v5 0/4] qcow2: don't leave partially initialized file on image creation

2020-12-09 Thread Maxim Levitsky
Use the bdrv_co_delete_file interface to delete the underlying file if qcow2 initialization fails (e.g due to bad encryption secret) This makes the qcow2 driver behave the same way as the luks driver behaves. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1845353 V3: addressed review feedb

[RFC 6/8] s390x/pci: Handle devices that support relaxed alignment

2020-12-09 Thread Matthew Rosato
Certain zPCI device types (e.g. ISM) allow for a different set of address alignment rules for PCISTB instructions. Recognize this distinction and perform only a subset of alignment checks for intercepted PCISTB instructions. Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-inst.c| 34

[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 deletio

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

2020-12-09 Thread Maxim Levitsky
On Wed, 2020-12-09 at 18:41 +0100, Alberto Garcia wrote: > On Wed 09 Dec 2020 05:44:41 PM CET, Maxim Levitsky wrote: > > @@ -3847,12 +3847,13 @@ static int coroutine_fn > > qcow2_co_create_opts(BlockDriver *drv, > > > > /* Create the qcow2 image (format layer) */ > > ret = qcow2_co_cre

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; > > +} > > + > > +

[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 t

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;

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

2020-12-09 Thread Peter Maydell
On Wed, 9 Dec 2020 at 20:13, Richard Henderson wrote: > > 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 pro

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 > again

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

2020-12-09 Thread Peter Maydell
On Wed, 9 Dec 2020 at 09:49, Thomas Huth wrote: > > 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 tag

Re: [PATCH 0/3] sev: enable seret injection to a self described area in OVMF

2020-12-09 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20201209172334.14100-1-j...@linux.ibm.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20201209172334.14100-1-j...@linux.ibm.com Subject: [PATCH 0/3] sev: enable seret injection

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(&ram_block_discard_requirers); >> +return qatomic_read(&ram_block_discard_requirers) || >> + qatomic_read(&ram_b

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] 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 PATCH 16/27] virtio: Expose virtqueue_alloc_element

2020-12-09 Thread Eugenio Perez Martin
On Tue, Dec 8, 2020 at 9:26 AM Stefan Hajnoczi wrote: > > On Fri, Nov 20, 2020 at 07:50:54PM +0100, Eugenio Pérez wrote: > > Specify VirtQueueElement * as return type makes no harm at this moment. > > The reason for the void * return type is that C implicitly converts void > pointers to pointers o

[Bug 1818937] Re: Crash with HV_ERROR on macOS host

2020-12-09 Thread Brad Koehn
I'm getting this error immediately and consistently when trying to boot the Win10 ISO with the following command: $ qemu-system-x86_64 -M accel=hvf -cpu host -smp 2 -hda windows-image.img -cdrom Win10_20H2_English_x64.iso -m 8G -vga virtio -usb -device usb-tablet -display default -boot d qemu-s

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

2020-12-09 Thread Pankaj Gupta
> We want to separate the two cases whereby we discard ram > - uncoordinated: e.g., virito-balloon > - coordinated: e.g., virtio-mem coordinated via the RamDiscardMgr > > Cc: Paolo Bonzini > Cc: "Michael S. Tsirkin" > Cc: Alex Williamson > Cc: Dr. David Alan Gilbert > Cc: Igor Mammedov > Cc: P

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

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

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 confusin

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

2020-12-09 Thread Alex Bennée
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 >> >>> diff --git a/accel/tcg/tcg-cpus.c b/accel

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

2020-12-09 Thread Catalin Marinas
On Wed, Dec 09, 2020 at 12:27:59PM -0600, Richard Henderson wrote: > 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 easie

Re: [PATCH v2 09/10] virtio-mem: Require only coordinated discards

2020-12-09 Thread Pankaj Gupta
> We implement the RamDiscardMgr interface and only require coordinated > discarding of RAM to work. > > Reviewed-by: Dr. David Alan Gilbert > Cc: Paolo Bonzini > Cc: "Michael S. Tsirkin" > Cc: Alex Williamson > Cc: Dr. David Alan Gilbert > Cc: Igor Mammedov > Cc: Pankaj Gupta > Cc: Peter Xu

Re: [PATCH v2 02/10] virtio-mem: Factor out traversing unplugged ranges

2020-12-09 Thread Pankaj Gupta
> Let's factor out the core logic, to be reused soon. > > Cc: Paolo Bonzini > Cc: "Michael S. Tsirkin" > Cc: Alex Williamson > Cc: Dr. David Alan Gilbert > Cc: Igor Mammedov > Cc: Pankaj Gupta > Cc: Peter Xu > Cc: Auger Eric > Cc: Wei Yang > Cc: teawater > Cc: Marek Kedzierski > Signed-o

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 in

Re: [PATCH v3] tests/acceptance: test hot(un)plug of ccw devices

2020-12-09 Thread Philippe Mathieu-Daudé
On 12/9/20 7:22 PM, Cornelia Huck wrote: > On Wed, 9 Dec 2020 19:09:25 +0100 > Philippe Mathieu-Daudé wrote: > >> Hi Paolo, Fam, >> >> On 12/8/20 1:28 PM, Cornelia Huck wrote: >>> Hotplug a virtio-net-ccw device, and then hotunplug it again. >>> >>> Signed-off-by: Cornelia Huck >>> --- >>> v2->v

Re: [RFC PATCH 18/27] vhost: add vhost_vring_poll_rcu

2020-12-09 Thread Eugenio Perez Martin
On Tue, Dec 8, 2020 at 9:42 AM Stefan Hajnoczi wrote: > > On Fri, Nov 20, 2020 at 07:50:56PM +0100, Eugenio Pérez wrote: > > @@ -83,6 +89,18 @@ void > > vhost_vring_set_notification_rcu(VhostShadowVirtqueue *vq, bool enable) > > smp_mb(); > > } > > > > +bool vhost_vring_poll_rcu(VhostShadow

Re: [PATCH v1 6/6] gitlab: add --without-default-features build

2020-12-09 Thread Alex Bennée
Thomas Huth writes: > On 09/12/2020 18.00, Alex Bennée wrote: >> Signed-off-by: Alex Bennée >> --- >> .gitlab-ci.yml | 7 +++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml >> index 878d114d40..f87584ca8f 100644 >> --- a/.gitlab-ci.yml >> +++ b/.git

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

2020-12-09 Thread Eduardo Habkost
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; i++) { > -spapr_reset_vcpu(sc->threads[i]); > +

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 th

Re: [PATCH v2 01/10] memory: Introduce RamDiscardMgr for RAM memory regions

2020-12-09 Thread Pankaj Gupta
> We have some special RAM memory regions (managed by virtio-mem), whereby > the guest agreed to only use selected memory ranges. "unused" parts are > discarded so they won't consume memory - to logically unplug these memory > ranges. Before the VM is allowed to use such logically unplugged memory

Re: [PATCH v3] tests/acceptance: test hot(un)plug of ccw devices

2020-12-09 Thread Cornelia Huck
On Wed, 9 Dec 2020 19:09:25 +0100 Philippe Mathieu-Daudé wrote: > Hi Paolo, Fam, > > On 12/8/20 1:28 PM, Cornelia Huck wrote: > > Hotplug a virtio-net-ccw device, and then hotunplug it again. > > > > Signed-off-by: Cornelia Huck > > --- > > v2->v3: > > - do the dmesg cleanout and waiting for m

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

2020-12-09 Thread Eduardo Habkost
On Wed, Dec 09, 2020 at 09:42:25AM +, Daniel P. Berrangé wrote: > 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 > > tha

[PULL v2 62/65] x86: ich9: let firmware negotiate 'CPU hot-unplug with SMI' feature

2020-12-09 Thread Michael S. Tsirkin
From: Igor Mammedov Keep CPU hotunplug with SMI disabled on 5.2 and older and enable it by default on newer machine types. Signed-off-by: Igor Mammedov Message-Id: <20201207140739.3829993-9-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/pc.

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 th

Re: [RFC PATCH 10/27] vhost: Allocate shadow vring

2020-12-09 Thread Eugenio Perez Martin
On Tue, Dec 8, 2020 at 9:18 AM Stefan Hajnoczi wrote: > > On Fri, Nov 20, 2020 at 07:50:48PM +0100, Eugenio Pérez wrote: > > Signed-off-by: Eugenio Pérez > > --- > > hw/virtio/vhost-sw-lm-ring.c | 7 ++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/hw/virtio/vhost-

[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 Sig

[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(-) dif

[PULL v2 65/65] hw/virtio-pci Added AER capability.

2020-12-09 Thread Michael S. Tsirkin
From: Andrew Melnychenko Added AER capability for virtio-pci devices. Also added property for devices, by default AER is disabled. Signed-off-by: Andrew Melnychenko Message-Id: <20201203110713.204938-3-and...@daynix.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- h

[PULL v2 61/65] x86: ich9: factor out "guest_cpu_hotplug_features"

2020-12-09 Thread Michael S. Tsirkin
From: Igor Mammedov it will be reused by next patch to check validity of unplug feature. Signed-off-by: Igor Mammedov Message-Id: <20201207140739.3829993-8-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/isa/lpc_ich9.c | 8 ++-- 1 file change

[PULL v2 64/65] hw/virtio-pci Added counter for pcie capabilities offsets.

2020-12-09 Thread Michael S. Tsirkin
From: Andrew Melnychenko Removed hardcoded offset for ats. Added cap offset counter for future capabilities like AER. Signed-off-by: Andrew Melnychenko Message-Id: <20201203110713.204938-2-and...@daynix.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virt

[PULL v2 63/65] pcie_aer: Fix help message of pcie_aer_inject_error command

2020-12-09 Thread Michael S. Tsirkin
From: Zenghui Yu There is an interesting typo in the help message of pcie_aer_inject_error command. Use 'tlp' instead of 'tlb' to match the PCIe AER term. Signed-off-by: Zenghui Yu Message-Id: <20201204030953.837-1-yuzeng...@huawei.com> Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Michael

[PULL v2 39/65] failover: We don't need to cache primary_device_id anymore

2020-12-09 Thread Michael S. Tsirkin
From: Juan Quintela Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-25-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| 20 ++-- 2 files changed, 10

[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 (0

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 currently

[PULL v2 60/65] tests/acpi: update expected files

2020-12-09 Thread Michael S. Tsirkin
From: Igor Mammedov update expected files with following change: @@ -557,6 +557,7 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPCDSDT", 0x0001) CINS, 1, CRMV, 1, CEJ0, 1, +CEJF, 1, Offset (0x05),

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

2020-12-09 Thread Michael S. Tsirkin
From: Juan Quintela We don't need to walk the opts by hand. qmp_opt_get() already does that. And then we can remove the functions that did that walk. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-21-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S

[PULL v2 54/65] block/export: 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 Sig

[PULL v2 59/65] x86: acpi: let the firmware handle pending "CPU remove" events in SMM

2020-12-09 Thread Michael S. Tsirkin
From: Igor Mammedov if firmware and QEMU negotiated CPU hotunplug support, generate _EJ0 method so that it will mark CPU for removal by firmware and pass control to it by triggering SMI. Signed-off-by: Igor Mammedov Message-Id: <20201207140739.3829993-6-imamm...@redhat.com> Reviewed-by: Michael

[PULL v2 56/65] acpi: cpuhp: introduce 'firmware performs eject' status/control bits

2020-12-09 Thread Michael S. Tsirkin
From: Igor Mammedov Adds bit #4 to status/control field of CPU hotplug MMIO interface. New bit will be used OSPM to mark CPUs as pending for removal by firmware, when it calls _EJ0 method on CPU device node. Later on, when firmware sees this bit set, it will perform CPU eject which will clear bit

  1   2   3   4   >