Re: [PATCH qemu v10] spapr: Implement Open Firmware client interface

2020-10-30 Thread Alexey Kardashevskiy
Has anyone at least tried this, or everybody is busy KVMforuming? :) On 13/10/2020 13:19, Alexey Kardashevskiy wrote: The PAPR platform which describes an OS environment that's presented by a combination of a hypervisor and firmware. The features it specifies require collaboration between the

Re: [PATCH v2 8/8] target/ppc: replaced the TODO with LOG_UNIMP and add break for silence warnings

2020-10-30 Thread David Gibson
On Fri, Oct 30, 2020 at 08:40:46AM +0800, Chen Qun wrote: > When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning: > target/ppc/mmu_helper.c: In function ‘dump_mmu’: > target/ppc/mmu_helper.c:1351:12: warning: this statement may fall through > [-Wimplicit-fallthrough=] > 13

Re: [PATCH v2 7/8] ppc: Add a missing break for PPC6xx_INPUT_TBEN

2020-10-30 Thread David Gibson
On Fri, Oct 30, 2020 at 08:40:45AM +0800, Chen Qun wrote: > When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning: > hw/ppc/ppc.c: In function ‘ppc6xx_set_irq’: > hw/ppc/ppc.c:118:16: warning: this statement may fall through > [-Wimplicit-fallthrough=] > 118 |

[PATCH V2] hw/display/omap_lcdc: Fix potential NULL pointer dereference

2020-10-30 Thread AlexChen
In omap_lcd_interrupts(), the pointer omap_lcd is dereferinced before being check if it is valid, which may lead to NULL pointer dereference. So move the assignment to surface after checking that the omap_lcd is valid and move surface_bits_per_pixel(surface) to after the surface assignment. Report

Re: [PATCH] hw/display/omap_lcdc: Fix potential NULL pointer dereference

2020-10-30 Thread AlexChen
On 2020/10/30 22:35, Peter Maydell wrote: > On Fri, 30 Oct 2020 at 14:29, Peter Maydell wrote: >> >> On Fri, 30 Oct 2020 at 10:23, AlexChen wrote: >>> >>> In omap_lcd_interrupts(), the pointer omap_lcd is dereferenced before >>> being check if it is valid, which may lead to NULL pointer dereferen

Re: [PATCH] hw/display/exynos4210_fimd: Fix potential NULL pointer dereference

2020-10-30 Thread AlexChen
On 2020/10/30 22:28, Peter Maydell wrote: > On Fri, 30 Oct 2020 at 10:23, AlexChen wrote: >> >> In exynos4210_fimd_update(), the pointer s is dereferenced before >> being check if it is valid, which may lead to NULL pointer dereference. >> So move the assignment to global_width after checking that

Re: RFC: Fast Migration for SEV and SEV-ES - blueprint and proof of concept

2020-10-30 Thread Tobin Feldman-Fitzthum
On 2020-10-30 16:02, Dr. David Alan Gilbert wrote: * Tobin Feldman-Fitzthum (to...@linux.ibm.com) wrote: Hello, Dov Murik, James Bottomley, Hubertus Franke, and I have been working on a plan for fast live migration with SEV and SEV-ES. We just posted an RFC about it to the edk2 list. It inclu

Re: [PATCH 34/36] machine: Use DEFINE_PROP_STRING for string properties

2020-10-30 Thread Eduardo Habkost
On Fri, Oct 30, 2020 at 09:41:46PM +0100, Paolo Bonzini wrote: > Il ven 30 ott 2020, 21:03 Eduardo Habkost ha scritto: > > > > OBJECT_CLASS_PROPERTY_ADD_STR(oc, MachineState, kernel_filename, > > > "kernel", prop_allow_set_always); > > > > I like the idea of

Re: [PATCH 34/36] machine: Use DEFINE_PROP_STRING for string properties

2020-10-30 Thread Paolo Bonzini
Il ven 30 ott 2020, 21:03 Eduardo Habkost ha scritto: > > OBJECT_CLASS_PROPERTY_ADD_STR(oc, MachineState, kernel_filename, > > "kernel", prop_allow_set_always); > > I like the idea of having an interface like this, but I would > like to avoid having to write

[PATCH 19/20] filter-buffer: Remove unnecessary prefix from error message

2020-10-30 Thread Eduardo Habkost
object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost --- Cc: Jason Wang Cc: qemu-devel@nongnu.org --- net/filter-buffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/filter-buffer.c b/ne

[PATCH 17/20] colo-compare: Remove unnecessary prefix from error message

2020-10-30 Thread Eduardo Habkost
object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost --- Cc: Zhang Chen Cc: Li Zhijian Cc: Jason Wang Cc: qemu-devel@nongnu.org --- net/colo-compare.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-)

[PATCH 14/20] i386: Remove unnecessary prefix from error message

2020-10-30 Thread Eduardo Habkost
object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH 11/20] tpm_util: Remove unnecessary prefix from error message

2020-10-30 Thread Eduardo Habkost
object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost --- Cc: Stefan Berger Cc: qemu-devel@nongnu.org --- backends/tpm/tpm_util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backends/tpm/tpm_

[PULL v2 10/12] block: Return depth level during bdrv_is_allocated_above

