From patchwork Fri Nov 11 18:25:31 2022 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: 623759 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp958457pvb; Fri, 11 Nov 2022 10:30:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf6XGfoHyA9l5d98PWMMvj+lNc2Xj4FWS2I+7CUyg6poXAZ5f16Km+xlWIG85ZOzAmP7EG6Y X-Received: by 2002:a05:622a:5a87:b0:3a5:460f:f155 with SMTP id fz7-20020a05622a5a8700b003a5460ff155mr2528497qtb.264.1668191449255; Fri, 11 Nov 2022 10:30:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668191449; cv=none; d=google.com; s=arc-20160816; b=XEY+f8JPDB0uNlNmrae3w0bSftXdjd0Qxn6UDT7eJnXKEc3tCxzTMr+B3ddHfK8FtE Sce8+KqGLDlGBkn6/m9oegR9XxRvQN2NAXM39kRX1EDfT40fEZVV4qp9mXX4p69JUYhr WXwOQghJ01C2AIGsGyvji93vcULIHhqk1ELCtLGJ4PSqghJLmM5Igd8GLq9BzvuQ1S54 q0AaLOAmpWiplg+2xSkrWD9R4kh7ZYeu5aHuvE9AfK3KyAePOVIeXSdEwfqjYyTcXLY3 dl6edCh5HdK6RnrST+G8gdQhWMQVWv9KCP4hh3dD71CO1fZ6qhv+Y1c4bu6oYVNysKos qAgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=tP1tnCJDD0/845PJkX8UHaIw8B4BsTZ1dk/TTCfeP/A=; b=V/N4oWGrRzcXPNoFe3pGU0wKFtLeER8QeBF2gYj7uridoZGdSxpRnQadrs2H1KQpNH P8fl3cD/+K/JL4l8H8AkFtdDtTJN3Fm9RzuWaZLnI0LTjR6lWhsdGG/6IgqutUE71lXY ROwbbAVWfYbG4Tx0tu9XL8/Mtq18FjAIpURJxkQgpZaoRAqBwDASDzBXjAxxVqnMxyPK CdsnuX3Bb+S6HSHJSkcXiTLnMya/IQFa1mYltWh6lz8R59IpYo09UrmrxCeuNRaCZAMZ cVMhaISYCotxRfqOt6f/MV8bMogdKgHiqZv56NWqJVKKxZOSg5Mj4iuAZYd2FMZ8HFgq 1GLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vJ1rwERz; 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=pass (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 f5-20020a05622a1a0500b003a52751ce83si1677559qtb.129.2022.11.11.10.30.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Nov 2022 10:30:49 -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=pass header.i=@linaro.org header.s=google header.b=vJ1rwERz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otYiz-000899-J0; Fri, 11 Nov 2022 13:25:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otYis-00085y-Qo for qemu-devel@nongnu.org; Fri, 11 Nov 2022 13:25:53 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otYin-0005HJ-9B for qemu-devel@nongnu.org; Fri, 11 Nov 2022 13:25:50 -0500 Received: by mail-wr1-x42b.google.com with SMTP id a14so7511139wru.5 for ; Fri, 11 Nov 2022 10:25:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tP1tnCJDD0/845PJkX8UHaIw8B4BsTZ1dk/TTCfeP/A=; b=vJ1rwERzDeVM9w9TlVKCP2hiWVh1iLspt9v6fmbJ/bOmZ0c0zfvLuuidoGIJSrtxFO uBQhfcMWWMJN1xW0B5xDi0ygmkTAhyN7vJE8UNwQnAWYWgX0bjTlH8+fpKLcCRg4YuMW 04MX9PIj+M0SOpiN6jP5RMo6S6D+yjTEltHM+bU4F1cN5mHCZR8bG8UX7vLfLdCArMHr QdqtkoxRb8sv3lYCXzzH7uGz6bHGPIpH9K7Mx7cyUHb5uhyjvfpSe9ubf63GLGzB0Nex F7YZj2zFVfzuIeOViaD3ZXoNlBP+QCXQOE+wz2/KfGIDF8lHqZciHqdlZfO6kWy30mWH Zu/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tP1tnCJDD0/845PJkX8UHaIw8B4BsTZ1dk/TTCfeP/A=; b=AD/Zz0RORLEUEU2FKg4ENrYFDkYiWM6ild+g/kzWd/8mPfYwohBTEJdk3rXsX/5P+i 5KXbOoGegXvJK5oct0zywlMDJtsyB3MWeVqu6LLR4V+cnDM7yXy3dDXNhyVKxBtM+JSM JbcsGxVWJzq+zhoiAZ1OAO6DeWtG8bdvKjkeV6rXty1QMwORvP6V92fSyBZ/jwzL7pL4 dQTYWJa587hY2JFo+L8AyBrquVYVvKtx0yRzvkHy7Ie1XrBQR5Qa6sFiMFjvIjTxkODZ wzpvHY6OqAd/+RfcXxgFtxBFo6ryjj5QSEG8bfYP5jhgZfqNmprA85MPGFVOcfTfHEeH WdOQ== X-Gm-Message-State: ANoB5pnymt4wOwW3LCuqpEO8xotjifWmkXVP/zn6iiU2Umtlv2zeb9Vf AiFKf6Q6K7jmWLnJ5TCLriDsL/QyTL3omA== X-Received: by 2002:a05:6000:1a54:b0:236:8dd7:1925 with SMTP id t20-20020a0560001a5400b002368dd71925mr1977037wry.662.1668191143953; Fri, 11 Nov 2022 10:25:43 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id x10-20020adff64a000000b00236883f2f5csm2514835wrp.94.2022.11.11.10.25.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 10:25:39 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 47B061FFC6; Fri, 11 Nov 2022 18:25:37 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: f4bug@amsat.org, =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v5 16/20] include: add MEMTXATTRS_MACHINE helper Date: Fri, 11 Nov 2022 18:25:31 +0000 Message-Id: <20221111182535.64844-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221111182535.64844-1-alex.bennee@linaro.org> References: <20221111182535.64844-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com 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, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We will need this shortly for machine specific transactions for the PC IOAPIC. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- include/exec/memattrs.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/exec/memattrs.h b/include/exec/memattrs.h index 8359fc448b..b92f11aaa4 100644 --- a/include/exec/memattrs.h +++ b/include/exec/memattrs.h @@ -104,6 +104,14 @@ typedef struct MemTxAttrs { {.requester_type = MTRT_PCI, \ .requester_id = pci_requester_id(dev)}) +/* + * Helper for setting a machine specific sourced transaction. The + * details of how to decode the requester_id are machine specific. + */ +#define MEMTXATTRS_MACHINE(id) ((MemTxAttrs) \ + {.requester_type = MTRT_MACHINE, \ + .requester_id = id }) + /* New-style MMIO accessors can indicate that the transaction failed. * A zero (MEMTX_OK) response means success; anything else is a failure * of some kind. The memory subsystem will bitwise-OR together results