Re: [PATCH v14 3/7] migration/dirtyrate: Refactor dirty page rate calculation

2022-02-14 Thread Peter Xu
Mostly good, one trivial nit below: On Fri, Feb 11, 2022 at 12:17:37AM +0800, huang...@chinatelecom.cn wrote: > +int64_t vcpu_calculate_dirtyrate(int64_t calc_time_ms, > + int64_t init_time_ms, > + VcpuStat *stat, > +

Re: [PATCH v14 2/7] cpus: Introduce cpu_list_generation_id

2022-02-14 Thread Peter Xu
On Fri, Feb 11, 2022 at 12:17:36AM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Introduce cpu_list_generation_id to track cpu list generation so > that cpu hotplug/unplug can be detected during measurement of > dirty page rate. Could you add a short paragraph on showing how

[PULL 6/6] hw/nvme: add support for zoned random write area

2022-02-14 Thread Klaus Jensen
From: Klaus Jensen Add support for TP 4076 ("Zoned Random Write Area"), v2021.08.23 ("Ratified"). This adds three new namespace parameters: "zoned.numzrwa" (number of zrwa resources, i.e. number of zones that can have a zrwa), "zoned.zrwas" (zrwa size in LBAs), "zoned.zrwafg" (granularity in LBA

Re: [PATCH v14 1/7] accel/kvm/kvm-all: Refactor per-vcpu dirty ring reaping

2022-02-14 Thread Peter Xu
On Fri, Feb 11, 2022 at 12:17:35AM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Add a non-required argument 'CPUState' to kvm_dirty_ring_reap so > that it can cover single vcpu dirty-ring-reaping scenario. > > Signed-off-by: Hyman Huang(黄勇) Reviewed-by: Peter Xu -- Pet

[PULL 2/6] hw/nvme/ctrl: Have nvme_addr_write() take const buffer

2022-02-14 Thread Klaus Jensen
From: Philippe Mathieu-Daudé The 'buf' argument is not modified, so better pass it as const type. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Klaus Jensen Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/nvme/ctrl.c

Re: [PATCH v14 5/7] accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function

2022-02-14 Thread Peter Xu
On Fri, Feb 11, 2022 at 12:17:39AM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Introduce kvm_dirty_ring_size util function to help calculate > dirty ring ful time. > > Signed-off-by: Hyman Huang(黄勇) Acked-by: Peter Xu -- Peter Xu

Re: [PATCH v14 4/7] softmmu/dirtylimit: Implement vCPU dirtyrate calculation periodically

2022-02-14 Thread Peter Xu
On Fri, Feb 11, 2022 at 12:17:38AM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Introduce the third method GLOBAL_DIRTY_LIMIT of dirty > tracking for calculate dirtyrate periodly for dirty page > rate limit. > > Add dirtylimit.c to implement dirtyrate calculation periodly,

[PULL 1/6] hw/nvme: fix CVE-2021-3929

2022-02-14 Thread Klaus Jensen
From: Klaus Jensen This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the device itself. This still allows DMA to MMIO regions of other devices (e.g. doing P2P DMA to the controller memory buffer of another NVMe device). Fixes: CVE-2021-3929 Reported-by: Qiuhao Li Reviewed-by: Ke

Re: [PATCH] qapi, i386/sev: Add debug-launch-digest to launch-measure response

2022-02-14 Thread Dov Murik
On 31/01/2022 16:26, Daniel P. Berrangé wrote: [...] > > IOW, I think there's only two scenarios that make sense > > 1. The combined launch digest over firmware, kernel hashes >and VMSA state. > > 2. Individual hashes for each of firmware, kernel hashes table and >VMSA state > Just

Re: [PATCH v14 7/7] softmmu/dirtylimit: Implement dirty page rate limit

2022-02-14 Thread Peter Xu
On Fri, Feb 11, 2022 at 12:17:41AM +0800, huang...@chinatelecom.cn wrote: > +static struct DirtyLimitInfoList *dirtylimit_query_all(void) > +{ > +int i, index; > +DirtyLimitInfo *info = NULL; > +DirtyLimitInfoList *head = NULL, **tail = &head; > + > +dirtylimit_state_lock(); > + > +

[PULL 3/6] hw/nvme/ctrl: Pass buffers as 'void *' types

2022-02-14 Thread Klaus Jensen
From: Philippe Mathieu-Daudé These buffers can be anything, not an array of chars, so use the 'void *' type for them. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Klaus Jensen Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 10 +- hw/nvme/nvme.h | 4 ++-- 2 files changed, 7 i

Re: [PATCH v14 6/7] softmmu/dirtylimit: Implement virtual CPU throttle

2022-02-14 Thread Peter Xu
On Fri, Feb 11, 2022 at 12:17:40AM +0800, huang...@chinatelecom.cn wrote: > @@ -2964,8 +2971,13 @@ int kvm_cpu_exec(CPUState *cpu) > */ > trace_kvm_dirty_ring_full(cpu->cpu_index); > qemu_mutex_lock_iothread(); > -kvm_dirty_ring_reap(kvm_state, NU

[PULL 0/6] hw/nvme updates

2022-02-14 Thread Klaus Jensen
From: Klaus Jensen Hi Peter, 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: git://git.infradead.org

[PULL 4/6] hw/nvme: add struct for zone management send

2022-02-14 Thread Klaus Jensen
From: Klaus Jensen Add struct for Zone Management Send in preparation for more zone send flags. Reviewed-by: Keith Busch Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 10 -- include/block/nvme.h | 19 +++ 2 files changed, 23 insertions(+), 6 deletions(-) diff

Re: [PATCH v14 3/7] migration/dirtyrate: Refactor dirty page rate calculation

2022-02-14 Thread Hyman Huang
在 2022/2/14 15:57, Peter Xu 写道: Mostly good, one trivial nit below: On Fri, Feb 11, 2022 at 12:17:37AM +0800, huang...@chinatelecom.cn wrote: +int64_t vcpu_calculate_dirtyrate(int64_t calc_time_ms, + int64_t init_time_ms, + Vcpu

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

2022-02-14 Thread Igor Mammedov
On Mon, 14 Feb 2022 14:58:57 +0800 Yang Zhong wrote: > 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/un

[PULL 5/6] hw/nvme: add ozcs enum

2022-02-14 Thread Klaus Jensen
From: Klaus Jensen Add enumeration for OZCS values. Reviewed-by: Keith Busch Signed-off-by: Klaus Jensen --- hw/nvme/ns.c | 3 ++- include/block/nvme.h | 4 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/nvme/ns.c b/hw/nvme/ns.c index 8b5f98c76180..356b6c1c2f14

Re: [PATCH v14 6/7] softmmu/dirtylimit: Implement virtual CPU throttle

2022-02-14 Thread Hyman Huang
在 2022/2/14 16:20, Peter Xu 写道: On Fri, Feb 11, 2022 at 12:17:40AM +0800, huang...@chinatelecom.cn wrote: @@ -2964,8 +2971,13 @@ int kvm_cpu_exec(CPUState *cpu) */ trace_kvm_dirty_ring_full(cpu->cpu_index); qemu_mutex_lock_iothread(); -kv

Re: qemu iotest 161 and make check

2022-02-14 Thread Christian Borntraeger
Am 10.02.22 um 15:47 schrieb Vladimir Sementsov-Ogievskiy: 10.02.2022 10:57, Christian Borntraeger wrote: Hello, I do see spurious failures of 161 in our CI, but only when I use make check with parallelism (-j). I have not yet figured out which other testcase could interfere @@ -34,6 +34,8

[PATCH] ui/cocoa: Add Services menu

2022-02-14 Thread Akihiko Odaki
Services menu functionality of Cocoa is described at: https://developer.apple.com/design/human-interface-guidelines/macos/extensions/services/ Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 4 1 file changed, 4 insertions(+) diff --git a/ui/cocoa.m b/ui/cocoa.m index ac18e14ce01..e0882fd48e

Re: [PATCH v14 6/7] softmmu/dirtylimit: Implement virtual CPU throttle

2022-02-14 Thread Hyman Huang
在 2022/2/14 16:20, Peter Xu 写道: On Fri, Feb 11, 2022 at 12:17:40AM +0800, huang...@chinatelecom.cn wrote: @@ -2964,8 +2971,13 @@ int kvm_cpu_exec(CPUState *cpu) */ trace_kvm_dirty_ring_full(cpu->cpu_index); qemu_mutex_lock_iothread(); -kv

Re: [PATCH v14 7/7] softmmu/dirtylimit: Implement dirty page rate limit

2022-02-14 Thread Hyman Huang
在 2022/2/14 16:25, Peter Xu 写道: On Fri, Feb 11, 2022 at 12:17:41AM +0800, huang...@chinatelecom.cn wrote: +static struct DirtyLimitInfoList *dirtylimit_query_all(void) +{ +int i, index; +DirtyLimitInfo *info = NULL; +DirtyLimitInfoList *head = NULL, **tail = &head; + +dirtylim

Re: [PATCH v14 3/7] migration/dirtyrate: Refactor dirty page rate calculation

2022-02-14 Thread Peter Xu
On Mon, Feb 14, 2022 at 04:40:31PM +0800, Hyman Huang wrote: > Dropping this parameter is fine from my point view if we ignore the duration > error result from the delay between caller and callee of > 'vcpu_calculate_dirtyrate’ Agreed, then let's drop it. -- Peter Xu

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

2022-02-14 Thread Christian Schoenebeck
On Sonntag, 13. Februar 2022 21:33:10 CET Peter Maydell wrote: > 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

Re: [PATCH] MAINTAINERS: Add Akihiko Odaki to macOS-relateds

2022-02-14 Thread Christian Schoenebeck
On Sonntag, 13. Februar 2022 03:12:15 CET Akihiko Odaki wrote: > Signed-off-by: Akihiko Odaki > --- > MAINTAINERS | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 2fd74c46426..5aefb5b431a 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -2333,6 +233

Re: [PATCH v14 6/7] softmmu/dirtylimit: Implement virtual CPU throttle

2022-02-14 Thread Peter Xu
On Mon, Feb 14, 2022 at 05:05:38PM +0800, Hyman Huang wrote: > But i'm ok if you insist because it's just about how to call the > 'dirtylimit' and doesn't affect the whole logic. If you don't have plan to add e.g. another adjust() method then it's pointless. The hook can be easily added on top whe

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

2022-02-14 Thread Peter Maydell
On Mon, 14 Feb 2022 at 09:47, Christian Schoenebeck wrote: > So this is about the 'dirent' patch: > https://github.com/cschoenebeck/qemu/commit/de19c79dad6a2cad54ae04ce754d47c07bf9bc93 > > In conjunction with the 9p fuzzing tests: > https://wiki.qemu.org/Documentation/9p#Fuzzing > > I first though

Re: [RFC] thread-pool: Add option to fix the pool size

2022-02-14 Thread Stefan Hajnoczi
On Fri, Feb 11, 2022 at 12:32:57PM +0100, Kevin Wolf wrote: > Am 03.02.2022 um 15:19 hat Stefan Hajnoczi geschrieben: > > On Thu, Feb 03, 2022 at 10:56:49AM +, Daniel P. Berrangé wrote: > > > On Thu, Feb 03, 2022 at 10:53:07AM +, Stefan Hajnoczi wrote: > > > > On Wed, Feb 02, 2022 at 06:52:

Re: [PATCH 1/6] block/io.c: fix bdrv_child_cb_drained_begin invocations from a coroutine

2022-02-14 Thread Emanuele Giuseppe Esposito
On 11/02/2022 12:54, Kevin Wolf wrote: > Am 08.02.2022 um 16:36 hat Emanuele Giuseppe Esposito geschrieben: >> Using bdrv_do_drained_begin_quiesce() in bdrv_child_cb_drained_begin() >> is not a good idea: the callback might be called when running >> a drain in a coroutine, and bdrv_drained_begin

Re: [PATCH] ui/cocoa: Set UI information

2022-02-14 Thread Gerd Hoffmann
> (2) A question for Gerd: > Is it safe to call dpy_set_ui_info() from a non-QEMU-main-thread? No. take care, Gerd

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

2022-02-14 Thread Daniel P . Berrangé
On Mon, Feb 14, 2022 at 09:21:07AM +0100, Igor Mammedov wrote: > On Mon, 14 Feb 2022 14:58:57 +0800 > Yang Zhong wrote: > > > 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 SG

Re: [PATCH] qapi, i386/sev: Add debug-launch-digest to launch-measure response

2022-02-14 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Thu, Feb 10, 2022 at 07:39:01PM +, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > I wonder if we're thinking of this at the wrong level though. Does > > > it actually need to be QEMU providing this

Re: [PATCH 3/6] block.c: bdrv_replace_child_noperm: first call ->attach(), and then add child

2022-02-14 Thread Emanuele Giuseppe Esposito
On 11/02/2022 13:34, Kevin Wolf wrote: > Am 08.02.2022 um 16:36 hat Emanuele Giuseppe Esposito geschrieben: >> Doing the opposite can make adding the child node to a non-drained node, >> as apply_subtree_drain is only done in ->attach() and thus make >> assert_bdrv_graph_writable fail. >> >> Thi

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

2022-02-14 Thread Greg Kurz
On Mon, 14 Feb 2022 10:47:43 +0100 Christian Schoenebeck wrote: > On Sonntag, 13. Februar 2022 21:33:10 CET Peter Maydell wrote: > > On Thu, 10 Feb 2022 at 11:33, Christian Schoenebeck > > > > wrote: > > > The following changes since commit > > > 0a301624c2f4ced3331ffd5bce85b4274fe132af: > > >

Re: [RFC PATCH 01/25] virtio-snd: Add virtio sound header file

2022-02-14 Thread Gerd Hoffmann
On Sat, Feb 12, 2022 at 03:42:55AM +0530, Shreyansh Chouhan wrote: > Added device configuration and common definitions to the header > file. > > Signed-off-by: Shreyansh Chouhan > --- > include/hw/virtio/virtio-snd.h | 97 ++ > 1 file changed, 97 insertions(+) >

Re: [PATCH] ui/cocoa: Set UI information

2022-02-14 Thread Peter Maydell
On Mon, 14 Feb 2022 at 10:27, Gerd Hoffmann wrote: > > > (2) A question for Gerd: > > Is it safe to call dpy_set_ui_info() from a non-QEMU-main-thread? > > No. Is it OK to do so if the other thread is holding the iothread lock? (This is how we do a lot of the other "need to call a QEMU function"

Re: [RFC PATCH v2 00/25] Virtio Sound card Implementation

2022-02-14 Thread Gerd Hoffmann
Hi, > IMHO, all your patches can be merged in only one. For the most part yes. I'd keep the pci wrapper (aka -device virtio-snd-pci) separate though. Possibly also patches adding significant functionality in the future (i.e. one patch with all basics and playback support, one patch adding rec

Re: [RFC PATCH v2 00/25] Virtio Sound card Implementation

2022-02-14 Thread Laurent Vivier
Le 14/02/2022 à 11:44, Gerd Hoffmann a écrit : Hi, IMHO, all your patches can be merged in only one. For the most part yes. I'd keep the pci wrapper (aka -device virtio-snd-pci) separate though. Possibly also patches adding significant functionality in the future (i.e. one patch with all

Re: [PATCH 5/6] test-bdrv-drain.c: remove test_detach_by_parent_cb()

2022-02-14 Thread Emanuele Giuseppe Esposito
On 11/02/2022 16:38, Kevin Wolf wrote: > Am 08.02.2022 um 16:36 hat Emanuele Giuseppe Esposito geschrieben: >> This test uses a callback of an I/O function (blk_aio_preadv) >> to modify the graph, using bdrv_attach_child. >> This is simply not allowed anymore. I/O cannot change the graph. > > T

Re: [PATCH v2] Deprecate C virtiofsd

2022-02-14 Thread Stefan Hajnoczi
On Thu, Feb 10, 2022 at 05:47:14PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > There's a nice new Rust implementation out there; recommend people > do new work on that. > > Signed-off-by: Dr. David Alan Gilbert > --- > docs/about/deprecated.rst | 17

[PATCH 1/2] spapr: Add SPAPR_CAP_AIL_MODE_3 for AIL mode 3 support for H_SET_MODE hcall

2022-02-14 Thread Nicholas Piggin
The behaviour of the Address Translation Mode on Interrupt resource is not consistently supported by all CPU versions or all KVM versions. In particular KVM HV only supports mode 0 on POWER7 processors and some early POWER9 processors, and does not support mode 2 anywhere. KVM PR only supports mode

[PATCH 2/2] target/ppc/kvm: Use KVM_CAP_PPC_AIL_MODE_3 to determine cap-ail-mode-3 support

2022-02-14 Thread Nicholas Piggin
Use KVM_CAP_PPC_AIL_MODE_3 to determine cap-ail-mode-3 support for KVM guests. Keep the fallback heuristic for KVM hosts that pre-date this CAP. This is only proposed the KVM CAP has not yet been allocated. I will ask to merge the new KVM cap when there are no objections on the QEMU side. not-yet

Re: [PATCH v2] Deprecate C virtiofsd

2022-02-14 Thread Dr. David Alan Gilbert
* Richard W.M. Jones (rjo...@redhat.com) wrote: > On Thu, Feb 10, 2022 at 05:47:14PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > There's a nice new Rust implementation out there; recommend people > > do new work on that. > > > > Signed-off-by: Dr. David

Re: [RFC] thread-pool: Add option to fix the pool size

2022-02-14 Thread Kevin Wolf
Am 14.02.2022 um 11:09 hat Stefan Hajnoczi geschrieben: > On Fri, Feb 11, 2022 at 12:32:57PM +0100, Kevin Wolf wrote: > > Am 03.02.2022 um 15:19 hat Stefan Hajnoczi geschrieben: > > > On Thu, Feb 03, 2022 at 10:56:49AM +, Daniel P. Berrangé wrote: > > > > On Thu, Feb 03, 2022 at 10:53:07AM +000

Re: [PATCH 5/6] test-bdrv-drain.c: remove test_detach_by_parent_cb()

2022-02-14 Thread Paolo Bonzini
On 2/11/22 16:38, Kevin Wolf wrote: The callback of an I/O function isn't I/O, though. It is code_after_ the I/O has completed. If this doesn't work any more, it feels like this is a bug. The issue is that the I/O has *not* completed yet. blk_aio_preadv(..., cb, opaque) is not equivalent to

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

2022-02-14 Thread Christian Schoenebeck
On Montag, 14. Februar 2022 11:36:53 CET Greg Kurz wrote: > On Mon, 14 Feb 2022 10:47:43 +0100 > > Christian Schoenebeck wrote: > > On Sonntag, 13. Februar 2022 21:33:10 CET Peter Maydell wrote: > > > On Thu, 10 Feb 2022 at 11:33, Christian Schoenebeck > > > > > > wrote: > > > > The following c

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

2022-02-14 Thread Stefano Garzarella
On Mon, Feb 14, 2022 at 03:11:20PM +0800, Jason Wang wrote: 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 20

Re: [PATCH] ui/cocoa: Set UI information

2022-02-14 Thread Gerd Hoffmann
On Mon, Feb 14, 2022 at 10:43:32AM +, Peter Maydell wrote: > On Mon, 14 Feb 2022 at 10:27, Gerd Hoffmann wrote: > > > > > (2) A question for Gerd: > > > Is it safe to call dpy_set_ui_info() from a non-QEMU-main-thread? > > > > No. > > Is it OK to do so if the other thread is holding the iothr

[PATCH v4 1/1] util: adjust coroutine pool size to virtio block queue

2022-02-14 Thread Hiroki Narukawa
Coroutine pool size was 64 from long ago, and the basis was organized in the commit message in 4d68e86b. At that time, virtio-blk queue-size and num-queue were not configuable, and equivalent values were 128 and 1. Coroutine pool size 64 was fine then. Later queue-size and num-queue got config

[PATCH v4 0/1] Patch to adjust coroutine pool size adaptively

2022-02-14 Thread Hiroki Narukawa
Resending with correct commit message Resending patch with decreasing coroutine pool size on device remove We encountered random disk IO performance drop since qemu-5.0.0, and this patch fixes it. Commit message in 4d68e86b implied to adjust coroutine pool size adaptively, so I tried to implem

RE: [PATCH v3 1/1] util: adjust coroutine pool size to virtio block queue

2022-02-14 Thread Hiroki Narukawa
> Coroutine pool size was 64 from long ago, and the basis was organized in the > commit message in c740ad92. Sorry, I noticed that commit ID mentioning here was incorrect. The correct one is 4d68e86b. https://gitlab.com/qemu-project/qemu/-/commit/4d68e86bb10159099da0798f74e7512955f15eec I have r

Re: [PATCH 1/6] block/io.c: fix bdrv_child_cb_drained_begin invocations from a coroutine

2022-02-14 Thread Paolo Bonzini
On 2/14/22 11:27, Emanuele Giuseppe Esposito wrote: Anyways, I think that in addition to the fix in this patch, we should also fix bdrv_parent_drained_begin_single(poll=true) in bdrv_replace_child_noperm, with something similar to what is done in bdrv_co_yield_to_drain? ie if we are in coroutine,

Re: [PATCH] Add --with-branding-prefix and QEMU_BRANDING_PREFIX

2022-02-14 Thread Liviu Ionescu
> On 8 Feb 2022, at 21:58, Peter Maydell wrote: > > I've cc'd some people who might have an opinion on whether this > something we want to add upstream. ... Well, given the comments received, it is obvious that we have different use cases, and, in my opinion, a one-size-fits-all approach can

[PATCH] ui/clipboard: fix use-after-free regression

2022-02-14 Thread marcandre . lureau
From: Marc-André Lureau The same info may be used to update the clipboard, and may be freed before being ref'ed again. Fixes: 70a54b01693ed ("ui: avoid compiler warnings from unused clipboard info variable") Signed-off-by: Marc-André Lureau --- ui/clipboard.c | 6 -- 1 file changed, 4 in

[PATCH] MAINTAINERS: no need to add my name explicitly as a reviewer for VIOT tables

2022-02-14 Thread Ani Sinha
I am already listed as a reviewer for ACPI/SMBIOS subsystem. There is no need to again add me as a reviewer for ACPI/VIOT. Signed-off-by: Ani Sinha --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index b0b845f445..d92a262947 100644 --- a/MAINTAINERS +

Re: [PATCH 0/6] ui/dbus: Share one listener for a console

2022-02-14 Thread Marc-André Lureau
Hi Akihiko On Sun, Feb 13, 2022 at 6:44 AM Akihiko Odaki wrote: > ui/dbus required to have multiple DisplayChangeListeners (possibly with > OpenGL) > for a console but that caused several problems: > - It broke egl-headless, an unusual display which implements OpenGL > rendering > for non-Open

Re: [PATCH] ui/clipboard: fix use-after-free regression

2022-02-14 Thread Daniel P . Berrangé
On Mon, Feb 14, 2022 at 03:59:17PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The same info may be used to update the clipboard, and may be freed > before being ref'ed again. Ewww, subtle. > Fixes: 70a54b01693ed ("ui: avoid compiler warnings from unused clipboard in

Re: [PATCH 1/6] block/io.c: fix bdrv_child_cb_drained_begin invocations from a coroutine

2022-02-14 Thread Kevin Wolf
Am 14.02.2022 um 11:27 hat Emanuele Giuseppe Esposito geschrieben: > > > On 11/02/2022 12:54, Kevin Wolf wrote: > > Am 08.02.2022 um 16:36 hat Emanuele Giuseppe Esposito geschrieben: > >> Using bdrv_do_drained_begin_quiesce() in bdrv_child_cb_drained_begin() > >> is not a good idea: the callback

Re: [PATCH] Add --with-branding-prefix and QEMU_BRANDING_PREFIX

2022-02-14 Thread Peter Maydell
On Mon, 14 Feb 2022 at 11:54, Liviu Ionescu wrote: > Would you agree on a multi step approach, first a minimal patch that would > solve my use case, then, if there will be others needing it, a more elaborate > solution? > > For example I don't mind having to pass a preprocessor definition to my

Re: [PATCH] hw/i386: Improve bounds checking in OVMF table parsing

2022-02-14 Thread Philippe Mathieu-Daudé via
On 14/2/22 13:08, Dov Murik wrote: When pc_system_parse_ovmf_flash() parses the optional GUIDed table in the end of the OVMF flash memory area, the table length field is checked for sizes that are too small, but doesn't error on sizes that are too big (bigger than the flash content itself). Add

Re: [PATCH] MAINTAINERS: no need to add my name explicitly as a reviewer for VIOT tables

2022-02-14 Thread Philippe Mathieu-Daudé via
On 14/2/22 13:01, Ani Sinha wrote: I am already listed as a reviewer for ACPI/SMBIOS subsystem. There is no need to again add me as a reviewer for ACPI/VIOT. Signed-off-by: Ani Sinha --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index b0b845f445

Re: [PATCH] MAINTAINERS: Add Akihiko Odaki to macOS-relateds

2022-02-14 Thread Philippe Mathieu-Daudé via
On 13/2/22 03:12, Akihiko Odaki wrote: Signed-off-by: Akihiko Odaki --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2fd74c46426..5aefb5b431a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2333,6 +2333,7 @@ F: audio/alsaaudio.c Core Audio

[PATCH] hw/i386: Improve bounds checking in OVMF table parsing

2022-02-14 Thread Dov Murik
When pc_system_parse_ovmf_flash() parses the optional GUIDed table in the end of the OVMF flash memory area, the table length field is checked for sizes that are too small, but doesn't error on sizes that are too big (bigger than the flash content itself). Add a check for maximal size of the OVMF

Re: [PATCH] Add --with-branding-prefix and QEMU_BRANDING_PREFIX

2022-02-14 Thread Liviu Ionescu
> On 14 Feb 2022, at 14:06, Peter Maydell wrote: > > ... but the "v6.2.0-1-xpack-arm" pkgversion suffix works for this > purpose too. Currently I do not use any --pkgversion in my builds, so I guess that this is automatically generated by the meson script, and reflects the name of a custom

Re: [PATCH] ui/cocoa: Add Services menu

2022-02-14 Thread Philippe Mathieu-Daudé via
On 14/2/22 10:13, Akihiko Odaki wrote: Services menu functionality of Cocoa is described at: https://developer.apple.com/design/human-interface-guidelines/macos/extensions/services/ Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 4 1 file changed, 4 insertions(+) Reviewed-by: Philippe

Re: [PATCH v6 03/10] virtiofsd: Parse extended "struct fuse_init_in"

2022-02-14 Thread Dr. David Alan Gilbert
* Vivek Goyal (vgo...@redhat.com) wrote: > Add some code to parse extended "struct fuse_init_in". And use a local > variable "flag" to represent 64 bit flags. This will make it easier > to add more features without having to worry about two 32bit flags (->flags > and ->flags2) in "fuse_struct_in".

Re: [PATCH] hw/ide: implement ich6 ide controller support

2022-02-14 Thread BALATON Zoltan
On Sat, 5 Feb 2022, BALATON Zoltan wrote: Hello, Ping? John, do you agree with my comments? Should Liav proceed to send a v2? Thanks, BALATON Zoltan On Sat, 5 Feb 2022, Liav Albani wrote: On 2/5/22 17:48, BALATON Zoltan wrote: On Sat, 5 Feb 2022, Liav Albani wrote: This type of IDE cont

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

2022-02-14 Thread Christian Schoenebeck
On Montag, 14. Februar 2022 10:55:17 CET Peter Maydell wrote: > On Mon, 14 Feb 2022 at 09:47, Christian Schoenebeck > > wrote: > > So this is about the 'dirent' patch: > > https://github.com/cschoenebeck/qemu/commit/de19c79dad6a2cad54ae04ce754d47 > > c07bf9bc93 > > > > In conjunction with the 9p

[PATCH 3/6] hw/nvme: move format parameter parsing

2022-02-14 Thread Klaus Jensen
From: Klaus Jensen There is no need to extract the format command parameters for each namespace. Move it to the entry point. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/hw/nvme/ctrl.c b/hw/

Re: [PATCH] Add --with-branding-prefix and QEMU_BRANDING_PREFIX

2022-02-14 Thread Daniel P . Berrangé
On Mon, Feb 14, 2022 at 02:18:13PM +0200, Liviu Ionescu wrote: > > > > On 14 Feb 2022, at 14:06, Peter Maydell wrote: > > > > ... but the "v6.2.0-1-xpack-arm" pkgversion suffix works for this > > purpose too. > > Currently I do not use any --pkgversion in my builds, so I guess that > this is a

[PATCH 5/6] hw/nvme: add pi tuple size helper

2022-02-14 Thread Klaus Jensen
From: Klaus Jensen A subsequent patch will introduce a new tuple size; so add a helper and use that instead of sizeof() and magic numbers. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 14 -- hw/nvme/dif.c | 16 hw/nvme/dif.h | 5 + 3 files changed, 21 in

[PATCH 0/6] hw/nvme: enhanced protection information (64-bit guard)

2022-02-14 Thread Klaus Jensen
From: Klaus Jensen This adds support for one possible new protection information format introduced in TP4068 (and integrated in NVMe 2.0): the 64-bit CRC guard and 48-bit reference tag. This version does not support storage tags. Like the CRC16 support already present, this uses a software imple

[PATCH 2/6] hw/nvme: add host behavior support feature

2022-02-14 Thread Klaus Jensen
From: Naveen Nagar Add support for getting and setting the Host Behavior Support feature. Signed-off-by: Naveen Nagar Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 8 hw/nvme/nvme.h | 4 +++- include/block/nvme.h | 9 + 3 files changed, 20 insertions(+), 1 dele

[PATCH 4/6] hw/nvme: add support for the lbafee hbs feature

2022-02-14 Thread Klaus Jensen
From: Naveen Nagar Add support for up to 64 LBA formats through the LBAFEE field of the Host Behavior Support feature. Signed-off-by: Naveen Nagar Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 34 +++--- hw/nvme/ns.c | 15 +-- hw/nvme/n

[PATCH 6/6] hw/nvme: 64-bit pi support

2022-02-14 Thread Klaus Jensen
From: Naveen Nagar This adds support for one possible new protection information format introduced in TP4068 (and integrated in NVMe 2.0): the 64-bit CRC guard and 48-bit reference tag. This version does not support storage tags. Like the CRC16 support already present, this uses a software imple

Re: [PATCH] ui/cocoa: Do not alert even without block devices

2022-02-14 Thread Philippe Mathieu-Daudé via
On 13/2/22 03:14, Akihiko Odaki wrote: Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 5 - 1 file changed, 5 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index ac18e14ce01..271a2676026 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -1715,11 +1715,6 @@ static void addRemovableDevicesMenu

[PATCH 1/6] hw/nvme: move dif/pi prototypes into dif.h

2022-02-14 Thread Klaus Jensen
From: Klaus Jensen Move dif/pi data structures and inlines to dif.h. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 1 + hw/nvme/dif.c | 1 + hw/nvme/dif.h | 53 ++ hw/nvme/nvme.h | 50 --- 4 file

[PATCH v3 0/4] virtio-iommu: Support VIRTIO_IOMMU_F_BYPASS_CONFIG

2022-02-14 Thread Jean-Philippe Brucker
Replace the VIRTIO_IOMMU_F_BYPASS feature with VIRTIO_IOMMU_F_BYPASS_CONFIG, which enables a config space bit to switch global bypass on and off. Add a boot-bypass option, which defaults to 'on' to be in line with other vIOMMUs and to allow running firmware/bootloader that are unaware of the IOMMU

Re: [PATCH v2 2/3] hw/smbios: fix table memory corruption with large memory vms

2022-02-14 Thread Igor Mammedov
On Mon, 7 Feb 2022 17:01:28 +0530 Ani Sinha wrote: > With the current smbios table assignment code, we can have only 512 DIMM slots it's a bit confusing, since it's not DIMM slots in QEMU sense (we do not expose DIMM devices via SMBIOS/E820). So maybe clarify here that initial RAM is split into

[PATCH v3 1/4] linux-headers: update to v5.17-rc1

2022-02-14 Thread Jean-Philippe Brucker
Update Linux headers to v5.17-rc1 Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker --- include/standard-headers/asm-x86/kvm_para.h | 1 + include/standard-headers/drm/drm_fourcc.h | 11 ++ include/standard-headers/linux/ethtool.h | 1 + include/standard-headers/linux

Re: 9 TiB vm memory creation

2022-02-14 Thread Igor Mammedov
On Mon, 14 Feb 2022 10:54:22 +0530 (IST) Ani Sinha wrote: > Hi Igor: > > I failed to spawn a 9 Tib VM. The max I could do was a 2 TiB vm on my > system with the following commandline before either the system > destabilized or the OOM killed killed qemu > > -m 2T,maxmem=9T,slots=1 \ > -object >

[PATCH] target/ppc: raise HV interrupts for partition table entry problems

2022-02-14 Thread Nicholas Piggin
Invalid or missing partition table entry exceptions should cause HV interrupts. HDSISR is set to bad MMU config, which is consistent with the ISA and experimentally matches what POWER9 generates. Signed-off-by: Nicholas Piggin --- target/ppc/mmu-radix64.c | 4 ++-- 1 file changed, 2 insertions(+

[PATCH] spapr: prevent hdec timer being set up under virtual hypervisor

2022-02-14 Thread Nicholas Piggin
The spapr virtual hypervisor does not require the hdecr timer. Remove it. Signed-off-by: Nicholas Piggin --- hw/ppc/ppc.c| 2 +- hw/ppc/spapr_cpu_core.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index 462c87dba8..a7c262db93

Re: [PATCH v4 01/13] lcitool: refresh

2022-02-14 Thread Philippe Mathieu-Daudé via
On 12/2/22 16:14, Akihiko Odaki wrote: On 2022/02/12 1:34, Philippe Mathieu-Daudé via wrote: Signed-off-by: Philippe Mathieu-Daudé ---   tests/docker/dockerfiles/ubuntu1804.docker | 2 --   tests/docker/dockerfiles/ubuntu2004.docker | 2 --   2 files changed, 4 deletions(-) diff --git a/tests/d

Re: [PATCH 0/6] ui/dbus: Share one listener for a console

2022-02-14 Thread Akihiko Odaki
On Mon, Feb 14, 2022 at 9:07 PM Marc-André Lureau wrote: > > Hi Akihiko > > On Sun, Feb 13, 2022 at 6:44 AM Akihiko Odaki wrote: >> >> ui/dbus required to have multiple DisplayChangeListeners (possibly with >> OpenGL) >> for a console but that caused several problems: >> - It broke egl-headless,

Re: [PATCH v4 10/13] audio/coreaudio: Remove a deprecation warning on macOS 12

2022-02-14 Thread Philippe Mathieu-Daudé via
On 12/2/22 16:23, Akihiko Odaki wrote: On 2022/02/12 1:34, Philippe Mathieu-Daudé via wrote: When building on macOS 12 we get:    audio/coreaudio.c:50:5: error: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Werror,-Wdeprecated-declarations]    kAudio

Re: [PATCH v4 05/13] hvf: Fix OOB write in RDTSCP instruction decode

2022-02-14 Thread Philippe Mathieu-Daudé via
Hi Cameron, On 11/2/22 17:34, Philippe Mathieu-Daudé wrote: From: Cameron Esfahani A guest could craft a specific stream of instructions that will have QEMU write 0xF9 to inappropriate locations in memory. Add additional asserts to check for this. Generate a #UD if there are more than 14 pre

[PATCH v3 2/4] virtio-iommu: Default to bypass during boot

2022-02-14 Thread Jean-Philippe Brucker
Currently the virtio-iommu device must be programmed before it allows DMA from any PCI device. This can make the VM entirely unusable when a virtio-iommu driver isn't present, for example in a bootloader that loads the OS from storage. Similarly to the other vIOMMU implementations, default to DMA

Re: [PATCH] Add --with-branding-prefix and QEMU_BRANDING_PREFIX

2022-02-14 Thread Daniel P . Berrangé
On Mon, Feb 14, 2022 at 03:05:58PM +0200, Liviu Ionescu wrote: > > > > On 14 Feb 2022, at 14:28, Daniel P. Berrangé wrote: > > > > In a .git checkout, pkgversion defaults to "git describe --match 'v*' > > --dirty" > > See scripts/qemu-version.sh > > I see. I would say that this is a different

Re: [PATCH v2 3/3] hw/smbios: add an assertion to ensure tables 19 and 32 do not collide

2022-02-14 Thread Igor Mammedov
On Mon, 7 Feb 2022 17:01:29 +0530 Ani Sinha wrote: > Since change b3cddba9c14b034 ("hw/smbios: fix table memory corruption with > large memory vms") > we reserve additional memory space between tables 17 and 19 for large VMs. > This may cause table 19 to collide with table 32 for those VMs. Thi

Re: [PATCH v6 05/10] virtiofsd, fuse_lowlevel.c: Add capability to parse security context

2022-02-14 Thread Dr. David Alan Gilbert
* Vivek Goyal (vgo...@redhat.com) wrote: > Add capability to enable and parse security context as sent by client > and put into fuse_req. Filesystems now can get security context from > request and set it on files during creation. > > Signed-off-by: Vivek Goyal I'd be tempted to move the secctx_

[PATCH v3 4/4] tests/qtest/virtio-iommu-test: Check bypass config

2022-02-14 Thread Jean-Philippe Brucker
The bypass config field should be initialized to 1 by default. Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker --- tests/qtest/virtio-iommu-test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qtest/virtio-iommu-test.c b/tests/qtest/virtio-iommu-test.c index 47e68388a

Re: [RFC] thread-pool: Add option to fix the pool size

2022-02-14 Thread Stefan Hajnoczi
On Mon, Feb 14, 2022 at 12:38:22PM +0100, Kevin Wolf wrote: > Am 14.02.2022 um 11:09 hat Stefan Hajnoczi geschrieben: > > On Fri, Feb 11, 2022 at 12:32:57PM +0100, Kevin Wolf wrote: > > > Am 03.02.2022 um 15:19 hat Stefan Hajnoczi geschrieben: > > > > On Thu, Feb 03, 2022 at 10:56:49AM +, Danie

Re: [PATCH] Add --with-branding-prefix and QEMU_BRANDING_PREFIX

2022-02-14 Thread Liviu Ionescu
> On 14 Feb 2022, at 14:28, Daniel P. Berrangé wrote: > > In a .git checkout, pkgversion defaults to "git describe --match 'v*' --dirty" > See scripts/qemu-version.sh I see. I would say that this is a different use case. Thank you, Liviu

Re: [PATCH 2/2] target/ppc/kvm: Use KVM_CAP_PPC_AIL_MODE_3 to determine cap-ail-mode-3 support

2022-02-14 Thread Fabiano Rosas
Nicholas Piggin writes: > Use KVM_CAP_PPC_AIL_MODE_3 to determine cap-ail-mode-3 support for KVM > guests. Keep the fallback heuristic for KVM hosts that pre-date this > CAP. > > This is only proposed the KVM CAP has not yet been allocated. I will > ask to merge the new KVM cap when there are no

[PATCH v3 3/4] virtio-iommu: Support bypass domain

2022-02-14 Thread Jean-Philippe Brucker
The driver can create a bypass domain by passing the VIRTIO_IOMMU_ATTACH_F_BYPASS flag on the ATTACH request. Bypass domains perform slightly better than domains with identity mappings since they skip translation. Signed-off-by: Jean-Philippe Brucker --- hw/virtio/virtio-iommu.c | 39 +++

RE: [RFC v4 01/21] vfio-user: introduce vfio-user protocol specification

2022-02-14 Thread Thanos Makatos
> -Original Message- > From: Qemu-devel bounces+thanos.makatos=nutanix@nongnu.org> On Behalf Of John > Johnson > Sent: 12 January 2022 00:44 > To: qemu-devel@nongnu.org > Subject: [RFC v4 01/21] vfio-user: introduce vfio-user protocol specification > > From: Thanos Makatos > > Thi

Re: [PATCH RFCv2 3/4] i386/pc: warn if phys-bits is too low

2022-02-14 Thread David Edmondson
On Monday, 2022-02-07 at 20:24:21 GMT, Joao Martins wrote: > Default phys-bits on Qemu is TCG_PHYS_BITS (40) which is enough > to address 1Tb (0xff ). On AMD platforms, if a > ram-above-4g relocation happens and the CPU wasn't configured > with a big enough phys-bits, warn the user. There

Re: [PATCH] Add --with-branding-prefix and QEMU_BRANDING_PREFIX

2022-02-14 Thread Peter Maydell
On Mon, 14 Feb 2022 at 13:06, Liviu Ionescu wrote: > > > > > On 14 Feb 2022, at 14:28, Daniel P. Berrangé wrote: > > > > In a .git checkout, pkgversion defaults to "git describe --match 'v*' > > --dirty" > > See scripts/qemu-version.sh > > I see. I would say that this is a different use case. I

Re: [PATCH] target/ppc: raise HV interrupts for partition table entry problems

2022-02-14 Thread Daniel Henrique Barboza
On 2/14/22 09:31, Nicholas Piggin wrote: Invalid or missing partition table entry exceptions should cause HV interrupts. HDSISR is set to bad MMU config, which is consistent with the ISA and experimentally matches what POWER9 generates. Signed-off-by: Nicholas Piggin --- Reviewed-by: Danie

  1   2   3   >