2020-10-30 Thread Eric Blake
When checking for allocation across a chain, it's already easy to count the depth within the chain at which the allocation is found. Instead of throwing that information away, return it to the caller. Existing callers only cared about allocated/non-allocated, but having a depth available will be us

[PATCH 09/20] cryptodev: Remove unnecessary prefix from error message

2020-10-30 Thread Eduardo Habkost
object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost --- Cc: "Gonglei (Arei)" Cc: qemu-devel@nongnu.org --- backends/cryptodev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backends/cryptode

[PULL v2 00/12] NBD patches for 2020-10-27 soft-freeze

2020-10-30 Thread Eric Blake
The following changes since commit 9a2ea4f4a7230fe224dee91d9adf2ef872c3d226: Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-for-5.2-pull-request' into staging (2020-10-30 15:49:35 +) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git tags/pull-

[PATCH 07/20] qdev: Stop using error_set_from_qdev_prop_error() for css devno property

2020-10-30 Thread Eduardo Habkost
Just setting a reasonable error string using error_setg() is simpler and makes error messages clearer. Before: $ qemu-system-s390x -device x-terminal3270,devno=x qemu-system-s390x: -device x-terminal3270,devno=x: Property 'x-terminal3270.devno' doesn't take value 'x' After: $ qemu-system

[PATCH 08/20] qdev: Delete unused error_set_from_qdev_prop_error() function

2020-10-30 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- include/hw/qdev-properties.h | 2 -- hw/core/qdev-properties.c| 22 -- 2 files changed, 24 deletions(-) diff --git a/include/hw/qdev-propert

[PATCH 20/20] qom: Remove error prefix check at object_property_parse()

2020-10-30 Thread Eduardo Habkost
All existing "Property '.' ..." error messages were rewritten, we can now add the error message prefix unconditionally. Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- qom/object.c | 10 ++ 1 file changed,

[PATCH 16/20] nvdimm: Remove unnecessary prefix from error message

2020-10-30 Thread Eduardo Habkost
object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost --- Cc: Xiao Guangrong Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: qemu-devel@nongnu.org --- hw/mem/nvdimm.c | 6 ++ 1 file changed, 2 insertions(+), 4 de

[PATCH 06/20] qdev: Stop using error_set_from_qdev_prop_error() for PCI host device property

2020-10-30 Thread Eduardo Habkost
Just setting a reasonable error string using error_setg() is simpler and makes error messages clearer. Before: $ qemu-system-x86_64 -device vfio-pci,host=x qemu-system-x86_64: -device vfio-pci,host=x: Property 'vfio-pci.host' doesn't take value 'x' After: $ qemu-system-x86_64 -device vfi

[PATCH 15/20] qerror: Delete unused QERR_PROPERTY_VALUE_BAD macro

2020-10-30 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- Cc: Markus Armbruster Cc: qemu-devel@nongnu.org --- include/qapi/qmp/qerror.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 7c76e24aa7..646a42c4b4 100644 --- a/include/qapi/qmp/qerror.h +++ b/i

[PATCH 13/20] qdev: chardev: Remove unnecessary prefix from error message

2020-10-30 Thread Eduardo Habkost
object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- hw/core/qdev-properties-system.c | 8 +++- 1 file changed, 3

[PATCH 18/20] filter-dump: Remove unnecessary prefix from error message

2020-10-30 Thread Eduardo Habkost
object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost --- Cc: Jason Wang Cc: qemu-devel@nongnu.org --- net/dump.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/dump.c b/net/dump.c index 7fd

[PATCH 12/20] qdev: drive: Remove unnecessary prefix from error message

2020-10-30 Thread Eduardo Habkost
object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- hw/core/qdev-properties-system.c | 3 +-- 1 file changed, 1 inse

[PATCH 05/20] qdev: Stop using error_set_from_qdev_prop_error() for devfn property

2020-10-30 Thread Eduardo Habkost
Just setting a reasonable error string using error_setg() is simpler and makes error messages clearer. Before: $ qemu-system-x86_64 -device e1000,addr=x qemu-system-x86_64: -device e1000,addr=x: Property 'e1000.addr' doesn't take value 'x' After: $ qemu-system-x86_64 -device e1000,addr=x

[PATCH 10/20] memfd: Remove unnecessary prefix from error message

2020-10-30 Thread Eduardo Habkost
object_property_parse() will add a "Property '.' can't take value ''" prefix automatically for us. Signed-off-by: Eduardo Habkost --- Cc: Eduardo Habkost Cc: Igor Mammedov Cc: qemu-devel@nongnu.org --- backends/hostmem-memfd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --g

[PATCH 02/20] qdev: Stop using error_set_from_qdev_prop_error() for netdev property

2020-10-30 Thread Eduardo Habkost
Just setting a reasonable error string using error_setg() is simpler and makes error messages clearer. Before: $ qemu-system-x86_64 -device e1000,netdev=n0 qemu-system-x86_64: -device e1000,netdev=n0: Property 'e1000.netdev' can't find value 'n0' $ qemu-system-x86_64 -netdev id=n0,type=use

[PATCH 01/20] qom: Add prefix to error message inside object_property_parse()

2020-10-30 Thread Eduardo Habkost
Make object_property_parse() automatically add a error message prefix mentioning the QOM type and property name when encountering errors. As we have a large number of functions that add their own "Property '...'" to the error messages, add a temporary check for existing prefixes before prepending

