Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-09-24 Thread Richard W.M. Jones
On Tue, Sep 24, 2024 at 09:52:04AM +0200, Thomas Huth wrote: > On 23/09/2024 18.03, Eric Blake wrote: > >On Sun, Sep 22, 2024 at 08:51:22PM GMT, Richard W.M. Jones wrote: > >>On Thu, Mar 28, 2024 at 02:13:42PM +0000, Richard W.M. Jones wrote: > >>>On Thu, Mar 28, 20

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-09-23 Thread Richard W.M. Jones
On Mon, Sep 23, 2024 at 06:38:27PM +0200, Daniel P. Berrangé wrote: > On Mon, Sep 23, 2024 at 11:03:08AM -0500, Eric Blake wrote: > > On Sun, Sep 22, 2024 at 08:51:22PM GMT, Richard W.M. Jones wrote: > > > On Thu, Mar 28, 2024 at 02:13:42PM +0000, Richard W.M. Jones wrote: >

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-09-22 Thread Richard W.M. Jones
On Thu, Mar 28, 2024 at 02:13:42PM +, Richard W.M. Jones wrote: > On Thu, Mar 28, 2024 at 03:06:03PM +0100, Thomas Huth wrote: > > Since version 2.66, glib has useful URI parsing functions, too. > > Use those instead of the QEMU-internal ones to be finally able > > to

Re: [PATCH 01/39] docs/spin: replace assert(0) with g_assert_not_reached()

2024-09-11 Thread Richard W.M. Jones
On Wed, Sep 11, 2024 at 02:46:18PM +0200, Maciej S. Szmigiero wrote: > On 11.09.2024 14:37, Eric Blake wrote: > >On Wed, Sep 11, 2024 at 07:33:59AM GMT, Eric Blake wrote: > >>On Tue, Sep 10, 2024 at 03:15:28PM GMT, Pierrick Bouvier wrote: > >>>Signed-off-by: Pierrick Bouvier > >>>--- > >> > >>A ge

Re: [PATCH 25/39] block: remove break after g_assert_not_reached()

2024-09-11 Thread Richard W.M. Jones
S: > return check_host_key_knownhosts(s, errp); > default: > -- > 2.39.2 Reviewed-by: Richard W.M. Jones -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windo

Re: [PATCH 07/39] hw/watchdog: replace assert(0) with g_assert_not_reached()

2024-09-11 Thread Richard W.M. Jones
f..d0ce3c4ac55 100644 > --- a/hw/watchdog/watchdog.c > +++ b/hw/watchdog/watchdog.c > @@ -85,7 +85,7 @@ void watchdog_perform_action(void) > break; > > default: > -assert(0); > +g_assert_not_reached(); > } > } > Reviewed-by:

Re: [PATCH] tests/unit: remove block layer code from test-nested-aio-poll

2024-09-02 Thread Richard W.M. Jones
does not even need iothreads. So remove everything that > calls aio_wait_kick(), which is nice for coverage compared to adding the call > to qemu_init_main_loop(). > > Reported-by: Richard W.M. Jones > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2434 > Signed-off-b

Re: [PATCH for-9.1 0/2] NBD: don't print raw server error text to terminal

2024-08-05 Thread Richard W.M. Jones
On Mon, Aug 05, 2024 at 01:48:12PM -0500, Eric Blake wrote: > On Fri, Aug 02, 2024 at 02:26:04PM GMT, Eric Blake wrote: > > I've requested a CVE from Red Hat, and hope to have an assigned number > > soon. Meanwhile, we can get review started, to make sure this is > > ready to include in 9.1. 'qem

Re: [PATCH 2/2] qemu-img: CVE-XXX Sanitize untrusted output from NBD server

2024-08-03 Thread Richard W.M. Jones
On Fri, Aug 02, 2024 at 11:01:36PM +0100, Richard W.M. Jones wrote: > On Fri, Aug 02, 2024 at 02:26:06PM -0500, Eric Blake wrote: > > Error messages from an NBD server must be treated as untrusted; a > > malicious server can inject escape sequences to try and trigger RCE >

Re: [PATCH 2/2] qemu-img: CVE-XXX Sanitize untrusted output from NBD server

2024-08-02 Thread Richard W.M. Jones
On Fri, Aug 02, 2024 at 02:26:06PM -0500, Eric Blake wrote: > Error messages from an NBD server must be treated as untrusted; a > malicious server can inject escape sequences to try and trigger RCE > flaws via escape sequences to whatever terminal happens to be running > qemu-img. This presentatio

Re: [PATCH 2/2] qemu-img: CVE-XXX Sanitize untrusted output from NBD server

2024-08-02 Thread Richard W.M. Jones
pt to hide the name of the Unix socket and forcing > the terminal to render part of the text red. > > Note that I did _not_ sanitize the string being sent through > trace-events in trace_nbd_server_error_msg; this is because I assume > that our trace engines already treat

Re: [PATCH 1/2] util: Refactor json-writer's string sanitizer to be public

2024-08-02 Thread Richard W.M. Jones
fact that the resulting function allows a non-UTF-8 2-byte synonym > for U+. > > Signed-off-by: Eric Blake I have to admit I'd never heard of "modified UTF-8" before, but it's a thing: https://en.wikipedia.org/wiki/UTF-8#Modified_UTF-8 As the patch is almo

