From patchwork Tue Oct 13 00:28:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11834537 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 927B192C for ; Tue, 13 Oct 2020 00:29:48 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1E1DB21655 for ; Tue, 13 Oct 2020 00:29:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KQ2RdRMr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E1DB21655 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:42900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kS8CI-0000v4-T7 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 12 Oct 2020 20:29:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kS8Az-0007rF-Sb for qemu-devel@nongnu.org; Mon, 12 Oct 2020 20:28:25 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]:45155) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kS8Ay-0004mT-7n for qemu-devel@nongnu.org; Mon, 12 Oct 2020 20:28:25 -0400 Received: by mail-pg1-x52f.google.com with SMTP id y14so16107219pgf.12 for ; Mon, 12 Oct 2020 17:28:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zEKfNIeymcKPsazgVsI+BouUpU8RF746p2+yCwWSEXg=; b=KQ2RdRMrYsh6GOoShET0iRiz98tfZVxWp37i0REPXHO6NARYLcNsw4Wc9R7nh3WC1h BrU/Zl9wYiMyKJTjyf5NXb67921ylOS1SayG0gWBRKAKYA78N2rZknBvaYFgNCYVxAls 76Yb0qy22N34e39aNLLi1R3Fv0j62GRPBQgR8jJC2wlAQRxWMPOT2tMTEUoqMOz3hPSI puYQzifmQMQXjk2wi3GUsRpk24cNjuD67BoZmOUulb5uaCkf4xGf5xZS1RkK6XgQEEFH 6umZUKsHEJwqNady+gPenQ1OixHsmg8SqQxQ6kQ9iMtGP32U83dKTo/XrVGo7XHAtcPB qN5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zEKfNIeymcKPsazgVsI+BouUpU8RF746p2+yCwWSEXg=; b=QC2YSjvAcvXJkLCIZ8ZxPuSIgN5yRcXd9GtCcEg/sAKwuVhaxkYmCcpoeyA0OPgCTg Aa/R03c9heZd+RZ58J0x1cDvU5tuYtDQGb7k+J4anDl6wBctCUsazSUgPoHYRHdTHxvD kNq+WaK/QYry9ULe/qShnB9ocje0srsGrntJEOrALSGLy5o3ndDxTAehrYqfTiKnpbbB yGJSVwYntLfErJsHtzMTZjdKDg5qERU+36SAswuJZx9Yusme7R6BUoXlxvxAB4TEWysb 6Mi3RoLPlVzBQPsZUBTW3XLEf3eimEq/T0qMuVE5um0JNLbRzsi27sCFHvBet4ELn4Ac l88Q== X-Gm-Message-State: AOAM531rPINbPqFdFwTrg52k2SS8PlldIobMSTgQrS248ftW6WsnZ3EP KASnW4tdYcEUpW4nvHcmqjzluGkoISca5Q== X-Google-Smtp-Source: ABdhPJwJV7iSGkurUd6SPHe4Zk0tj63x25wp6R3J4ji7jniNlAfs93iQANLBOhJg9zUJtAF8GsIabg== X-Received: by 2002:a17:90b:30d2:: with SMTP id hi18mr23247720pjb.86.1602548902208; Mon, 12 Oct 2020 17:28:22 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id y5sm22565925pge.62.2020.10.12.17.28.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 17:28:21 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v6 0/5] Enable plugin support on msys2/mingw Date: Tue, 13 Oct 2020 08:28:01 +0800 Message-Id: <20201013002806.1447-1-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x52f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Yonggang Luo , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" V5-V6 Skip merged patches V3-V4 Split plugin: Fixes typo in qemu-plugin.h out Trying to explain the design of plugin: Getting qemu-plugin works under win32. V1-V2 1. Fixes review comments 2. Increase QEMU_PLUGIN_VERSION to 1 for compat QEMU_PLUGIN_VERSION 0 3. Revise the loader to support for version 0 and 1 4. By export function qemu_plugin_initialize in plugin, and call it in loader= , so we have no need call it in every plugin. And also provide a standard implem= entation, anyway, use can also override it. Add this feature on msys2/mingw by using glib provided cross-platform dlsym f= unctional. Yonggang Luo (5): plugins: getting qemu_plugin_get_hwaddr only expose one function prototype plugins: Fixes typo in qemu-plugin.h plugins: Getting qemu-plugin works under win32. plugins: Getting qemu-plugin.h can be included in multiple source file cirrus: Enable plugins in cirrus for windows .cirrus.yml | 1 + Makefile | 1 - configure | 71 ------------ contrib/plugins/hotblocks.c | 1 + contrib/plugins/hotpages.c | 1 + contrib/plugins/howvec.c | 1 + contrib/plugins/lockstep.c | 1 + include/qemu/qemu-plugin.h | 208 +++++++++++++++++++++++++++-------- meson.build | 6 +- plugins/api.c | 113 ++++++++++--------- plugins/core.c | 16 ++- plugins/loader.c | 50 ++++++++- plugins/meson.build | 10 +- plugins/plugin.h | 1 + plugins/qemu-plugins.symbols | 40 ------- tests/plugin/bb.c | 1 + tests/plugin/empty.c | 1 + tests/plugin/insn.c | 1 + tests/plugin/mem.c | 1 + 19 files changed, 298 insertions(+), 227 deletions(-) delete mode 100644 plugins/qemu-plugins.symbols --=20 2.28.0.windows.1