All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Rowan Hart <rowanbhart@gmail.com>
Cc: qemu-devel@nongnu.org,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Zhao Liu" <zhao1.liu@intel.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Alexandre Iooss" <erdnaxe@crans.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Mahmoud Mandour" <ma.mandourr@gmail.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v13 0/7] Add additional plugin API functions to read and write memory and registers
Date: Tue, 24 Jun 2025 12:21:04 +0100	[thread overview]
Message-ID: <87bjqd1j33.fsf@draig.linaro.org> (raw)
In-Reply-To: <20250619161547.1401448-1-rowanbhart@gmail.com> (Rowan Hart's message of "Thu, 19 Jun 2025 09:15:40 -0700")

Rowan Hart <rowanbhart@gmail.com> writes:

> This patch series adds several new API functions focused on enabling use
> cases around reading and writing guest memory from QEMU plugins. To support
> these new APIs, some utility functionality around retrieving information about
> address spaces is added as well.

I think we are almost there but I ran into a problem with the test:

  ➜  make run-tcg-tests-x86_64-softmmu
    BUILD   x86_64-softmmu guest-tests
    RUN     x86_64-softmmu guest-tests
    TEST    hello on x86_64
    TEST    interrupt on x86_64
    TEST    memory on x86_64
    TEST    hello-with-libbb.so on x86_64
    TEST    interrupt-with-libbb.so on x86_64
    TEST    memory-with-libbb.so on x86_64
    TEST    hello-with-libempty.so on x86_64
    TEST    interrupt-with-libempty.so on x86_64
    TEST    memory-with-libempty.so on x86_64
    TEST    hello-with-libinline.so on x86_64
    TEST    interrupt-with-libinline.so on x86_64
    TEST    memory-with-libinline.so on x86_64
    TEST    hello-with-libinsn.so on x86_64
    TEST    interrupt-with-libinsn.so on x86_64
    TEST    memory-with-libinsn.so on x86_64
    TEST    hello-with-libmem.so on x86_64
    TEST    interrupt-with-libmem.so on x86_64
    TEST    memory-with-libmem.so on x86_64
    TEST    check plugin libmem.so output with memory
    TEST    hello-with-libreset.so on x86_64
    TEST    interrupt-with-libreset.so on x86_64
    TEST    memory-with-libreset.so on x86_64
    TEST    hello-with-libsyscall.so on x86_64
    TEST    interrupt-with-libsyscall.so on x86_64
    TEST    memory-with-libsyscall.so on x86_64
    TEST    softmmu gdbstub support on x86_64
  qemu-system-x86_64: -gdb unix:path=/tmp/tmp01eq35b3qemu-gdbstub/gdbstub.socket,server=on: info: QEMU waiting for connection on: disconnected:unix:/tmp/tmp01eq35b3qemu-gdbstub/gdbstub.socket,server=on
  qemu-system-x86_64: QEMU: Terminated via GDBstub
    TEST    softmmu gdbstub support on x86_64
  qemu-system-x86_64: -gdb unix:path=/tmp/tmp4wf7k1fwqemu-gdbstub/gdbstub.socket,server=on: info: QEMU waiting for connection on: disconnected:unix:/tmp/tmp4wf7k1fwqemu-gdbstub/gdbstub.socket,server=on
  qemu-system-x86_64: QEMU: Terminated via GDBstub
    TEST    softmmu gdbstub untimely packets on x86_64
  qemu-system-x86_64: -gdb unix:path=/tmp/tmpnagp6w_mqemu-gdbstub/gdbstub.socket,server=on: info: QEMU waiting for connection on: disconnected:unix:/tmp/tmpnagp6w_mqemu-gdbstub/gdbstub.socket,server=on
    GREP    file untimely-packet.gdb.err
    TEST    softmmu gdbstub support on x86_64
  qemu-system-x86_64: -gdb unix:path=/tmp/tmpnkn1fbmsqemu-gdbstub/gdbstub.socket,server=on: info: QEMU waiting for connection on: disconnected:unix:/tmp/tmpnkn1fbmsqemu-gdbstub/gdbstub.socket,server=on
  qemu-system-x86_64: QEMU: Terminated via GDBstub
  make[1]: *** No rule to make target 'patch-target', needed by 'run-plugin-patch-target-with-libpatch.so'.  Stop.
  make: *** [/home/alex/lsrc/qemu.git/tests/Makefile.include:56: run-tcg-tests-x86_64-softmmu] Error 2

You need to ensure vpath is set, something like:

modified   tests/tcg/x86_64/Makefile.softmmu-target
@@ -1,13 +1,11 @@
 #
-# x86 system tests
-#
-# This currently builds only for i386. The common C code is built
-# with standard compiler flags however so we can support both by
-# adding additional boot files for x86_64.
+# x86-64 system tests
 #
 
-I386_SYSTEM_SRC=$(SRC_PATH)/tests/tcg/i386/system
 X64_SYSTEM_SRC=$(SRC_PATH)/tests/tcg/x86_64/system
+X64_SYSTEM_TESTS= $(patsubst $(X64_SYSTEM_SRC)/%.c, %, $(wildcard $(X64_SYSTEM_SRC)/*.c))
+
+VPATH+=$(X64_SYSTEM_SRC)
 
 # These objects provide the basic boot code and helper functions for all tests
 CRT_OBJS=boot.o
@@ -18,7 +16,7 @@ LDFLAGS=-Wl,-T$(LINK_SCRIPT) -Wl,-melf_x86_64
 CFLAGS+=-nostdlib -ggdb -O0 $(MINILIB_INC)
 LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc
 
-TESTS+=$(MULTIARCH_TESTS)
+TESTS+=$(X64_SYSTEM_TESTS) $(MULTIARCH_TESTS)
 EXTRA_RUNS+=$(MULTIARCH_RUNS)
 
 # building head blobs
@@ -41,4 +39,4 @@ run-plugin-patch-target-with-libpatch.so:		\
 run-plugin-patch-target-with-libpatch.so:		\
 	CHECK_PLUGIN_OUTPUT_COMMAND=$(X64_SYSTEM_SRC)/validate-patch.py $@.out
 run-plugin-patch-target-with-libpatch.so: patch-target libpatch.so
-EXTRA_RUNS+=run-plugin-patch-target-with-libpatch.so
\ No newline at end of file
+EXTRA_RUNS+=run-plugin-patch-target-with-libpatch.so

<snip>
>
> Rowan Hart (1):
>   plugins: Add enforcement of QEMU_PLUGIN_CB flags in register R/W
>     callbacks
>
> novafacing (6):
>   gdbstub: Expose gdb_write_register function to consumers of gdbstub
>   plugins: Add register write API
>   plugins: Add memory virtual address write API
>   plugins: Add memory hardware address read/write API
>   plugins: Add patcher plugin and test
>   plugins: Update plugin version and add notes

Could you update the Author fields so the Author matches the s-o-b tags
please and is consistent please.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  parent reply	other threads:[~2025-06-24 11:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-19 16:15 [PATCH v13 0/7] Add additional plugin API functions to read and write memory and registers Rowan Hart
2025-06-19 16:15 ` [PATCH v13 1/7] gdbstub: Expose gdb_write_register function to consumers of gdbstub Rowan Hart
2025-06-19 16:15 ` [PATCH v13 2/7] plugins: Add register write API Rowan Hart
2025-06-19 16:15 ` [PATCH v13 3/7] plugins: Add enforcement of QEMU_PLUGIN_CB flags in register R/W callbacks Rowan Hart
2025-06-19 16:15 ` [PATCH v13 4/7] plugins: Add memory virtual address write API Rowan Hart
2025-06-19 16:15 ` [PATCH v13 5/7] plugins: Add memory hardware address read/write API Rowan Hart
2025-06-19 16:15 ` [PATCH v13 6/7] plugins: Add patcher plugin and test Rowan Hart
2025-06-19 16:15 ` [PATCH v13 7/7] plugins: Update plugin version and add notes Rowan Hart
2025-06-24 11:21 ` Alex Bennée [this message]
2025-06-24 17:56   ` [PATCH v13 0/7] Add additional plugin API functions to read and write memory and registers Rowan Hart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bjqd1j33.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=eduardo@habkost.net \
    --cc=erdnaxe@crans.org \
    --cc=ma.mandourr@gmail.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=rowanbhart@gmail.com \
    --cc=wangyanan55@huawei.com \
    --cc=zhao1.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.