From patchwork Tue Nov 12 16:40:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 179226 Delivered-To: patch@linaro.org Received: by 2002:ac9:3c86:0:0:0:0:0 with SMTP id w6csp7989068ocf; Tue, 12 Nov 2019 08:42:06 -0800 (PST) X-Google-Smtp-Source: APXvYqz7YBa23scbI0nVZ2oUzcmtWV9NNk2uOWkVJuzjXzR0kXNDL2yicgV3YoZprPwAwMGt4V3F X-Received: by 2002:ac8:2d2d:: with SMTP id n42mr31945978qta.119.1573576926782; Tue, 12 Nov 2019 08:42:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573576926; cv=none; d=google.com; s=arc-20160816; b=aA03XmL18MelWS1u/nVyuSbFCLUvUHnrK1O+r8LNasn+NsLMUimlT5TP/g00Yeu/q1 CpDt3E/Q4iCbax+CefzwfGuPSWwd9qqjAZTYGMm9ohh7o1pD3W6EeghfIPHkmqvcXlmd Xipzj+b3uBexQmtv5pidWq0/dwbcskUBhgGt1fvDnAiIiVZglWD4RXNnlLpTKY4RV4v0 GFSzEYC3+J0FWOOfl8foN4EjTMeg/HWnwadQ/TwxQnKu4KKpjde8n2uG239RWmubtenL OCB2YQjDHTnRrmx/s/30deJYfXLclBryL5lbxuAu7kokoKLkd+rYd1Ky9kk8GJVWTvJf VkyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=mxOHNLiZiav5q06u4iP+1Y23i6AhW3YCUAOUVG6uEnY=; b=s3YXs2FzBtr3WVrbZAem8oBOuaNbS1ApOPiUQcmvxJner2GrBgD7v03xAeUd2WpWOE YfonFP/orQ5DRZpVQ2ndtVRBFg4K1KJMcNSZPI/0hoCRWlyDKl+oXCtmC3STEBTcVOyS 3zgEWnvU7u1Ux8MJJkttP495tEJ4+Gdz0RnvRKDRUukRAqzUcLqAW8UWyRJUz/7Fqwii dsQFoE2Wge4NS0omn08mvnsYLjJkxEK/8uoyXLG5cHiWhb8KyKru6ALjGa0tol9nmG8y 67EHOUETi4e7pVYvAveEu+N+UUeOz6KucWM1EhEDp4ZV7Kobauw0lVib+BOCmoaEvjRq 70ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HUV0sfiH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t128si4158238qke.61.2019.11.12.08.42.06 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Nov 2019 08:42:06 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HUV0sfiH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:37492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUZF0-0006Hk-7d for patch@linaro.org; Tue, 12 Nov 2019 11:42:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55273) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUZDt-0004dn-2k for qemu-devel@nongnu.org; Tue, 12 Nov 2019 11:40:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iUZDr-00006i-RN for qemu-devel@nongnu.org; Tue, 12 Nov 2019 11:40:56 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:35338) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iUZDr-00005k-LR for qemu-devel@nongnu.org; Tue, 12 Nov 2019 11:40:55 -0500 Received: by mail-wm1-x344.google.com with SMTP id 8so3713910wmo.0 for ; Tue, 12 Nov 2019 08:40:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mxOHNLiZiav5q06u4iP+1Y23i6AhW3YCUAOUVG6uEnY=; b=HUV0sfiHP4FCd9MBPOfk7ob8pDAkwa4XLMJWXvgfDx3mVfeMMfychtviJ1lDJeO1LA /ifa1TBv7diBbkY5Je5+9N4NzuO+w7tSlWij1KwCnTFaOnzgYF7s/ojsG+RsGyMYJuiG UZ9n0r1faB0W+jusiqudNpqAHmV/v2/2kLVkC8FaYihuRwrnl6egmqYo7PpUNpU4DvaR d4tZ1aUzNFrXzfX2Cr2J95xvSZ8RolmkR683o8/BZdf/njWUSTL2wJGdu5rcvBELBLq3 YkNijRyZe9uhvL6pz13nWehyYo6u9a70P3ujs4YuLP7UrP7JxCWAHBr+iB2EV6h2BgNX Wkqw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=mxOHNLiZiav5q06u4iP+1Y23i6AhW3YCUAOUVG6uEnY=; b=lzT8jDCpU+NpBEVbXo50x3dsdablv7dfdUf4m3Wnzw7Ju9QbzOz2/tvNxjTmvkccjP S/Q6deeNPEww3EByVn6vqNdeos4P4bc9PnsxeMZkbJTmclmkUrFXgn5DoC4irgq4WQ3q M8OyE0+3p+WjfEzaNSJSO52HtOFWyblaqhWlaqwK9jDECEO9AOn/vG6wc9iebT+Pe94A uBuvmgN8kQGcq3oQgoB23c3lXs796kGINx8U4M8wl5tPv+3XN1X8ei4Lijd7rf584oKW 4Q2P6G6vSlHLFpFpddsF865rZNo1uX6Il4FSe+JMd/k6457KkKMo7PQRTKXMUeUKWFy4 MwhA== X-Gm-Message-State: APjAAAUZ2s1iSLhnYovBszT4wAUQP3A5Q7E1pPcePwV65mZXR3kcU7P0 3OS6vyw/mevnjuf5GVXYr6deQg== X-Received: by 2002:a1c:a4c5:: with SMTP id n188mr4799065wme.30.1573576854436; Tue, 12 Nov 2019 08:40:54 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b186sm3588457wmb.21.2019.11.12.08.40.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 08:40:52 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B9DAC1FF8F; Tue, 12 Nov 2019 16:40:51 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 2/2] docs/devel: update tcg-plugins.rst with API versioning details Date: Tue, 12 Nov 2019 16:40:51 +0000 Message-Id: <20191112164051.16404-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191112164051.16404-1-alex.bennee@linaro.org> References: <20191112164051.16404-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 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: fam@euphon.net, berrange@redhat.com, stefanb@linux.vnet.ibm.com, =?utf-8?q?Alex_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, stefanha@redhat.com, marcandre.lureau@redhat.com, pbonzini@redhat.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alex Bennée --- docs/devel/tcg-plugins.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 2.20.1 diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index b18fb6729e3..8d619fd44ef 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins.rst @@ -25,6 +25,22 @@ process. However the project reserves the right to change or break the API should it need to do so. The best way to avoid this is to submit your plugin upstream so they can be updated if/when the API changes. +API versioning +-------------- + +All plugins need to declare a symbol which exports the plugin API +version they were built against. This is can be done simply by: + +:: + QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; + +The core code will refuse to load a plugin that doesn't export a +`qemu_plugin_version` symbol. Additionally the `qemu_info_t` structure +which is passed to the `qemu_plugin_install` method of a plugin will +detail the minimum and current API versions supported by QEMU. The API +version will be incremented if new APIs are added. The minimum API +version will be incremented if existing APIs are changed or removed. + Exposure of QEMU internals --------------------------