Re: [PATCH] 9pfs: fix 'total_open_fd' decrementation

2025-04-04 Thread Greg Kurz
On Wed, 19 Mar 2025 13:14:27 +0100 Christian Schoenebeck wrote: > On Wednesday, March 19, 2025 11:08:58 AM CET Christian Schoenebeck wrote: > > According to 'man 2 close' errors returned by close() should only be used > > for either diagnostic purposes or for catching data loss due to a previous

Re: [PATCH] hw/9pfs: add cleanup operation for 9p-synth

2025-04-04 Thread Greg Kurz
On Fri, 04 Apr 2025 15:59:54 +0200 Christian Schoenebeck wrote: > On Monday, March 31, 2025 3:52:31 PM CEST Zheng Huang wrote: > > Hi, > > Hi! > Hi Zheng ! We certainly appreciate politeness here but we only want relevant details in what will become the commit message. Anything else you want

Re: [PATCH v2] 9pfs: fix 'total_open_fd' decrementation

2025-03-20 Thread Greg Kurz
o ignore close() errors except of > EBADF */ > +if (unlikely(err && errno == EBADF)) { > +/* > + * unexpected case as FIDs were picked above by having a > valid > + * file descriptor > + */ &g

Re: [PATCH] 9pfs: fix 'total_open_fd' decrementation

2025-03-20 Thread Greg Kurz
On Thu, 20 Mar 2025 10:48:11 +0100 Christian Schoenebeck wrote: > On Wednesday, March 19, 2025 7:52:51 PM CET Greg Kurz wrote: > > On Wed, 19 Mar 2025 13:14:27 +0100 > > Christian Schoenebeck wrote: > > > > > On Wednesday, March 19, 2025 11:08:58 AM C

[PATCH v3 1/6] 9pfs: local : Introduce local_fid_fd() helper

2025-03-12 Thread Greg Kurz
Factor out duplicated code to a single helper. More users to come. Reviewed-by: Christian Schoenebeck Signed-off-by: Greg Kurz v2: - simplified local_fid_fd() --- hw/9pfs/9p-local.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/hw/9pfs/9p

[PATCH v3 4/6] 9pfs: Introduce futimens file op

2025-03-12 Thread Greg Kurz
Schoenebeck Signed-off-by: Greg Kurz v2: - moved v9fs_co_futimens() near v9fs_co_utimensat() in coth.h - similar change in file-op-9p.h v3: - rename to fid_has_valid_file_handle() --- fsdev/file-op-9p.h | 2 ++ hw/9pfs/9p-local.c | 9 + hw/9pfs/9p-synth.c | 8 hw/9pfs/9p

[PATCH v3 3/6] 9pfs: Introduce ftruncate file op

2025-03-12 Thread Greg Kurz
Schoenebeck Signed-off-by: Greg Kurz v2: - moved v9fs_co_ftruncate() near v9fs_co_truncate() in coth.h - similar change in file-op-9p.h v3: - rename to fid_has_valid_file_handle() --- fsdev/file-op-9p.h | 2 ++ hw/9pfs/9p-local.c | 9 + hw/9pfs/9p-synth.c | 8 hw/9pfs/9p.c

[PATCH v3 6/6] tests/9p: Test `Tsetattr` can truncate unlinked file

2025-03-12 Thread Greg Kurz
Enhance the `use-after-unlink` test with a new check for the case where the client wants to alter the size of an unlinked file for which it still has an active fid. Suggested-by: Christian Schoenebeck Signed-off-by: Greg Kurz v3: - check the size of the truncated file --- tests/qtest/virtio

[PATCH v3 5/6] tests/9p: add 'Tsetattr' request to test client

2025-03-12 Thread Greg Kurz
From: Christian Schoenebeck Add and implement functions to 9pfs test client for sending a 9p2000.L 'Tsetattr' request and receiving its 'Rsetattr' response counterpart. Signed-off-by: Christian Schoenebeck Signed-off-by: Greg Kurz --- tests/qtest/libqos/vir

[PATCH v3 2/6] 9pfs: Don't use file descriptors in core code

2025-03-12 Thread Greg Kurz
has_valid_file_handle() backend operation. Reviewed-by: Christian Schoenebeck Signed-off-by: Greg Kurz v2: - rename to has_valid_file_handle() - don't reuse local_fid_fd() v3: - rename to fid_has_valid_file_handle() --- fsdev/file-op-9p.h | 1 + hw/9pfs/9p-local.c | 8 hw/9p

[PATCH v3 0/6] 9pfs: Fix ftruncate-after-unlink

2025-03-12 Thread Greg Kurz
= 0 Cheers, -- Greg Christian Schoenebeck (1): tests/9p: add 'Tsetattr' request to test client Greg Kurz (5): 9pfs: local : Introduce local_fid_fd() helper 9pfs: Don't use file descriptors in core code 9pfs: Introduce ftruncate file op 9pfs: Introduce futimens

Re: [PATCH v2 6/6] tests/9p: Test `Tsetattr` can truncate unlinked file

2025-03-12 Thread Greg Kurz
On Wed, 12 Mar 2025 15:11:41 +0100 Christian Schoenebeck wrote: > On Tuesday, March 11, 2025 6:28:09 PM CET Greg Kurz wrote: > > Enhance the `use-after-unlink` test with a new check for the > > case where the client wants to alter the size of an unlinked > > file for which i

Re: [PATCH v2 3/6] 9pfs: Introduce ftruncate file op

2025-03-12 Thread Greg Kurz
On Wed, 12 Mar 2025 15:07:20 +0100 Christian Schoenebeck wrote: > On Tuesday, March 11, 2025 6:28:06 PM CET Greg Kurz wrote: > > Add an ftruncate operation to the fs driver and use if when a fid has > > a valid file descriptor. This is required to support more cases where > >

[PATCH 3/4] 9pfs: Introduce ftruncate file op

2025-03-11 Thread Greg Kurz
Add an ftruncate operation to the fs driver and use if when a fid has a valid file descriptor. This is required to support more cases where the client wants to do an action on an unlinked file which it still has an open file decriptor for. Only 9P2000.L was considered. Signed-off-by: Greg Kurz

[PATCH 1/4] 9pfs: local : Introduce local_fid_fd() helper

2025-03-11 Thread Greg Kurz
Factor out duplicated code to a single helper. More users to come. Signed-off-by: Greg Kurz --- hw/9pfs/9p-local.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index 928523afcc6c..c4366c867988 100644 --- a/hw

[PATCH v2 5/6] tests/9p: add 'Tsetattr' request to test client

2025-03-11 Thread Greg Kurz
From: Christian Schoenebeck Add and implement functions to 9pfs test client for sending a 9p2000.L 'Tsetattr' request and receiving its 'Rsetattr' response counterpart. Signed-off-by: Christian Schoenebeck Signed-off-by: Greg Kurz --- tests/qtest/libqos/vir

[PATCH v2 2/6] 9pfs: Don't use file descriptors in core code

2025-03-11 Thread Greg Kurz
has_valid_file_handle() backend operation. Signed-off-by: Greg Kurz v2: - rename to has_valid_file_handle() - don't reuse local_fid_fd() --- fsdev/file-op-9p.h | 1 + hw/9pfs/9p-local.c | 8 hw/9pfs/9p-synth.c | 6 ++ hw/9pfs/9p.c | 9 ++--- 4 files change

[PATCH v2 6/6] tests/9p: Test `Tsetattr` can truncate unlinked file

2025-03-11 Thread Greg Kurz
Enhance the `use-after-unlink` test with a new check for the case where the client wants to alter the size of an unlinked file for which it still has an active fid. Suggested-by: Christian Schoenebeck Signed-off-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 8 1 file changed, 8

[PATCH v2 0/6] 9pfs: Fix ftruncate-after-unlink

2025-03-11 Thread Greg Kurz
= 0 This v2 has a qtest as suggested by Christian Schoenebeck. Cheers, -- Greg Christian Schoenebeck (1): tests/9p: add 'Tsetattr' request to test client Greg Kurz (5): 9pfs: local : Introduce local_fid_fd() helper 9pfs: Don't use file descriptors in core code 9

[PATCH v2 3/6] 9pfs: Introduce ftruncate file op

2025-03-11 Thread Greg Kurz
Schoenebeck Signed-off-by: Greg Kurz v2: - moved v9fs_co_ftruncate() near v9fs_co_truncate() in coth.h - similar change in file-op-9p.h --- fsdev/file-op-9p.h | 2 ++ hw/9pfs/9p-local.c | 9 + hw/9pfs/9p-synth.c | 8 hw/9pfs/9p.c | 6 +- hw/9pfs/cofs.c | 18

[PATCH v2 1/6] 9pfs: local : Introduce local_fid_fd() helper

2025-03-11 Thread Greg Kurz
Factor out duplicated code to a single helper. More users to come. Signed-off-by: Greg Kurz v2: - simplified local_fid_fd() --- hw/9pfs/9p-local.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index

[PATCH v2 4/6] 9pfs: Introduce futimens file op

2025-03-11 Thread Greg Kurz
Schoenebeck Signed-off-by: Greg Kurz v2: - moved v9fs_co_futimens() near v9fs_co_utimensat() in coth.h - similar change in file-op-9p.h --- fsdev/file-op-9p.h | 2 ++ hw/9pfs/9p-local.c | 9 + hw/9pfs/9p-synth.c | 8 hw/9pfs/9p-util.h | 1 + hw/9pfs/9p.c | 6

Re: [PATCH 2/2] 9pfs: reduce latency of v9fs_reclaim_fd()

2025-03-11 Thread Greg Kurz
On Tue, 4 Mar 2025 16:16:05 +0100 Christian Schoenebeck wrote: > This function calls v9fs_co_close() and v9fs_co_closedir() in a loop. Each > one of the calls adds two thread hops (between main thread and a fs driver > background thread). Each thread hop adds latency, which sums up in > function'

[PATCH 2/4] 9pfs: Don't use file descriptors in core code

2025-03-11 Thread Greg Kurz
has_valid_handle() backend operation. Make the existing local_fid_fd() helper more robust so that it can cope with P9_FID_NONE or a null directory stream and reuse it. Signed-off-by: Greg Kurz --- fsdev/file-op-9p.h | 1 + hw/9pfs/9p-local.c | 12 +--- hw/9pfs/9p-synth.c | 6 ++ hw

[PATCH 4/4] 9pfs: Introduce futimens file op

2025-03-11 Thread Greg Kurz
Add an futimens operation to the fs driver and use if when a fid has a valid file descriptor. This is required to support more cases where the client wants to do an action on an unlinked file which it still has an open file decriptor for. Only 9P2000.L was considered. Signed-off-by: Greg Kurz

Re: [PATCH 1/4] 9pfs: local : Introduce local_fid_fd() helper

2025-03-11 Thread Greg Kurz
On Tue, 11 Mar 2025 11:58:28 +0100 Christian Schoenebeck wrote: > On Monday, March 10, 2025 6:10:58 PM CET Greg Kurz wrote: > > Factor out duplicated code to a single helper. More users to come. > > > > Signed-off-by: Greg Kurz > > --- > > hw/9pfs/9p-local.c

Re: [PATCH 2/4] 9pfs: Don't use file descriptors in core code

2025-03-11 Thread Greg Kurz
On Tue, 11 Mar 2025 15:03:13 +0100 Greg Kurz wrote: > On Tue, 11 Mar 2025 12:13:06 +0100 > Christian Schoenebeck wrote: > > > On Monday, March 10, 2025 6:10:59 PM CET Greg Kurz wrote: > > > v9fs_getattr() currently peeks into V9fsFidOpenState to know if a fid > >

Re: [PATCH 2/4] 9pfs: Don't use file descriptors in core code

2025-03-11 Thread Greg Kurz
On Tue, 11 Mar 2025 12:13:06 +0100 Christian Schoenebeck wrote: > On Monday, March 10, 2025 6:10:59 PM CET Greg Kurz wrote: > > v9fs_getattr() currently peeks into V9fsFidOpenState to know if a fid > > has a valid file descriptor or directory stream. Even though the fields >

[PATCH 0/4] 9pfs: Fix ftruncate-after-unlink

2025-03-10 Thread Greg Kurz
= 0 Christian, I'm not familiar enough with the latest changes to write a proper test for this case and I don't have enough cycles to learn. I'm sorry for that but I guess it will be a lot easier for you and I'll review. Cheers, -- Greg Greg Kurz (4): 9pfs: lo

Re: [PATCH v2 2/2] 9pfs: fix FD leak and reduce latency of v9fs_reclaim_fd()

2025-03-10 Thread Greg Kurz
On Fri, 07 Mar 2025 10:47:33 +0100 Christian Schoenebeck wrote: > On Friday, March 7, 2025 10:23:02 AM CET Christian Schoenebeck wrote: > > This patch fixes two different bugs in v9fs_reclaim_fd(): > > > > 1. Reduce latency: > > > > This function calls v9fs_co_close() and v9fs_co_closedir() in

Re: [PATCH v2 2/2] 9pfs: fix FD leak and reduce latency of v9fs_reclaim_fd()

2025-03-10 Thread Greg Kurz
st_cancelled(pdu) check there. > > Fixes: 7a46274529c ('hw/9pfs: Add file descriptor reclaim support') > Fixes: bccacf6c792 ('hw/9pfs: Implement TFLUSH operation') > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > hw/9pfs/9p.c |

[PATCH] docs: Rename default-configs to configs

2025-03-06 Thread Greg Kurz
This was missed at the time. Fixes: 812b31d3f91 ("configs: rename default-configs to configs and reorganise") Signed-off-by: Greg Kurz --- docs/devel/build-system.rst | 10 +- docs/devel/kconfig.rst | 16 2 files changed, 13 insertions(+), 13 deletion

Re: [PATCH 1/2] 9pfs: fix concurrent v9fs_reclaim_fd() calls

2025-03-05 Thread Greg Kurz
needed for this boolean > variable as this function is only entered and returned on main thread. > > Fixes: 7a46274529c ('hw/9pfs: Add file descriptor reclaim support') > Signed-off-by: Christian Schoenebeck > --- Another long long standing bug bites the dust ! Good catch

Re: [PATCH] MAINTAINERS: Mark me as reviewer only for 9pfs

2025-01-15 Thread Greg Kurz
On Wed, 15 Jan 2025 11:08:49 +0100 Greg Kurz wrote: > I still review 9pfs changes from time to time but I'm definitely > not able to do actual maintainer work. Drop my tree on the way > as I'll obviously not use it anymore, and it has been left > untouched since May 2020

[PATCH] MAINTAINERS: Mark me as reviewer only for 9pfs

2025-01-15 Thread Greg Kurz
I still review 9pfs changes from time to time but I'm definitely not able to do actual maintainer work. Drop my tree on the way as I'll obviously not use it anymore, and it has been left untouched since May 2020. Signed-off-by: Greg Kurz --- MAINTAINERS | 3 +-- 1 file changed, 1

Re: [PATCH 12/71] hw/9pfs: Constify all Property

2024-12-13 Thread Greg Kurz
On Fri, 13 Dec 2024 13:06:46 -0600 Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- Reviewed-by: Greg Kurz > hw/9pfs/virtio-9p-device.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9

Re: [PATCH] 9pfs: fix regression regarding CVE-2023-2861

2024-12-08 Thread Greg Kurz
path based operations on the resulting file descriptor > and prevents I/O such as read() and write() on that file descriptor. > > Fixes: f6b0de53fb8 ("9pfs: prevent opening special files (CVE-2023-2861)") > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2337 > Repo

Re: [PATCH] 9pfs: improve v9fs_walk() tracing

2024-12-04 Thread Greg Kurz
parated string presentation for being passed to the tracing system. > As this conversion is somewhat expensive, this new helper function returns > immediately if tracing of event 'v9fs_walk' is currently not enabled. > > Signed-off-by: Christian Schoenebeck > --- Rev

Re: [PATCH 6/6] tests/9p: also check 'Tgetattr' in 'use-after-unlink' test

2024-11-26 Thread Greg Kurz
On Sun, 24 Nov 2024 17:05:32 +0100 Christian Schoenebeck wrote: > This verifies expected behaviour of previous bug fix patch. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests/qtest/virtio-9p-test.c | 5 + > 1 file changed, 5 insertions(+)

Re: [PATCH 5/6] 9pfs: fix 'Tgetattr' after unlink

2024-11-26 Thread Greg Kurz
https://github.com/torvalds/linux/commit/9013c51 > > glibc fix: https://github.com/bminor/glibc/commit/551101e > > So on glibc side, due to a misconception, they inappropriately translated > fstat(fd, buf) -> fstatat(fd, "", buf, AT_EMPTY_PATH) for a long time, instead > of just calling fstat() directly as ought to be and done now. > > And on kernel side, the negative performance impact of case AT_EMPTY_PATH + > empty string wasn't considered in fstatat() implementation. This case is now > short-circuited right at the beginning of the function. > > /Christian > > Great explanation Christian ! Reviewed-by: Greg Kurz Cheers, -- Greg

Re: [PATCH 0/6] 9pfs: fix fstat() after unlink() (with a Linux guest)

2024-11-25 Thread Greg Kurz
On Mon, 25 Nov 2024 11:23:39 +0100 Christian Schoenebeck wrote: > On Monday, November 25, 2024 9:45:54 AM CET Greg Kurz wrote: > > On Sun, 24 Nov 2024 17:28:40 +0100 > > Christian Schoenebeck wrote: > > > > > This fixes an infamous, long standing bug: > > &g

Re: [PATCH 0/6] 9pfs: fix fstat() after unlink() (with a Linux guest)

2024-11-25 Thread Greg Kurz
On Mon, 25 Nov 2024 09:45:54 +0100 Greg Kurz wrote: > On Sun, 24 Nov 2024 17:28:40 +0100 > Christian Schoenebeck wrote: > > > This fixes an infamous, long standing bug: > > https://gitlab.com/qemu-project/qemu/-/issues/103 > > > > \o/ > > It is great

Re: [PATCH 4/6] 9pfs: remove obsolete comment in v9fs_getattr()

2024-11-25 Thread Greg Kurz
catch ! Reviewed-by: Greg Kurz > hw/9pfs/9p.c | 4 > 1 file changed, 4 deletions(-) > > diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c > index 9a291d1b51..851e36b9a1 100644 > --- a/hw/9pfs/9p.c > +++ b/hw/9pfs/9p.c > @@ -1596,10 +1596,6 @@ static void coroutine_fn

Re: [PATCH 2/6] tests/9p: fix Rreaddir response name

2024-11-25 Thread Greg Kurz
On Sun, 24 Nov 2024 14:34:31 +0100 Christian Schoenebeck wrote: > All 9p response types are prefixed with an "R", therefore fix > "READDIR" -> "RREADDIR" in function rmessage_name(). > > Signed-off-by: Christian Schoenebeck > --- Reviewed

Re: [PATCH 3/6] tests/9p: add missing Rgetattr response name

2024-11-25 Thread Greg Kurz
igned-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests/qtest/libqos/virtio-9p-client.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/qtest/libqos/virtio-9p-client.c > b/tests/qtest/libqos/virtio-9p-client.c > index c61632fcd3..98b77db51d 100644 >

Re: [PATCH 1/6] tests/9p: add 'use-after-unlink' test

2024-11-25 Thread Greg Kurz
inked > file, as this is what already works. This test is extended later on > after having fixed other use cases after unlink that are not working > yet. > > Signed-off-by: Christian Schoenebeck > --- Test looks good but make sure it is merged last to preserve bisect. Reviewed-

Re: [PATCH 0/6] 9pfs: fix fstat() after unlink() (with a Linux guest)

2024-11-25 Thread Greg Kurz
On Sun, 24 Nov 2024 17:28:40 +0100 Christian Schoenebeck wrote: > This fixes an infamous, long standing bug: > https://gitlab.com/qemu-project/qemu/-/issues/103 > \o/ It is great if you manage to fix that once and far all ! > * Actual fix of this bug is patch 5. > > * Patches 1 and 6 add a t

Re: [PATCH] hw/virtio: Fix getting the correct ring number on loading

2024-11-22 Thread Greg Kurz
On Fri, 22 Nov 2024 08:01:34 +0100 Philippe Mathieu-Daudé wrote: > Hi Wafer, > > On 22/11/24 03:00, Wafer wrote: > > From: Wafer Xie > > > > The virtio-1.2 specification writes: > > > > 2.7.6 The Virtqueue Available Ring: > > "idx field indicates where the driver would put the next descriptor

Re: [PATCH] 9pfs: cleanup V9fsFidState

2024-11-21 Thread Greg Kurz
On Thu, 21 Nov 2024 11:52:48 +0100 Christian Schoenebeck wrote: > Drop V9fsFidState's 'next' member, which is no longer used since: > > f5265c8f917e ('9pfs: use GHashTable for fid table') > Good catch ! Fixes: f5265c8f917e ('9pfs: use GHashTa

Re: [PATCH] 9pfs: fix crash on 'Treaddir' request

2024-11-05 Thread Greg Kurz
idtype so that we can do type ...") > Reported-by: Akihiro Suda > Tested-by: Akihiro Suda > Signed-off-by: Christian Schoenebeck > --- > hw/9pfs/9p.c | 5 + > 1 file changed, 5 insertions(+) > Wow ! And this is there since pretty much always... I'm amazed how

Re: [PATCH] virtio-9p: remove virtfs-proxy-helper

2024-09-09 Thread Greg Kurz
On Thu, 5 Sep 2024 10:22:59 +0200 Paolo Bonzini wrote: > It has been deprecated since 8.1; remove it and suggest using permission > mapping > or virtiofsd. > > Signed-off-by: Paolo Bonzini > --- Thanks Paolo ! Acked-by: Greg Kurz > MAINTAINERS

Re: [PATCH for-9.0 v3 0/2] qtest/virtio-9p-test.c: fix slow tests

2024-03-27 Thread Greg Kurz
On Wed, 27 Mar 2024 11:20:09 -0300 Daniel Henrique Barboza wrote: > Hi, > > In this new version we took a different approach after the discussions > we had in [1]. The tests are now untouched, and we're addressing the root > cause directly: the fact that we have a single temp dir for all the tes

Re: [PATCH for-9.0 1/3] qtest/virtio-9p-test.c: consolidate create dir, file and symlink tests

2024-03-27 Thread Greg Kurz
> wrote: > > >> On 3/27/24 05:47, Christian Schoenebeck wrote: > > >>> On Tuesday, March 26, 2024 6:47:17 PM CET Daniel Henrique Barboza wrote: > > >>>> On 3/26/24 14:05, Greg Kurz wrote: > > >>>>> On Tue, 26 Mar 2024 10:26:0

Re: [PATCH for-9.0 1/3] qtest/virtio-9p-test.c: consolidate create dir, file and symlink tests

2024-03-26 Thread Greg Kurz
On Tue, 26 Mar 2024 10:26:04 -0300 Daniel Henrique Barboza wrote: > The local 9p driver in virtio-9p-test.c its temporary dir right at the > start of qos-test (via virtio_9p_create_local_test_dir()) and only > deletes it after qos-test is finished (via > virtio_9p_remove_local_test_dir()). > > T

Re: [PATCH for-9.0 0/3] qtest/virtio-9p-test.c: fix slow tests

2024-03-26 Thread Greg Kurz
Bom dia Daniel ! On Tue, 26 Mar 2024 10:26:03 -0300 Daniel Henrique Barboza wrote: > Hi, > > Thomas reported in [1] a problem that happened with the RISC-V machine > where some tests from virtio-9p-test.c were failing with '-m slow', i.e. > enabling slow tests. > > In the end it wasn't a RISC-

Re: [PATCH 1/3] hw/i386: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
On Tue, 30 Jan 2024 21:43:27 +0530 Ani Sinha wrote: > > > > On 30-Jan-2024, at 21:26, Greg Kurz wrote: > > > > error_fprintf() doesn't add newlines. > > ^ > > Should be error_printf(). Ditto for other patches. > Thanks. Pos

[PATCH v2 1/3] hw/i386: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_printf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index edc979379c03..e990b0ae927f 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386

[PATCH v2 0/3] acpi-build: Fix hint messages

2024-01-30 Thread Greg Kurz
ACPI build for ARM, i386 and Loongarch all have the same warning report with a hint for the user. The hint is printed with error_printf() as expected but it lacks the terminating '\n'. v2: - s/error_fprintf/error_printf in commit logs (Ani) Greg Kurz (3): hw/i386: Add `\n` to hint me

[PATCH v2 3/3] hw/arm: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_printf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/arm/virt-acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 17aeec7a6f56..48febde1ccd1 100644 --- a/hw/arm/virt-acpi-build.c +++ b/h

[PATCH v2 2/3] hw/loongarch: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_printf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/loongarch/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c index 730bc4a748c4..a1c419874123 100644 --- a/hw/loongarch/acpi-build.c +++

[PATCH 3/3] hw/arm: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_fprintf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/arm/virt-acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 17aeec7a6f56..48febde1ccd1 100644 --- a/hw/arm/virt-acpi-build.c +++ b/h

[PATCH 0/3] acpi-build: Fix hint messages

2024-01-30 Thread Greg Kurz
ACPI build for ARM, i386 and Loongarch all have the same warning report with a hint for the user. The hint is printed with error_printf() as expected but it lacks the terminating '\n'. Greg Kurz (3): hw/i386: Add `\n` to hint message hw/loongarch: Add `\n` to hint message hw/ar

[PATCH 1/3] hw/i386: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_fprintf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index edc979379c03..e990b0ae927f 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386

[PATCH 2/3] hw/loongarch: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_fprintf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/loongarch/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c index 730bc4a748c4..a1c419874123 100644 --- a/hw/loongarch/acpi-build.c +++

Re: [PATCH 2/6] hw/9pfs/9p-synth: Use RCU_READ macro

2024-01-23 Thread Greg Kurz
t; --- > hw/9pfs/9p-synth.c | 24 > 1 file changed, 12 insertions(+), 12 deletions(-) > Acked-by: Greg Kurz > diff --git a/hw/9pfs/9p-synth.c b/hw/9pfs/9p-synth.c > index 0ac79a500b..419ea69e3a 100644 > --- a/hw/9pfs/9p-synth.c > +++ b/hw/9pfs/9p-syn

Re: [PATCH 20/71] hw/9pfs: Constify VMState

2023-11-05 Thread Greg Kurz
On Sun, 5 Nov 2023 22:57:36 -0800 Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- Acked-by: Greg Kurz > hw/9pfs/virtio-9p-device.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9

Re: [PATCH 07/13] RFC migration: icp/server is a mess

2023-10-20 Thread Greg Kurz
On Fri, 20 Oct 2023 17:49:38 +1000 "Nicholas Piggin" wrote: > On Fri Oct 20, 2023 at 7:39 AM AEST, Greg Kurz wrote: > > On Thu, 19 Oct 2023 21:08:25 +0200 > > Juan Quintela wrote: > > > > > Current code does: > > > - register pre_2_10

Re: [PATCH 07/13] RFC migration: icp/server is a mess

2023-10-20 Thread Greg Kurz
On Fri, 20 Oct 2023 09:30:44 +0200 Juan Quintela wrote: > Greg Kurz wrote: > > On Thu, 19 Oct 2023 21:08:25 +0200 > > Juan Quintela wrote: > > > >> Current code does: > >> - register pre_2_10_vmstate_dummy_icp with "icp/server" and instance

Re: [PATCH 07/13] RFC migration: icp/server is a mess

2023-10-19 Thread Greg Kurz
pre_2_10_vmstate_dummy_icp > * unregister pre_2_10_vmstate_dummy_icp > * register real vmstate_icp > > As the initialization of this machine is already complex enough, I > need help from PPC maintainers to fix this. > > Volunteers? > > CC: Cedric Le Goater >

Re: [PATCH 07/13] RFC migration: icp/server is a mess

2023-10-19 Thread Greg Kurz
fix this. I might be able to answer some questions or to review someone else's patch that gets rid of the offending code, at best. Cheers, -- Greg > CC: Cedric Le Goater > CC: Daniel Henrique Barboza > CC: David Gibson > CC: Greg Kurz > > Signed-off-by: Juan Qu

Re: [PATCH] MAINTAINERS: Nick Piggin PPC maintainer, other PPC changes

2023-09-15 Thread Greg Kurz
d knowledge and motivation to drive the boat. > Have a good trip Nick ! :-) > - Greg Kurz is being removed from all qemu-ppc entries. Greg has moved > to other areas of interest and will retire from qemu-ppc. Thanks Mr > Kurz for all the years of service. > My pleasure ! &

