[Bug 1747393] Re: nvme is missing support for NVME_ADM_CMD_ASYNC_EV_REQ

2021-04-21 Thread Klaus Jensen
This was fixed in 5.2.0. ** Changed in: qemu Status: Incomplete => Fix Released ** Changed in: qemu Assignee: (unassigned) => Klaus Jensen (birkelund) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpa

Re: [PATCH v2] hw/riscv: Fix OT IBEX reset vector

2021-04-21 Thread Alexander Wagner
On 21.04.21 02:00, Alistair Francis wrote: On Tue, Apr 20, 2021 at 6:01 PM Alexander Wagner wrote: The IBEX documentation [1] specifies the reset vector to be "the most significant 3 bytes of the boot address and the reset value (0x80) as the least significant byte". [1] https://github.com/

Re: [RFC PATCH v2 0/6] hw/arm/virt: Introduce cpu topology support

2021-04-21 Thread wangyanan (Y)
Hey guys, any comments will be really welcomed and appreciated! 😉 Thanks, Yanan On 2021/4/13 16:07, Yanan Wang wrote: Hi, This series is a new version of [0] recently posted by Ying Fang to introduce cpu topology support for ARM platform. I have taken over his work about this now, thanks for hi

Re: [Virtio-fs] [for-6.1 2/2] virtiofsd: Add support for FUSE_SYNCFS request

2021-04-21 Thread Greg Kurz
On Tue, 20 Apr 2021 14:57:19 -0400 Vivek Goyal wrote: > On Mon, Apr 19, 2021 at 05:11:42PM +0200, Greg Kurz wrote: > > Honor the expected behavior of syncfs() to synchronously flush all > > data and metadata on linux systems. Like the ->sync_fs() superblock > > operation in the linux kernel, FUSE

[PATCH] mirror: stop cancelling in-flight requests on non-force cancel in READY

2021-04-21 Thread Vladimir Sementsov-Ogievskiy
If mirror is READY than cancel operation is not discarding the whole result of the operation, but instead it's a documented way get a point-in-time snapshot of source disk. So, we should not cancel any requests if mirror is READ and force=false. Let's fix that case. Note, that bug that we have be

[PATCH RFC v3 0/8] Introduce Bypass IOMMU Feature

2021-04-21 Thread Wang Xingang
From: Xingang Wang These patches add support for configure bypass_iommu on/off for pci root bus, including primary bus and pxb root bus. At present, All root bus will go through iommu when iommu is configured, which is not flexible, because in many situations the need for using iommu and bypass i

[PATCH RFC v3 1/8] hw/pci/pci_host: Allow bypass iommu for pci host

2021-04-21 Thread Wang Xingang
From: Xingang Wang This add a bypass_iommu property for pci host, which indicates whether devices attached to the pci root bus will bypass iommu. In pci_device_iommu_address_space(), add a bypass_iommu check to avoid getting iommu address space for devices bypass iommu. Signed-off-by: Xingang Wa

[PATCH RFC v3 4/8] hw/i386: Add a pc machine option to bypass iommu for primary bus

2021-04-21 Thread Wang Xingang
From: Xingang Wang Add a bypass_iommu pc machine option to bypass iommu translation for the primary root bus. The option can be used as manner: qemu-system-x86_64 -machine q35,bypass_iommu=true Signed-off-by: Xingang Wang Signed-off-by: Jiahui Cen --- hw/i386/pc.c | 18 +++

[PATCH RFC v3 3/8] hw/arm/virt: Add a machine option to bypass iommu for primary bus

2021-04-21 Thread Wang Xingang
From: Xingang Wang This add a bypass_iommu option for arm virt machine, the option can be used in this manner: qemu -machine virt,iommu=smmuv3,bypass_iommu=true Signed-off-by: Xingang Wang Signed-off-by: Jiahui Cen --- hw/arm/virt.c | 26 ++ include/hw/arm/virt

[PATCH RFC v3 8/8] hw/i386/acpi-build: Add bypass_iommu check when building IVRS table

2021-04-21 Thread Wang Xingang
From: Xingang Wang When building IVRS table, only devices which go through iommu will be scanned, and the corresponding ivhd will be inserted. Signed-off-by: Xingang Wang Signed-off-by: Jiahui Cen --- hw/i386/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/

[PATCH RFC v3 7/8] hw/i386/acpi-build: Add explicit scope in DMAR table

2021-04-21 Thread Wang Xingang
From: Xingang Wang In DMAR table, the drhd is set to cover all pci devices when intel_iommu is on. This patch add explicit scope data, including only the pci devices that go through iommu. Signed-off-by: Xingang Wang Signed-off-by: Jiahui Cen --- hw/i386/acpi-build.c | 68

[PATCH RFC v3 2/8] hw/pxb: Add a bypass iommu property

2021-04-21 Thread Wang Xingang
From: Xingang Wang This add a bypass_iommu property for pci_expander_bridge. The property can be used as: qemu -device pxb-pcie,bus_nr=0x10,addr=0x1,bypass_iommu=true Signed-off-by: Xingang Wang Signed-off-by: Jiahui Cen --- hw/pci-bridge/pci_expander_bridge.c | 3 +++ 1 file changed, 3 inser

[PATCH RFC v3 5/8] hw/pci: Add pci_bus_range to get bus number range

2021-04-21 Thread Wang Xingang
From: Xingang Wang This helps to get the bus number range of a pci bridge hierarchy. Signed-off-by: Xingang Wang Signed-off-by: Jiahui Cen --- hw/pci/pci.c | 15 +++ include/hw/pci/pci.h | 1 + 2 files changed, 16 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c in