Re: hppa-firmware.img missing build-id

2024-04-23 Thread Richard W.M. Jones
On Tue, Apr 23, 2024 at 10:11:50AM -0400, Cole Robinson wrote: > Hi, > > hppa-firmware.img and hppa-firmware64.img in qemu.git are missing ELF > build-id annotations. rpm builds on Fedora will error if an ELF binary > doesn't have build-id: > > RPM build errors: > Missing build-id in > /tmp/r

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-04-04 Thread Richard W.M. Jones
On Thu, Mar 28, 2024 at 04:40:10PM +, Richard W.M. Jones wrote: > libnbd absolutely does *not* get this right, eg: > > $ nbdinfo NBD://localhost > nbdinfo: nbd_connect_uri: unknown NBD URI scheme: NBD: Invalid argument > > so that's a bug too. Proposed fix: ht

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Richard W.M. Jones
On Thu, Mar 28, 2024 at 10:06:01AM -0500, Eric Blake wrote: > Adjusting cc list to add upstream NBD and drop developers unrelated to > this part of the qemu series... > > On Thu, Mar 28, 2024 at 02:13:42PM +0000, Richard W.M. Jones wrote: > > On Thu, Mar 28, 2024 at 03:06:03PM

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Richard W.M. Jones
l IPv6 address */ > -if (uri->server[0] == '[') { > -host = qstring_from_substr(uri->server, 1, > - strlen(uri->server) - 1); > -} else { > -host = qstring_from_str(uri->server); > - } > -

Re: [PATCH for-9.1 8/9] block/ssh: Use URI parsing code from glib