Re: [PATCH v5 8/9] fsdev: Use ThrottleDirection instread of bool is_write

2023-08-07 Thread Greg Kurz
On Fri, 28 Jul 2023 10:20:05 +0800 zhenwei pi wrote: > 'bool is_write' style is obsolete from throttle framework, adapt > fsdev to the new style. > > Cc: Greg Kurz > Reviewed-by: Hanna Czenczek > Signed-off-by: zhenwei pi Reviewed-by: Greg Kurz > --- >

Re: [PATCH v6] ppc: Enable 2nd DAWR support on p10

2023-07-07 Thread Greg Kurz
On Fri, 7 Jul 2023 21:31:47 +0530 Shivaprasad G Bhat wrote: > On 7/7/23 17:52, Daniel Henrique Barboza wrote: > > > > > > On 7/7/23 08:59, Greg Kurz wrote: > >> Hi Daniel and Shiva ! > >> > >> On Fri, 7 Jul 2023 08:09:47 -0300 > >> Daniel

Re: [PATCH v6] ppc: Enable 2nd DAWR support on p10

2023-07-07 Thread Greg Kurz
ot. If it's supported, allow user to set > > the pa-feature bit in guest DT using cap-dawr1 machine capability. Though, > > watchpoint on powerpc TCG guest is not supported and thus 2nd DAWR is not > > enabled for TCG mode. > > > > Signed-off-by: Ravi Bangoria

