Re: [RFC PATCH] spapr: Add SPAPR_CAP_AIL_MODES for supported AIL modes for H_SET_MODE hcall

2022-02-13 Thread Nicholas Piggin
Excerpts from David Gibson's message of February 7, 2022 11:41 am: > On Sat, Jan 29, 2022 at 04:50:07PM +1000, Nicholas Piggin wrote: >> The behaviour of the Address Translation Mode on Interrupt resource is >> not consistently supported by all CPU versions or all KVM versions. In >> particular

Re: [RFC] vhost-vdpa: make notifiers _init()/_uninit() symmetric

2022-02-13 Thread Jason Wang
On Mon, Feb 14, 2022 at 3:33 PM Laurent Vivier wrote: > > On 14/02/2022 04:20, Jason Wang wrote: > > On Sat, Feb 12, 2022 at 12:13 AM Laurent Vivier wrote: > >> > >> vhost_vdpa_host_notifiers_init() initializes queue notifiers > >> for queues "dev->vq_index" to queue "dev->vq_index + dev->nvqs",

Re: [PATCH v4 4/4] hw/i386/sgx: Attach SGX-EPC objects to machine

2022-02-13 Thread Yang Zhong
On Mon, Feb 07, 2022 at 09:37:52AM +0100, Igor Mammedov wrote: > On Sat, 5 Feb 2022 13:45:26 +0100 > Philippe Mathieu-Daudé wrote: > > > Previously SGX-EPC objects were exposed in the QOM tree at a path > > > > /machine/unattached/device[nn] > > > > where the 'nn' varies depending on what

Re: [PATCH] hw/timer: fix a9gtimer vmstate

2022-02-13 Thread Pavel Dovgalyuk
ping On 07.02.2022 11:44, Pavel Dovgalyuk wrote: A9 gtimer includes global control field and number of per-cpu fields. But only per-cpu ones are migrated. This patch adds a subsection for global control field migration. Signed-off-by: Pavel Dovgalyuk --- hw/timer/a9gtimer.c | 21

Re: [RFC] vhost-vdpa: make notifiers _init()/_uninit() symmetric

2022-02-13 Thread Laurent Vivier
On 14/02/2022 04:20, Jason Wang wrote: On Sat, Feb 12, 2022 at 12:13 AM Laurent Vivier wrote: vhost_vdpa_host_notifiers_init() initializes queue notifiers for queues "dev->vq_index" to queue "dev->vq_index + dev->nvqs", whereas vhost_vdpa_host_notifiers_uninit() uninitializes the same

Re: [PATCH v4 4/4] hw/i386/sgx: Attach SGX-EPC objects to machine

2022-02-13 Thread Yang Zhong
On Mon, Feb 07, 2022 at 09:37:52AM +0100, Igor Mammedov wrote: > On Sat, 5 Feb 2022 13:45:26 +0100 > Philippe Mathieu-Daudé wrote: > > > Previously SGX-EPC objects were exposed in the QOM tree at a path > > > > /machine/unattached/device[nn] > > > > where the 'nn' varies depending on what

Re: [PATCH] intel_iommu: support snoop control

2022-02-13 Thread Jason Wang
On Mon, Feb 14, 2022 at 3:05 PM Peter Xu wrote: > > On Mon, Feb 14, 2022 at 02:40:20PM +0800, Jason Wang wrote: > > Or we can do tricks like checking IOMMU_NOTIFIER_DEVIOTLB_UNMAP and > > assume it's vhost. > > > > But I'm not sure it's worth it. > > If not any use, then probably not at all. :-)

Re: Call for GSoC and Outreachy project ideas for summer 2022