2024-03-28 Thread Richard W.M. Jones
gerror) { > +warn_report("Failed to parse SSH URI parameters '%s'.", > + uri_query); > +break; > +} > +/* > + * Pick out the query parameters that we understand, and ignore

[PATCH v2] block/blkio: Make s->mem_region_alignment be 64 bits

2024-01-30 Thread Richard W.M. Jones
int64_t *’ {aka ‘long long unsigned int *’} but argument is of type ‘size_t *’ {aka ‘unsigned int *’} 49 | int blkio_get_uint64(struct blkio *b, const char *name, uint64_t *value); | ~~^ Signed-off-by: Richard W.M. Jones ---

Re: [PATCH [repost]] block/blkio: Don't assume size_t is 64 bit

2024-01-30 Thread Richard W.M. Jones
On Tue, Jan 30, 2024 at 01:04:46PM +0100, Kevin Wolf wrote: > Am 30.01.2024 um 11:30 hat Richard W.M. Jones geschrieben: > > On Tue, Jan 30, 2024 at 09:51:59AM +0100, Kevin Wolf wrote: > > > Am 29.01.2024 um 19:53 hat Richard W.M. Jones geschrieben: > > > > With GCC

Re: [PATCH [repost]] block/blkio: Don't assume size_t is 64 bit

2024-01-30 Thread Richard W.M. Jones
On Tue, Jan 30, 2024 at 09:51:59AM +0100, Kevin Wolf wrote: > Am 29.01.2024 um 19:53 hat Richard W.M. Jones geschrieben: > > With GCC 14 the code failed to compile on i686 (and was wrong for any > > version of GCC): > > > > ../block/blkio.c: In function ‘blkio_file_open

[PATCH [repost]] block/blkio: Don't assume size_t is 64 bit

2024-01-29 Thread Richard W.M. Jones
int64_t *’ {aka ‘long long unsigned int *’} but argument is of type ‘size_t *’ {aka ‘unsigned int *’} 49 | int blkio_get_uint64(struct blkio *b, const char *name, uint64_t *value); | ~~^ Signed-off-by: Richard W.M. Jones ---

[PATCH [repost]] block/blkio: Don't assume size_t is 64 bit

2024-01-29 Thread Richard W.M. Jones
Repost of the same patch as a minute ago because I messed up a couple of email addresses in the CC. Rich.

Re: [PATCH] xen: fix condition for enabling the Xen accelerator

2023-12-09 Thread Richard W.M. Jones
7;CONFIG_XEN'] similar > to what is already there for KVM, and fix xen_native.h. Here's a Fedora scratch build with Xen 4.18.0 which includes this patch: https://koji.fedoraproject.org/koji/taskinfo?taskID=110105806 Rich. > Cc: Stefano Stabellini > Cc: Richard W.M. Jones

Re: [PATCH] fix qemu build with xen-4.18.0

2023-12-08 Thread Richard W.M. Jones
On Fri, Dec 08, 2023 at 08:47:07AM +, Richard W.M. Jones wrote: > (Adding Xen maintainers) > > On Thu, Dec 07, 2023 at 11:12:48PM +, Michael Young wrote: > > Builds of qemu-8.2.0rc2 with xen-4.18.0 are currently failing > > with errors like > > ../h

Re: [PATCH] fix qemu build with xen-4.18.0

2023-12-08 Thread Richard W.M. Jones
On Fri, Dec 08, 2023 at 08:47:07AM +, Richard W.M. Jones wrote: > (Adding Xen maintainers) > > On Thu, Dec 07, 2023 at 11:12:48PM +, Michael Young wrote: > > Builds of qemu-8.2.0rc2 with xen-4.18.0 are currently failing > > with errors like > > ../h

Re: [PATCH] fix qemu build with xen-4.18.0

2023-12-08 Thread Richard W.M. Jones
0 > > Signed-off-by: Michael Young Reviewed-by: Richard W.M. Jones > --- > include/hw/xen/xen_native.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/hw/xen/xen_native.h b/include/hw/xen/xen_native.h > index 6f09c48823..04b1ef4d34 100644

Re: [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro

2023-10-31 Thread Richard W.M. Jones
On Tue, Oct 31, 2023 at 05:42:37PM +0100, Kevin Wolf wrote: > Am 31.10.2023 um 14:48 hat Richard W.M. Jones geschrieben: > > On Tue, Oct 31, 2023 at 02:17:56PM +0100, Kevin Wolf wrote: > > > Am 17.10.2023 um 16:01 hat Philippe Mathieu-Daudé geschrieben: > > > > Acc

Re: [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro

2023-10-31 Thread Richard W.M. Jones
On Tue, Oct 31, 2023 at 02:17:56PM +0100, Kevin Wolf wrote: > Am 17.10.2023 um 16:01 hat Philippe Mathieu-Daudé geschrieben: > > Access QOM parent with the proper QOM VIRTIO_SCSI_COMMON() macro. > > > > Signed-off-by: Philippe Mathieu-Daudé > > --- > > hw/scsi/virtio-scsi.c | 2 +- > > 1 file ch

Re: tcg_flush_jmp_cache replacing qatomic_set loop with memset

2023-10-16 Thread Richard W.M. Jones
On Mon, Oct 16, 2023 at 04:43:36PM +0100, Richard W.M. Jones wrote: > Hey Paolo, > > Quick question. I'm sure the transformation below is *not* correct, > because it doesn't preserve the invariant of the lockless structure. > Is there a way to do this while maintaining

tcg_flush_jmp_cache replacing qatomic_set loop with memset

2023-10-16 Thread Richard W.M. Jones
Hey Paolo, Quick question. I'm sure the transformation below is *not* correct, because it doesn't preserve the invariant of the lockless structure. Is there a way to do this while maintaining correctness? For example putting barrier() after memset? (Note I'm also zeroing .pc which may be a prob

Re: [PATCH 2/6] target/riscv: Use env_archcpu() in [check_]nanbox()

2023-10-09 Thread Richard W.M. Jones
m-cast-debug. > > Inspired-by: Richard W.M. Jones > Signed-off-by: Philippe Mathieu-Daudé > --- > target/riscv/internals.h | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/target/riscv/internals.h b/target/riscv/internals.h > index b5f82

Re: [PATCH v2] target/riscv: Use a direct cast for better performance

2023-10-09 Thread Richard W.M. Jones
On Mon, Oct 09, 2023 at 08:36:28PM +0800, LIU Zhiwei wrote: > > On 2023/10/9 5:50, Richard W.M. Jones wrote: > >RISCV_CPU(cs) uses a checked cast. When QOM cast debugging is enabled > >this adds about 5% total overhead when emulating RV64 on x86-64 host. > > > >Usin

[PATCH v3] target/riscv: Use env_archcpu for better performance

2023-10-09 Thread Richard W.M. Jones
qemu source tree with 'make clean; time make -j16'. Before making this change the compile step took 449 & 447 seconds over two consecutive runs. After making this change: 428 & 421 seconds. The saving is over 5%. Thanks: Paolo Bonzini Thanks: Philippe Mathieu-Daudé Signed-off-by:

[PATCH v3] target/riscv: Use env_archcpu for better performance

2023-10-09 Thread Richard W.M. Jones
In v3: - Use env_archcpu - Rerun the benchmark to get new "after" figures Rich.

[PATCH v2] target/riscv: Use a direct cast for better performance

2023-10-08 Thread Richard W.M. Jones
qemu source tree with 'make clean; time make -j16'. Before making this change the compile step took 449 & 447 seconds over two consecutive runs. After making this change, 428 & 422 seconds. The saving is about 5%. Thanks: Paolo Bonzini Signed-off-by: Richard W.M. Jones Reviewed-b

[PATCH v2] target/riscv: Use a direct cast for better performance

2023-10-08 Thread Richard W.M. Jones
v1 was here: https://lists.nongnu.org/archive/html/qemu-devel/2023-10/msg02021.html v2 is functionally exactly the same, except I changed s/qemu cast/QOM cast/ in the comment, and added the Reviewed-by tag received for the first version. Rich.

Re: [PATCH] target/riscv: Use a direct cast for better performance

2023-10-07 Thread Richard W.M. Jones
If you're interested in how I found this problem, it was done using 'perf report -a -g' & flamegraphs. This is the flamegraph of qemu (on the host) when the guest is running the parallel compile: http://oirase.annexia.org/tmp/qemu-riscv.svg If you click into 'CPU_0/TCG' at the bottom left (all

[PATCH] target/riscv: Use a direct cast for better performance

2023-10-07 Thread Richard W.M. Jones
qemu source tree with 'make clean; time make -j16'. Before making this change the compile step took 449 & 447 seconds over two consecutive runs. After making this change, 428 & 422 seconds. The saving is about 5%. Thanks: Paolo Bonzini Signed-off-by: Richard W.M. Jones

Re: [PATCH] qemu-img: Update documentation for compressed images

2023-09-01 Thread Richard W.M. Jones
On Fri, Sep 01, 2023 at 12:24:30PM +0200, Kevin Wolf wrote: > Document the 'compression_type' option for qcow2, and mention that > streamOptimized vmdk supports compression, too. > > Reported-by: Richard W.M. Jones > Signed-off-by: Kevin Wolf Looks good, so: Review

Re: qemu-img cache modes with Linux cgroup v1

2023-07-31 Thread Richard W.M. Jones
On Mon, Jul 31, 2023 at 11:40:36AM -0400, Stefan Hajnoczi wrote: > 3. Using buffered I/O because O_DIRECT is not universally supported? > > If you can't use O_DIRECT, then qemu-img could be extended to manage its > dirty page cache set carefully. This consists of picking a budget and > writing bac

Re: [PATCH v2 2/2] accel/tcg: Always lock pages before translation

2023-07-07 Thread Richard W.M. Jones
I'm not sure if you meant v3 there, or if this is v2 rebased on top of the main branch, but I tested it again and it passed 5,000 boots. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com

Re: [PATCH v2 2/2] accel/tcg: Always lock pages before translation

2023-07-07 Thread Richard W.M. Jones
ed-by: Richard W.M. Jones > Signed-off-by: Richard Henderson > Tested-by: Richard W.M. Jones I tested another 5,000 iterations successfully, so this one looks good as well. I don't have an easy way to test qemu-user, so I only tested qemu-system-x86_64. Rich. > --- &g

Re: [PATCH 2/2] accel/tcg: Always lock pages before translation

2023-07-06 Thread Richard W.M. Jones
ed-by: Richard W.M. Jones > Signed-off-by: Richard Henderson Tested-by: Richard W.M. Jones I tested it across two machines, total of 10,000 iterations successfully. Great fix, thanks. Rich. > accel/tcg/internal.h | 30 - > accel/tcg/cpu-exec.c | 4 + > a

Re: [PATCH 1/2] accel/tcg: Split out cpu_exec_longjmp_cleanup

2023-07-06 Thread Richard W.M. Jones
On Thu, Jul 06, 2023 at 06:05:36PM +0100, Richard Henderson wrote: > Share the setjmp cleanup between cpu_exec_step_atomic > and cpu_exec_setjmp. > > Signed-off-by: Richard Henderson Reviewed-by: Richard W.M. Jones (I'm still testing the other one, but already up to 600

[PATCH] tb-maint: Document #ifdef..else..endif correctly

2023-07-06 Thread Richard W.M. Jones
It was hard to tell from the comments whether the code applied to user mode (CONFIG_USER_ONLY) or system mode. Fix the comments on the #else and #endif directives to be clearer. Signed-off-by: Richard W.M. Jones --- accel/tcg/tb-maint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

Collecting information from a hung qemu process

2023-06-08 Thread Richard W.M. Jones
I filed this bug about recent Linux hanging very rarely when booting on recent qemu: https://gitlab.com/qemu-project/qemu/-/issues/1696 As I'm able to reproduce this bug at will (albeit I have to wait for 100s or 1000s of iterations of the test), I am able to observe the qemu process after it han

Re: [PATCH nbd 1/4] nbd: Add multi-conn option

2023-03-10 Thread Richard W.M. Jones
On Fri, Mar 10, 2023 at 04:17:17PM -0600, Eric Blake wrote: > On Thu, Mar 09, 2023 at 11:39:43AM +0000, Richard W.M. Jones wrote: > > + * safe for multi-conn, force it to 1. > > + */ > > +if (!(s->info.flags & NBD_FLAG_CAN_MULTI_CONN)) { &g

Re: [PATCH nbd 0/4] Enable multi-conn NBD [for discussion only]

2023-03-10 Thread Richard W.M. Jones
On Fri, Mar 10, 2023 at 01:04:12PM -0600, Eric Blake wrote: > How many of these timing numbers can be repeated with TLS in the mix? While I have been playing with TLS and kTLS recently, it's not something that is especially important to v2v since all NBD traffic goes over Unix domain sockets only

[PATCH nbd 1/4] nbd: Add multi-conn option

2023-03-09 Thread Richard W.M. Jones
not advertise that it is safe for multi-conn then this setting is forced to 1. Signed-off-by: Richard W.M. Jones --- block/nbd.c | 24 1 file changed, 24 insertions(+) diff --git a/block/nbd.c b/block/nbd.c index bf2894ad5c..5ffae0b798 100644 --- a/block/nbd.c +++ b/block/nb

[PATCH nbd 3/4] nbd: Open multiple NBD connections if multi-conn is set

2023-03-09 Thread Richard W.M. Jones
le or shortlived NBD operations do not require multiple connections to be made. Signed-off-by: Richard W.M. Jones --- block/nbd.c | 128 1 file changed, 90 insertions(+), 38 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 84e8a

[PATCH nbd 4/4] nbd: Enable multi-conn using round-robin

2023-03-09 Thread Richard W.M. Jones
on size of requests outstanding) the load on each connection. But this implementation doesn't do any of that. Signed-off-by: Richard W.M. Jones --- block/nbd.c | 67 +++-- 1 file changed, 49 insertions(+), 18 deletions(-) diff --git a/block/nb