[PATCH 04/20] qdev: Stop using error_set_from_qdev_prop_error() for mac property

2020-10-30 Thread Eduardo Habkost
Just setting a reasonable error string using error_setg() is simpler and makes error messages clearer. Before: $ qemu-system-x86_64 -device e1000,mac=x qemu-system-x86_64: -device e1000,mac=x: Property 'e1000.mac' doesn't take value 'x' After: $ qemu-system-x86_64 -device e1000,mac=x q

[PATCH 03/20] qdev: Stop using error_set_from_qdev_prop_error() for audiodev property

2020-10-30 Thread Eduardo Habkost
Just setting a reasonable error string using error_setg() is simpler and makes error messages clearer. Before: $ qemu-system-x86_64 -device AC97,audiodev=a0 qemu-system-x86_64: -device AC97,audiodev=a0: Property 'AC97.audiodev' can't find value 'a0' After: $ ./qemu-system-x86_64 -device

[PATCH 00/20] qdev/qom: Remove explicit type names from error_setg() calls

2020-10-30 Thread Eduardo Habkost
Based-on: 20201029220246.472693-1-ehabk...@redhat.com Git branch: https://gitlab.com/ehabkost/qemu/-/commits/work/prop-error-reporting One of the obstacles when refactoring the QOM property parsing code are the references to the object itself in the error code, to generate "Property '.' can't take

Re: [PULL 00/12] NBD patches for 2020-10-27 soft-freeze

2020-10-30 Thread Eric Blake
On 10/27/20 4:59 PM, Eric Blake wrote: > The following changes since commit 725ca3313a5b9cbef89eaa1c728567684f37990a: > > Merge remote-tracking branch > 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20201026' into staging > (2020-10-27 14:29:52 +) > > are available in the Git repository at:

Re: [PATCH 34/36] machine: Use DEFINE_PROP_STRING for string properties

