From patchwork Mon Feb 7 10:36:13 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: 12737127 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 07B02C433F5 for ; Mon, 7 Feb 2022 10:36:28 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.266668.460369 (Exim 4.92) (envelope-from ) id 1nH1Na-00063T-Ix; Mon, 07 Feb 2022 10:36:18 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 266668.460369; Mon, 07 Feb 2022 10:36:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nH1Na-00063M-FY; Mon, 07 Feb 2022 10:36:18 +0000 Received: by outflank-mailman (input) for mailman id 266668; Mon, 07 Feb 2022 10:36:17 +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 1nH1NZ-0005wh-9l for xen-devel@lists.xenproject.org; Mon, 07 Feb 2022 10:36:17 +0000 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c7370740-8801-11ec-8f75-fffcc8bd4f1a; Mon, 07 Feb 2022 11:36:16 +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-out2.suse.de (Postfix) with ESMTPS id D94691F37E; Mon, 7 Feb 2022 10:36:15 +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 9A00B13B92; Mon, 7 Feb 2022 10:36:15 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4qQ5JB/2AGJeQgAAMHmgww (envelope-from ); Mon, 07 Feb 2022 10:36:15 +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: c7370740-8801-11ec-8f75-fffcc8bd4f1a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1644230175; 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=IigLRlJyl3GnO9/rAuPdXj1reb21GnqbYc745JCT4VM=; b=h0LiGBDd5zv5AKSm6Q4MIMFe0vZnGMQYKYvU9SREQ4ie7Wq4VKwuZNy5F255pBPwMbF2Iu RQBWuubFKmZw7BYQ7O5XbE1BsuEl/wg3fVChg60YT6Y2E/zfKQTRXDZvu8ELXNllnN/8xp 53J8Y011JjiYTFYaDBS+QamY+n4PGTw= 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/public: partially revert commit 7c7f7e8fba01 Date: Mon, 7 Feb 2022 11:36:13 +0100 Message-Id: <20220207103613.32260-1-jgross@suse.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Commit 7c7f7e8fba01 changed xen/include/public/memory.h in an incompatible way. Unfortunately the changed parts were already in use in the Linux kernel, so an update of the header in the kernel would result in a build breakage. Even when removing its usage from the kernel the used flag bit should be marked as reserved in order to avoid to give it a different semantic in the future. Do a partial revert of said commit in order to enable the kernel to take an updated version of memory.h. Fixes: 7c7f7e8fba01 ("include/public/memory.h: remove the XENMEM_rsrc_acq_caller_owned flag") Signed-off-by: Juergen Gross --- xen/common/memory.c | 2 +- xen/include/public/memory.h | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/xen/common/memory.c b/xen/common/memory.c index 0d7c413df8..9b5214a8a9 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -1234,7 +1234,7 @@ static int acquire_resource( if ( copy_from_guest(&xmar, arg, 1) ) return -EFAULT; - if ( xmar.pad != 0 ) + if ( xmar.flags != 0 ) return -EINVAL; /* diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h index 383a9468c3..fd768e0b7b 100644 --- a/xen/include/public/memory.h +++ b/xen/include/public/memory.h @@ -662,7 +662,17 @@ struct xen_mem_acquire_resource { * two calls. */ uint32_t nr_frames; - uint32_t pad; + + /* + * OUT - Must be zero on entry. On return this may contain a bitwise + * OR of the following values. + */ + uint32_t flags; + + /* No longer supported - will be never set */ +#define _XENMEM_rsrc_acq_caller_owned 0 +#define XENMEM_rsrc_acq_caller_owned (1u << _XENMEM_rsrc_acq_caller_owned) + /* * IN - the index of the initial frame to be mapped. This parameter * is ignored if nr_frames is 0. This value may be updated