[PATCH nbd 2/4] nbd: Split out block device state from underlying NBD connections

2023-03-09 Thread Richard W.M. Jones
the zeroth slot in the conns[] array. Thus this does not implement multi-conn yet. Signed-off-by: Richard W.M. Jones --- block/coroutines.h | 5 +- block/nbd.c| 674 - 2 files changed, 358 insertions(+), 321 deletions(-) diff --git a/block

[PATCH nbd 0/4] Enable multi-conn NBD [for discussion only]

2023-03-09 Thread Richard W.M. Jones
[ Patch series also available here, along with this cover letter and the script used to generate test results: https://gitlab.com/rwmjones/qemu/-/commits/2023-nbd-multi-conn-v1 ] This patch series adds multi-conn support to the NBD block driver in qemu. It is only meant for discussion and tes

[PATCH v2] tcg: Include "qemu/timer.h" for profile_getclock

2023-03-03 Thread Richard W.M. Jones
-declaration] 4905 | qatomic_set(&prof->opt_time, prof->opt_time - profile_getclock()); | ^~~~ Thanks: Philippe Mathieu-Daudé Signed-off-by: Richard W.M. Jones --- accel/tcg/tcg-accel-ops.c | 1 + accel/tcg/trans

[PATCH] tcg: Include "qemu/timer.h" for profile_getclock

