From nobody Tue Feb 10 21:59:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1586166633; cv=none; d=zohomail.com; s=zohoarc; b=TpkKgHxI8ljElUrg7ZQMH9A46JhGRtmXWq21HUxLylnqwUhKenzPtpEJxUj2EMfBweZIwTJdQL3X/lJs21E9b1k4tfV1R6n5c5f0uVILG96RaFI+XXUDJx5BiyLzglJWG5vq901bEh8F5dswBfOZPpfBOLU6AQ1LJijY92PVk64= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586166633; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=V34vqiNMw97o1dTPzX27wWZMFaoDykDwdyaDjPR3ekE=; b=f8itPwA88RmuGQqL2WeYmioU54ZerHoEusgTCr9w/su367eir1to4YPYUPfZoOedmfy5vmlV7SFhNhFifa60WtjCZFtDPOSPdITU7629LqfgHzIj37L80Mu7ndKoBSyb4x+t/rl9XSBk2Y+1tCgvQGKAXK7GHwxRg0EB1NJ0Ah0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1586166633673946.738135291446; Mon, 6 Apr 2020 02:50:33 -0700 (PDT) Received: from localhost ([::1]:57430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOOm-0000Di-Bd for importer@patchew.org; Mon, 06 Apr 2020 05:50:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44510) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOH6-0002wq-TE for qemu-devel@nongnu.org; Mon, 06 Apr 2020 05:42:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLOH5-0002Zb-5o for qemu-devel@nongnu.org; Mon, 06 Apr 2020 05:42:36 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:45722) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jLOH4-0002Yy-Ts for qemu-devel@nongnu.org; Mon, 06 Apr 2020 05:42:35 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0369dSE4025474; Mon, 6 Apr 2020 09:42:29 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 306jvmwr73-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Apr 2020 09:42:28 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0369bM7G056443; Mon, 6 Apr 2020 09:42:28 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 3073qcndad-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Apr 2020 09:42:28 +0000 Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0369gQvt013893; Mon, 6 Apr 2020 09:42:27 GMT Received: from flaka.hsd1.ca.comcast.net (/67.180.143.163) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 06 Apr 2020 02:42:26 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2020-01-29; bh=V34vqiNMw97o1dTPzX27wWZMFaoDykDwdyaDjPR3ekE=; b=y6ldnnIAg+1sJaif4fvWln7q6dsx5pGfJLSddNi59G9LDonBi/7VXAkSRRootTtpySM0 RgbLroGQIZJbKF4tJ4GdoFpgEz2iC50QiBZaTNnmefQwpNZDSP+JrgeFLDVo0mYQh0tx 8XXAgb8xa9tL4JSDan9TWi5OoCKzDDmliZOyK0i/uw1oetrW6JZOYTv8Ad0Xaz4HPjVK fjIyEgNS1QyyoABcvkBYTyqVMSU5whpbSLrupBnGk4iiXHN6CYNg0VFFQyZ+nLT0tzqP Ugrj3BSLCJLPsW5JNGrx4xGrtcgtqyFBXnJrnqBVeoE3GYb3I8l2pQiRJcbiCb+bDgy+ tA== From: elena.ufimtseva@oracle.com To: qemu-devel@nongnu.org Subject: [PATCH v6 33/36] multi-process/mon: enable QMP module support in the remote process Date: Mon, 6 Apr 2020 02:41:23 -0700 Message-Id: X-Mailer: git-send-email 2.25.GIT In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9582 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxscore=0 mlxlogscore=999 spamscore=0 bulkscore=0 adultscore=0 malwarescore=0 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004060083 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9582 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=1 mlxlogscore=999 mlxscore=0 bulkscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1015 malwarescore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004060083 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.85 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: elena.ufimtseva@oracle.com, fam@euphon.net, swapnil.ingle@nutanix.com, john.g.johnson@oracle.com, kraxel@redhat.com, jag.raman@oracle.com, quintela@redhat.com, mst@redhat.com, armbru@redhat.com, kanth.ghatraju@oracle.com, felipe@nutanix.com, thuth@redhat.com, ehabkost@redhat.com, konrad.wilk@oracle.com, dgilbert@redhat.com, liran.alon@oracle.com, stefanha@redhat.com, thanos.makatos@nutanix.com, rth@twiddle.net, kwolf@redhat.com, berrange@redhat.com, mreitz@redhat.com, ross.lagerwall@citrix.com, marcandre.lureau@gmail.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Elena Ufimtseva Build system changes to enable QMP module in the remote process Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- Makefile.objs | 10 ++++++++++ Makefile.target | 35 +++++++++++++++++++++++++++++++++-- block/Makefile.objs | 3 +++ block/monitor/Makefile.objs | 2 ++ hmp-commands.hx | 1 + hw/core/Makefile.objs | 1 + monitor/Makefile.objs | 4 ++++ monitor/misc.c | 8 ++++++++ qapi/Makefile.objs | 2 ++ qom/Makefile.objs | 1 + stubs/monitor.c | 1 + ui/Makefile.objs | 2 ++ 12 files changed, 68 insertions(+), 2 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index ff3f06b146..cdb55b2f82 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -32,6 +32,7 @@ remote-pci-obj-$(CONFIG_MPQEMU) +=3D migration/ remote-pci-obj-$(CONFIG_MPQEMU) +=3D remote/ remote-pci-obj-$(CONFIG_MPQEMU) +=3D accel/ remote-pci-obj-$(CONFIG_MPQEMU) +=3D util/ +remote-pci-obj-$(CONFIG_MPQEMU) +=3D monitor/ =20 remote-pci-obj-$(CONFIG_MPQEMU) +=3D cpus-common.o remote-pci-obj-$(CONFIG_MPQEMU) +=3D dma-helpers.o @@ -45,6 +46,10 @@ remote-pci-obj-$(CONFIG_MPQEMU) +=3D qemu-parse.o # remote-lsi-obj-y is code used to implement remote LSI device =20 remote-lsi-obj-$(CONFIG_MPQEMU) +=3D hw/ +remote-lsi-obj-$(CONFIG_MPQEMU) +=3D ui/ +remote-lsi-obj-$(CONFIG_MPQEMU) +=3D block/ + +#remote-lsi-obj-$(CONFIG_MPQEMU) +=3D device-hotplug.o =20 ####################################################################### # crypto-obj-y is code used by both qemu system emulation and qemu-img @@ -113,6 +118,11 @@ common-obj-y +=3D util/machine-notify.o =20 endif # CONFIG_SOFTMMU =20 +remote-pci-obj-$(CONFIG_MPQEMU) +=3D qapi/ +remote-pci-obj-$(CONFIG_MPQEMU) +=3D blockdev-nbd.o +remote-pci-obj-$(CONFIG_MPQEMU) +=3D job-qmp.o +remote-pci-obj-$(CONFIG_MPQEMU) +=3D balloon.o + ####################################################################### # Target-independent parts used in system and user emulation common-obj-y +=3D cpus-common.o diff --git a/Makefile.target b/Makefile.target index adc76886f8..1e9e102df8 100644 --- a/Makefile.target +++ b/Makefile.target @@ -142,13 +142,32 @@ remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D accel/stubs/= hax-stub.o remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D accel/stubs/whpx-stub.o remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D stubs/vl-stub.o remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D stubs/net-stub.o -remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D stubs/monitor.o remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D stubs/replay.o remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D stubs/xen-mapcache.o remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D stubs/audio.o remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D stubs/monitor.o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D stubs/migration.o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D stubs/ui-stub.o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D stubs/gdbstub.o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D stubs/qapi-target.o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D stubs/qapi-misc.o =20 remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D remote/memory.o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D arch_init.o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D monitor/misc.o + +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D qapi/qapi-introspect.o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D qapi/qapi-commands-block-core.o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D qapi/qapi-commands-block.o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D qapi/qapi-commands-misc.o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D qapi/qapi-commands.o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D qapi/qapi-commands-machine-target= .o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D qapi/qapi-commands-misc-target.o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D qapi/qapi-visit-machine-target.o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D qapi/qapi-visit-misc-target.o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D qapi/qapi-types-machine-target.o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D qapi/qapi-types-misc-target.o +remote-pci-tgt-obj-$(CONFIG_MPQEMU) +=3D qapi/qapi-init-commands.o endif =20 ######################################################### @@ -204,6 +223,10 @@ endif generated-files-y +=3D hmp-commands.h hmp-commands-info.h generated-files-y +=3D config-devices.h =20 +ifdef CONFIG_MPQEMU +generated-files-y +=3D hmp-scsi-commands.h hmp-scsi-commands-info.h +endif + endif # CONFIG_SOFTMMU =20 dummy :=3D $(call unnest-vars,,obj-y) @@ -289,10 +312,18 @@ hmp-commands.h: $(SRC_PATH)/hmp-commands.hx $(SRC_PAT= H)/scripts/hxtool hmp-commands-info.h: $(SRC_PATH)/hmp-commands-info.hx $(SRC_PATH)/scripts/= hxtool $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$(= TARGET_DIR)$@") =20 +ifdef CONFIG_MPQEMU +hmp-scsi-commands.h: $(SRC_PATH)/hmp-commands.hx $(SRC_PATH)/scripts/hxtool + $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -tgt scsi < $< > $@) + +hmp-scsi-commands-info.h: $(SRC_PATH)/hmp-commands-info.hx $(SRC_PATH)/scr= ipts/hxtool + $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -tgt scsi < $< > $@) +endif + clean: clean-target rm -f *.a *~ $(PROGS) rm -f $(shell find . -name '*.[od]') - rm -f hmp-commands.h gdbstub-xml.c + rm -f hmp-commands.h gdbstub-xml.c hmp-scsi-commands.h hmp-scsi-commands-= info.h rm -f trace/generated-helpers.c trace/generated-helpers.c-timestamp ifdef CONFIG_TRACE_SYSTEMTAP rm -f *.stp diff --git a/block/Makefile.objs b/block/Makefile.objs index 3e7513967c..734548d48f 100644 --- a/block/Makefile.objs +++ b/block/Makefile.objs @@ -76,3 +76,6 @@ parallels.o-cflags :=3D $(LIBXML2_CFLAGS) parallels.o-libs :=3D $(LIBXML2_LIBS) =20 remote-pci-obj-$(CONFIG_MPQEMU) +=3D stream.o +remote-pci-obj-$(CONFIG_MPQEMU) +=3D qapi-sysemu.o + +remote-lsi-obj-$(CONFIG_MPQEMU) +=3D monitor/ diff --git a/block/monitor/Makefile.objs b/block/monitor/Makefile.objs index 0a74f9a8b5..a0c898711f 100644 --- a/block/monitor/Makefile.objs +++ b/block/monitor/Makefile.objs @@ -1 +1,3 @@ common-obj-y +=3D block-hmp-cmds.o + +remote-lsi-obj-$(CONFIG_MPQEMU) +=3D block-hmp-cmds.o diff --git a/hmp-commands.hx b/hmp-commands.hx index 1b60676d7c..54d01a055f 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -12,6 +12,7 @@ HXCOMM HXCOMM can be used for comments, discarded from bo= th rST and C. .params =3D "[cmd]", .help =3D "show the help", .cmd =3D hmp_do_help_cmd, + .targets =3D "scsi", .flags =3D "p", }, =20 diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs index e3e80848c8..251b77bc4c 100644 --- a/hw/core/Makefile.objs +++ b/hw/core/Makefile.objs @@ -49,3 +49,4 @@ remote-pci-obj-$(CONFIG_MPQEMU) +=3D numa.o remote-pci-obj-$(CONFIG_MPQEMU) +=3D cpu.o remote-pci-obj-$(CONFIG_MPQEMU) +=3D vmstate-if.o remote-pci-obj-$(CONFIG_MPQEMU) +=3D resettable.o +remote-pci-obj-$(CONFIG_MPQEMU) +=3D machine-qmp-cmds.o diff --git a/monitor/Makefile.objs b/monitor/Makefile.objs index a8533c9dd7..b6949be297 100644 --- a/monitor/Makefile.objs +++ b/monitor/Makefile.objs @@ -4,3 +4,7 @@ common-obj-y +=3D qmp-cmds.o qmp-cmds-control.o common-obj-y +=3D hmp-cmds.o =20 storage-daemon-obj-y +=3D monitor.o qmp.o qmp-cmds-control.o + +remote-pci-obj-$(CONFIG_MPQEMU) +=3D monitor.o qmp.o hmp.o +remote-pci-obj-$(CONFIG_MPQEMU) +=3D qmp-cmds.o qmp-cmds-control.o +remote-pci-obj-$(CONFIG_MPQEMU) +=3D hmp-cmds.o diff --git a/monitor/misc.c b/monitor/misc.c index c0eee6f4ab..edda4cce17 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -1679,13 +1679,21 @@ int monitor_fd_param(Monitor *mon, const char *fdna= me, Error **errp) =20 /* Please update hmp-commands.hx when adding or changing commands */ static HMPCommand hmp_info_cmds[] =3D { +#if defined(SCSI_PROCESS) +#include "hmp-scsi-commands-info.h" +#else #include "hmp-commands-info.h" +#endif { NULL, NULL, }, }; =20 /* hmp_cmds and hmp_info_cmds would be sorted at runtime */ HMPCommand hmp_cmds[] =3D { +#if defined(SCSI_PROCESS) +#include "hmp-scsi-commands.h" +#else #include "hmp-commands.h" +#endif { NULL, NULL, }, }; =20 diff --git a/qapi/Makefile.objs b/qapi/Makefile.objs index 4673ab7490..f7433d6a73 100644 --- a/qapi/Makefile.objs +++ b/qapi/Makefile.objs @@ -36,3 +36,5 @@ QAPI_MODULES_STORAGE_DAEMON =3D block-core char common co= ntrol crypto QAPI_MODULES_STORAGE_DAEMON +=3D introspect job qom sockets pragma transac= tion =20 storage-daemon-obj-y +=3D $(QAPI_MODULES_STORAGE_DAEMON:%=3Dqapi-commands-= %.o) + +remote-pci-obj-$(CONFIG_MPQEMU) +=3D $(QAPI_COMMON_MODULES:%=3Dqapi-comman= ds-%.o) diff --git a/qom/Makefile.objs b/qom/Makefile.objs index 7e9455db90..546f9fbde6 100644 --- a/qom/Makefile.objs +++ b/qom/Makefile.objs @@ -6,3 +6,4 @@ storage-daemon-obj-y +=3D qom-qmp-cmds.o =20 remote-pci-obj-$(CONFIG_MPQEMU) +=3D object.o qom-qobject.o container.o remote-pci-obj-$(CONFIG_MPQEMU) +=3D object_interfaces.o +remote-pci-obj-$(CONFIG_MPQEMU) +=3D qom-qmp-cmds.o qom-hmp-cmds.o diff --git a/stubs/monitor.c b/stubs/monitor.c index 959460834b..1f8fa301f5 100644 --- a/stubs/monitor.c +++ b/stubs/monitor.c @@ -36,6 +36,7 @@ #pragma weak monitor_printf #pragma weak monitor_cur_is_qmp #pragma weak qmp_device_list_properties +#pragma weak monitor_fdsets_cleanup =20 __thread Monitor *cur_mon; =20 diff --git a/ui/Makefile.objs b/ui/Makefile.objs index e6da6ff047..c3ac572d6b 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -68,3 +68,5 @@ console-gl.o-libs +=3D $(OPENGL_LIBS) egl-helpers.o-libs +=3D $(OPENGL_LIBS) egl-context.o-libs +=3D $(OPENGL_LIBS) egl-headless.o-libs +=3D $(OPENGL_LIBS) + +remote-lsi-obj-$(CONFIG_MPQEMU) +=3D vnc-stubs.o --=20 2.25.GIT