Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp58381lqt; Thu, 18 Apr 2024 08:22:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUF+yhGyd0Su6pHzmeI4kGMPXSwOh+D4z5uZdAWmVOOnKLAXkQ6xWyIiYK3MP5UpF/mO/I0i/vfIaHYVnTzqSuiSkjchWhwl+VeOiI62A== X-Google-Smtp-Source: AGHT+IHkObGqY9/TUba7iLdOEugzE6oqxna6nGVI8Va/oNyk1Gd4MdwdqePhGuRhq3fs7kwJ69NE X-Received: by 2002:a05:620a:a5e:b0:78d:63be:a1e8 with SMTP id j30-20020a05620a0a5e00b0078d63bea1e8mr3367555qka.37.1713453762927; Thu, 18 Apr 2024 08:22:42 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b14-20020a05620a0cce00b0078ec3e9ea8csi1574926qkj.513.2024.04.18.08.22.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 08:22:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150381-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GpGLMkIt; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-150381-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150381-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 606411C2091F for ; Thu, 18 Apr 2024 15:22:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 103F816D4C0; Thu, 18 Apr 2024 15:22:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GpGLMkIt" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A87F416C688; Thu, 18 Apr 2024 15:22:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.11 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713453735; cv=fail; b=qC+flCFngvWZw0M4r6Bv8uCSvuYRgKCRWOtqB3SY6Aiq6am2c2pXqEPDLAhNeyrWQZFsUwkByAm+53HSutCc4NDwRWsIM41BHgrY6FJWzzi7bKGvWJA3H3qR2E557tuAslN5z+51PuexZqOZOj6ywCZV4qWeKTGCyCJ5pg+UIZs= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713453735; c=relaxed/simple; bh=C2i/Wy6/wNgSSEoBTbi8TZ52Cv3W2rAtaU8ntuCe08g=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=AN07snx8axWihFVb/XolBHtAXVdB8FTl9dJEEHALh4H3k6N30OWK9tnoUdeUhit1sfYcDYdw7VGkqlPfLLQUqfS7VmjWS9AfuXd7UF4ZgflTjyxmQZM3/dOo1HRx8UVcn4pPMRqHyohOiGxVBc2cpkZXXVxOoDIt9OnQNtvpjMI= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=GpGLMkIt; arc=fail smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713453734; x=1744989734; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=C2i/Wy6/wNgSSEoBTbi8TZ52Cv3W2rAtaU8ntuCe08g=; b=GpGLMkItqAv7lDf9FsMq4ggPbK3PhYikCbU/sKdsTXwlbef1Kc3LTyg+ WRrTbcEI5OmBT0RNNDFdYxvISEEeaPOFR9aUvfpieK475/fVPMGcUauEk qaMlU+VALDLDEJEaEbgAFdTBDTVuZW/ySifg/6zsjGExU7KR1Kwtohe6c kCYN8GQ5loZ7MzfuAu1zAOFO0ogf5NDI+fEhWfh0Bk5aYHPglcNr8/NaL 54N9B86w+uU6bLEcWLN4UJAdegIJy7X86dcf7pDaeUEHoYPXOD+26FBuq hfdrKomDESB5qgpiUjy12nxbEXITRo/puIoR38jCSMXwM8F5gfL74EgG1 Q==; X-CSE-ConnectionGUID: kCxcZHPxSGa+4OKFfea5Zg== X-CSE-MsgGUID: 54HVv2UIRly+yJhJBIAKrg== X-IronPort-AV: E=McAfee;i="6600,9927,11047"; a="19568933" X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="19568933" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2024 08:22:13 -0700 X-CSE-ConnectionGUID: yJqtLjV6TPuOqnIZWzX2DA== X-CSE-MsgGUID: QtWn0dZcRgmyPGNS2IVw/A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="23102074" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa007.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 18 Apr 2024 08:22:12 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 18 Apr 2024 08:22:12 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 18 Apr 2024 08:22:11 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 18 Apr 2024 08:22:11 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 18 Apr 2024 08:22:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h/EK3wMkdMIpjS5rT7V5lOlsvNcs2cGlGuqoTnoC9YS4maQqvkouhDBgYHRwZDru0DZNXFRIhcjprvmkSecHypl0yXhjTX4jcdfyMPs4SJ2MVyrEfcSJ5/SqLe7tYjO8B+h5XJhsEaLG5440xKnhotCYeK2a+7gYhO3QcGGUQhG85FhTzG9GLALI/psu/TTfT+l51uo21/NotjuEEjqY0JEYUt3fype7joZaG7DaQc7Uds1wjN8H6+DcQcWTu8MtHkqzEEpovZOQoT5/zS/N4BoGtj56kSCPRvbD1g0Fs05Z76tkRODr4dseYmfRH7LaOvfTSuWNEGXUlnJsPG3hDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JnbcuCT6pCYvJ5sFWG/+eJozyyoC6W+COAHYcrNYfJc=; b=MudIWS+nJUXJ9M78PjhARIjaYjSoBVQIu0cVTpXwKFw3Ab57BMBRzaEnLOTXbxsqGap9BnEwQvW8+E9jQ+QkxosmgYcK2lWSh2VvIdjAytRkpslONmm5HSkx3h+656m9GCqPaIaFSgsvp9v2KReYaqmmWn4dlsa4RTRL958BShXLHEfyO1d/lQ2o/jSxSlfh+vVI2QCmW39ulnjxn8kpXXM1YhdRwAfUuZfUmfMsz6TQ6FKCtg0DJ9UB4fnJb1OVS//qc3g+AshgpIl1/jA0qo5Yr1oqvkpcllr4flDn+aMR7D+1zp3gEVbwLQr+0+9KyFKcpnyGLUeU04/bXy7brA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DS0PR11MB6373.namprd11.prod.outlook.com (2603:10b6:8:cb::20) by PH7PR11MB6008.namprd11.prod.outlook.com (2603:10b6:510:1d0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.39; Thu, 18 Apr 2024 15:22:09 +0000 Received: from DS0PR11MB6373.namprd11.prod.outlook.com ([fe80::55de:b95:2c83:7e6c]) by DS0PR11MB6373.namprd11.prod.outlook.com ([fe80::55de:b95:2c83:7e6c%7]) with mapi id 15.20.7519.010; Thu, 18 Apr 2024 15:22:09 +0000 From: "Wang, Wei W" To: "Wang, Wei W" , Sean Christopherson CC: "pbonzini@redhat.com" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [RFC PATCH v1] KVM: x86: Introduce macros to simplify KVM_X86_OPS static calls Thread-Topic: [RFC PATCH v1] KVM: x86: Introduce macros to simplify KVM_X86_OPS static calls Thread-Index: AQHakNiYqtvKEMFbS0SvTLh/C3Jv+7FsplwAgACN6vCAANskAIAAAkcQgAATVbA= Date: Thu, 18 Apr 2024 15:22:09 +0000 Message-ID: References: <20240417150354.275353-1-wei.w.wang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DS0PR11MB6373:EE_|PH7PR11MB6008:EE_ x-ms-office365-filtering-correlation-id: 65e81b45-07a2-4190-fb37-08dc5fbb5092 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: =?us-ascii?Q?2W3ZMsQ3pvMEWptivF/hwa9pPWDoLZ+eCBlkQA1R0lryxFznsKK4pO+sI5fj?= =?us-ascii?Q?7uqYsWOmf9OpTfwl8fAqxhn6R4hsaz1pUtC5XyUCJovxqBVXb3cgwmCdrsbO?= =?us-ascii?Q?Giy+WTFPHVj08dJpTifD8x1d09LeOJ/jlgyNHua51RUdRk/RWeS5v9OsmZAC?= =?us-ascii?Q?ldUW+49tU5LT2G8l9J5Q7jdtKij9NApx5LL0EukP6jC7bvqsdshrDJCu+mDh?= =?us-ascii?Q?1QPO2ireFcDuUakGwvoy3wdoQScMhGBNgiSPI0a0L/rIkNahQzUTiD3FPl+0?= =?us-ascii?Q?o7cAMLkrA79ge2Vx4iRI5STWHQyFmSqrAccrXP+3/+q+UabbpIozerwt2zRk?= =?us-ascii?Q?KWvSIdXbr3xeho1bB7/YAKGbIzm1wznKLN6OSaMoFp/WgGl/jrY/uoVp4pcl?= =?us-ascii?Q?Kw2qVHX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pVUN8W7Y0CjUrSBDjJ4hva?= =?us-ascii?Q?D/Q0RqAzjO0bJfFFcfjYYAKjtzMLGDheJ09O+Noptv1Pow=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR11MB6373.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(1800799015)(366007)(38070700009);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ef7IZGtJg4jV2psroufNJMIsaZCzDrAa9AUAarp4liyaZ8Tdm4UxIPyPC5VA?= =?us-ascii?Q?RI5l+ZXIJeVecTS/QZawIdmITJqHdFBKNqcq3VFv2LyuqWigawl/01rS1zeg?= =?us-ascii?Q?1++/R6LAy/MnbABoTUk45eLF2I1Ih9r2IF2uvC2I3xdiKclfZirDPyyxKdIH?= =?us-ascii?Q?9sM/9y8/eQ3i5SOQyYDLC/qaijSv5G1Pcztyuo+as9rlIGVneuS1X/qVdzo+?= =?us-ascii?Q?SCI4WiTQdaDbuC57x36bTblaCNCJ3OhEcEE6r+wnT3+hD94fp+6WHXzrguuY?= =?us-ascii?Q?udHpZ5L/nR9QW8Svpm2dG9QkB7U/COY4ZJ/g0jEkBrZxVQes0XsnQPuVH4YN?= =?us-ascii?Q?XJFXffMyKI5G1+7nmOW/Sjwx1OzXzenkrdvNdIxXrYDtgUHFa8hAn7n5fiX6?= =?us-ascii?Q?iw8HS9N+UJx5U/aFn/h4HKGo6hyehsfqvXPUT3St2AC6kzaEqa2cOinVRJqi?= =?us-ascii?Q?7Xzk6qoc4GJ+bKrzWCygusl/ftAgzJDNCNpBoc0CYnbvXUe6RO/JZSEhpoHZ?= =?us-ascii?Q?OYru+UHge4OzNish8kx5dJwgtfPRawXZF5WV5wsgMdxwdPA1Uk1MNCsqWwCD?= =?us-ascii?Q?YZ0rKisMV8NOGhurAnz2h86f/3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UlqbI2u6EbpK/Fou0gzvKbelL4qH7ny/EfIARW2AAaZFQYMkbR49eFs7w?= =?us-ascii?Q?=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB6373.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65e81b45-07a2-4190-fb37-08dc5fbb5092 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Apr 2024 15:22:09.4941 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wdlY+3whIJR7bkCUlxShWLME72HQozkSyM0dwf5U9XzZiN3kJ4FamdG5GSACwZ8Kxe9yB8Y16QkZLGtBVr6oUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB6008 X-OriginatorOrg: intel.com On Thursday, April 18, 2024 10:20 PM, Wang, Wei W wrote: > On Thursday, April 18, 2024 9:59 PM, Sean Christopherson wrote: > > On Thu, Apr 18, 2024, Wei W Wang wrote: > > > On Thursday, April 18, 2024 12:27 AM, Sean Christopherson wrote: > > > > On Wed, Apr 17, 2024, Wei Wang wrote: > > > > > Introduces two new macros, KVM_X86_SC() and KVM_X86_SCC(), to > > > > > streamline the usage of KVM_X86_OPS static calls. The current > > > > > implementation of these calls is verbose and can lead to > > > > > alignment challenges due to the two pairs of parentheses. This > > > > > makes the code susceptible to exceeding the "80 columns per singl= e > line of code" > > > > > limit as defined in the coding-style document. The two macros > > > > > are added to improve code readability and maintainability, while > > > > > adhering to > > > > the coding style guidelines. > > > > > > > > Heh, I've considered something similar on multiple occasionsi. > > > > Not because the verbosity bothers me, but because I often search > > > > for exact "word" matches when looking for function usage and the > > > > kvm_x86_ > > prefix trips me up. > > > > > > Yeah, that's another compelling reason for the improvement. > > > > > > > IIRC, static_call_cond() is essentially dead code, i.e. it's the > > > > exact same as static_call(). I believe there's details buried in > > > > a proposed series to remove it[*]. And to not lead things astray, > > > > I verified that invoking a NULL kvm_x86_op with static_call() does > > > > no harm > > (well, doesn't explode at least). > > > > > > > > So if we add wrapper macros, I would be in favor in removing all > > > > static_call_cond() as a prep patch so that we can have a single mac= ro. > > > > > > Sounds good. Maybe KVM_X86_OP_OPTIONAL could now also be removed? > > > > No, KVM_X86_OP_OPTIONAL() is what allow KVM to WARN if a mandatory > > hook isn't defined. Without the OPTIONAL and OPTIONAL_RET variants, > > KVM would need to assume every hook is optional, and thus couldn't WARN= . >=20 > Yes, KVM_X86_OP_OPTIONAL is used to enforce the definition of mandatory > hooks with WARN_ON().=20 I meant the KVM_X86_OP in the current implementation as you shared. If we don't need KVM_X86_OP_OPTIONAL(), the WARN_ON() from KVM_X86_OP will need to be removed to allow that all the hooks could be optional. > But the distinction between mandatory and optional > hooks has now become ambiguous. For example, all the hooks, whether > defined or undefined (NULL), are invoked via static_call() without issues= now. > In some sense, all hooks could potentially be deemed as optional, and the > undefined ones just lead to NOOP when unconditionally invoked by the > kvm/x86 core code. > (the KVM_X86_OP_RET0 is needed) > Would you see any practical issues without that WARN_ON?