2022-02-13 Thread Jason Wang
On Fri, Jan 28, 2022 at 11:47 PM Stefan Hajnoczi wrote: > > Dear QEMU, KVM, and rust-vmm communities, > QEMU will apply for Google Summer of Code 2022 > (https://summerofcode.withgoogle.com/) and has been accepted into > Outreachy May-August 2022 (https://www.outreachy.org/). You can now > submit

Re: [PATCH] intel_iommu: support snoop control

2022-02-13 Thread Peter Xu
On Mon, Feb 14, 2022 at 02:40:20PM +0800, Jason Wang wrote: > Or we can do tricks like checking IOMMU_NOTIFIER_DEVIOTLB_UNMAP and > assume it's vhost. > > But I'm not sure it's worth it. If not any use, then probably not at all. :-) -- Peter Xu

Re: [PATCH] intel_iommu: support snoop control

2022-02-13 Thread Jason Wang
On Mon, Feb 14, 2022 at 2:35 PM Jason Wang wrote: > > On Mon, Feb 14, 2022 at 2:31 PM Peter Xu wrote: > > > > On Mon, Feb 14, 2022 at 02:03:46PM +0800, Jason Wang wrote: > > > SC is required for some kernel features like vhost-vDPA. So this patch > > > implements basic SC feature. The idea is

Re: [PATCH] intel_iommu: support snoop control

2022-02-13 Thread Peter Xu
On Mon, Feb 14, 2022 at 02:35:18PM +0800, Jason Wang wrote: > On Mon, Feb 14, 2022 at 2:31 PM Peter Xu wrote: > > > > On Mon, Feb 14, 2022 at 02:03:46PM +0800, Jason Wang wrote: > > > SC is required for some kernel features like vhost-vDPA. So this patch > > > implements basic SC feature. The

Re: [PATCH] intel_iommu: support snoop control

2022-02-13 Thread Jason Wang
On Mon, Feb 14, 2022 at 2:31 PM Peter Xu wrote: > > On Mon, Feb 14, 2022 at 02:03:46PM +0800, Jason Wang wrote: > > SC is required for some kernel features like vhost-vDPA. So this patch > > implements basic SC feature. The idea is pretty simple, for software > > emulated DMA it would be always

Re: [PATCH] intel_iommu: support snoop control

2022-02-13 Thread Peter Xu
On Mon, Feb 14, 2022 at 02:03:46PM +0800, Jason Wang wrote: > SC is required for some kernel features like vhost-vDPA. So this patch > implements basic SC feature. The idea is pretty simple, for software > emulated DMA it would be always coherent. In this case we can simple > advertise ECAP_SC

[PATCH] intel_iommu: support snoop control

2022-02-13 Thread Jason Wang
SC is required for some kernel features like vhost-vDPA. So this patch implements basic SC feature. The idea is pretty simple, for software emulated DMA it would be always coherent. In this case we can simple advertise ECAP_SC bit. For VFIO and vhost, thing will be more much complicated, so this

[PULL 5/8] net/colo-compare.c: Update the default value comments

2022-02-13 Thread Jason Wang
From: Zhang Chen Make the comments consistent with the REGULAR_PACKET_CHECK_MS. Signed-off-by: Zhang Chen Signed-off-by: Jason Wang --- net/colo-compare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 216de5a..62554b5 100644

[PULL 3/8] net: Fix uninitialized data usage

2022-02-13 Thread Jason Wang
From: Peter Foley e.g. 1109 15:16:20.151506 Uninitialized bytes in ioctl_common_pre at offset 0 inside [0x7ffc516af9b8, 4) 1109 15:16:20.151659 ==588974==WARNING: MemorySanitizer: use-of-uninitialized-value 1109 15:16:20.312923 #0 0x5639b88acb21 in tap_probe_vnet_hdr_len

[PULL 7/8] hw/net: e1000e: Clear ICR on read when using non MSI-X interrupts

2022-02-13 Thread Jason Wang
From: Nick Hudson In section 7.4.3 of the 82574 datasheet it states that "In systems that do not support MSI-X, reading the ICR register clears it's bits..." Some OSes rely on this. Signed-off-by: Nick Hudson Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 5 +

[PULL 6/8] net/filter: Optimize filter_send to coroutine

2022-02-13 Thread Jason Wang
From: Rao Lei This patch is to improve the logic of QEMU main thread sleep code in qemu_chr_write_buffer() where it can be blocked and can't run other coroutines during COLO IO stress test. Our approach is to put filter_send() in a coroutine. In this way, filter_send() will call

[PULL 2/8] net/tap: Set return code on failure

2022-02-13 Thread Jason Wang
From: Peter Foley Match the other error handling in this function. Fixes: e7b347d0bf6 ("net: detect errors from probing vnet hdr flag for TAP devices") Reviewed-by: Patrick Venture Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Peter Foley Signed-off-by: Jason Wang --- net/tap.c | 1

[PULL 4/8] net/colo-compare.c: Optimize compare order for performance

2022-02-13 Thread Jason Wang
From: Zhang Chen COLO-compare use the glib function g_queue_find_custom to dump another VM's networking packet to compare. But this function always start find from the queue->head(here is the newest packet), It will reduce the success rate of comparison. So this patch reversed the order of the

[PULL 1/8] hw/net/vmxnet3: Log guest-triggerable errors using LOG_GUEST_ERROR

2022-02-13 Thread Jason Wang
From: Philippe Mathieu-Daudé The "Interrupt Cause" register (VMXNET3_REG_ICR) is read-only. Write accesses are ignored. Log them with as LOG_GUEST_ERROR instead of aborting: [R +0.239743] writeq 0xe0002031 0x46291a5a55460800 ERROR:hw/net/vmxnet3.c:1819:vmxnet3_io_bar1_write: code should not

Re: [PATCH 1/8] hw/net/vmxnet3: Log guest-triggerable errors using LOG_GUEST_ERROR

2022-02-13 Thread Jason Wang
Hi: Hit the wrong button, please ignore this series. Thanks On Mon, Feb 14, 2022 at 11:57 AM Jason Wang wrote: > > From: Philippe Mathieu-Daudé > > The "Interrupt Cause" register (VMXNET3_REG_ICR) is read-only. > Write accesses are ignored. Log them with as LOG_GUEST_ERROR > instead of

[PULL 8/8] net/eth: Don't consider ESP to be an IPv6 option header

2022-02-13 Thread Jason Wang
From: Thomas Jansen The IPv6 option headers all have in common that they start with some common fields, in particular the type of the next header followed by the extention header length. This is used to traverse the list of the options. The ESP header does not follow that format, which can break

[PATCH 4/8] net/colo-compare.c: Optimize compare order for performance

2022-02-13 Thread Jason Wang
From: Zhang Chen COLO-compare use the glib function g_queue_find_custom to dump another VM's networking packet to compare. But this function always start find from the queue->head(here is the newest packet), It will reduce the success rate of comparison. So this patch reversed the order of the

[PATCH 8/8] net/eth: Don't consider ESP to be an IPv6 option header

2022-02-13 Thread Jason Wang
From: Thomas Jansen The IPv6 option headers all have in common that they start with some common fields, in particular the type of the next header followed by the extention header length. This is used to traverse the list of the options. The ESP header does not follow that format, which can break

[PATCH 6/8] net/filter: Optimize filter_send to coroutine

2022-02-13 Thread Jason Wang
From: Rao Lei This patch is to improve the logic of QEMU main thread sleep code in qemu_chr_write_buffer() where it can be blocked and can't run other coroutines during COLO IO stress test. Our approach is to put filter_send() in a coroutine. In this way, filter_send() will call

[PULL 0/8] Net patches

2022-02-13 Thread Jason Wang
The following changes since commit 48033ad678ae2def43bf0d543a2c4c3d2a93feaf: Merge remote-tracking branch 'remotes/vsementsov/tags/pull-nbd-2022-02-09-v2' into staging (2022-02-12 22:04:07 +) are available in the git repository at: https://github.com/jasowang/qemu.git

[PATCH 3/8] net: Fix uninitialized data usage

2022-02-13 Thread Jason Wang
From: Peter Foley e.g. 1109 15:16:20.151506 Uninitialized bytes in ioctl_common_pre at offset 0 inside [0x7ffc516af9b8, 4) 1109 15:16:20.151659 ==588974==WARNING: MemorySanitizer: use-of-uninitialized-value 1109 15:16:20.312923 #0 0x5639b88acb21 in tap_probe_vnet_hdr_len

[PATCH 7/8] hw/net: e1000e: Clear ICR on read when using non MSI-X interrupts

2022-02-13 Thread Jason Wang
From: Nick Hudson In section 7.4.3 of the 82574 datasheet it states that "In systems that do not support MSI-X, reading the ICR register clears it's bits..." Some OSes rely on this. Signed-off-by: Nick Hudson Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 5 +

[PATCH 5/8] net/colo-compare.c: Update the default value comments

2022-02-13 Thread Jason Wang
From: Zhang Chen Make the comments consistent with the REGULAR_PACKET_CHECK_MS. Signed-off-by: Zhang Chen Signed-off-by: Jason Wang --- net/colo-compare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 216de5a12b..62554b5b3c

[PATCH 2/8] net/tap: Set return code on failure

2022-02-13 Thread Jason Wang
From: Peter Foley Match the other error handling in this function. Fixes: e7b347d0bf6 ("net: detect errors from probing vnet hdr flag for TAP devices") Reviewed-by: Patrick Venture Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Peter Foley Signed-off-by: Jason Wang --- net/tap.c | 1

[PATCH 1/8] hw/net/vmxnet3: Log guest-triggerable errors using LOG_GUEST_ERROR

2022-02-13 Thread Jason Wang
From: Philippe Mathieu-Daudé The "Interrupt Cause" register (VMXNET3_REG_ICR) is read-only. Write accesses are ignored. Log them with as LOG_GUEST_ERROR instead of aborting: [R +0.239743] writeq 0xe0002031 0x46291a5a55460800 ERROR:hw/net/vmxnet3.c:1819:vmxnet3_io_bar1_write: code should not

Re: [PATCH v2] hw/net: e1000e: Clear ICR on read when using non MSI-X interrupts

2022-02-13 Thread Jason Wang
在 2022/2/12 下午5:44, Nick Hudson 写道: In section 7.4.3 of the 82574 datasheet it states that "In systems that do not support MSI-X, reading the ICR register clears it's bits..." Some OSes rely on this. Signed-off-by: Nick Hudson Applied. Thanks --- hw/net/e1000e_core.c |

Re: [PATCH v4 09/13] block/file-posix: Remove a deprecation warning on macOS 12

2022-02-13 Thread Cameron Esfahani
Reviewed by: Cameron Esfahani mailto:di...@apple.com>> > On Feb 11, 2022, at 8:34 AM, Philippe Mathieu-Daudé via > wrote: > > When building on macOS 12 we get: > > block/file-posix.c:3335:18: warning: 'IOMasterPort' is deprecated: first > deprecated in macOS 12.0 [-Wdeprecated-declarations]

Re: [PATCH v4 12/13] ui/cocoa: Remove allowedFileTypes restriction in SavePanel

2022-02-13 Thread Cameron Esfahani
Reviewed-by: Cameron Esfahani mailto:di...@apple.com>> > On Feb 11, 2022, at 8:34 AM, Philippe Mathieu-Daudé via > wrote: > > setAllowedFileTypes is deprecated in macOS 12. > > Per Akihiko Odaki [*]: > > An image file, which is being chosen by the panel, can be a > raw file and have a

Re: [RFC] vhost-vdpa: make notifiers _init()/_uninit() symmetric

2022-02-13 Thread Jason Wang
On Sat, Feb 12, 2022 at 12:13 AM Laurent Vivier wrote: > > vhost_vdpa_host_notifiers_init() initializes queue notifiers > for queues "dev->vq_index" to queue "dev->vq_index + dev->nvqs", > whereas vhost_vdpa_host_notifiers_uninit() uninitializes the > same notifiers for queue "0" to queue

Re: [PATCH] hw/virtio: vdpa: Fix leak of host-notifier memory-region

2022-02-13 Thread Jason Wang
On Sat, Feb 12, 2022 at 1:03 AM Laurent Vivier wrote: > > If call virtio_queue_set_host_notifier_mr fails, should free > host-notifier memory-region. > > This problem can trigger a coredump with some vDPA drivers (mlx5, > but not with the vdpasim), if we unplug the virtio-net card from > the

Re: [PULL 0/5] 9p queue 2022-02-10

2022-02-13 Thread Peter Maydell
On Thu, 10 Feb 2022 at 11:33, Christian Schoenebeck wrote: > > The following changes since commit 0a301624c2f4ced3331ffd5bce85b4274fe132af: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20220208' into staging (2022-02-08 > 11:40:08 +) > > are available in the

Re: bdrv_is_allocated

2022-02-13 Thread Philippe Mathieu-Daudé via
On 13/2/22 15:24, 沈梦姣 wrote: Hi, I’m trying to understand this function, but seems no note in the header file, could anyone help explain this function? It will be great if there is an example. Thanks in advance! thanks Cc'ing qemu-block@ list.

Re: [PATCH v2 2/5] pci: Always pass own DeviceState to pci_map_irq_fn's

2022-02-13 Thread BALATON Zoltan
On Sun, 13 Feb 2022, Bernhard Beschow wrote: Am 12. Februar 2022 17:13:19 MEZ schrieb BALATON Zoltan : On Sat, 12 Feb 2022, Bernhard Beschow wrote: Am 12. Februar 2022 14:27:32 MEZ schrieb BALATON Zoltan : On Sat, 12 Feb 2022, Bernhard Beschow wrote: Passing own DeviceState rather than just

Re: [PATCH v2 1/5] malta: Move PCI interrupt handling from gt64xxx to piix4

2022-02-13 Thread Bernhard Beschow
Am 12. Februar 2022 14:18:54 MEZ schrieb BALATON Zoltan : >On Sat, 12 Feb 2022, Bernhard Beschow wrote: >> Handling PCI interrupts in piix4 increases cohesion and reduces differences >> between piix4 and piix3. >> >> Signed-off-by: Bernhard Beschow >> Reviewed-by: Philippe Mathieu-Daudé > >Sorry

Re: [PATCH v2 2/5] pci: Always pass own DeviceState to pci_map_irq_fn's

2022-02-13 Thread Bernhard Beschow
Am 12. Februar 2022 17:13:19 MEZ schrieb BALATON Zoltan : >On Sat, 12 Feb 2022, Bernhard Beschow wrote: >> Am 12. Februar 2022 14:27:32 MEZ schrieb BALATON Zoltan : >>> On Sat, 12 Feb 2022, Bernhard Beschow wrote: Passing own DeviceState rather than just the IRQs allows for resolving

bdrv_is_allocated

2022-02-13 Thread 沈梦姣
Hi, I’m trying to understand this function, but seems no note in the header file, could anyone help explain this function? It will be great if there is an example. Thanks in advance! thanks

Re: [PATCH v2 1/5] malta: Move PCI interrupt handling from gt64xxx to piix4

2022-02-13 Thread Bernhard Beschow
Am 12. Februar 2022 17:44:30 MEZ schrieb BALATON Zoltan : >On Sat, 12 Feb 2022, BALATON Zoltan wrote: >> On Sat, 12 Feb 2022, Bernhard Beschow wrote: >>> Handling PCI interrupts in piix4 increases cohesion and reduces differences >>> between piix4 and piix3. >>> >>> Signed-off-by: Bernhard

Re: [PULL 18/38] hw/arm/virt: Honor highmem setting when computing the memory map

2022-02-13 Thread Peter Maydell
On Sun, 13 Feb 2022 at 11:38, Akihiko Odaki wrote: > I found that it actually gets the available PA bit of the emulated CPU > when highmem=on. I used "cortex-a72", which can have more than 36 > bits. I just simply switched to "host"; hvf didn't support "host" when > I set up my VM but now it

Re: [PULL 18/38] hw/arm/virt: Honor highmem setting when computing the memory map

2022-02-13 Thread Akihiko Odaki
On Sun, Feb 13, 2022 at 7:46 PM Peter Maydell wrote: > > On Sun, 13 Feb 2022 at 10:22, Marc Zyngier wrote: > > > > [+ Alex for HVF] > > > > On Sun, 13 Feb 2022 05:05:33 +, > > Akihiko Odaki wrote: > > > Hi, > > > This breaks in a case where highmem is disabled but can have more than > > > 4

Re: [PATCH] ui/cocoa: Fix the leak of qemu_console_get_label

2022-02-13 Thread BALATON Zoltan
On Sun, 13 Feb 2022, Akihiko Odaki wrote: Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index ac18e14ce01..fdf52a7c2f7 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -1680,7 +1680,10 @@ static void

Re: [PULL 18/38] hw/arm/virt: Honor highmem setting when computing the memory map

2022-02-13 Thread Peter Maydell
On Sun, 13 Feb 2022 at 10:22, Marc Zyngier wrote: > > [+ Alex for HVF] > > On Sun, 13 Feb 2022 05:05:33 +, > Akihiko Odaki wrote: > > Hi, > > This breaks in a case where highmem is disabled but can have more than > > 4 GiB of RAM. M1 (Apple Silicon) actually can have 36-bit PA with HVF, > >

Re: [PULL v2 0/7] nbd: handle AioContext change correctly

2022-02-13 Thread Peter Maydell
On Fri, 11 Feb 2022 at 13:22, Vladimir Sementsov-Ogievskiy wrote: > > The following changes since commit 0a301624c2f4ced3331ffd5bce85b4274fe132af: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20220208' into staging (2022-02-08 > 11:40:08 +) > > are available

Re: [PULL 18/38] hw/arm/virt: Honor highmem setting when computing the memory map

2022-02-13 Thread Marc Zyngier
[+ Alex for HVF] On Sun, 13 Feb 2022 05:05:33 +, Akihiko Odaki wrote: > > On 2022/01/20 21:36, Peter Maydell wrote: > > From: Marc Zyngier > > > > Even when the VM is configured with highmem=off, the highest_gpa > > field includes devices that are above the 4GiB limit. > > Similarily,