Re: [PATCH] MAINTAINERS: raise status of 9p to 'Maintained'

2023-07-03 Thread Greg Kurz
the good work ! :-) > Based-on: > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index e8a3205eb4..71f2479ec5 100644 > ---

Re: [PATCH v4] target: ppc: Use MSR_HVB bit to get the target endianness for memory dump

2023-07-03 Thread Greg Kurz
LE > LE powernv(OPAL/PowerNV) BE > LE pseries(OPAL/PowerNV/pSeries) KVMHV LE > LE pseries TCG LE > > Fixes: 5609400a4228 ("target/ppc: Set the correct endianness for powernv > memory >

Re: [PATCH] ppc: spapr: Fix device tree entries in absence of XIVE native mode

2023-06-29 Thread Greg Kurz
On Fri, 30 Jun 2023 11:00:56 +0530 Gautam Menghani wrote: > Currently, XIVE native exploitation mode is not supported in nested > guests. When we boot up a nested guest on PowerNV platform, we observe > the following entries in the device tree of nested guest: > > ``` > device_type = "power-ivp

Re: [PATCH v3 6/6] target/ppc: Remove pointless checks of CONFIG_USER_ONLY in 'kvm_ppc.h'

2023-06-28 Thread Greg Kurz
On Tue, 27 Jun 2023 13:51:24 +0200 Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- Reviewed-by: Greg Kurz > target/ppc/kvm_ppc.h | 5 - > 1 file changed, 5 deletions(-) > > diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h

Re: [PATCH v3 4/6] target/ppc: Define TYPE_HOST_POWERPC_CPU in cpu-qom.h

2023-06-28 Thread Greg Kurz
On Tue, 27 Jun 2023 13:51:22 +0200 Philippe Mathieu-Daudé wrote: > TYPE_HOST_POWERPC_CPU is used in various places of cpu_init.c, > in order to restrict "kvm_ppc.h" to sysemu, move this QOM-related > definition to cpu-qom.h. > > Signed-off-by: Philippe Mathieu-Daudé

Re: [PATCH v3 5/6] target/ppc: Restrict 'kvm_ppc.h' to sysemu in cpu_init.c

2023-06-28 Thread Greg Kurz
On Tue, 27 Jun 2023 13:51:23 +0200 Philippe Mathieu-Daudé wrote: > User emulation shouldn't need any of the KVM prototypes > declared in "kvm_ppc.h". > > Signed-off-by: Philippe Mathieu-Daudé > --- Reviewed-by: Greg Kurz > target/ppc/cpu_init.c | 2 +- >

Re: [PATCH v3 3/6] target/ppc: Move CPU QOM definitions to cpu-qom.h

2023-06-28 Thread Greg Kurz
On Tue, 27 Jun 2023 13:51:21 +0200 Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > target/ppc/cpu-qom.h | 5 + > target/ppc/cpu.h | 6 -- > 2 files changed, 5 insertions(+), 6 deletions(-) > > diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h >

Re: [PATCH v3 2/6] target/ppc: Reorder #ifdef'ry in kvm_ppc.h

2023-06-28 Thread Greg Kurz
On Tue, 27 Jun 2023 13:51:20 +0200 Philippe Mathieu-Daudé wrote: > Keep a single if/else/endif block checking CONFIG_KVM. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/ppc/kvm_ppc.h | 62 > 1 file changed, 28 insertions(+), 34 deletions(-

Re: [PATCH v3 1/6] target/ppc: Have 'kvm_ppc.h' include 'sysemu/kvm.h'

2023-06-28 Thread Greg Kurz
On Tue, 27 Jun 2023 13:51:19 +0200 Philippe Mathieu-Daudé wrote: > "kvm_ppc.h" declares: > > int kvm_handle_nmi(PowerPCCPU *cpu, struct kvm_run *run); > > 'struct kvm_run' is declared in "sysemu/kvm.h", include it. > > Signed-off-by: Ph

Re: [PATCH] target/ppc: Only generate decodetree files when TCG is enabled

2023-06-27 Thread Greg Kurz
On Mon, 26 Jun 2023 16:01:00 +0200 Philippe Mathieu-Daudé wrote: > No need to generate TCG-specific decodetree files > when TCG is disabled. > > Signed-off-by: Philippe Mathieu-Daudé > --- Reviewed-by: Greg Kurz > target/ppc/meson.build | 2 +- > 1 file changed, 1 ins

Re: [SPAM] [PATCH v4] 9pfs: deprecate 'proxy' backend

2023-06-26 Thread Greg Kurz
ns (like chown, chmod to any mode/uid:gid). There are two > issues in pass-through security model: > diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c > index 3da64e9f72..9a50ee370b 100644 > --- a/fsdev/qemu-fsdev.c > +++ b/fsdev/qemu-fsdev.c > @@ -133,6 +133,14 @@ int qemu_

Re: [PATCH v3] 9pfs: deprecate 'proxy' backend

2023-06-21 Thread Greg Kurz
On Wed, 21 Jun 2023 16:16:46 +0200 Christian Schoenebeck wrote: > On Wednesday, June 21, 2023 3:41:36 PM CEST Greg Kurz wrote: > > On Wed, 21 Jun 2023 15:32:39 +0200 > > Christian Schoenebeck wrote: > > > > > On Thursday, June 15, 2023 11:35:05 AM CEST Christian

Re: [PATCH v3] 9pfs: deprecate 'proxy' backend

2023-06-21 Thread Greg Kurz
On Wed, 21 Jun 2023 15:32:39 +0200 Christian Schoenebeck wrote: > On Thursday, June 15, 2023 11:35:05 AM CEST Christian Schoenebeck wrote: > > On Saturday, June 10, 2023 3:39:44 PM CEST Christian Schoenebeck wrote: > > > As recent CVE-2023-2861 once again showed, the 9p 'proxy' fs driver is in >

Re: [PATCH] hw/ppc/spapr: Test whether TCG is enabled with tcg_enabled()

2023-06-20 Thread Greg Kurz
apr_set_vsmt_mode(SpaprMachineState > > *spapr, Error **errp) > > int ret; > > unsigned int smp_threads = ms->smp.threads; > > > > -if (!kvm_enabled() && (smp_threads > 1)) { > > +if (tcg_enabled() && (smp_threads > 1)

Re: [SPAM] [PATCH v3] 9pfs: deprecate 'proxy' backend

2023-06-12 Thread Greg Kurz
Hi Christian, On Sat, 10 Jun 2023 15:39:44 +0200 Christian Schoenebeck wrote: > As recent CVE-2023-2861 once again showed, the 9p 'proxy' fs driver is in > bad shape. Using the 'proxy' backend was already discouraged for safety > reasons before and we recommended to use the 'local' backend inste

Re: [PATCH v3] 9pfs: prevent opening special files (CVE-2023-2861)

2023-06-07 Thread Greg Kurz
ibit opening any special file directly on host > + * (especially device files), as a compromised client could potentially gain > + * access outside exported tree under certain, unsafe setups. We expect > + * client to handle I/O on special files exclusively on guest side. > + */ > +

Re: [PATCH v2] 9pfs: prevent opening special files (CVE-2023-2861)

2023-06-07 Thread Greg Kurz
On Wed, 07 Jun 2023 13:02:17 +0200 Christian Schoenebeck wrote: > On Tuesday, June 6, 2023 6:00:28 PM CEST Greg Kurz wrote: > > Hi Christian, > > > > On Tue, 06 Jun 2023 15:57:50 +0200 > > Christian Schoenebeck wrote: > > > > > The 9p protocol doe

Re: [PATCH v2] 9pfs: prevent opening special files (CVE-2023-2861)

2023-06-06 Thread Greg Kurz
Hi Christian, On Tue, 06 Jun 2023 15:57:50 +0200 Christian Schoenebeck wrote: > The 9p protocol does not specifically define how server shall behave when > client tries to open a special file, however from security POV it does > make sense for 9p server to prohibit opening any special file on ho

Re: [PATCH v3] target: ppc: Use MSR_HVB bit to get the target endianness for memory dump

2023-05-23 Thread Greg Kurz
On Tue, 23 May 2023 12:20:17 +0530 Narayana Murty N wrote: > > On 5/22/23 23:50, Greg Kurz wrote: > > On Mon, 22 May 2023 12:02:42 -0400 > > Narayana Murty N wrote: > > > >> Currently on PPC64 qemu always dumps the guest memory in > >> Big Endian (B

Re: [PATCH v3] target: ppc: Use MSR_HVB bit to get the target endianness for memory dump

2023-05-22 Thread Greg Kurz
On Mon, 22 May 2023 12:02:42 -0400 Narayana Murty N wrote: > Currently on PPC64 qemu always dumps the guest memory in > Big Endian (BE) format even though the guest running in Little Endian > (LE) mode. So crash tool fails to load the dump as illustrated below: > > Log : > $ virsh dump DOMAIN --

Re: [PATCH] tests/9p: fix potential leak in v9fs_rreaddir()

2023-05-01 Thread Greg Kurz
On Sat, 29 Apr 2023 15:20:12 +0200 Christian Schoenebeck wrote: > On Saturday, April 29, 2023 2:04:30 PM CEST Greg Kurz wrote: > > Hi Christian ! > > Hi there, it's been a while! :) > > > On Sat, 29 Apr 2023 11:25:33 +0200 > > Christian Schoenebeck wrote:

Re: [PATCH] tests/9p: fix potential leak in v9fs_rreaddir()

2023-04-29 Thread Greg Kurz
> [1] https://lore.kernel.org/all/1690923.g4PEXVpXuU@silver > > Reported-by: Coverity (CID 1487558) > Signed-off-by: Christian Schoenebeck > --- Good catch Coverity ! :-) Reviewed-by: Greg Kurz I still have a suggestion. See below. > tests/qtest/libqos/virtio-9p-client.c | 5 + &

Re: [PATCH 0/2] vhost-user: Remove the nested event loop to unbreak the DPDK use case

2023-01-23 Thread Greg Kurz
On Thu, 19 Jan 2023 18:24:22 +0100 Greg Kurz wrote: > The nested event loop was introduced in QEMU 6.0 to allow servicing > of requests coming from the slave channel while waiting for an ack > from the back-end on the master socket. It turns out this is fragile > and breaks if the

[PATCH 0/2] vhost-user: Remove the nested event loop to unbreak the DPDK use case

2023-01-20 Thread Greg Kurz
nnels arises again. Greg Kurz (2): Revert "vhost-user: Monitor slave channel in vhost_user_read()" Revert "vhost-user: Introduce nested event loop in vhost_user_read()" hw/virtio/vhost-user.c | 100 - 1 file changed, 8 in

Re: [PATCH 1/2] Revert "vhost-user: Monitor slave channel in vhost_user_read()"

2023-01-19 Thread Greg Kurz
3 18:24:23 +0100 Greg Kurz wrote: > This reverts commit db8a3772e300c1a656331a92da0785d81667dc81. > > Motivation : this is breaking vhost-user with DPDK as reported in [0]. > > Received unexpected msg type. Expected 22 received 40 > Fail to update device iotlb > Received u

[PATCH 1/2] Revert "vhost-user: Monitor slave channel in vhost_user_read()"

2023-01-19 Thread Greg Kurz
discussed with Maxime in the mail thread below. [0] https://lore.kernel.org/qemu-devel/43145ede-89dc-280e-b953-6a2b436de...@redhat.com/ Reported-by: Yanghang Liu Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2155173 Signed-off-by: Greg Kurz --- hw/virtio/vhost-user.c | 35

  1   2   3   4   5   6   7   8   9   10   >