2020-10-30 Thread Eduardo Habkost
On Fri, Oct 30, 2020 at 06:10:34PM +0100, Paolo Bonzini wrote: > On 29/10/20 23:02, Eduardo Habkost wrote: > > +static Property machine_props[] = { > > +DEFINE_PROP_STRING("kernel", MachineState, kernel_filename), > > +DEFINE_PROP_STRING("initrd", MachineState, initrd_filename), > > +DE

Re: [PATCH 0/2] docs: Fix building with Sphinx 3.2

2020-10-30 Thread Peter Maydell
On Fri, 30 Oct 2020 at 19:12, Peter Maydell wrote: > > On Fri, 30 Oct 2020 at 18:20, Paolo Bonzini wrote: > > > > On 30/10/20 18:46, Peter Maydell wrote: > > > > > > This does mean our kernel-doc gets another patch that makes > > > it diverge a little from the kernel's version, but we already > >

Re: RFC: Fast Migration for SEV and SEV-ES - blueprint and proof of concept

2020-10-30 Thread Dr. David Alan Gilbert
* Tobin Feldman-Fitzthum (to...@linux.ibm.com) wrote: > Hello, > > Dov Murik, James Bottomley, Hubertus Franke, and I have been working on a > plan for fast live migration with SEV and SEV-ES. We just posted an RFC > about it to the edk2 list. It includes a proof-of-concept for what we feel > to b

[Bug 1902306] [NEW] Allow setting usb storage device ID parameters

2020-10-30 Thread Greg Zdanowski
Public bug reported: Some stubborn software requires certain VID/PID/Serial to authenticate and refuses to start in emulation. This poses a problem with unsupported programs which often require keeping an ancient hardware praying that the USB stick will not die before the (often defunct) company m

Re: [PULL 0/8] Trivial branch for 5.2 patches

2020-10-30 Thread Peter Maydell
On Tue, 27 Oct 2020 at 16:33, Laurent Vivier wrote: > > The following changes since commit 4c5b97bfd0dd54dc27717ae8d1cd10e14eef1430: > > Merge remote-tracking branch 'remotes/kraxel/tags/modules-20201022-pull-req= > uest' into staging (2020-10-22 12:33:21 +0100) > > are available in the Git repo

Re: [PATCH] target/arm: Get correct MMU index for other-security-state

2020-10-30 Thread Richard Henderson
On 10/22/20 9:44 AM, Peter Maydell wrote: > In arm_v7m_mmu_idx_for_secstate() we get the 'priv' level to pass to > armv7m_mmu_idx_for_secstate_and_priv() by calling arm_current_el(). > This is incorrect when the security state being queried is not the > current one, because arm_current_el() uses th

Re: [PATCH v4] introduce vfio-user protocol specification

2020-10-30 Thread Stefan Hajnoczi
On Thu, Oct 15, 2020 at 2:39 PM Felipe Franciosi wrote: > > On Oct 13, 2020, at 10:30 AM, Stefan Hajnoczi wrote:> > > > > > On Fri, Oct 02, 2020 at 10:14:23AM +, Felipe Franciosi wrote: > >>> On Sep 30, 2020, at 3:24 PM, Stefan Hajnoczi wrote: > >>> On Tue, Sep 29, 2020 at 09:21:54AM -0700,

Re: [PATCH 0/2] docs: Fix building with Sphinx 3.2

2020-10-30 Thread Peter Maydell
On Fri, 30 Oct 2020 at 18:20, Paolo Bonzini wrote: > > On 30/10/20 18:46, Peter Maydell wrote: > > > > This does mean our kernel-doc gets another patch that makes > > it diverge a little from the kernel's version, but we already > > have one of those (commit 152d1967f650f67b7e). I do want to > > t

Re: [PATCH v2 00/19] Mirror map JIT memory for TCG

2020-10-30 Thread Richard Henderson
On 10/30/20 11:26 AM, Paolo Bonzini wrote: > On 30/10/20 01:49, Richard Henderson wrote: >> Fourth, I have renamed the command-line parameter to "split-rwx". > > Stupid observation, but wouldn't it be "split-wx"? Um, yes. ;-) r~

Re: [PATCH] hw/arm/boot: fix SVE for EL3 direct kernel boot

2020-10-30 Thread Richard Henderson
On 10/30/20 8:15 AM, r...@remlab.net wrote: > From: Rémi Denis-Courmont > > When booting a CPU with EL3 using the -kernel flag, set up CPTR_EL3 so > that SVE will not trap to EL3. > > Signed-off-by: Rémi Denis-Courmont > --- > hw/arm/boot.c | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-

Re: [PATCH-for-5.2 v2] hw/rx/rx-gdbsim: Fix memory leak

2020-10-30 Thread Richard Henderson
On 10/30/20 6:49 AM, Philippe Mathieu-Daudé wrote: > As load_device_tree() returns allocated memory, > we need to free it. > > Cc: Yoshinori Sato > Fixes: bda19d7bb56 ("hw/rx: Add RX GDB simulator") > Reported-by: Coverity (CID 1432307: RESOURCE_LEAK) > Signed-off-by: Philippe Mathieu-Daudé > --

Re: [PATCH] target/unicore32/translate: Add missing fallthrough annotations

2020-10-30 Thread Richard Henderson
On 10/30/20 2:31 AM, Thomas Huth wrote: > Looking at the way the code is formatted here (there is an empty > line after break statements, but none where the break is missing), > the fallthrough is very likely intended here. So add a fallthrough > comment to make the it compilable with -Werror=impli

Re: [PATCH v2 00/19] Mirror map JIT memory for TCG

2020-10-30 Thread Paolo Bonzini
On 30/10/20 01:49, Richard Henderson wrote: > Fourth, I have renamed the command-line parameter to "split-rwx". Stupid observation, but wouldn't it be "split-wx"? Thanks, Paolo > I don't think this is perfect, and I'm not even sure if it's better > than "mirror-jit". What this has done, though

Re: [PATCH 0/2] docs: Fix building with Sphinx 3.2

2020-10-30 Thread Paolo Bonzini
On 30/10/20 18:46, Peter Maydell wrote: > > This does mean our kernel-doc gets another patch that makes > it diverge a little from the kernel's version, but we already > have one of those (commit 152d1967f650f67b7e). I do want to > try to upstream these to the kernel, but that will require > more

Re: [PATCH v10 10/10] vfio: Don't issue full 2^64 unmap

2020-10-30 Thread Paolo Bonzini
On 30/10/20 18:26, Alex Williamson wrote: >> >> if (try_unmap) { >> +if (llsize == int128_2_64()) { >> +/* The unmap ioctl doesn't accept a full 64-bit span. */ >> +llsize = int128_rshift(llsize, 1); >> +ret = vfio_dma_unmap(container, iova, int128

[PATCH v11 10/10] vfio: Don't issue full 2^64 unmap

2020-10-30 Thread Jean-Philippe Brucker
IOMMUs may declare memory regions spanning from 0 to UINT64_MAX. When attempting to deal with such region, vfio_listener_region_del() passes a size of 2^64 to int128_get64() which throws an assertion failure. Even ignoring this, the VFIO_IOMMU_DMA_MAP ioctl cannot handle this size since the size f

[PATCH v11 03/10] virtio-iommu: Add memory notifiers for map/unmap

2020-10-30 Thread Jean-Philippe Brucker
From: Bharat Bhushan Extend VIRTIO_IOMMU_T_MAP/UNMAP request to notify memory listeners. It will call VFIO notifier to map/unmap regions in the physical IOMMU. Signed-off-by: Bharat Bhushan Signed-off-by: Eric Auger Signed-off-by: Jean-Philippe Brucker --- v11: * Forward permissions from the

[PATCH v11 09/10] virtio-iommu: Set supported page size mask

2020-10-30 Thread Jean-Philippe Brucker
From: Bharat Bhushan The virtio-iommu device can deal with arbitrary page sizes for virtual endpoints, but for endpoints assigned with VFIO it must follow the page granule used by the host IOMMU driver. Implement the interface to set the vIOMMU page size mask, called by VFIO for each endpoint. W

[PATCH v11 07/10] memory: Add interface to set iommu page size mask

2020-10-30 Thread Jean-Philippe Brucker
From: Bharat Bhushan Allow to set the page size mask supported by an iommu memory region. This enables a vIOMMU to communicate the page size granule supported by an assigned device, on hosts that use page sizes greater than 4kB. Acked-by: Peter Xu Reviewed-by: Eric Auger Signed-off-by: Bharat

[PATCH v11 01/10] virtio-iommu: Fix virtio_iommu_mr()

2020-10-30 Thread Jean-Philippe Brucker
Due to an invalid mask, virtio_iommu_mr() may return the wrong memory region. It hasn't been too problematic so far because the function was only used to test existence of an endpoint, but that is about to change. Fixes: cfb42188b24d ("virtio-iommu: Implement attach/detach command") Cc: QEMU Stabl

[PATCH v11 02/10] virtio-iommu: Store memory region in endpoint struct

2020-10-30 Thread Jean-Philippe Brucker
Store the memory region associated to each endpoint into the endpoint structure, to allow efficient memory notification on map/unmap. Acked-by: Eric Auger Signed-off-by: Jean-Philippe Brucker --- hw/virtio/virtio-iommu.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --

[PATCH v11 08/10] vfio: Set IOMMU page size as per host supported page size

2020-10-30 Thread Jean-Philippe Brucker
From: Bharat Bhushan Set IOMMU supported page size mask same as host Linux supported page size mask. Acked-by: Alex Williamson Reviewed-by: Eric Auger Signed-off-by: Bharat Bhushan Signed-off-by: Jean-Philippe Brucker --- --- hw/vfio/common.c | 8 1 file changed, 8 insertions(+) d

[PATCH v11 00/10] virtio-iommu: VFIO integration

2020-10-30 Thread Jean-Philippe Brucker
This series adds support for VFIO endpoints to virtio-iommu. Since [v10] I addressed the review comments, and changed the logic of patch 9 for setting the page mask, as discussed. Please see individual changelogs for details. [v10] https://lore.kernel.org/qemu-devel/20201008171558.410886-1-jean-p

[PATCH v11 04/10] virtio-iommu: Call memory notifiers in attach/detach

2020-10-30 Thread Jean-Philippe Brucker
From: Bharat Bhushan Call the memory notifiers when attaching an endpoint to a domain, to replay existing mappings, and when detaching the endpoint, to remove all mappings. Signed-off-by: Bharat Bhushan Signed-off-by: Jean-Philippe Brucker --- v11: Pass mapping permissions to the notifiers ---

[PATCH v11 06/10] virtio-iommu: Add notify_flag_changed() memory region callback

2020-10-30 Thread Jean-Philippe Brucker
From: Bharat Bhushan Add notify_flag_changed() to notice when memory listeners are added and removed. Acked-by: Eric Auger Signed-off-by: Bharat Bhushan Signed-off-by: Jean-Philippe Brucker --- v11: improve tracepoint string --- hw/virtio/virtio-iommu.c | 14 ++ hw/virtio/trace-e

[PATCH v11 05/10] virtio-iommu: Add replay() memory region callback

2020-10-30 Thread Jean-Philippe Brucker
From: Bharat Bhushan Implement the replay callback to setup all mappings for a new memory region. Signed-off-by: Bharat Bhushan Signed-off-by: Jean-Philippe Brucker --- v11: Don't notify unmap before map, add permission flags --- hw/virtio/virtio-iommu.c | 40 +

RFC: Fast Migration for SEV and SEV-ES - blueprint and proof of concept

2020-10-30 Thread Tobin Feldman-Fitzthum
Hello, Dov Murik, James Bottomley, Hubertus Franke, and I have been working on a plan for fast live migration with SEV and SEV-ES. We just posted an RFC about it to the edk2 list. It includes a proof-of-concept for what we feel to be the most difficult part of fast live migration with SEV-ES.

Re: [PATCH 1/2] scripts/kerneldoc: For Sphinx 3 use c:macro for macros with arguments

2020-10-30 Thread Daniel P . Berrangé
On Fri, Oct 30, 2020 at 05:46:59PM +, Peter Maydell wrote: > The kerneldoc script currently emits Sphinx markup for a macro with > arguments that uses the c:function directive. This is correct for > Sphinx versions earlier than Sphinx 3, where c:macro doesn't allow > documentation of macros wit

Re: [PATCH 2/2] qemu-option-trace.rst.inc: Don't use option:: markup

2020-10-30 Thread Daniel P . Berrangé
On Fri, Oct 30, 2020 at 05:47:00PM +, Peter Maydell wrote: > Sphinx 3.2 is pickier than earlier versions about the option:: markup, > and complains about our usage in qemu-option-trace.rst: > > ../../docs/qemu-option-trace.rst.inc:4:Malformed option description > '[enable=]PATTERN', should l

[PATCH 2/2] qemu-option-trace.rst.inc: Don't use option:: markup

2020-10-30 Thread Peter Maydell
Sphinx 3.2 is pickier than earlier versions about the option:: markup, and complains about our usage in qemu-option-trace.rst: ../../docs/qemu-option-trace.rst.inc:4:Malformed option description '[enable=]PATTERN', should look like "opt", "-opt args", "--opt args", "/opt args" or "+opt args"

[PATCH 0/2] docs: Fix building with Sphinx 3.2

2020-10-30 Thread Peter Maydell
This patchseries fixes some issues with building our docs with Sphinx 3.2: * kerneldoc was using the 'c:function' directive for both functions and macros, but Sphinx 3.2 wants 'c:macro' for macros and complains if the argument to 'c:function' isn't parseable as a function declaration * q

[PATCH 1/2] scripts/kerneldoc: For Sphinx 3 use c:macro for macros with arguments

2020-10-30 Thread Peter Maydell
The kerneldoc script currently emits Sphinx markup for a macro with arguments that uses the c:function directive. This is correct for Sphinx versions earlier than Sphinx 3, where c:macro doesn't allow documentation of macros with arguments and c:function is not picky about the syntax of what it is

Re: [PATCH v10 10/10] vfio: Don't issue full 2^64 unmap

2020-10-30 Thread Alex Williamson
On Fri, 30 Oct 2020 06:25:34 -0400 "Michael S. Tsirkin" wrote: > On Thu, Oct 08, 2020 at 03:22:14PM -0600, Alex Williamson wrote: > > On Thu, 8 Oct 2020 19:15:58 +0200 > > Jean-Philippe Brucker wrote: > > > > > IOMMUs may declare memory regions spanning from 0 to UINT64_MAX. When > > > attem

Re: [PATCH v8 07/11] hw/block/nvme: Support Zoned Namespace Command Set

2020-10-30 Thread Niklas Cassel
On Fri, Oct 30, 2020 at 11:32:38AM +0900, Dmitry Fomichev wrote: > The emulation code has been changed to advertise NVM Command Set when > "zoned" device property is not set (default) and Zoned Namespace > Command Set otherwise. > > Define values and structures that are needed to support Zoned > N

Re: --enable-xen on gitlab CI? (was Re: [PATCH 09/36] qdev: Make qdev_get_prop_ptr() get Object* arg)

2020-10-30 Thread Paolo Bonzini
On 30/10/20 12:35, Eduardo Habkost wrote: > > What is necessary to make sure we have a CONFIG_XEN=y job in > gitlab CI? Maybe just including xen-devel in some of the > container images is enough? Fedora already has it, but build-system-fedora does not include x86_64-softmmu. Paolo

Re: [PATCH 34/36] machine: Use DEFINE_PROP_STRING for string properties

2020-10-30 Thread Paolo Bonzini
On 29/10/20 23:02, Eduardo Habkost wrote: > +static Property machine_props[] = { > +DEFINE_PROP_STRING("kernel", MachineState, kernel_filename), > +DEFINE_PROP_STRING("initrd", MachineState, initrd_filename), > +DEFINE_PROP_STRING("append", MachineState, kernel_cmdline), > +DEFINE_P

Re: [PATCH 31/36] qdev: Stop using error_set_from_qdev_prop_error() for UUID property

2020-10-30 Thread Marc-André Lureau
On Fri, Oct 30, 2020 at 2:22 AM Eduardo Habkost wrote: > Just setting a reasonable error string using error_setg() is > simpler and makes error messages clearer. > > Before: > > $ qemu-system-x86_64 -device vmgenid,guid=x > qemu-system-x86_64: -device vmgenid,guid=x: Property 'vmgenid.guid' >

Re: [PATCH v5] introduce vfio-user protocol specification

2020-10-30 Thread John Levon
On Wed, Oct 28, 2020 at 04:41:31PM +, Thanos Makatos wrote: > FYI here's v5 of the vfio-user protocol, my --cc in git send-email got messed > up somehow Hi Thanos, this looks great, I just had some minor questions below. > Command Concurrency > --- > A client may pipeline mu

Re: [PATCH 30/36] qdev: Rename qdev_prop_* to prop_info_*

2020-10-30 Thread Marc-André Lureau
On Fri, Oct 30, 2020 at 2:19 AM Eduardo Habkost wrote: > The basic property types in qdev-properties.c are not going to be > qdev-specific anymore. Rename the variables to prop_info_*. > > Signed-off-by: Eduardo Habkost > Reviewed-by: Marc-André Lureau > --- > Cc: Paolo Bonzini > Cc: "Dani

Re: [PATCH 29/36] qdev: Move qdev_prop_tpm declaration to tpm_prop.h

2020-10-30 Thread Marc-André Lureau
On Fri, Oct 30, 2020 at 2:24 AM Eduardo Habkost wrote: > Move the variable declaration close to the macro that uses it. > > Signed-off-by: Eduardo Habkost > Reviewed-by: Marc-André Lureau > --- > Cc: Stefan Berger > Cc: Paolo Bonzini > Cc: "Daniel P. Berrangé" > Cc: Eduardo Habkost > Cc:

Re: [PATCH 28/36] qdev: Move core static property code to QOM

2020-10-30 Thread Marc-André Lureau
On Fri, Oct 30, 2020 at 2:17 AM Eduardo Habkost wrote: > Move the core of the static property code to qom/static-property.c. > > The actual property type implementations are still in > qdev-properties.c, they will be moved later. > > Signed-off-by: Eduardo Habkost > > Reviewed-by: Marc-André Lur

Re: [PATCH 27/36] qdev: Reuse DEFINE_PROP in all DEFINE_PROP_* macros

2020-10-30 Thread Marc-André Lureau
On Fri, Oct 30, 2020 at 2:23 AM Eduardo Habkost wrote: > Instead of duplicating the code that sets name, info, offset, > and does type checking, make DEFINE_PROP accept a variable number > of arguments and reuse it in all DEFINE_PROP_* macros. > > Signed-off-by: Eduardo Habkost > neat! and clev

Re: [PATCH 26/36] qdev: Move softmmu properties to qdev-properties-system.h

2020-10-30 Thread Marc-André Lureau
On Fri, Oct 30, 2020 at 2:17 AM Eduardo Habkost wrote: > Move the property types and property macros implemented in > qdev-properties-system.c to a new qdev-properties-system.h > header. > > Signed-off-by: Eduardo Habkost > Reviewed-by: Marc-André Lureau > --- > audio/audio.h

Re: [PATCH 23/36] qdev: Make qdev_propinfo_get_uint16() static

2020-10-30 Thread Marc-André Lureau
On Fri, Oct 30, 2020 at 2:20 AM Eduardo Habkost wrote: > There are no users of the function outside qdev-properties.c. > Make function static and rename it to get_uint16(). > > Signed-off-by: Eduardo Habkost > Reviewed-by: Marc-André Lureau > --- > Cc: Paolo Bonzini > Cc: "Daniel P. Berrang

Re: [PATCH 15/36] qdev: Make PropertyInfo.create return ObjectProperty*

2020-10-30 Thread Marc-André Lureau
On Fri, Oct 30, 2020 at 2:14 AM Eduardo Habkost wrote: > Signed-off-by: Eduardo Habkost > Reviewed-by: Marc-André Lureau > --- > Cc: Paolo Bonzini > Cc: "Daniel P. Berrangé" > Cc: Eduardo Habkost > Cc: qemu-devel@nongnu.org > --- > include/hw/qdev-properties.h | 2 +- > hw/core/qdev-pr

Re: [PATCH 24/36] qdev: Rename qdev_propinfo_* to object_propinfo_*

2020-10-30 Thread Marc-André Lureau
On Fri, Oct 30, 2020 at 2:13 AM Eduardo Habkost wrote: > These functions will be moved to be part of QOM, so rename them. > > Signed-off-by: Eduardo Habkost > Reviewed-by: Marc-André Lureau > --- > Cc: Paolo Bonzini > Cc: "Daniel P. Berrangé" > Cc: Eduardo Habkost > Cc: qemu-devel@nongnu

Re: [PATCH 21/36] qom: Add allow_set callback to ObjectProperty

2020-10-30 Thread Marc-André Lureau
On Fri, Oct 30, 2020 at 2:12 AM Eduardo Habkost wrote: > Note that this doesn't replace the check callback at > object*_property_add_link() (yet), because currently the link > property check callback needs to get the property value as > argument (despite this not being necessary in most cases). >

Re: [PATCH 22/36] qdev: Make qdev_prop_allow_set() a property allow_set callback

2020-10-30 Thread Marc-André Lureau
On Fri, Oct 30, 2020 at 2:15 AM Eduardo Habkost wrote: > This removes the last remaining DeviceState-specific line of code > inside qdev property registration code, and will allow us to make > static properties a core QOM feature. > > Signed-off-by: Eduardo Habkost > Reviewed-by: Marc-André Lu

[PATCH v10 8/8] tests/test-char.c: Wait for the chardev to connect in char_socket_client_dupid_test

2020-10-30 Thread Lukas Straub
A connecting chardev object has an additional reference by the connecting thread, so if the chardev is still connecting by the end of the test, then the chardev object won't be freed. This in turn means that the yank instance won't be unregistered and when running the next test-case yank_register_i

[PATCH v10 6/8] io: Document qmp oob suitability of qio_channel_shutdown and io_shutdown

2020-10-30 Thread Lukas Straub
Migration and yank code assume that qio_channel_shutdown is thread -safe and can be called from qmp oob handler. Document this after checking the code. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé --- include/io/channel.h | 5 - 1 file changed, 4 in

[PATCH v10 7/8] MAINTAINERS: Add myself as maintainer for yank feature

2020-10-30 Thread Lukas Straub
I'll maintain this for now as the colo usecase is the first user of this functionality. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8c744a9bdf..81288fd219 100644 --- a/MAINTAINER

[PATCH v10 3/8] chardev/char-socket.c: Add yank feature

2020-10-30 Thread Lukas Straub
Register a yank function to shutdown the socket on yank. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi --- chardev/char-socket.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 95e45812d5..5947c

[PATCH v10 4/8] migration: Add yank feature

2020-10-30 Thread Lukas Straub
Register yank functions on sockets to shut them down. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Acked-by: Dr. David Alan Gilbert --- migration/channel.c | 13 + migration/migration.c | 25 + migration/multifd.c | 10 ++

[PATCH v10 5/8] io/channel-tls.c: make qio_channel_tls_shutdown thread-safe

2020-10-30 Thread Lukas Straub
Make qio_channel_tls_shutdown thread-safe by using atomics when accessing tioc->shutdown. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé --- io/channel-tls.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/io/channel-tls.c b/io/c

[PATCH v10 1/8] Introduce yank feature

2020-10-30 Thread Lukas Straub
The yank feature allows to recover from hanging qemu by "yanking" at various parts. Other qemu systems can register themselves and multiple yank functions. Then all yank functions for selected instances can be called by the 'yank' out-of-band qmp command. Available instances can be queried by a 'qu

[PATCH v10 2/8] block/nbd.c: Add yank feature

2020-10-30 Thread Lukas Straub
Register a yank function which shuts down the socket and sets s->state = NBD_CLIENT_QUIT. This is the same behaviour as if an error occured. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi --- block/nbd.c | 154 +++- 1 file changed, 93 inser

[PATCH v10 0/8] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-10-30 Thread Lukas Straub
Hello Everyone, So here is v10. We still need ACKs from NBD and chardev maintainers. Changes: v10: -moved from qapi/misc.json to qapi/yank.json -rename 'blockdev' -> 'block-node' -document difference betwen migration yank instance and migrate_cancel -better document return values of yank comm

[Bug 1902267] Re: CPU not support 32-bit stack in 32-bit unreal mode

2020-10-30 Thread CandyMan
** Attachment removed: "my operating system" https://bugs.launchpad.net/qemu/+bug/1902267/+attachment/5429520/+files/FLATDOS.IMG ** Attachment added: "my operating system" https://bugs.launchpad.net/qemu/+bug/1902267/+attachment/5429530/+files/FLATDOS.IMG -- You received this bug notific

Re: [PATCH] target/s390x: fix execution with icount

2020-10-30 Thread Richard Henderson
On 10/30/20 1:36 AM, Pavel Dovgalyuk wrote: > This patch adds some gen_io_start() calls to allow execution > of s390x targets in icount mode with -smp 1. > It enables deterministic timers and record/replay features. Thanks for pointing this out. There are enough of these that I think it would be

[Bug 1902267] [NEW] CPU not support 32-bit stack in 32-bit unreal mode

2020-10-30 Thread CandyMan
Public bug reported: QEMU version 5.0.0 supports 32-bit and 16-bit unreal mode. Great! Unfortunately, QEMU does not support 32-bit stack in unreal 32-bit mode. After the INT instruction, the stack is switched to 16-bit, which should not be the case. At BOCHS, my code works 100%. At QEMU not work

Re: [RFC PATCH-for-5.2] tools/virtiofsd: Check vu_init() return value (CID 1435958)

2020-10-30 Thread Dr. David Alan Gilbert
* Philippe Mathieu-Daudé (phi...@redhat.com) wrote: > Since commit 6f5fd837889, vu_init() can fail if malloc() returns NULL. > > This fixes the following Coverity warning: > > CID 1435958 (#1 of 1): Unchecked return value (CHECKED_RETURN) > > Fixes: 6f5fd837889 ("libvhost-user: support many v

[Bug 1902262] [NEW] vmstate_load_state return error into virtio_load function

2020-10-30 Thread Jingtao
Public bug reported: Qemu version 4.2.1 In the function of virtio_load, the vmstate_load_state will return error in the following case. The virtio is legacy mode(disable-modern=on,disable-legacy=off), virtio_device is in reset state. In the the function of "vmstate_load_state", it will load all

Re: [PATCH] docs/system: Deprecate raspi2/raspi3 machine aliases

2020-10-30 Thread Philippe Mathieu-Daudé
On 10/30/20 3:33 PM, Peter Maydell wrote: > On Mon, 19 Oct 2020 at 09:23, Philippe Mathieu-Daudé wrote: >> >> Since commit aa35ec2213b ("hw/arm/raspi: Use more >> specific machine names") the raspi2/raspi3 machines >> have been renamed as raspi2b/raspi3b. >> >> As more Raspberry Pi 2/3 models are

Re: [PULL 0/5] Block layer patches

2020-10-30 Thread Peter Maydell
On Tue, 27 Oct 2020 at 15:15, Kevin Wolf wrote: > > The following changes since commit d55450df995d6223486db11c66491cbf6c131523: > > Merge remote-tracking branch > 'remotes/dgilbert/tags/pull-migration-20201026a' into staging (2020-10-27 > 10:25:42 +) > > are available in the Git repositor

Re: [PATCH v3 4/6] hw/misc: Add npcm7xx random number generator

2020-10-30 Thread Havard Skinnemoen
On Fri, Oct 30, 2020 at 6:34 AM Peter Maydell wrote: > > On Fri, 23 Oct 2020 at 22:06, Havard Skinnemoen > wrote: > > > > The RNG module returns a byte of randomness when the Data Valid bit is > > set. > > > > This implementation ignores the prescaler setting, and loads a new value > > into RNGD

Re: [PATCH v2 8/8] target/ppc: replaced the TODO with LOG_UNIMP and add break for silence warnings

2020-10-30 Thread Thomas Huth
On 30/10/2020 01.40, Chen Qun wrote: > When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning: > target/ppc/mmu_helper.c: In function ‘dump_mmu’: > target/ppc/mmu_helper.c:1351:12: warning: this statement may fall through > [-Wimplicit-fallthrough=] > 1351 | if (ppc6

Re: [PATCH v2 7/8] ppc: Add a missing break for PPC6xx_INPUT_TBEN

2020-10-30 Thread Thomas Huth
On 30/10/2020 01.40, Chen Qun wrote: > When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning: > hw/ppc/ppc.c: In function ‘ppc6xx_set_irq’: > hw/ppc/ppc.c:118:16: warning: this statement may fall through > [-Wimplicit-fallthrough=] > 118 | if (level) { >

  1   2   3   4   >