From nobody Sat Nov 23 21:11:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=cloud.com ARC-Seal: i=1; a=rsa-sha256; t=1730225847; cv=none; d=zohomail.com; s=zohoarc; b=GJPH2vm+otZrZrJo2VvP/YZnCrx0A8+mDjS7hWHd8XXG7tWDMPTvfICXIDKFoehQ1cCi2QZph9GHTQOrcpuqQPHRMdU89DOxpaBgN0Dt9Fe4xsd06h6VF40tCWuCRAnKW42GW6wRv6jWzYP7mPec8QEoZg/OabJqJiaZ9M5lg+s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730225847; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=TYiBaICmKjMQAw+x0zvFUjtQo2tj3LsRH3e85w48BTg=; b=FjfdkeaSem13kKkfCPpSgeZc2p0gn76EQF4kSTRq5gPBWZ4n0KMn2+Mf3Xy1bHoaF36kGWnju1NZ7VW9b2s0YgmvK0ywDRztChO4LduqNn9w7pO85hQYoUn0JVkEqfxq6MFnMNDogKdKaIZ1b0szYg9qEuRFy0IOekiMzqCuAEc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1730225847819544.3842821684372; Tue, 29 Oct 2024 11:17:27 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.827796.1242518 (Exim 4.92) (envelope-from ) id 1t5qm9-0007pk-Jf; Tue, 29 Oct 2024 18:17:05 +0000 Received: by outflank-mailman (output) from mailman id 827796.1242518; Tue, 29 Oct 2024 18:17:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t5qm9-0007pd-FX; Tue, 29 Oct 2024 18:17:05 +0000 Received: by outflank-mailman (input) for mailman id 827796; Tue, 29 Oct 2024 18:17:04 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t5qm8-0007bP-4v for xen-devel@lists.xenproject.org; Tue, 29 Oct 2024 18:17:04 +0000 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [2a00:1450:4864:20::22a]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id fe089983-9621-11ef-a0c3-8be0dac302b0; Tue, 29 Oct 2024 19:17:01 +0100 (CET) Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2fb5a9c7420so54493031fa.3 for ; Tue, 29 Oct 2024 11:17:01 -0700 (PDT) Received: from localhost.localdomain ([217.156.233.154]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cbb63197bdsm4110171a12.70.2024.10.29.11.16.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 11:16:59 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: fe089983-9621-11ef-a0c3-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjoyMmEiLCJoZWxvIjoibWFpbC1sajEteDIyYS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImZlMDg5OTgzLTk2MjEtMTFlZi1hMGMzLThiZTBkYWMzMDJiMCIsInRzIjoxNzMwMjI1ODIxLjI2Nzg1LCJzZW5kZXIiOiJhbGVqYW5kcm8udmFsbGVqb0BjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1730225820; x=1730830620; darn=lists.xenproject.org; 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=TYiBaICmKjMQAw+x0zvFUjtQo2tj3LsRH3e85w48BTg=; b=UEGRIssyRtaXdu7ByOv36Cu0gO+fUaZNTmAX5GZ/dlGUAZ6UmA19xL9ezHpvyLztpx CTBuh0bgI2sijpdrUsCsLtK94oS8LGLsZr1dO/2J4u/1oJPRVVOZ1FO2vuywuw0wWo3+ UYvKLb3outKP23d/YCDKFo4ipHVIjdrTE6Guo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730225820; x=1730830620; 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=TYiBaICmKjMQAw+x0zvFUjtQo2tj3LsRH3e85w48BTg=; b=am+BiYxdlvzthCpHzdpOI1n5Qy3TcJt0bb5WJocZNLU4goe6U9vogUabmPE/8tE5tn qEF/7aMaEepJN5+JagIRBYYCqzcjERevZVf+YAXVzR3YcLjFFz7RNF1SgdrwC2StAK6T QfZnq2d4a9byng78bPc1Ylq+oWdEjQpZquk7aNFEOgQBIWPYPjAD8X3z3j5IDIEi/RLh IwgOZJLdXeVAmXh27/HWEe9jl3Av9f4c4Z7bcNRlZ56Hwd3E5LfUK03Q2umrHt+/tgoG oMf96BgPmiSwL7E83k4JluyCdvHnQ22fgyTGNvWM0eXuK5n5+jcNZmVNcumCVFCYslqY SQww== X-Gm-Message-State: AOJu0YyjIfAnzf4mwvR3I6bzDBtQM3uImhK23/rEiPb12OjxXN7EB2k/ 5rAcYVgFDNK2wQdqlnbce5roO6tvmA0JZanifIY23fNVFJvAxh4VC5PH5UEApyNartebWt40Gwr H X-Google-Smtp-Source: AGHT+IHiH+WTS6e+1lzB3olW6ZDDUckMSuVBvpNDyrGNIcUwkJmLNUQNZY+BMzTWDMVji81H8BGkSg== X-Received: by 2002:a2e:e02:0:b0:2fc:9622:794b with SMTP id 38308e7fff4ca-2fcbdfeaef3mr45935681fa.24.1730225820254; Tue, 29 Oct 2024 11:17:00 -0700 (PDT) From: Alejandro Vallejo To: xen-devel@lists.xenproject.org Cc: Alejandro Vallejo , Andrew Cooper , Jan Beulich , Julien Grall , Stefano Stabellini Subject: [RFC PATCH 1/6] xen/domctl: Refine grant_opts into grant_version Date: Tue, 29 Oct 2024 18:16:27 +0000 Message-ID: <20241029181632.69600-2-alejandro.vallejo@cloud.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241029181632.69600-1-alejandro.vallejo@cloud.com> References: <20241029181632.69600-1-alejandro.vallejo@cloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @cloud.com) X-ZM-MESSAGEID: 1730225849503116600 Content-Type: text/plain; charset="utf-8" grant_opts is overoptimizing for space packing in a hypercall that doesn't warrant the effort. Tweak the ABI without breaking it in order to remove the bitfield by extending it to 8 bits. Xen only supports little-endian systems, so the transformation from uint32_t to uint8_t followed by 3 octets worth of padding is not an ABI breakage. No functional change Signed-off-by: Alejandro Vallejo Acked-by: Christian Lindig --- xen/include/public/domctl.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h index 353f831e402e..b3c8271e66ba 100644 --- a/xen/include/public/domctl.h +++ b/xen/include/public/domctl.h @@ -90,11 +90,18 @@ struct xen_domctl_createdomain { int32_t max_grant_frames; int32_t max_maptrack_frames; =20 -/* Grant version, use low 4 bits. */ -#define XEN_DOMCTL_GRANT_version_mask 0xf -#define XEN_DOMCTL_GRANT_version(v) ((v) & XEN_DOMCTL_GRANT_version_m= ask) + /* + * Maximum grant table version the domain can be configured with. + * + * Domains always start with v1 (if CONFIG_GRANT_TABLE) and can be bum= ped + * to use up to `max_grant_version` via GNTTABOP_set_version. + * + * Must be zero iff !CONFIG_GRANT_TABLE. + */ + uint8_t max_grant_version; =20 - uint32_t grant_opts; + /* Unused */ + uint8_t rsvd0[3]; =20 /* * Enable altp2m mixed mode. --=20 2.47.0 From nobody Sat Nov 23 21:11:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=cloud.com ARC-Seal: i=1; a=rsa-sha256; t=1730225848; cv=none; d=zohomail.com; s=zohoarc; b=jObw7NKmsN40r+vT3jeTsYJjegRFDDA2F4LQAjdk5XrEoW+TPsitBoSKO4GjnDsnbNQlXH6wjp3suowzc0K3FdS2In32Fu4o3nRfCpU+jTNL33baY6/fngiqmstr0IZcma3jVXA6W5fsrt5xRi409Qq8X8nuu+KoGzVTZRjmbZ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730225848; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=mauj61DJ+HdnhGgV8L4W73l1Sj6rpokHLuR7Nm9WpIU=; b=GBlHXqDzwfeOE/sld9a9OuFDpFYVydO/w4+kX33DvSkbP6dKvlQM06Kr6OERZt0I+fOOlmmO5BEzRz4hnECvCZyzLRXwLPkZ5U0Pi9TRPiW/pm8q3Drg35I3va231LrOoUXOKgz4QyGbsUO+ojRJYNC4njgLToiBfdVwAtk0Um4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1730225848148193.28872201113825; Tue, 29 Oct 2024 11:17:28 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.827797.1242527 (Exim 4.92) (envelope-from ) id 1t5qmA-000847-S1; Tue, 29 Oct 2024 18:17:06 +0000 Received: by outflank-mailman (output) from mailman id 827797.1242527; Tue, 29 Oct 2024 18:17:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t5qmA-00083y-NH; Tue, 29 Oct 2024 18:17:06 +0000 Received: by outflank-mailman (input) for mailman id 827797; Tue, 29 Oct 2024 18:17:06 +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 1t5qmA-0007Zv-3U for xen-devel@lists.xenproject.org; Tue, 29 Oct 2024 18:17:06 +0000 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [2a00:1450:4864:20::536]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id fecc8c58-9621-11ef-99a3-01e77a169b0f; Tue, 29 Oct 2024 19:17:02 +0100 (CET) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5c957d8bce2so2857439a12.2 for ; Tue, 29 Oct 2024 11:17:02 -0700 (PDT) Received: from localhost.localdomain ([217.156.233.154]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cbb63197bdsm4110171a12.70.2024.10.29.11.17.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 11:17:00 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: fecc8c58-9621-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo1MzYiLCJoZWxvIjoibWFpbC1lZDEteDUzNi5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImZlY2M4YzU4LTk2MjEtMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMwMjI1ODIyLjY1NTU1OSwic2VuZGVyIjoiYWxlamFuZHJvLnZhbGxlam9AY2xvdWQuY29tIiwicmVjaXBpZW50IjoieGVuLWRldmVsQGxpc3RzLnhlbnByb2plY3Qub3JnIn0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1730225822; x=1730830622; darn=lists.xenproject.org; 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=mauj61DJ+HdnhGgV8L4W73l1Sj6rpokHLuR7Nm9WpIU=; b=cRWnmunZPwgmS9da3lN0MRqI4jHO6jVkVLM7Nxi5WNHfSX5eImuftEmY7rsB8y+dYb XMOQpPRPJvrh0azcOkay5KWsaIbM8pfUqu4Xtz4OolnN8eBkEHRMzQNCziD0b3dHV+4k TgjK3rgTs5/zEJOQg/3a/cFzhCUe2+/JbtKUs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730225822; x=1730830622; 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=mauj61DJ+HdnhGgV8L4W73l1Sj6rpokHLuR7Nm9WpIU=; b=sHEi391NFOkEspKLpFvnfgOANAHwo58Hg7tQ3IhHlcHgaTUE4+164+7NFARF4rrjVK bm/YurpDyJRM/Sazo6s+k8x7Qlf/8CU2xbBtl0SoCfSI0yW1yEfJXnXQoNtsH38VxH75 yAcWoqJt8GQjhBQ+wLqQPfYioCQYqUTaKqJSwtNZCZhZ1jlW8nfmkuDGuMJ8sL0eZpOm egjGYldd17dP3uN+Cbq4lJKR0VF9fsREPNj8WGaa5gcfh9ObqLOiX5SDi88Ni3UYVVtA fppzSl8cJSBzfzI0x7SyEhk1/iZvjTBOycPSBdEZOf8Dp7Hpl/MSG6iHnPGr07TVLAwD lpsA== X-Gm-Message-State: AOJu0Ywfd2xiRlnD1yWXD2MeZL6wMAnUGxknWWl+hcO1RNxN2pAUr4yE LN3jUKd6LTw/ph9OIWdAzL/iDx2ylaj2arRFJeWGbtnBT69n8TTjKdP0WtGS4eAOGkNJtXdNExn x X-Google-Smtp-Source: AGHT+IGxj78iBc6LxwwvBHGZ6VhJtiCCLp05sKsN5mEz30rmUVnax2pmQCPr1BZgIJjmB4hvQMgWrA== X-Received: by 2002:a05:6402:27d2:b0:5cb:aad6:145c with SMTP id 4fb4d7f45d1cf-5cbbf8a3c8dmr15714972a12.8.1730225821719; Tue, 29 Oct 2024 11:17:01 -0700 (PDT) From: Alejandro Vallejo To: xen-devel@lists.xenproject.org Cc: Alejandro Vallejo , Juergen Gross , Julien Grall , Anthony PERARD , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Subject: [RFC PATCH 2/6] tools: Rename grant_opts to grant_version Date: Tue, 29 Oct 2024 18:16:28 +0000 Message-ID: <20241029181632.69600-3-alejandro.vallejo@cloud.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241029181632.69600-1-alejandro.vallejo@cloud.com> References: <20241029181632.69600-1-alejandro.vallejo@cloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @cloud.com) X-ZM-MESSAGEID: 1730225849595116600 Content-Type: text/plain; charset="utf-8" ... and remove the macros that no longer exist. No functional change Signed-off-by: Alejandro Vallejo Acked-by: Christian Lindig --- tools/helpers/init-xenstore-domain.c | 2 +- tools/libs/light/libxl_create.c | 2 +- tools/python/xen/lowlevel/xc/xc.c | 2 +- tools/tests/paging-mempool/test-paging-mempool.c | 2 +- tools/tests/resource/test-resource.c | 6 +++--- tools/tests/tsx/test-tsx.c | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/helpers/init-xenstore-domain.c b/tools/helpers/init-xens= tore-domain.c index 01ca667d25d1..25e41cf5175f 100644 --- a/tools/helpers/init-xenstore-domain.c +++ b/tools/helpers/init-xenstore-domain.c @@ -96,7 +96,7 @@ static int build(xc_interface *xch) */ .max_grant_frames =3D 4, .max_maptrack_frames =3D 128, - .grant_opts =3D XEN_DOMCTL_GRANT_version(1), + .grant_version =3D 1, }; =20 xs_fd =3D open("/dev/xen/xenbus_backend", O_RDWR); diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_creat= e.c index edeadd57ef5a..f952614b1f8d 100644 --- a/tools/libs/light/libxl_create.c +++ b/tools/libs/light/libxl_create.c @@ -646,7 +646,7 @@ int libxl__domain_make(libxl__gc *gc, libxl_domain_conf= ig *d_config, .max_evtchn_port =3D b_info->event_channels, .max_grant_frames =3D b_info->max_grant_frames, .max_maptrack_frames =3D b_info->max_maptrack_frames, - .grant_opts =3D XEN_DOMCTL_GRANT_version(b_info->max_grant_ver= sion), + .grant_version =3D b_info->max_grant_version, .vmtrace_size =3D ROUNDUP(b_info->vmtrace_buf_kb << 10, XC_PAG= E_SHIFT), .cpupool_id =3D info->poolid, }; diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/= xc/xc.c index 9feb12ae2b16..b3bbda6d955d 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -167,7 +167,7 @@ static PyObject *pyxc_domain_create(XcObject *self, #else #error Architecture not supported #endif - config.grant_opts =3D XEN_DOMCTL_GRANT_version(max_grant_version); + config.grant_version =3D max_grant_version; =20 if ( (ret =3D xc_domain_create(self->xc_handle, &dom, &config)) < 0 ) return pyxc_error_to_exception(self->xc_handle); diff --git a/tools/tests/paging-mempool/test-paging-mempool.c b/tools/tests= /paging-mempool/test-paging-mempool.c index 1ebc13455ac2..dc90b3b41793 100644 --- a/tools/tests/paging-mempool/test-paging-mempool.c +++ b/tools/tests/paging-mempool/test-paging-mempool.c @@ -24,7 +24,7 @@ static struct xen_domctl_createdomain create =3D { .flags =3D XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap, .max_vcpus =3D 1, .max_grant_frames =3D 1, - .grant_opts =3D XEN_DOMCTL_GRANT_version(1), + .grant_version =3D 1, =20 .arch =3D { #if defined(__x86_64__) || defined(__i386__) diff --git a/tools/tests/resource/test-resource.c b/tools/tests/resource/te= st-resource.c index 1b10be16a6b4..33bdb3113d85 100644 --- a/tools/tests/resource/test-resource.c +++ b/tools/tests/resource/test-resource.c @@ -137,7 +137,7 @@ static void test_domain_configurations(void) .create =3D { .max_vcpus =3D 2, .max_grant_frames =3D 40, - .grant_opts =3D XEN_DOMCTL_GRANT_version(1), + .grant_version =3D 1, }, }, { @@ -146,7 +146,7 @@ static void test_domain_configurations(void) .flags =3D XEN_DOMCTL_CDF_hvm, .max_vcpus =3D 2, .max_grant_frames =3D 40, - .grant_opts =3D XEN_DOMCTL_GRANT_version(1), + .grant_version =3D 1, .arch =3D { .emulation_flags =3D XEN_X86_EMU_LAPIC, }, @@ -159,7 +159,7 @@ static void test_domain_configurations(void) .flags =3D XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap, .max_vcpus =3D 2, .max_grant_frames =3D 40, - .grant_opts =3D XEN_DOMCTL_GRANT_version(1), + .grant_version =3D 1, }, }, #endif diff --git a/tools/tests/tsx/test-tsx.c b/tools/tests/tsx/test-tsx.c index 5af04953f340..86608c95d627 100644 --- a/tools/tests/tsx/test-tsx.c +++ b/tools/tests/tsx/test-tsx.c @@ -457,7 +457,7 @@ static void test_guests(void) struct xen_domctl_createdomain c =3D { .max_vcpus =3D 1, .max_grant_frames =3D 1, - .grant_opts =3D XEN_DOMCTL_GRANT_version(1), + .grant_version =3D 1, }; =20 printf("Testing PV guest\n"); @@ -470,7 +470,7 @@ static void test_guests(void) .flags =3D XEN_DOMCTL_CDF_hvm, .max_vcpus =3D 1, .max_grant_frames =3D 1, - .grant_opts =3D XEN_DOMCTL_GRANT_version(1), + .grant_version =3D 1, .arch =3D { .emulation_flags =3D XEN_X86_EMU_LAPIC, }, --=20 2.47.0 From nobody Sat Nov 23 21:11:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=cloud.com ARC-Seal: i=1; a=rsa-sha256; t=1730225846; cv=none; d=zohomail.com; s=zohoarc; b=Kykshw4/YtCulxv2+mdjZ9iqk3ZILFl63dJ9te39iavatvpbIA0XLQT3kL6M16KXqNItyHkBhPJWceraFGoC5ngYlCYTSlxODW1anI4vVD1SUhPwtUyRl4BN/yI8C3Up3KhunEq63dpFBqPQfHzvi/ONDSaN8MqbLwR9FmuhDwQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730225846; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NHAv65UQuL06AhRkdwzzFlLaL52D2s2KboSCcDG7zeM=; b=Uzmhyopau5sdZUONrni7egjmapm7hvSiGDRxSS2OiwvVyxuONx//A36gHrOROu3oRJ1UiVMYV3JbHcbgWMA1Vw3AMgChLqaWdHkv9UORhJeKQtdSro9a3oA1bNNkO/YXuPGUw4MkPJPUn4Nk7/cU0gwdbxHK5FshpMqlIitGqXY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1730225846609800.9783076553819; Tue, 29 Oct 2024 11:17:26 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.827798.1242536 (Exim 4.92) (envelope-from ) id 1t5qmC-0008Jj-1D; Tue, 29 Oct 2024 18:17:08 +0000 Received: by outflank-mailman (output) from mailman id 827798.1242536; Tue, 29 Oct 2024 18:17:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t5qmB-0008JZ-Uc; Tue, 29 Oct 2024 18:17:07 +0000 Received: by outflank-mailman (input) for mailman id 827798; Tue, 29 Oct 2024 18:17:06 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t5qmA-0007bP-Ja for xen-devel@lists.xenproject.org; Tue, 29 Oct 2024 18:17:06 +0000 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [2a00:1450:4864:20::52d]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id fff2a356-9621-11ef-a0c3-8be0dac302b0; Tue, 29 Oct 2024 19:17:04 +0100 (CET) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5c96b2a10e1so8915022a12.2 for ; Tue, 29 Oct 2024 11:17:04 -0700 (PDT) Received: from localhost.localdomain ([217.156.233.154]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cbb63197bdsm4110171a12.70.2024.10.29.11.17.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 11:17:02 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: fff2a356-9621-11ef-a0c3-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo1MmQiLCJoZWxvIjoibWFpbC1lZDEteDUyZC5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImZmZjJhMzU2LTk2MjEtMTFlZi1hMGMzLThiZTBkYWMzMDJiMCIsInRzIjoxNzMwMjI1ODI0LjU0MDE3Miwic2VuZGVyIjoiYWxlamFuZHJvLnZhbGxlam9AY2xvdWQuY29tIiwicmVjaXBpZW50IjoieGVuLWRldmVsQGxpc3RzLnhlbnByb2plY3Qub3JnIn0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1730225824; x=1730830624; darn=lists.xenproject.org; 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=NHAv65UQuL06AhRkdwzzFlLaL52D2s2KboSCcDG7zeM=; b=TArfiwbS9nbsL7F+MRQ3vbeYPKAzRQotIeRXeO9srWia2lNA7Ej0rNKVtt6EmjtxiR ZsUua7gJvYV4a6ZFZy7KtuZmOBC4n2qUnTFwBJa6Pu+yy/ZJJ7kZF4CVmtOHvSFKs+sE seJqoB8a6gq0j76cVfOwlDxUvM5obcL2y6J0U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730225824; x=1730830624; 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=NHAv65UQuL06AhRkdwzzFlLaL52D2s2KboSCcDG7zeM=; b=To7tI4qx0tf3gHQns3JU/jheov2bHwPLrOpo1opHWuLrdR/3nIfJMilg9ISegTnHMF GvWceJ7R00S8OVjFKfJL0vxCsyII2vG14FnWxV2HgqCs94X8kwE5zq3vHoOnczhPh334 IW7Pt1HS+7CdLa4Dgu3geayH91pccsv9ITkXudH5MOpNwcXiUfqh/qu8Lm8LVaLWh6s9 +Jc/uPLviz8O1GgdS0gR0q1OT+5k40Cv1ifJZhxvgrOJrULmdPUSLb47GupEeu4/E0iN dXtgjsrXGLwRTiL+WjbekmNGzBrXEkwOJ4oDVvARDXBPAiyxk9cl3tbnISJMe7SSLwIk ODtA== X-Gm-Message-State: AOJu0YwD1cdUi5W1RmqRQx8Vzww4YgugCZsWBweol6ejMkY6555wwmke trIh/5X4CskDUf3dXupJBTkBkGuhzdY6xUCWNfC0KWddlW8awEhvKp4bDlLzMHJe68BYcQLdRnI P X-Google-Smtp-Source: AGHT+IErQd444FdPqZO2+7ts6pDj6/aAmff0PJVyNCwIPnwZmCmruAN8E3QKWv8wfFL/vcBlkv5XmQ== X-Received: by 2002:a05:6402:3513:b0:5cb:6272:1585 with SMTP id 4fb4d7f45d1cf-5cbbfa786d2mr11002803a12.32.1730225823743; Tue, 29 Oct 2024 11:17:03 -0700 (PDT) From: Alejandro Vallejo To: xen-devel@lists.xenproject.org Cc: Alejandro Vallejo , Christian Lindig , David Scott , Anthony PERARD Subject: [RFC PATCH 3/6] tools/ocaml: Rename grant_opts to grant_version Date: Tue, 29 Oct 2024 18:16:29 +0000 Message-ID: <20241029181632.69600-4-alejandro.vallejo@cloud.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241029181632.69600-1-alejandro.vallejo@cloud.com> References: <20241029181632.69600-1-alejandro.vallejo@cloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @cloud.com) X-ZM-MESSAGEID: 1730225847440116600 Content-Type: text/plain; charset="utf-8" ... and remove the macros that no longer exist. No functional change. Signed-off-by: Alejandro Vallejo Acked-by: Christian Lindig --- tools/ocaml/libs/xc/xenctrl_stubs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenc= trl_stubs.c index c78191f95abc..c4d34ca48753 100644 --- a/tools/ocaml/libs/xc/xenctrl_stubs.c +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c @@ -223,8 +223,7 @@ CAMLprim value stub_xc_domain_create(value xch_val, val= ue wanted_domid, value co .max_evtchn_port =3D Int_val(VAL_MAX_EVTCHN_PORT), .max_grant_frames =3D Int_val(VAL_MAX_GRANT_FRAMES), .max_maptrack_frames =3D Int_val(VAL_MAX_MAPTRACK_FRAMES), - .grant_opts =3D - XEN_DOMCTL_GRANT_version(Int_val(VAL_MAX_GRANT_VERSION)), + .grant_version =3D Int_val(VAL_MAX_GRANT_VERSION), .altp2m_opts =3D Int32_val(VAL_ALTP2M_OPTS), .vmtrace_size =3D vmtrace_size, .cpupool_id =3D Int32_val(VAL_CPUPOOL_ID), --=20 2.47.0 From nobody Sat Nov 23 21:11:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=cloud.com ARC-Seal: i=1; a=rsa-sha256; t=1730225855; cv=none; d=zohomail.com; s=zohoarc; b=CC/UGyWW3lKurbo7v5vaMTjyTqD5Xourj3xXx/kgVdOCVQO48ioA01sFyH64TCDGzXEaDtL9Dix8sP9/xGfHMzJw6jhQFb9fU5027v2c1SlKMuDINlk6UIYKVRmveB0ksVdHdpxrsuU6FO12/nwd/64Lv40N8L0G8sMKaouCLeQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730225855; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=4DIkzwOSItxin0RSm4lCkfpU1FM4LH2g8y9YAI95Pc8=; b=bBRVr9YKKQsXHPopSGB99YfSEw1NdUA8TzOgL+Ym7GLQayWQz14ydtjyLpLDQdIZKHeiv/TSSJLkGTJ1qYNH9WUmCVq2TQ3hrhUHpP9nZ/IrsfXvYNPQSgwEqUXazQDF/M5fhvpyD/pL/Qfntolh1OvAUis9DYv4lOwMcWay1CE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1730225855647509.31422636596665; Tue, 29 Oct 2024 11:17:35 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.827799.1242546 (Exim 4.92) (envelope-from ) id 1t5qmE-0000Av-9M; Tue, 29 Oct 2024 18:17:10 +0000 Received: by outflank-mailman (output) from mailman id 827799.1242546; Tue, 29 Oct 2024 18:17:10 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t5qmE-0000Am-6W; Tue, 29 Oct 2024 18:17:10 +0000 Received: by outflank-mailman (input) for mailman id 827799; Tue, 29 Oct 2024 18:17:09 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t5qmC-0007bP-Ug for xen-devel@lists.xenproject.org; Tue, 29 Oct 2024 18:17:08 +0000 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [2a00:1450:4864:20::532]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 0134dc8a-9622-11ef-a0c3-8be0dac302b0; Tue, 29 Oct 2024 19:17:06 +0100 (CET) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-5cbb719839eso5950714a12.2 for ; Tue, 29 Oct 2024 11:17:06 -0700 (PDT) Received: from localhost.localdomain ([217.156.233.154]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cbb63197bdsm4110171a12.70.2024.10.29.11.17.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 11:17:04 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 0134dc8a-9622-11ef-a0c3-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo1MzIiLCJoZWxvIjoibWFpbC1lZDEteDUzMi5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6IjAxMzRkYzhhLTk2MjItMTFlZi1hMGMzLThiZTBkYWMzMDJiMCIsInRzIjoxNzMwMjI1ODI2LjY1NzEzLCJzZW5kZXIiOiJhbGVqYW5kcm8udmFsbGVqb0BjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1730225826; x=1730830626; darn=lists.xenproject.org; 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=4DIkzwOSItxin0RSm4lCkfpU1FM4LH2g8y9YAI95Pc8=; b=LWPQkooDbc1Rzb8U/Bznz0uQ0nzFVEryKj8MIYIFBXGHIYehPLI1HFDPCdTcBFkLGC vKo1lucA6ks0Qjd2DJ1aBzYuVm7+vJE3Sf9IY8omMn3wsHpY5a7NEFyhgWgJHZuZks7U BkRIPzoQh5JPnIy5EQHCoDLiFngTYLOLY6+MU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730225826; x=1730830626; 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=4DIkzwOSItxin0RSm4lCkfpU1FM4LH2g8y9YAI95Pc8=; b=IMx1gJ/yies03EvG2Sphq4dq6zBBJ4N1CEw1Nh6U+rpI0IOcEn7lA4jmt0/CTgDOfv +62Fi54aN0xlxfh7tPtF9yxuw/c7sxwYzUeJKdCNhesjNTiCub0UJBmRf7/LJ9M9NUBl 3vpFYhCrlxvZhrOV3fosL5TER7ff+dECwdsXo9XuzTaylZOOg2vx/HqyVxRUuy9Be1zP lH+enkTgwkePNc1ZApHEUpjJDMM591mUVz3aVUYgcXsRcAj5BxPWlCrHpj324OPOe/7E 87dcAvQyTlAjm1BsNxA7XbDVqqa1gdx7rau3Gyd2ndEE04JweOvqj3ThqvYI9mRBm3ju lqpg== X-Gm-Message-State: AOJu0YxhGnXB9dVwjhIdmzxJt+ZJ86cHt4SLT4WGbhUtT9atH3+xUsGt gCVz2oAcMzWutYC6itNrNVFYCem+DqSRFomwIBiuPSnczUc8o//HEXqPUFPqFAbRyY9znBySOcA C X-Google-Smtp-Source: AGHT+IFJRSAHHq3ooBzXUB65Ql4sc0WmsWsVziKlIatVGdhVitw4IPqArerB9vD5dUkrX+NLoUavTQ== X-Received: by 2002:a05:6402:d0d:b0:5c9:8047:def4 with SMTP id 4fb4d7f45d1cf-5cbbfac3881mr9941280a12.36.1730225825811; Tue, 29 Oct 2024 11:17:05 -0700 (PDT) From: Alejandro Vallejo To: xen-devel@lists.xenproject.org Cc: Alejandro Vallejo , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk Subject: [RFC PATCH 4/6] xen/arm: Rename grant_opts to grant_version Date: Tue, 29 Oct 2024 18:16:30 +0000 Message-ID: <20241029181632.69600-5-alejandro.vallejo@cloud.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241029181632.69600-1-alejandro.vallejo@cloud.com> References: <20241029181632.69600-1-alejandro.vallejo@cloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @cloud.com) X-ZM-MESSAGEID: 1730225857414116600 Content-Type: text/plain; charset="utf-8" ... and remove the macros that no longer exist. No functional change. Signed-off-by: Alejandro Vallejo Acked-by: Christian Lindig --- xen/arch/arm/dom0less-build.c | 4 ++-- xen/arch/arm/domain_build.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/dom0less-build.c b/xen/arch/arm/dom0less-build.c index f328a044e9d3..1c6219c7cc82 100644 --- a/xen/arch/arm/dom0less-build.c +++ b/xen/arch/arm/dom0less-build.c @@ -877,7 +877,7 @@ void __init create_domUs(void) .max_evtchn_port =3D 1023, .max_grant_frames =3D -1, .max_maptrack_frames =3D -1, - .grant_opts =3D XEN_DOMCTL_GRANT_version(opt_gnttab_max_versio= n), + .max_grant_version =3D opt_gnttab_max_version, }; unsigned int flags =3D 0U; uint32_t val; @@ -959,7 +959,7 @@ void __init create_domUs(void) } =20 if ( dt_property_read_u32(node, "max_grant_version", &val) ) - d_cfg.grant_opts =3D XEN_DOMCTL_GRANT_version(val); + d_cfg.max_grant_version =3D val; =20 if ( dt_property_read_u32(node, "max_grant_frames", &val) ) { diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 2c30792de88b..773412ba2acb 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -2194,7 +2194,7 @@ void __init create_dom0(void) .max_evtchn_port =3D -1, .max_grant_frames =3D gnttab_dom0_frames(), .max_maptrack_frames =3D -1, - .grant_opts =3D XEN_DOMCTL_GRANT_version(opt_gnttab_max_version), + .max_grant_version =3D opt_gnttab_max_version, }; int rc; =20 --=20 2.47.0 From nobody Sat Nov 23 21:11:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=cloud.com ARC-Seal: i=1; a=rsa-sha256; t=1730225854; cv=none; d=zohomail.com; s=zohoarc; b=Fs9rvgSkqMIPua1PeE5aKNi6t0hOPVxorJG8GTH+ATjBTxkjk+PAh/nOwVWzDHphVkbk5zF5erqW7i8ThxaNG+IsVr3DrDqxzuE8A3ZRiMUAX1JxhpNWFJL6FAkxyy09dmGbGe9/2Iz7LxRcucXYg0nkSidFQBNho6adAa2QJzQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730225854; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=yOAoP8cuHmKGFhmeuvZS1Al8PeEIAn2DesMMCGjFrZU=; b=RM9bq9jf+q74tEVpFO2Ul0j2HwBj37UfLTq+NWFRm6AUZbhPoATqMsUSJATzD2GyyqRgSJqpvPQLml2tkieixDcpDLcmgZvVfKPwhi61oDCPwoCeMJBc+4Su1nGHowP60BduVRkbCV9PuPBKds6fZJ8WeTnwfBM1I3HeI1xNQqQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1730225854231970.7991842416022; Tue, 29 Oct 2024 11:17:34 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.827800.1242557 (Exim 4.92) (envelope-from ) id 1t5qmF-0000Sm-Nz; Tue, 29 Oct 2024 18:17:11 +0000 Received: by outflank-mailman (output) from mailman id 827800.1242557; Tue, 29 Oct 2024 18:17:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t5qmF-0000Sc-KU; Tue, 29 Oct 2024 18:17:11 +0000 Received: by outflank-mailman (input) for mailman id 827800; Tue, 29 Oct 2024 18:17:10 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t5qmE-0007bP-6x for xen-devel@lists.xenproject.org; Tue, 29 Oct 2024 18:17:10 +0000 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [2a00:1450:4864:20::52f]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 0207de9e-9622-11ef-a0c3-8be0dac302b0; Tue, 29 Oct 2024 19:17:08 +0100 (CET) Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5c9634c9160so6597861a12.2 for ; Tue, 29 Oct 2024 11:17:08 -0700 (PDT) Received: from localhost.localdomain ([217.156.233.154]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cbb63197bdsm4110171a12.70.2024.10.29.11.17.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 11:17:06 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 0207de9e-9622-11ef-a0c3-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo1MmYiLCJoZWxvIjoibWFpbC1lZDEteDUyZi5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6IjAyMDdkZTllLTk2MjItMTFlZi1hMGMzLThiZTBkYWMzMDJiMCIsInRzIjoxNzMwMjI1ODI4LjAzODM3OSwic2VuZGVyIjoiYWxlamFuZHJvLnZhbGxlam9AY2xvdWQuY29tIiwicmVjaXBpZW50IjoieGVuLWRldmVsQGxpc3RzLnhlbnByb2plY3Qub3JnIn0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1730225827; x=1730830627; darn=lists.xenproject.org; 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=yOAoP8cuHmKGFhmeuvZS1Al8PeEIAn2DesMMCGjFrZU=; b=lM1jI0jN7Fl0hN3f/V1/yoWbZGpt5FyEsjU1OJ/IGPu3zS+zoHFQpVOTF4714igi8k ONJtSZ1A6z3Cx7u8KQUvAljMYOC4IkxFl+vgfTGlRk25V9N2jAK9b3LzEfilsEGeoCCw DOtf0os1iudCAMp4c1aoGU4IZbUMdzMIBIJJk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730225827; x=1730830627; 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=yOAoP8cuHmKGFhmeuvZS1Al8PeEIAn2DesMMCGjFrZU=; b=k4ZaOeOP6osanOJ2zY4Fmi68jZyO8RbZssYYcABJ3x2zYdK8mwKQszx4AtgN6dLS+7 Uylm1WWSo5tso1bGReRN4gZnvWULY/qgZm+wZH6QM4PZH7vH9CE5teRubz+Dsa9cUcQs zlPoyNQ8qSL/Be62vzXV26nGMy9nMHvEeIoB3SzY+sKdBZkzwYeyBGx/NMPdVQmETOq7 XvU1UC2GItWWyUEloDT14Jqtydmb/9zwOTs089G1JSbj9tRQRxpu7BQAuK/6ZUxMzERU 2RUkexu5iWpOfCmWGbkDDNBQQU/mOsscwgla9Lc+oB9FOxBT9YeRFUfsJ17Vqdwz2vZv rCVg== X-Gm-Message-State: AOJu0Ywe7HzufsOOf529jgEPCVtkeJlGfGi1Bt4kg5RAx6kjboWikRfL yz2Th/Yt8CUkad4lveIcdAm694zO6PNoniAxrx7KCy+26h/JoiCXm6zSD/bcmDxPaO64TCs67xH r X-Google-Smtp-Source: AGHT+IGVxPqbkm6G3Esjtcz6v5YtREoyWp/z70cMdlWCcHGyBNNCNdUNyjxtP28BKt29zBqkKGX/aA== X-Received: by 2002:a05:6402:90c:b0:5c7:2122:6ad with SMTP id 4fb4d7f45d1cf-5cbbf89a142mr10244671a12.14.1730225827189; Tue, 29 Oct 2024 11:17:07 -0700 (PDT) From: Alejandro Vallejo To: xen-devel@lists.xenproject.org Cc: Alejandro Vallejo , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [RFC PATCH 5/6] xen/x86: Rename grant_opts to grant_version Date: Tue, 29 Oct 2024 18:16:31 +0000 Message-ID: <20241029181632.69600-6-alejandro.vallejo@cloud.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241029181632.69600-1-alejandro.vallejo@cloud.com> References: <20241029181632.69600-1-alejandro.vallejo@cloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @cloud.com) X-ZM-MESSAGEID: 1730225855399116600 Content-Type: text/plain; charset="utf-8" ... and remove the macros that no longer exist. No functional change. Signed-off-by: Alejandro Vallejo Acked-by: Christian Lindig --- xen/arch/x86/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 177f4024abca..a9130161969b 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -956,7 +956,7 @@ static struct domain *__init create_dom0(const module_t= *image, .max_evtchn_port =3D -1, .max_grant_frames =3D -1, .max_maptrack_frames =3D -1, - .grant_opts =3D XEN_DOMCTL_GRANT_version(opt_gnttab_max_version), + .max_grant_version =3D opt_gnttab_max_version, .max_vcpus =3D dom0_max_vcpus(), .arch =3D { .misc_flags =3D opt_dom0_msr_relaxed ? XEN_X86_MSR_RELAXED : 0, --=20 2.47.0 From nobody Sat Nov 23 21:11:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=cloud.com ARC-Seal: i=1; a=rsa-sha256; t=1730225861; cv=none; d=zohomail.com; s=zohoarc; b=HS1hHK624XA0qj4lFvTwcpuBIjgmOpqasX20hAbXGZ9vQEca9OUa2pJhZ8xIfysFiPPJE0sHx4C0UiAcdN8OPwkLKoNDlscGbTOHTTDwHawHXwZa3lIW93VAQGNKDgOVsCHBMDqGBlWk1QwoFveoUblul3BuL8cgaYjbhUBBXQE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730225861; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=SlNOfvbEUH68SFYddIu2H52O+/CuAeFVRrD11ZLL/cA=; b=ize5LheZuJQ0qav6+yLsr5r5fGl6i1dRvYenoGA/2wPQ03Zk38naH48ni1GOWU/76HXBhW8YnMYdd1qAtB1lX9oFKUzgpLzOqy4xUtqmo1ArDhPaljdl7tSSFa3UPtd9d6NQMWPonqNUWLksjBtQ7vvVLFrbGrEqiuyW1LfyH+U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1730225860896932.8852047649254; Tue, 29 Oct 2024 11:17:40 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.827801.1242567 (Exim 4.92) (envelope-from ) id 1t5qmH-0000je-1F; Tue, 29 Oct 2024 18:17:13 +0000 Received: by outflank-mailman (output) from mailman id 827801.1242567; Tue, 29 Oct 2024 18:17:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t5qmG-0000jM-TF; Tue, 29 Oct 2024 18:17:12 +0000 Received: by outflank-mailman (input) for mailman id 827801; Tue, 29 Oct 2024 18:17:11 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t5qmF-0007bP-O3 for xen-devel@lists.xenproject.org; Tue, 29 Oct 2024 18:17:11 +0000 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [2a00:1450:4864:20::52b]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 02dc4537-9622-11ef-a0c3-8be0dac302b0; Tue, 29 Oct 2024 19:17:09 +0100 (CET) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5cb615671acso3556382a12.1 for ; Tue, 29 Oct 2024 11:17:09 -0700 (PDT) Received: from localhost.localdomain ([217.156.233.154]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cbb63197bdsm4110171a12.70.2024.10.29.11.17.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 11:17:08 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 02dc4537-9622-11ef-a0c3-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo1MmIiLCJoZWxvIjoibWFpbC1lZDEteDUyYi5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6IjAyZGM0NTM3LTk2MjItMTFlZi1hMGMzLThiZTBkYWMzMDJiMCIsInRzIjoxNzMwMjI1ODI5LjQ0MDE5OSwic2VuZGVyIjoiYWxlamFuZHJvLnZhbGxlam9AY2xvdWQuY29tIiwicmVjaXBpZW50IjoieGVuLWRldmVsQGxpc3RzLnhlbnByb2plY3Qub3JnIn0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1730225829; x=1730830629; darn=lists.xenproject.org; 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=SlNOfvbEUH68SFYddIu2H52O+/CuAeFVRrD11ZLL/cA=; b=W7Mak5ts4jbcJnqn+AFA7C3RANiy3jk5fNWDhN99ZA4b6fNOkZ+Iph6w3dV0r0cIRR N+7GatYJE2cwyZpuXj03/sa1sgtA1biwaIVodvK18UmvG0HYQ2EHxRuMt3RtoO7Jx6AW 1Dg7A6vikE/t1vmobQSVDhyzEjXeeEh1mNzD0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730225829; x=1730830629; 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=SlNOfvbEUH68SFYddIu2H52O+/CuAeFVRrD11ZLL/cA=; b=Z+1xxPuyynXVqqFQbJ5NKGbRLQhc1jwK9QdK6mpo2NGhwbj/8uNuUqB68IA/c9Upal OWXy6AtDlEPBstfWOgWObX14PyepdL9qpRhLhPiJ4p4sVOOC/oODm9D/g081eHkM179V rT1Wr9xH2P9DW33beSVkQ+tBVWNfcTn9qxK0FY5koFNFJEvrNjb8qw1/iBKW9867QIG3 ldiNXBqOOys/o3Au6zjtHXFZOxhbGlPu/yifXPNkouIUGKjJo3Iy3vETMfUxEHHO8qB4 uL7qAzF2GUNHxRt5u3GOHnALhDKtPFVhYa+/4ImQVkxzga+SIdu9AkGJQkevRqgDAlTD Ooug== X-Gm-Message-State: AOJu0YwgiLO5o4PZ3nIhaaBrwarTmptJoCdUf2AS9MkZ+uI8GASvborH l/KO0uevjj7ivmaHqyIEpQc+/NTgotQynq8WL7fwJOsuLRWxARgqaWHcM8uN8b5n0cw1JhHzqHh Q X-Google-Smtp-Source: AGHT+IFubUz7zr6S8J//8W0qF4by33zcAeFp8hTScDVl0+3znHLfjan6Unn5BKLmej3g/KH/hRAS2g== X-Received: by 2002:a05:6402:4584:b0:5cb:728e:926b with SMTP id 4fb4d7f45d1cf-5cbbf8c2eacmr15114750a12.17.1730225828578; Tue, 29 Oct 2024 11:17:08 -0700 (PDT) From: Alejandro Vallejo To: xen-devel@lists.xenproject.org Cc: Alejandro Vallejo , Andrew Cooper , Jan Beulich , Julien Grall , Stefano Stabellini Subject: [RFC PATCH 6/6] xen/common: Rename grant_opts to grant_version Date: Tue, 29 Oct 2024 18:16:32 +0000 Message-ID: <20241029181632.69600-7-alejandro.vallejo@cloud.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241029181632.69600-1-alejandro.vallejo@cloud.com> References: <20241029181632.69600-1-alejandro.vallejo@cloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @cloud.com) X-ZM-MESSAGEID: 1730225861491116600 Content-Type: text/plain; charset="utf-8" ... and remove the macros that no longer exist. No functional change. Signed-off-by: Alejandro Vallejo Acked-by: Christian Lindig --- xen/common/domain.c | 6 +++--- xen/common/grant_table.c | 3 +-- xen/include/xen/grant_table.h | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/xen/common/domain.c b/xen/common/domain.c index 92263a4fbdc5..86f0e99e0d4a 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -579,9 +579,9 @@ static int sanitise_domain_config(struct xen_domctl_cre= atedomain *config) return -EINVAL; } =20 - if ( config->grant_opts & ~XEN_DOMCTL_GRANT_version_mask ) + if ( config->rsvd0[0] | config->rsvd0[1] | config->rsvd0[2] ) { - dprintk(XENLOG_INFO, "Unknown grant options %#x\n", config->grant_= opts); + dprintk(XENLOG_INFO, "Rubble in rsvd0 padding\n"); return -EINVAL; } =20 @@ -788,7 +788,7 @@ struct domain *domain_create(domid_t domid, =20 if ( (err =3D grant_table_init(d, config->max_grant_frames, config->max_maptrack_frames, - config->grant_opts)) !=3D 0 ) + config->max_grant_version)) !=3D 0 ) goto fail; init_status |=3D INIT_gnttab; =20 diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index 6c77867f8cdd..51a3f72a9601 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -1963,10 +1963,9 @@ active_alloc_failed: } =20 int grant_table_init(struct domain *d, int max_grant_frames, - int max_maptrack_frames, unsigned int options) + int max_maptrack_frames, uint8_t max_grant_version) { struct grant_table *gt; - unsigned int max_grant_version =3D options & XEN_DOMCTL_GRANT_version_= mask; int ret =3D -ENOMEM; =20 if ( !max_grant_version ) diff --git a/xen/include/xen/grant_table.h b/xen/include/xen/grant_table.h index 50edfecfb62f..f3edbae3c974 100644 --- a/xen/include/xen/grant_table.h +++ b/xen/include/xen/grant_table.h @@ -73,9 +73,9 @@ int gnttab_acquire_resource( static inline int grant_table_init(struct domain *d, int max_grant_frames, int max_maptrack_frames, - unsigned int options) + uint8_t max_grant_version) { - if ( options ) + if ( max_grant_version ) return -EINVAL; =20 return 0; --=20 2.47.0