From patchwork Mon Feb 21 12:42:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 12753586 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 59D50C433FE for ; Mon, 21 Feb 2022 12:42:43 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.276265.472375 (Exim 4.92) (envelope-from ) id 1nM81J-0003r2-Pp; Mon, 21 Feb 2022 12:42:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 276265.472375; Mon, 21 Feb 2022 12:42:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nM81J-0003qv-Mt; Mon, 21 Feb 2022 12:42:25 +0000 Received: by outflank-mailman (input) for mailman id 276265; Mon, 21 Feb 2022 12:42:25 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nM81J-0003qp-1V for xen-devel@lists.xenproject.org; Mon, 21 Feb 2022 12:42:25 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b78a7eeb-9313-11ec-8539-5f4723681683; Mon, 21 Feb 2022 13:42:23 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0A06F21129; Mon, 21 Feb 2022 12:42:23 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B822413AC3; Mon, 21 Feb 2022 12:42:22 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id xmyHK66IE2KGawAAMHmgww (envelope-from ); Mon, 21 Feb 2022 12:42:22 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b78a7eeb-9313-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1645447343; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=s5Ju/wj4WZBBr1h9srFDpm+oLA9XY5iSYL7QmbanTmQ=; b=cnaBYxgLooyCQggVuLUms0pmbYofbYEuILXoLP4NSurvgbTEGQTdxVjF+/5jqfsOFetbxF VJjD6XSpwUWDfIaN++T17mLPuTdkMKBMjqn0TW+U3xBSe0JKUirKgaMjPJUzvMxvm9uaVM h9+oxdeNH17E9VlTznRQkGJAZzPpPvk= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH] xen/include/public: add macro for invalid grant reference Date: Mon, 21 Feb 2022 13:42:21 +0100 Message-Id: <20220221124221.10245-1-jgross@suse.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Providing a macro for an invalid grant reference would be beneficial for users, especially as some are using the wrong value "0" for that purpose. Signed-off-by: Juergen Gross --- xen/include/public/grant_table.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/include/public/grant_table.h b/xen/include/public/grant_table.h index 7fbd1c6d10..af00aacfd3 100644 --- a/xen/include/public/grant_table.h +++ b/xen/include/public/grant_table.h @@ -113,6 +113,8 @@ */ typedef uint32_t grant_ref_t; +#define XEN_GRANT_REF_INVALID ~0U + /* * A grant table comprises a packed array of grant entries in one or more * page frames shared between Xen and a guest.