2023-03-02 Thread Richard W.M. Jones
-declaration] 4905 | qatomic_set(&prof->opt_time, prof->opt_time - profile_getclock()); | ^~~~ Signed-off-by: Richard W.M. Jones --- tcg/tcg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tcg/tcg.c b/tcg/t

Re: [GSoC 2023] Introducing Myself

2023-03-02 Thread Richard W.M. Jones
On Thu, Mar 02, 2023 at 07:17:46PM +0530, Ayush Singh wrote: > Hello Everyone, > > I am Ayush Singh, a 3rd-year university student from the Indian Institute of > Technology (Indian School of Mines), Dhanbad, India. This email is just to > > I participated and successfully completed my GSoC 2022 P

Re: [PATCH] tests: Ensure TAP version is printed before other messages

2023-03-01 Thread Richard W.M. Jones
On Tue, Feb 28, 2023 at 09:30:56PM +0100, Thomas Huth wrote: > On 27/02/2023 18.40, Richard W.M. Jones wrote: > >These two tests were failing with this error: > > > > stderr: > > TAP parsing error: version number must be on the first line > > [...] > >

Re: [PATCH v2] test-vmstate: fix bad GTree usage, use-after-free

2023-02-27 Thread Richard W.M. Jones
lab.com/qemu-project/qemu/-/issues/1518 > Signed-off-by: Marc-André Lureau > Signed-off-by: Eric Auger > Reported-by: Richard W.M. Jones You can add: Tested-by: Richard W.M. Jones Reviewed-by: Richard W.M. Jones > --- > > This is a respin of Marc-André's pat

[PATCH] tests: Ensure TAP version is printed before other messages

2023-02-27 Thread Richard W.M. Jones
. Thanks: Daniel Berrange, for diagnosing the problem Signed-off-by: Richard W.M. Jones --- tests/qtest/fuzz-lsi53c895a-test.c | 4 ++-- tests/qtest/rtl8139-test.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/qtest/fuzz-lsi53c895a-test.c b/tests/qtest/fuzz

Re: RFC: towards systemd socket activation in q-s-d

2023-01-30 Thread Richard W.M. Jones
On Mon, Jan 30, 2023 at 04:45:08PM +, Daniel P. Berrangé wrote: > which is LISTEN_FDS=2, LISTEN_FDNAMES=control,vnc Colon for separating the elements not comma. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog

Re: RFC: towards systemd socket activation in q-s-d

2023-01-30 Thread Richard W.M. Jones
On Mon, Jan 30, 2023 at 02:58:01PM +, Daniel P. Berrangé wrote: > Obviously at startup QEMU can trivially inherit the FDs from whatever > spawned it. The only task is to identify the FDs that are passed into, > and systemd defined a mechanism for this using LISTEN_FDNAMES. IOW the > socket acti

Re: RFC: towards systemd socket activation in q-s-d

2023-01-27 Thread Richard W.M. Jones
On Fri, Jan 27, 2023 at 03:26:15PM -0600, Eric Blake wrote: > In https://bugzilla.redhat.com/show_bug.cgi?id=2055229, the question > was raised on how to make qemu-storage-daemon sufficiently powerful to > be a full-blown replacement to qemu-nbd. One of the features still > lacking is the ability

Re: [PATCH 4/4] hw/isa: enable TCO watchdog reboot pin strap by default

