{"id":810776,"url":"http://patchwork.ozlabs.org/api/patches/810776/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/1504729728-23279-6-git-send-email-cota@braap.org/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1504729728-23279-6-git-send-email-cota@braap.org>","list_archive_url":null,"date":"2017-09-06T20:28:47","name":"[RFC,5/6] vl: support -plugin option","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"1d7a90eb72dbd71d3d1e0e33a48a006898cde34a","submitter":{"id":65690,"url":"http://patchwork.ozlabs.org/api/people/65690/?format=json","name":"Emilio Cota","email":"cota@braap.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/1504729728-23279-6-git-send-email-cota@braap.org/mbox/","series":[{"id":1871,"url":"http://patchwork.ozlabs.org/api/series/1871/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=1871","date":"2017-09-06T20:28:45","name":"initial plugin support","version":1,"mbox":"http://patchwork.ozlabs.org/series/1871/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/810776/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/810776/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=braap.org header.i=@braap.org\n\theader.b=\"D9n3IRdx\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=messagingengine.com\n\theader.i=@messagingengine.com header.b=\"RP0w2JxB\"; \n\tdkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xnZwf5jb8z9t2r\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  7 Sep 2017 06:30:58 +1000 (AEST)","from localhost ([::1]:37678 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dpgyO-0002gW-K2\n\tfor incoming@patchwork.ozlabs.org; Wed, 06 Sep 2017 16:30:56 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:53522)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <cota@braap.org>) id 1dpgxW-0002az-9R\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 16:30:07 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <cota@braap.org>) id 1dpgxR-00014Q-ED\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 16:30:02 -0400","from out1-smtp.messagingengine.com ([66.111.4.25]:47575)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <cota@braap.org>) id 1dpgxR-00013Z-Ah\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 16:29:57 -0400","from compute4.internal (compute4.nyi.internal [10.202.2.44])\n\tby mailout.nyi.internal (Postfix) with ESMTP id 0695621381;\n\tWed,  6 Sep 2017 16:29:56 -0400 (EDT)","from frontend2 ([10.202.2.161])\n\tby compute4.internal (MEProxy); Wed, 06 Sep 2017 16:29:56 -0400","from localhost (flamenco.cs.columbia.edu [128.59.20.216])\n\tby mail.messagingengine.com (Postfix) with ESMTPA id B6A60240A4;\n\tWed,  6 Sep 2017 16:29:55 -0400 (EDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc\n\t:content-transfer-encoding:content-type:date:from:in-reply-to\n\t:message-id:mime-version:references:subject:to:x-me-sender\n\t:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=x0JbfsYyMba4lSY\n\tRKAzEGTsWVAnkmZG4UE+PytUI0TM=; b=D9n3IRdxl39oZ1Cz7TbR5omn9cJnsBL\n\tY5lFpu4zlmOrTozaF73tJvSNRDp4EvvCzXkMNNtx4JStsi54StXIckwqbFbNjib+\n\t5PrtGz91HGWDZnQt+x2VZrtxy5ZB1Bcor2caADtwvO7bUDrP7mEF7l8zGZjJ2xyT\n\tSXPfr/2w5xDI=","v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:content-transfer-encoding:content-type\n\t:date:from:in-reply-to:message-id:mime-version:references\n\t:subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=\n\tfm1; bh=x0JbfsYyMba4lSYRKAzEGTsWVAnkmZG4UE+PytUI0TM=; b=RP0w2JxB\n\todF+ranZ+BXBzSu7nYh0ldWxMJqIUdZObaH1b4owDX2oJ9BhhT9tgeJEchE5vRSl\n\tWgBQwjXXUzc70INeawnEp8RAodJyi8seVKDq32q29GUr5sQ8L2+WsV8ffyz0nDW2\n\tm/xJ4QlYQB1hPSZr9SQyAcD4N5MV1pAa91Ae7nYd9IyfmtCCfw/h52pKgXKHz+PU\n\t1b+J8MdOQ5VtrsNYADMbnYKdz36fRFrau5zfAvAC0HqmaKgANkZPBAOinJUp/tUG\n\taNDcDX2PHAOSKsfFXzeuvKaztRFqt6hXfgPayYyRUN1+Zlfu/CEFePnQJ43vB8id\n\tL/lt0XkB3R4u9g=="],"X-ME-Sender":"<xms:w1qwWRftHp1NWPAlVNH3vvzSIXWz33a9eDiwiuxgofFtOvOVI2mSZQ>","X-Sasl-enc":"jV0UP1/vM27xwQwUQoFV6yCbq/jBHlqur6TLXMXi5kC/ 1504729795","From":"\"Emilio G. Cota\" <cota@braap.org>","To":"qemu-devel@nongnu.org","Date":"Wed,  6 Sep 2017 16:28:47 -0400","Message-Id":"<1504729728-23279-6-git-send-email-cota@braap.org>","X-Mailer":"git-send-email 2.7.4","In-Reply-To":"<1504729728-23279-1-git-send-email-cota@braap.org>","References":"<1504729728-23279-1-git-send-email-cota@braap.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"66.111.4.25","Subject":"[Qemu-devel] [RFC 5/6] vl: support -plugin option","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"=?utf-8?q?Llu=C3=ADs_Vilanova?= <vilanova@ac.upc.edu>,\n\tStefan Hajnoczi <stefanha@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"},"content":"From: Lluís Vilanova <vilanova@ac.upc.edu>\n\nSigned-off-by: Lluís Vilanova <vilanova@ac.upc.edu>\n[ cota: s/instrument/plugin ]\nSigned-off-by: Emilio G. Cota <cota@braap.org>\n---\n vl.c            | 10 ++++++++++\n qemu-options.hx | 17 +++++++++++++++++\n 2 files changed, 27 insertions(+)","diff":"diff --git a/vl.c b/vl.c\nindex fb6b2ef..d3d8adc 100644\n--- a/vl.c\n+++ b/vl.c\n@@ -118,6 +118,7 @@ int main(int argc, char **argv)\n \n #include \"trace-root.h\"\n #include \"trace/control.h\"\n+#include \"qemu/plugin.h\"\n #include \"qemu/queue.h\"\n #include \"sysemu/arch_init.h\"\n \n@@ -3031,6 +3032,7 @@ int main(int argc, char **argv, char **envp)\n     } BlockdevOptions_queue;\n     QSIMPLEQ_HEAD(, BlockdevOptions_queue) bdo_queue\n         = QSIMPLEQ_HEAD_INITIALIZER(bdo_queue);\n+    struct qemu_plugin_list plugin_list = QTAILQ_HEAD_INITIALIZER(plugin_list);\n \n     module_call_init(MODULE_INIT_TRACE);\n \n@@ -3058,6 +3060,7 @@ int main(int argc, char **argv, char **envp)\n     qemu_add_opts(&qemu_global_opts);\n     qemu_add_opts(&qemu_mon_opts);\n     qemu_add_opts(&qemu_trace_opts);\n+    qemu_plugin_add_opts();\n     qemu_add_opts(&qemu_option_rom_opts);\n     qemu_add_opts(&qemu_machine_opts);\n     qemu_add_opts(&qemu_accel_opts);\n@@ -3999,6 +4002,9 @@ int main(int argc, char **argv, char **envp)\n                 g_free(trace_file);\n                 trace_file = trace_opt_parse(optarg);\n                 break;\n+            case QEMU_OPTION_plugin:\n+                qemu_plugin_opt_parse(optarg, &plugin_list);\n+                break;\n             case QEMU_OPTION_readconfig:\n                 {\n                     int ret = qemu_read_config_file(optarg);\n@@ -4185,6 +4191,10 @@ int main(int argc, char **argv, char **envp)\n     }\n     trace_init_file(trace_file);\n \n+    if (qemu_plugin_load_list(&plugin_list)) {\n+        exit(1);\n+    }\n+\n     /* Open the logfile at this point and set the log mask if necessary.\n      */\n     if (log_file) {\ndiff --git a/qemu-options.hx b/qemu-options.hx\nindex 746b5fa..34557e6 100644\n--- a/qemu-options.hx\n+++ b/qemu-options.hx\n@@ -4064,6 +4064,23 @@ HXCOMM HX does not support conditional compilation of text.\n @findex -trace\n @include qemu-option-trace.texi\n ETEXI\n+DEF(\"plugin\", HAS_ARG, QEMU_OPTION_plugin,\n+    \"-plugin [file=]<file>[,arg=<string>]\\n\"\n+    \"                load a plugin\\n\",\n+    QEMU_ARCH_ALL)\n+STEXI\n+@item -plugin file=@var{file}[,arg=@var{string}]\n+@findex -plugin\n+\n+Load a plugin.\n+\n+@table @option\n+@item file=@var{file}\n+Load the given plugin from a shared library file.\n+@item arg=@var{string}\n+Argument string passed to the plugin. (Can be given multiple times.)\n+@end table\n+ETEXI\n \n HXCOMM Internal use\n DEF(\"qtest\", HAS_ARG, QEMU_OPTION_qtest, \"\", QEMU_ARCH_ALL)\n","prefixes":["RFC","5/6"]}