[PATCH RFC v3 6/8] hw/arm/virt-acpi-build: Add explicit IORT idmap for smmuv3 node

2021-04-21 Thread Wang Xingang
From: Xingang Wang This add explicit IORT idmap info according to pci root bus number range, and only add smmu idmap for those which does not bypass iommu. For idmap directly to ITS node, this split the whole RID mapping to smmu idmap and its idmap. So this should cover the whole idmap for throu

[Bug 1924669] Re: VFP code cannot see CPACR write in the same TB

2021-04-21 Thread Hansni Bu
Sorry, it's because a "ISB" is missing after CPACR is changed. Not bug of qemu. ** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1924669 Title: VFP c

Re: [PATCH v4 09/23] job: call job_enter from job_pause

2021-04-21 Thread Vladimir Sementsov-Ogievskiy
07.04.2021 14:38, Vladimir Sementsov-Ogievskiy wrote: 07.04.2021 14:19, Max Reitz wrote: On 16.01.21 22:46, Vladimir Sementsov-Ogievskiy wrote: If main job coroutine called job_yield (while some background process is in progress), we should give it a chance to call job_pause_point(). It will be

[PATCH] monitor: hmp_qemu_io: acquire aio contex, fix crash

2021-04-21 Thread Vladimir Sementsov-Ogievskiy
Max reported the following bug: $ ./qemu-img create -f raw src.img 1G $ ./qemu-img create -f raw dst.img 1G $ (echo ' {"execute":"qmp_capabilities"} {"execute":"blockdev-mirror", "arguments":{"job-id":"mirror", "device":"source", "target":"target",

Re: [PATCH 0/2] i386: Fix interrupt based Async PF enablement

2021-04-21 Thread Vitaly Kuznetsov
Eduardo Habkost writes: > On Thu, Apr 15, 2021 at 08:14:30PM +0100, Dr. David Alan Gilbert wrote: >> * Paolo Bonzini (pbonz...@redhat.com) wrote: >> > On 06/04/21 13:42, Vitaly Kuznetsov wrote: >> > > older machine types are still available (I disable it for <= 5.1 but we >> > > can consider disa

Re: [RFC PATCH 0/3] block-copy: lock tasks and calls list

2021-04-21 Thread Paolo Bonzini
On 20/04/21 15:12, Vladimir Sementsov-Ogievskiy wrote: 20.04.2021 13:04, Emanuele Giuseppe Esposito wrote: This serie of patches continues Paolo's series on making the block layer thread safe. Add a CoMutex lock for both tasks and calls list present in block/block-copy.c I think, we need more

[PATCH] amd_iommu: Fix pte_override_page_mask()

2021-04-21 Thread Jean-Philippe Brucker
AMD IOMMU PTEs have a special mode allowing to specify an arbitrary page size. Quoting the AMD IOMMU specification: "When the Next Level bits [of a pte] are 7h, the size of the page is determined by the first zero bit in the page address, starting from bit 12." So if the lowest bits of the page ad

Re: [PATCH 0/2] i386: Fix interrupt based Async PF enablement

2021-04-21 Thread Daniel P . Berrangé
On Wed, Apr 21, 2021 at 10:38:06AM +0200, Vitaly Kuznetsov wrote: > Eduardo Habkost writes: > > > On Thu, Apr 15, 2021 at 08:14:30PM +0100, Dr. David Alan Gilbert wrote: > >> * Paolo Bonzini (pbonz...@redhat.com) wrote: > >> > On 06/04/21 13:42, Vitaly Kuznetsov wrote: > >> > > older machine type

Re: [RFC PATCH 0/3] block-copy: lock tasks and calls list

2021-04-21 Thread Vladimir Sementsov-Ogievskiy
21.04.2021 11:38, Paolo Bonzini wrote: On 20/04/21 15:12, Vladimir Sementsov-Ogievskiy wrote: 20.04.2021 13:04, Emanuele Giuseppe Esposito wrote: This serie of patches continues Paolo's series on making the block layer thread safe. Add a CoMutex lock for both tasks and calls list present in blo

Re: [PATCH] tcg/ppc: Fix building with Clang

2021-04-21 Thread Peter Maydell
On Wed, 21 Apr 2021 at 02:15, Brad Smith wrote: > > Fix building with Clang. > > At the moment Clang does not define _CALL_SYSV as GCC does. From > clang/lib/Basic/Targets/PPC.cpp in getTargetDefines().. > > // FIXME: The following are not yet generated here by Clang, but are > //gener

Re: [PATCH 0/2] i386: Fix interrupt based Async PF enablement

2021-04-21 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Wed, Apr 21, 2021 at 10:38:06AM +0200, Vitaly Kuznetsov wrote: > > Eduardo Habkost writes: > > > > > On Thu, Apr 15, 2021 at 08:14:30PM +0100, Dr. David Alan Gilbert wrote: > > >> * Paolo Bonzini (pbonz...@redhat.com) wrote: > > >> > On 06/04

Re: [PATCH 0/2] i386: Fix interrupt based Async PF enablement

2021-04-21 Thread Vitaly Kuznetsov
Daniel P. Berrangé writes: > On Wed, Apr 21, 2021 at 10:38:06AM +0200, Vitaly Kuznetsov wrote: >> Eduardo Habkost writes: >> >> > On Thu, Apr 15, 2021 at 08:14:30PM +0100, Dr. David Alan Gilbert wrote: >> >> * Paolo Bonzini (pbonz...@redhat.com) wrote: >> >> > On 06/04/21 13:42, Vitaly Kuznetso

Re: [RFC PATCH v2 0/6] hw/arm/virt: Introduce cpu topology support

2021-04-21 Thread wangyanan (Y)
On 2021/4/13 16:07, Yanan Wang wrote: Hi, This series is a new version of [0] recently posted by Ying Fang to introduce cpu topology support for ARM platform. I have taken over his work about this now, thanks for his contribution. Description: An accurate cpu topology may help improve the cpu

Re: [PATCH 0/2] i386: Fix interrupt based Async PF enablement

2021-04-21 Thread Dr. David Alan Gilbert
* Vitaly Kuznetsov (vkuzn...@redhat.com) wrote: > Daniel P. Berrangé writes: > > > On Wed, Apr 21, 2021 at 10:38:06AM +0200, Vitaly Kuznetsov wrote: > >> Eduardo Habkost writes: > >> > >> > On Thu, Apr 15, 2021 at 08:14:30PM +0100, Dr. David Alan Gilbert wrote: > >> >> * Paolo Bonzini (pbonz...

Re: [PATCH 0/2] i386: Fix interrupt based Async PF enablement

2021-04-21 Thread Daniel P . Berrangé
On Wed, Apr 21, 2021 at 11:29:45AM +0200, Vitaly Kuznetsov wrote: > Daniel P. Berrangé writes: > > > On Wed, Apr 21, 2021 at 10:38:06AM +0200, Vitaly Kuznetsov wrote: > >> Eduardo Habkost writes: > >> > >> > On Thu, Apr 15, 2021 at 08:14:30PM +0100, Dr. David Alan Gilbert wrote: > >> >> * Paolo

Re: [PATCH 0/2] i386: Fix interrupt based Async PF enablement

2021-04-21 Thread Vitaly Kuznetsov
Daniel P. Berrangé writes: > On Wed, Apr 21, 2021 at 11:29:45AM +0200, Vitaly Kuznetsov wrote: >> Daniel P. Berrangé writes: >> >> > On Wed, Apr 21, 2021 at 10:38:06AM +0200, Vitaly Kuznetsov wrote: >> >> Eduardo Habkost writes: >> >> >> >> > On Thu, Apr 15, 2021 at 08:14:30PM +0100, Dr. Davi

firmware selection for SEV-ES

2021-04-21 Thread Laszlo Ersek
Hi Brijesh, Tom, in QEMU's "docs/interop/firmware.json", the @FirmwareFeature enumeration has a constant called @amd-sev. We should introduce an @amd-sev-es constant as well, minimally for the following reason: AMD document #56421 ("SEV-ES Guest-Hypervisor Communication Block Standardization") re

Re: [RFC PATCH] vfio-ccw: Permit missing IRQs

2021-04-21 Thread Cornelia Huck
On Mon, 19 Apr 2021 20:49:06 +0200 Eric Farman wrote: > Commit 690e29b91102 ("vfio-ccw: Refactor ccw irq handler") changed > one of the checks for the IRQ notifier registration from saying > "the host needs to recognize the only IRQ that exists" to saying > "the host needs to recognize ANY IRQ th

Re: [PATCH v3] hw/block/nvme: fix lbaf formats initialization

2021-04-21 Thread Gollu Appalanaidu
On Tue, Apr 20, 2021 at 09:47:00PM +0200, Klaus Jensen wrote: On Apr 16 17:29, Gollu Appalanaidu wrote: Currently LBAF formats are being intialized based on metadata size if and only if nvme-ns "ms" parameter is non-zero value. Since FormatNVM command being supported device parameter "ms" may no

Re: [PATCH v3] hw/block/nvme: fix lbaf formats initialization

2021-04-21 Thread Philippe Mathieu-Daudé
On 4/16/21 1:59 PM, Gollu Appalanaidu wrote: > Currently LBAF formats are being intialized based on metadata > size if and only if nvme-ns "ms" parameter is non-zero value. > Since FormatNVM command being supported device parameter "ms" > may not be the criteria to initialize the supported LBAFs. >

Re: [PATCH v3] memory: Directly dispatch alias accesses on origin memory region

2021-04-21 Thread Mark Cave-Ayland
On 20/04/2021 21:59, Peter Xu wrote: I agree with this sentiment: it has taken me a while to figure out what was happening, and that was only because I spotted accesses being rejected with -d guest_errors. From my perspective the names memory_region_dispatch_read() and memory_region_dispatch_w

Re: [PATCH v3 1/2] iotests/231: Update expected deprecation message

2021-04-21 Thread Stefano Garzarella
On Fri, Apr 09, 2021 at 09:38:53AM -0500, Connor Kuehl wrote: The deprecation message in the expected output has technically been wrong since the wrong version of a patch was applied to it. Because of this, the test fails. Correct the expected output so that it passes. Signed-off-by: Connor Kueh

Re: [PATCH v2 02/12] virtio-gpu: Add udmabuf helpers

2021-04-21 Thread Gerd Hoffmann
Hi, > --- /dev/null > +++ b/include/standard-headers/linux/udmabuf.h > --- a/scripts/update-linux-headers.sh > +++ b/scripts/update-linux-headers.sh Separate patch please. thanks, Gerd

Re: [PATCH v3 2/2] block/rbd: Add an escape-aware strchr helper

2021-04-21 Thread Stefano Garzarella
On Fri, Apr 09, 2021 at 09:38:54AM -0500, Connor Kuehl wrote: Sometimes the parser needs to further split a token it has collected from the token input stream. Right now, it does a cursory check to see if the relevant characters appear in the token to determine if it should break it down further.

Re: [PATCH v3] memory: Directly dispatch alias accesses on origin memory region

2021-04-21 Thread Peter Maydell
On Tue, 20 Apr 2021 at 21:59, Peter Xu wrote: > I think it should always be a valid request to trigger memory access via the > MR > layer, say, what if the caller has no address space context at all? From the > name of memory_region_dispatch_write|read I don't see either on why we should > not ta

[PATCH v2 0/5] mptcp support

2021-04-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This set adds support for multipath TCP (mptcp), and has been tested for migration and (lightly) for NBD. Multipath-tcp is a bit like bonding, but at L3; you can use it to handle failure, but can also use it to split traffic across multiple interfaces. U

[PATCH v2 1/5] channel-socket: Only set CLOEXEC if we have space for fds

2021-04-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" MSG_CMSG_CLOEXEC cleans up received fd's; it's really only for Unix sockets, but currently we enable it for everything; some socket types (IP_MPTCP) don't like this. Only enable it when we're giving the recvmsg room to receive fd's anyway. Signed-off-by: Dr. David

[PATCH v2 4/5] migration/socket: Close the listener at the end

2021-04-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Delay closing the listener until the cleanup hook at the end; mptcp needs the listener to stay open while the other paths come in. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Daniel P. Berrangé --- migration/multifd.c | 5 + migration/socket.c | 24

[PATCH v2 5/5] sockets: Support multipath TCP

2021-04-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Multipath TCP allows combining multiple interfaces/routes into a single socket, with very little work for the user/admin. It's enabled by 'mptcp' on most socket addresses: ./qemu-system-x86_64 -nographic -incoming tcp:0:,mptcp Signed-off-by: Dr. David Alan

[PATCH v2 2/5] io/net-listener: Call the notifier during finalize

2021-04-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Call the notifier during finalize; it's currently only called if we change it, which is not the intent. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Daniel P. Berrangé --- io/net-listener.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/io/net-list

[PATCH v2 3/5] migration: Add cleanup hook for inwards migration

2021-04-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a cleanup hook for incoming migration that gets called at the end as a way for a transport to allow cleanup. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Daniel P. Berrangé --- migration/migration.c | 3 +++ migration/migration.h | 4 2 files chan

[Bug 1759522] Re: windows qemu-img create vpc/vhdx error

2021-04-21 Thread Albert Kao
** Changed in: qemu Status: Incomplete => New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1759522 Title: windows qemu-img create vpc/vhdx error Status in QEMU: New Bug description: O

Re: firmware selection for SEV-ES

2021-04-21 Thread Pavel Hrdina
On Wed, Apr 21, 2021 at 11:54:24AM +0200, Laszlo Ersek wrote: > Hi Brijesh, Tom, > > in QEMU's "docs/interop/firmware.json", the @FirmwareFeature enumeration > has a constant called @amd-sev. We should introduce an @amd-sev-es > constant as well, minimally for the following reason: > > AMD docume

Re: [RFC PATCH 0/3] block-copy: lock tasks and calls list

2021-04-21 Thread Paolo Bonzini
On 21/04/21 10:53, Vladimir Sementsov-Ogievskiy wrote: Good point. Emanuele, can you work on ProgressMeter and SharedResource? AioTaskPool can also be converted to just use CoQueue instead of manually waking up coroutines. That would be great. I have one more question in mind: Is it effe

Re: [PATCH v2 8/8] block: do not take AioContext around reopen

2021-04-21 Thread Paolo Bonzini
On 19/04/21 10:55, Emanuele Giuseppe Esposito wrote: Reopen needs to handle AioContext carefully due to calling bdrv_drain_all_begin/end. By not taking AioContext around calls to bdrv_reopen_multiple, we can drop the function's release/acquire pair and the AioContext argument too. So... I wrot

Re: [PATCH v2 0/8] Block layer thread-safety, continued

2021-04-21 Thread Paolo Bonzini
On 19/04/21 10:55, Emanuele Giuseppe Esposito wrote: This and the following serie of patches are based on Paolo's v1 patches sent in 2017[*]. They have been ported to the current QEMU version, but the goal remains the same: - make the block layer thread-safe (patches 1-5), and - remove aio_contex

[PATCH v6 00/15] RAM_NORESERVE, MAP_NORESERVE and hostmem "reserve" property

2021-04-21 Thread David Hildenbrand
Based-on: 20210406080126.24010-1-da...@redhat.com Some cleanups previously sent in other context (resizeable allocations), followed by RAM_NORESERVE, implementing it under Linux using MAP_NORESERVE, and letting users configure it for memory backens using the "reserve" property (default: true). MA

Re: [RFC PATCH] vfio-ccw: Permit missing IRQs

2021-04-21 Thread Eric Farman
On Wed, 2021-04-21 at 12:01 +0200, Cornelia Huck wrote: > On Mon, 19 Apr 2021 20:49:06 +0200 > Eric Farman wrote: > > > Commit 690e29b91102 ("vfio-ccw: Refactor ccw irq handler") changed > > one of the checks for the IRQ notifier registration from saying > > "the host needs to recognize the only

[PATCH v6 09/15] util/mmap-alloc: Support RAM_NORESERVE via MAP_NORESERVE under Linux

2021-04-21 Thread David Hildenbrand
Let's support RAM_NORESERVE via MAP_NORESERVE on Linux. The flag has no effect on most shared mappings - except for hugetlbfs and anonymous memory. Linux man page: "MAP_NORESERVE: Do not reserve swap space for this mapping. When swap space is reserved, one has the guarantee that it is possible

[PATCH v6 01/15] util/mmap-alloc: Factor out calculation of the pagesize for the guard page

2021-04-21 Thread David Hildenbrand
Let's factor out calculating the size of the guard page and rename the variable to make it clearer that this pagesize only applies to the guard page. Reviewed-by: Peter Xu Acked-by: Murilo Opsfelder Araujo Cc: Igor Kotrasinski Signed-off-by: David Hildenbrand --- util/mmap-alloc.c | 31 ++

[PATCH v6 11/15] qmp: Clarify memory backend properties returned via query-memdev

2021-04-21 Thread David Hildenbrand
We return information on the currently configured memory backends and don't configure them, so decribe what the currently set properties express. Reviewed-by: Philippe Mathieu-Daudé Suggested-by: Markus Armbruster Cc: Eric Blake Cc: Markus Armbruster Cc: Igor Mammedov Signed-off-by: David Hil

[PATCH v6 05/15] softmmu/memory: Pass ram_flags to memory_region_init_ram_shared_nomigrate()

2021-04-21 Thread David Hildenbrand
Let's forward ram_flags instead, renaming memory_region_init_ram_shared_nomigrate() into memory_region_init_ram_flags_nomigrate(). Reviewed-by: Peter Xu Signed-off-by: David Hildenbrand --- backends/hostmem-ram.c| 6 +++-- hw/m68k/next-cube.c |

[PATCH v6 10/15] hostmem: Wire up RAM_NORESERVE via "reserve" property

2021-04-21 Thread David Hildenbrand
Let's provide a way to control the use of RAM_NORESERVE via memory backends using the "reserve" property which defaults to true (old behavior). Only Linux currently supports clearing the flag (and support is checked at runtime, depending on the setting of "/proc/sys/vm/overcommit_memory"). Windows

[PATCH v6 02/15] util/mmap-alloc: Factor out reserving of a memory region to mmap_reserve()

2021-04-21 Thread David Hildenbrand
We want to reserve a memory region without actually populating memory. Let's factor that out. Reviewed-by: Igor Kotrasinski Acked-by: Murilo Opsfelder Araujo Reviewed-by: Richard Henderson Reviewed-by: Peter Xu Signed-off-by: David Hildenbrand --- util/mmap-alloc.c | 58 +

Re: [PATCH v6 05/15] softmmu/memory: Pass ram_flags to memory_region_init_ram_shared_nomigrate()

2021-04-21 Thread Philippe Mathieu-Daudé
On 4/21/21 2:26 PM, David Hildenbrand wrote: > Let's forward ram_flags instead, renaming > memory_region_init_ram_shared_nomigrate() into > memory_region_init_ram_flags_nomigrate(). > > Reviewed-by: Peter Xu > Signed-off-by: David Hildenbrand > --- > backends/hostmem-ram.c

[PATCH v6 12/15] qmp: Include "share" property of memory backends

2021-04-21 Thread David Hildenbrand
Let's include the property, which can be helpful when debugging, for example, to spot misuse of MAP_PRIVATE which can result in some ugly corner cases (e.g., double-memory consumption on shmem). Use the same description we also use for describing the property. Reviewed-by: Philippe Mathieu-Daudé

[PATCH v6 08/15] memory: Introduce RAM_NORESERVE and wire it up in qemu_ram_mmap()

2021-04-21 Thread David Hildenbrand
Let's introduce RAM_NORESERVE, allowing mmap'ing with MAP_NORESERVE. The new flag has the following semantics: " RAM is mmap-ed with MAP_NORESERVE. When set, reserving swap space (or huge pages if applicable) is skipped: will bail out if not supported. When not set, the OS will do the reservation,

[PATCH v6 04/15] softmmu/memory: Pass ram_flags to qemu_ram_alloc_from_fd()

2021-04-21 Thread David Hildenbrand
Let's pass in ram flags just like we do with qemu_ram_alloc_from_file(), to clean up and prepare for more flags. Simplify the documentation of passed ram flags: Looking at our documentation of RAM_SHARED and RAM_PMEM is sufficient, no need to be repetitive. Reviewed-by: Philippe Mathieu-Daudé Re

[PATCH v6 13/15] hmp: Print "share" property of memory backends with "info memdev"

2021-04-21 Thread David Hildenbrand
Let's print the property. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Dr. David Alan Gilbert Cc: Markus Armbruster Cc: Eric Blake Cc: Igor Mammedov Signed-off-by: David Hildenbrand --- hw/core/machine-hmp-cmds.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/core/machine-hmp-

[PATCH v6 03/15] util/mmap-alloc: Factor out activating of memory to mmap_activate()

2021-04-21 Thread David Hildenbrand
We want to activate memory within a reserved memory region, to make it accessible. Let's factor that out. Reviewed-by: Richard Henderson Acked-by: Murilo Opsfelder Araujo Reviewed-by: Peter Xu Signed-off-by: David Hildenbrand --- util/mmap-alloc.c | 94 +---

[PATCH v6 15/15] hmp: Print "reserve" property of memory backends with "info memdev"

2021-04-21 Thread David Hildenbrand
Let's print the new property. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Dr. David Alan Gilbert Cc: Markus Armbruster Cc: Eric Blake Cc: Igor Mammedov Signed-off-by: David Hildenbrand --- hw/core/machine-hmp-cmds.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/core/machine-

[PATCH v6 06/15] softmmu/memory: Pass ram_flags to qemu_ram_alloc() and qemu_ram_alloc_internal()

2021-04-21 Thread David Hildenbrand
Let's pass ram_flags to qemu_ram_alloc() and qemu_ram_alloc_internal(), preparing for passing additional flags. Signed-off-by: David Hildenbrand --- include/exec/ram_addr.h | 2 +- softmmu/memory.c| 4 ++-- softmmu/physmem.c | 29 - 3 files changed, 15

Re: [PATCH v6 06/15] softmmu/memory: Pass ram_flags to qemu_ram_alloc() and qemu_ram_alloc_internal()

2021-04-21 Thread Philippe Mathieu-Daudé
On 4/21/21 2:26 PM, David Hildenbrand wrote: > Let's pass ram_flags to qemu_ram_alloc() and qemu_ram_alloc_internal(), > preparing for passing additional flags. > > Signed-off-by: David Hildenbrand > --- > include/exec/ram_addr.h | 2 +- > softmmu/memory.c| 4 ++-- > softmmu/physmem.c

[PATCH v6 07/15] util/mmap-alloc: Pass flags instead of separate bools to qemu_ram_mmap()

2021-04-21 Thread David Hildenbrand
Let's pass flags instead of bools to prepare for passing other flags and update the documentation of qemu_ram_mmap(). Introduce new QEMU_MAP_ flags that abstract the mmap() PROT_ and MAP_ flag handling and simplify it. We expose only flags that are currently supported by qemu_ram_mmap(). Maybe, we

[PATCH v6 14/15] qmp: Include "reserve" property of memory backends

2021-04-21 Thread David Hildenbrand
Let's include the new property. Reviewed-by: Philippe Mathieu-Daudé Cc: Eric Blake Cc: Markus Armbruster Cc: Igor Mammedov Signed-off-by: David Hildenbrand --- hw/core/machine-qmp-cmds.c | 1 + qapi/machine.json | 4 2 files changed, 5 insertions(+) diff --git a/hw/core/machin

Re: [PATCH v6 07/15] util/mmap-alloc: Pass flags instead of separate bools to qemu_ram_mmap()

2021-04-21 Thread Philippe Mathieu-Daudé
On 4/21/21 2:26 PM, David Hildenbrand wrote: > Let's pass flags instead of bools to prepare for passing other flags and > update the documentation of qemu_ram_mmap(). Introduce new QEMU_MAP_ > flags that abstract the mmap() PROT_ and MAP_ flag handling and simplify > it. > > We expose only flags t

Re: [PATCH v2 01/11] hw/arm/aspeed: Do not directly map ram container onto main address bus

2021-04-21 Thread Philippe Mathieu-Daudé
On 4/21/21 7:53 AM, Cédric Le Goater wrote: > On 4/20/21 8:28 PM, Peter Xu wrote: >> On Sat, Apr 17, 2021 at 12:30:18PM +0200, Philippe Mathieu-Daudé wrote: >>> The RAM container is exposed as an AddressSpace. >> >> I didn't see where did ram_container got exposed as an address space. I guess I us

[RFC PATCH] tests/tcg: add a multiarch signals test to stress test signal delivery

2021-04-21 Thread Alex Bennée
This adds a simple signal test that combines the POSIX timer_create with signal delivery across multiple threads. [AJB: So I wrote this in an attempt to flush out issues with the s390x-linux-user handling. However I suspect I've done something wrong or opened a can of signal handling worms. Nomin

[PATCH] target/riscv: fix a typo with interrupt names

2021-04-21 Thread Emmanuel Blot
Interrupt names have been swapped in 205377f8 and do not follow IRQ_*_EXT definition order. Signed-off-by: Emmanuel Blot --- target/riscv/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 7d6ed80f6b6..c79503ce967 100644 --- a/

Re: [RFC PATCH] tests/tcg: add a multiarch signals test to stress test signal delivery

2021-04-21 Thread Philippe Mathieu-Daudé
+Laurent On 4/21/21 3:29 PM, Alex Bennée wrote: > This adds a simple signal test that combines the POSIX timer_create > with signal delivery across multiple threads. > > [AJB: So I wrote this in an attempt to flush out issues with the > s390x-linux-user handling. However I suspect I've done somet

Re: [PATCH] Fix typo in CFI build documentation

2021-04-21 Thread Philippe Mathieu-Daudé
Hi Serge, Cc'ing qemu-trivial@ On 4/20/21 5:48 PM, serge-sans-paille wrote: > Signed-off-by: serge-sans-paille It looks your git-config is misconfigured... Maybe you used an incorrect profile :) Can you repost please? > --- > docs/devel/control-flow-integrity.rst | 4 ++-- > 1 file changed, 2

Re: [PATCH v4 16/19] qapi/expr.py: Add docstrings

2021-04-21 Thread Markus Armbruster
John Snow writes: [...] > I've made a re-spin. Let's try something new, if you don't mind: > > I've pushed a "almost v5" copy onto my gitlab, where edits made against > this patch are in their own commit so that all of the pending edits I've > made are easily visible. > > Here's the "merge requ

Re: [PATCH v3 02/33] block/nbd: fix how state is cleared on nbd_open() failure paths

2021-04-21 Thread Roman Kagan
On Fri, Apr 16, 2021 at 11:08:40AM +0300, Vladimir Sementsov-Ogievskiy wrote: > We have two "return error" paths in nbd_open() after > nbd_process_options(). Actually we should call nbd_clear_bdrvstate() > on these paths. Interesting that nbd_process_options() calls > nbd_clear_bdrvstate() by itsel

[Bug 1368178] Re: Windows ME falsely detects qemu's videocards as Number Nine Imagine 128

2021-04-21 Thread Thomas Huth
** Tags removed: 128 edition millenium -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1368178 Title: Windows ME falsely detects qemu's videocards as Number Nine Imagine 128 Status in QEMU: New

[PATCH 0/2] plugins: Freeing allocated values in hash tables.

2021-04-21 Thread Mahmoud Mandour
A hash table made using ``g_hash_table_new`` requires manually freeing any dynamically allocated keys/values. The two patches in this series fixes this issue in hotblocks and hotpages plugins. Mahmoud Mandour (2): plugins/hotblocks: Properly freed the hash table values plugins/hotpages: Proper

[PATCH 2/2] plugins/hotpages: Properly freed the hash table values

2021-04-21 Thread Mahmoud Mandour
Freed the values stored in the hash table ``pages`` returned by ``g_hash_table_get_values()`` by freeing the sorted list and destroyed the hash table afterward. Signed-off-by: Mahmoud Mandour --- contrib/plugins/hotpages.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/con

[PATCH 1/2] plugins/hotblocks: Properly freed the hash table values

2021-04-21 Thread Mahmoud Mandour
Freed the values stored in the hash table ``hotblocks`` returned by ``g_hash_table_get_values()`` by freeing the sorted list and destroyed the hash table afterward. Signed-off-by: Mahmoud Mandour --- contrib/plugins/hotblocks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v2] i386: Add ratelimit for bus locks acquired in guest

2021-04-21 Thread Eduardo Habkost
On Wed, Apr 21, 2021 at 02:26:42PM +0800, Chenyi Qiang wrote: > Hi, Eduardo, thanks for your comments! > > > On 4/21/2021 12:34 AM, Eduardo Habkost wrote: > > Hello, > > > > Thanks for the patch. Comments below: > > > > On Tue, Apr 20, 2021 at 05:37:36PM +0800, Chenyi Qiang wrote: > > > Virtua

Re: [PATCH v3] memory: Directly dispatch alias accesses on origin memory region

2021-04-21 Thread Peter Xu
On Wed, Apr 21, 2021 at 11:33:55AM +0100, Mark Cave-Ayland wrote: > On 20/04/2021 21:59, Peter Xu wrote: > > > > > I agree with this sentiment: it has taken me a while to figure out what > > > > was happening, and that was only because I spotted accesses being > > > > rejected with -d guest_errors

Re: [PATCH v2] i386: Add ratelimit for bus locks acquired in guest

2021-04-21 Thread Xiaoyao Li
On 4/21/2021 10:12 PM, Eduardo Habkost wrote: On Wed, Apr 21, 2021 at 02:26:42PM +0800, Chenyi Qiang wrote: Hi, Eduardo, thanks for your comments! On 4/21/2021 12:34 AM, Eduardo Habkost wrote: Hello, Thanks for the patch. Comments below: On Tue, Apr 20, 2021 at 05:37:36PM +0800, Chenyi Qia

Transferring bugs from Launchpad to Gitlab (was: Re: Upstream bug comments on the mailing list and Launchpad)

2021-04-21 Thread Thomas Huth
On 19/04/2021 18.04, Peter Maydell wrote: On Mon, 19 Apr 2021 at 16:52, Thomas Huth wrote: On 15/04/2021 11.49, Kashyap Chamarthy wrote: ... PS: I recall there was discussion on the list of moving to a different GitLab tracker. As Thomas Huth mentioned on IRC, more people seem to

[PATCH v2] vfio-ccw: Permit missing IRQs

2021-04-21 Thread Eric Farman
Commit 690e29b91102 ("vfio-ccw: Refactor ccw irq handler") changed one of the checks for the IRQ notifier registration from saying "the host needs to recognize the only IRQ that exists" to saying "the host needs to recognize ANY IRQ that exists." And this worked fine, because the subsequent change

Re: [PATCH v2] i386: Add ratelimit for bus locks acquired in guest

2021-04-21 Thread Eduardo Habkost
On Wed, Apr 21, 2021 at 10:50:10PM +0800, Xiaoyao Li wrote: > On 4/21/2021 10:12 PM, Eduardo Habkost wrote: > > On Wed, Apr 21, 2021 at 02:26:42PM +0800, Chenyi Qiang wrote: > > > Hi, Eduardo, thanks for your comments! > > > > > > > > > On 4/21/2021 12:34 AM, Eduardo Habkost wrote: > > > > Hello,

Re: [PATCH v3 2/3] vhost-user-blk: perform immediate cleanup if disconnect on initialization

2021-04-21 Thread Kevin Wolf
Am 25.03.2021 um 16:12 hat Denis Plotnikov geschrieben: > Commit 4bcad76f4c39 ("vhost-user-blk: delay vhost_user_blk_disconnect") > introduced postponing vhost_dev cleanup aiming to eliminate qemu aborts > because of connection problems with vhost-blk daemon. > > However, it introdues a new proble

[PATCH-for-6.0] net: tap: fix crash on hotplug

2021-04-21 Thread Cole Robinson
Attempting to hotplug a tap nic with libvirt will crash qemu: $ sudo virsh attach-interface f32 network default error: Failed to attach interface error: Unable to read from monitor: Connection reset by peer 0x55875b7f3a99 in tap_send (opaque=0x55875e39eae0) at ../net/tap.c:206 206

Re: [PATCH v2] i386: Add ratelimit for bus locks acquired in guest

2021-04-21 Thread Xiaoyao Li
On 4/21/2021 11:18 PM, Eduardo Habkost wrote: On Wed, Apr 21, 2021 at 10:50:10PM +0800, Xiaoyao Li wrote: On 4/21/2021 10:12 PM, Eduardo Habkost wrote: On Wed, Apr 21, 2021 at 02:26:42PM +0800, Chenyi Qiang wrote: Hi, Eduardo, thanks for your comments! On 4/21/2021 12:34 AM, Eduardo Habkost

Re: firmware selection for SEV-ES

2021-04-21 Thread Tom Lendacky
On 4/21/21 4:54 AM, Laszlo Ersek wrote: > Hi Brijesh, Tom, Hi Laszlo, > > in QEMU's "docs/interop/firmware.json", the @FirmwareFeature enumeration > has a constant called @amd-sev. We should introduce an @amd-sev-es > constant as well, minimally for the following reason: > > AMD document #56421

Re: [PATCH v3 2/3] vhost-user-blk: perform immediate cleanup if disconnect on initialization

2021-04-21 Thread Denis Plotnikov
On 21.04.2021 18:24, Kevin Wolf wrote: Am 25.03.2021 um 16:12 hat Denis Plotnikov geschrieben: Commit 4bcad76f4c39 ("vhost-user-blk: delay vhost_user_blk_disconnect") introduced postponing vhost_dev cleanup aiming to eliminate qemu aborts because of connection problems with vhost-blk daemon.

Re: [RFC PATCH] tests/tcg: add a multiarch signals test to stress test signal delivery

2021-04-21 Thread Alex Bennée
Alex Bennée writes: > This adds a simple signal test that combines the POSIX timer_create > with signal delivery across multiple threads. > > [AJB: So I wrote this in an attempt to flush out issues with the > s390x-linux-user handling. However I suspect I've done something wrong > or opened a c

[PATCH] pc-bios/s390-ccw/bootmap: Silence compiler warning from Clang

2021-04-21 Thread Thomas Huth
When compiling the s390-ccw bios with Clang, the compiler complains: pc-bios/s390-ccw/bootmap.c:302:9: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] if (!mbr->dev_type == DEV_TYPE_ECKD) { ^ ~~ The code works (

Re: [PATCH-for-6.0] net: tap: fix crash on hotplug

2021-04-21 Thread Philippe Mathieu-Daudé
Cc'ing Bin. On 4/21/21 5:22 PM, Cole Robinson wrote: > Attempting to hotplug a tap nic with libvirt will crash qemu: > > $ sudo virsh attach-interface f32 network default > error: Failed to attach interface > error: Unable to read from monitor: Connection reset by peer > > 0x55875b7f3a99 in

Re: [PATCH] pc-bios/s390-ccw/bootmap: Silence compiler warning from Clang

2021-04-21 Thread Christian Borntraeger
On 21.04.21 18:33, Thomas Huth wrote: When compiling the s390-ccw bios with Clang, the compiler complains: pc-bios/s390-ccw/bootmap.c:302:9: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] if (!mbr->dev_type == DEV_TYPE_ECKD)

Re: [PATCH] pc-bios/s390-ccw/bootmap: Silence compiler warning from Clang

2021-04-21 Thread Philippe Mathieu-Daudé
On 4/21/21 6:33 PM, Thomas Huth wrote: > When compiling the s390-ccw bios with Clang, the compiler complains: > > pc-bios/s390-ccw/bootmap.c:302:9: warning: logical not is only applied > to the left hand side of this comparison [-Wlogical-not-parentheses] > if (!mbr->dev_type == DEV_TYPE_EC

[PATCH] hw/arm/smmuv3: Another range invalidation fix

2021-04-21 Thread Eric Auger
6d9cd115b9 ("hw/arm/smmuv3: Enforce invalidation on a power of two range") failed to completely fix misalignment issues with range invalidation. For instance invalidations patterns like "invalidate 32 4kB pages starting from 0xff395000 are not correctly handled" due to the fact the previous fix onl

Re: [Virtio-fs] [PATCH v2 01/25] DAX: vhost-user: Rework slave return values

2021-04-21 Thread Dr. David Alan Gilbert
* Greg Kurz (gr...@kaod.org) wrote: > On Wed, 14 Apr 2021 16:51:13 +0100 > "Dr. David Alan Gilbert (git)" wrote: > > > From: "Dr. David Alan Gilbert" > > > > All the current slave handlers on the qemu side generate an 'int' > > return value that's squashed down to a bool (!!ret) and stuffed int

[PATCH v2 0/2] avocado-qemu: New SMMUv3 tests

2021-04-21 Thread Eric Auger
This series adds SMMU functional tests using Fedora cloud-init images. Compared to v1, guests with and without RIL (range invalidation support) are tested (resp fedora 33 and 31). For each, we test the protection of virtio-net-pci and virtio-block-pci devices. Also strict=no and passthrough modes a

[PATCH v2 2/2] avocado_qemu: Add SMMUv3 tests

2021-04-21 Thread Eric Auger
Add new tests checking the good behavior of the SMMUv3 protecting 2 virtio pci devices (block and net). We check the guest boots and we are able to install a package. Different guest configs are tested: standard, passthrough an strict=0. This is tested with both fedora 31 and 33. The former uses a

  1   2   3   4   >