2022-10-31 Thread Richard W.M. Jones
70..caabcac6e5 100644 > --- a/tests/qtest/tco-test.c > +++ b/tests/qtest/tco-test.c > @@ -60,7 +60,7 @@ static void test_init(TestData *d) > QTestState *qs; > > qs = qtest_initf("-machine q35 %s %s", > - d->noreboot ? "" : "

Re: [PATCH 2/4] hw/isa: add trace events for ICH9 LPC chip config access

2022-10-31 Thread Richard W.M. Jones
; via_pm_io_write(uint32_t addr, uint32_t val, int len) "addr 0x%x val 0x%x > len 0x%x" > via_superio_read(uint8_t addr, uint8_t val) "addr 0x%x val 0x%x" > via_superio_write(uint8_t addr, uint32_t val) "addr 0x%x val 0x%x" > + > +# lpc_ich9.c > +i

Re: [PATCH 3/4] hw/watchdog: add trace events for watchdog action handling

2022-10-31 Thread Richard W.M. Jones
27;system_reset' in monitor */ > qapi_event_send_watchdog(WATCHDOG_ACTION_RESET); > @@ -89,4 +92,5 @@ void watchdog_perform_action(void) > void qmp_watchdog_set_action(WatchdogAction action, Error **errp) > { > watchdog_action = action; > +trace_watchdog_set_

Re: [PATCH 1/4] hw/acpi: add trace events for TCO watchdog register access

2022-10-31 Thread Richard W.M. Jones
ddr: 0x%" PRIx64 > # tco.c > tco_timer_reload(int ticks, int msec) "ticks=%d (%d ms)" > tco_timer_expired(int timeouts_no, bool strap, bool no_reboot) > "timeouts_no=%d no_reboot=%d/%d" > +tco_io_write(uint64_t addr, uint32_t val) "addr=0x%" PRIx64 "

Re: ublk-qcow2: ublk-qcow2 is available

2022-10-06 Thread Richard W.M. Jones
On Tue, Oct 04, 2022 at 09:53:32AM -0400, Stefan Hajnoczi wrote: > qemu-nbd doesn't use io_uring to handle the backend IO, Would this be fixed by your (not yet upstream) libblkio driver for qemu? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my prog

Re: [PATCH 01/11] crypto: sanity check that LUKS header strings are NUL-terminated

2022-09-06 Thread Richard W.M. Jones
dkit does this which is slightly different: char cipher_name[33], cipher_mode[33], hash_spec[33]; /* Copy the header fields locally and ensure they are \0 terminated. */ memcpy (cipher_name, h->phdr.cipher_name, 32); cipher_name[32] = 0; memcpy (cipher_mode, h->phdr.cipher_mode, 32); ci

Re: [PATCH 04/11] crypto: validate that LUKS payload doesn't overlap with header

2022-09-06 Thread Richard W.M. Jones
On Tue, Sep 06, 2022 at 09:41:40AM +0100, Daniel P. Berrangé wrote: > We already validate that LUKS keyslots don't overlap with the > header, or with each other. This closes the remain hole in remain -> remaining > validation of LUKS file regions. > > Signed-off-by: Daniel P. Berrangé > --- >

Re: [PATCH 00/11] crypto: improve robustness of LUKS metadata validation

2022-09-06 Thread Richard W.M. Jones
priv.h | 143 > crypto/block-luks.c| 228 +++-- > tests/unit/test-crypto-block.c | 302 - > 3 files changed, 542 insertions(+), 131 deletions(-) > create mode 100644 crypto/block-luks-priv.h I think there is on

Re: [PATCH 06/11] crypto: check that LUKS PBKDF2 iterations count is non-zero

2022-09-06 Thread Richard W.M. Jones
cious LUKS input, or if we're just trying to sanity check the device hasn't been corrupted or improperly prepared. The test above is the latter, I think. Nevertheless as this is an improvement over the current situation: Reviewed-by: Richard W.M. Jones Rich. -- Richard Jones, Virtualiz

Re: [PATCH 02/11] crypto: enforce that LUKS stripes is always a fixed value

2022-09-06 Thread Richard W.M. Jones
y important implementation (the kernel) always fixes this at 4000 (cryptsetup.git/lib/keymanage.c), so: Reviewed-by: Richard W.M. Jones Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html

Re: [PATCH] linux-user: use 'max' instead of 'qemu32' / 'qemu64' by defualt

2022-08-26 Thread Richard W.M. Jones
On Fri, Aug 26, 2022 at 12:39:00PM +0100, Daniel P. Berrangé wrote: > The 'qemu64' CPU model implements the least featureful x86_64 CPU that's > possible. Historically this hasn't been an issue since it was rare for > OS distros to build with a higher mandatory CPU baseline. > > With RHEL-9, howev

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Richard W.M. Jones
On Wed, Aug 03, 2022 at 01:25:34PM +0100, Peter Maydell wrote: > On Wed, 3 Aug 2022 at 12:44, Daniel P. Berrangé wrote: > > Inconsistent return value checking is designed-in behaviour for > > QEMU's current Error handling coding pattern with error_abort/fatal. > > Yes; I habitually mark as false-

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Richard W.M. Jones
On Wed, Aug 03, 2022 at 12:07:19PM +0100, Alberto Faria wrote: > On Wed, Aug 3, 2022 at 11:46 AM Dr. David Alan Gilbert > wrote: > > > > * Alberto Faria (afa...@redhat.com) wrote: > > > Make non-void static functions whose return values are ignored by > > > all callers return void instead. > > > >

Re: [PATCH for 7.1] linux-user: fix compat with glibc >= 2.36 sys/mount.h

2022-08-02 Thread Richard W.M. Jones
On Tue, Aug 02, 2022 at 07:29:29PM +0100, Richard W.M. Jones wrote: > Dan, which Fedora glibc package shows this problem? I have > glibc-2.35.9000-31.fc37.x86_64 and qemu compiled fine. (Also nbdkit > which includes linux/fs.h) It would help if I enabled a *-linux-user target ... Y

Re: [PATCH for 7.1] linux-user: fix compat with glibc >= 2.36 sys/mount.h

2022-08-02 Thread Richard W.M. Jones
On Tue, Aug 02, 2022 at 12:41:34PM -0400, Daniel P. Berrangé wrote: > The latest glibc 2.36 has extended sys/mount.h so that it > defines the FSCONFIG_* enum constants. These are historically > defined in linux/mount.h, and thus if you include both headers > the compiler complains: > > In file inc

Re: [PATCH v3 3/3] nbd/server: Allow MULTI_CONN for shared writable exports

2022-03-16 Thread Richard W.M. Jones
On Wed, Mar 16, 2022 at 04:15:53PM -0500, Eric Blake wrote: > On Wed, Mar 16, 2022 at 04:07:21PM -0500, Eric Blake wrote: > > On Tue, Mar 15, 2022 at 01:14:41PM +, Richard W.M. Jones wrote: > > > The patches seem OK to me, but I don't really know enough about the > &g

Re: [PATCH 07/27] Replace GCC_FMT_ATTR with G_GNUC_PRINTF

2022-03-16 Thread Richard W.M. Jones
pretty much identical. I even learned about gnu_printf. So: Reviewed-by: Richard W.M. Jones Shouldn't there be a hunk which removes the definition of GCC_FMT_ATTR from include/qemu/compiler.h? Maybe that's in another place in the patch series. Rich. -- Richard Jones, Virtualization

Re: [PATCH v3 3/3] nbd/server: Allow MULTI_CONN for shared writable exports

2022-03-15 Thread Richard W.M. Jones
The patches seem OK to me, but I don't really know enough about the internals of qemu-nbd to give a line-by-line review. I did however build and test qemu-nbd with the patches: $ ./build/qemu-nbd /var/tmp/test.qcow2 $ nbdinfo nbd://localhost ... can_multi_conn: false $ ./build/

Re: [PATCH v2] nbd/server: Allow MULTI_CONN for shared writable exports

2022-02-16 Thread Richard W.M. Jones
On Tue, Feb 15, 2022 at 05:24:14PM -0600, Eric Blake wrote: > Oh. The QMP command (which is immediately visible through > nbd-server-add/block-storage-add to qemu and qemu-storage-daemon) > gains "multi-conn":"on", but you may be right that qemu-nbd would want > a command line option (either that,

Re: [PATCH v2] Deprecate C virtiofsd

2022-02-10 Thread Richard W.M. Jones
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

Re: Block alignment of qcow2 compress driver

2022-01-28 Thread Richard W.M. Jones
On Fri, Jan 28, 2022 at 01:30:43PM +0100, Hanna Reitz wrote: > On 28.01.22 13:18, Richard W.M. Jones wrote: > >On Fri, Jan 28, 2022 at 12:57:47PM +0100, Hanna Reitz wrote: > >>On 28.01.22 12:48, Richard W.M. Jones wrote: > >>>On Fri, Jan 28, 2022 at 12:39:11PM +010

Re: Block alignment of qcow2 compress driver

2022-01-28 Thread Richard W.M. Jones
On Fri, Jan 28, 2022 at 01:30:53PM +, Richard W.M. Jones wrote: > I feel like this may be a bug in what qemu-nbd advertises. Currently > it is: Ignore this email, see other reply. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my progr

Re: Block alignment of qcow2 compress driver

2022-01-28 Thread Richard W.M. Jones
On Fri, Jan 28, 2022 at 02:19:44PM +0100, Kevin Wolf wrote: > Am 28.01.2022 um 13:30 hat Hanna Reitz geschrieben: > > > > I just changed that line of code [2], as shown in [4].  I suppose > > > > the better thing to do would be to have an option for the NBD server > > > > to force-change the announ

Re: Block alignment of qcow2 compress driver

2022-01-28 Thread Richard W.M. Jones
On Fri, Jan 28, 2022 at 12:57:47PM +0100, Hanna Reitz wrote: > On 28.01.22 12:48, Richard W.M. Jones wrote: > >On Fri, Jan 28, 2022 at 12:39:11PM +0100, Hanna Reitz wrote: > >>So I actually don’t know why it works for you.  OTOH, I don’t > >>understand why the bloc

Re: Block alignment of qcow2 compress driver

2022-01-28 Thread Richard W.M. Jones
I hacked nbdcopy to ignore block alignment (the error actually comes from libnbd refusing to send the unaligned request, not from qemu-nbd), and indeed qemu-nbd accepts the unaligned request without complaint. Eric - maybe having some flag for nbdcopy to ignore unaligned requests when we know th

Re: Block alignment of qcow2 compress driver

2022-01-28 Thread Richard W.M. Jones
On Fri, Jan 28, 2022 at 12:39:11PM +0100, Hanna Reitz wrote: > So I actually don’t know why it works for you.  OTOH, I don’t > understand why the block size affects you over NBD, because I would > have expected qemu to internally auto-align requests when they are > not aligned (in bdrv_co_pwritev_p

Block alignment of qcow2 compress driver

2022-01-28 Thread Richard W.M. Jones
The commands below set up a sparse RAM disk, with an allocated block at offset 32K and another one at offset 1M-32K. Then it tries to copy this to a compressed qcow2 file using qemu-nbd + the qemu compress filter: $ qemu-img create -f qcow2 output.qcow2 1M $ qemu-nbd -t --image-opts driver=c

Re: [PATCH v1 20/34] tests/docker: add libfuse3 development headers

2022-01-05 Thread Richard W.M. Jones
Reitz > Cc: Richard W.M. Jones > Signed-off-by: Stefan Hajnoczi > Acked-by: Richard W.M. Jones > Reviewed-by: Beraldo Leal > Tested-by: Beraldo Leal > Message-Id: <20211207160025.52466-1-stefa...@redhat.com> > [AJB: migrate to lcitool qemu.yml and regenerate] &

Re: Redesign of QEMU startup & initial configuration

2022-01-04 Thread Richard W.M. Jones
Sorry for very delayed reply ... On Thu, Dec 02, 2021 at 07:57:38AM +0100, Markus Armbruster wrote: > 1. QMP only > >Management applications need to use QMP for monitoring anyway. They >may want to use it for initial configuration, too. Libvirt does. > >They still need to bootstrap

Re: [PATCH v2] Move the libssh setup from configure to meson.build

2021-12-09 Thread Richard W.M. Jones
On Thu, Dec 09, 2021 at 04:08:24PM +0100, Thomas Huth wrote: > On 09/12/2021 15.55, Richard W.M. Jones wrote: > >On Thu, Dec 09, 2021 at 03:48:01PM +0100, Thomas Huth wrote: > >>It's easier to do this in meson.build now. > >> > >>Signed-off-by: Thomas

Re: [PATCH v2] Move the libssh setup from configure to meson.build

2021-12-09 Thread Richard W.M. Jones
On Thu, Dec 09, 2021 at 03:48:01PM +0100, Thomas Huth wrote: > It's easier to do this in meson.build now. > > Signed-off-by: Thomas Huth > --- > v2: Added the missing "config_host_data.set('CONFIG_LIBSSH', libssh.found())" > > configure | 27 --- > m

Re: [PATCH] tests/docker: add libfuse3 development headers

2021-12-07 Thread Richard W.M. Jones
s OK in the end. The rest of the changes look good too, so: Acked-by: Richard W.M. Jones Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows progr

Re: QEMU 6.2.0 and rhbz#1999878

2021-12-03 Thread Richard W.M. Jones
On Fri, Dec 03, 2021 at 05:35:41PM -0300, Eduardo Lima wrote: > > > On Fri, Dec 3, 2021 at 4:37 PM Richard W.M. Jones wrote: > > On Fri, Dec 03, 2021 at 04:20:23PM -0300, Eduardo Lima wrote: > > Hi Rich, > > > > Can you confirm if the patch

Re: QEMU 6.2.0 and rhbz#1999878

2021-12-03 Thread Richard W.M. Jones
On Fri, Dec 03, 2021 at 04:20:23PM -0300, Eduardo Lima wrote: > Hi Rich, > > Can you confirm if the patch you added for qemu in Fedora has still not been > merged upstream? I could not find it on the git source tree. > > +Patch2: 0001-tcg-arm-Reduce-vector-alignment-requirement-for-NEON.patch > +

Re: [PATCH v2 0/6] aio-posix: split poll check from ready handler

2021-12-02 Thread Richard W.M. Jones
Not sure if this is related, but builds are failing with: FAILED: libblockdev.fa.p/block_export_fuse.c.o cc -m64 -mcx16 -Ilibblockdev.fa.p -I. -I.. -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/fuse3 -I/usr/include/p11-kit-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/includ

Re: [PATCH 0/1] vmx: Fix mapping

2021-10-04 Thread Richard W.M. Jones
On Mon, Oct 04, 2021 at 04:50:51PM +0200, Laszlo Ersek wrote: > On 10/04/21 11:59, Richard W.M. Jones wrote: > > It turns out that changing the qemu implementation is painful, > > particularly if we wish to maintain backwards compatibility of the > > command li

Re: [PATCH 0/1] vmx: Fix mapping

2021-10-04 Thread Richard W.M. Jones
/master/docs/vm-generation-id-across-hypervisors.txt On Thu, Sep 30, 2021 at 10:16:20AM +0100, Richard W.M. Jones wrote: > I was going to suggest something like: > > aa-bb-cc.. > or > aabbcc.. After thinking about this some more, the real implementation on Windows guest and hos

Re: [PATCH v3] nbd/server: Add --selinux-label option

2021-09-30 Thread Richard W.M. Jones
On Thu, Sep 30, 2021 at 02:00:11PM -0300, Willian Rampazzo wrote: > On Thu, Sep 30, 2021 at 5:55 AM Vladimir Sementsov-Ogievskiy > wrote: > > > > 9/30/21 11:47, Richard W.M. Jones wrote: > > > Under SELinux, Unix domain sockets have two labels. One is on the >

  1   2   3   4   5   6   7   8   9   10   >