[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v1 02/15] x86/hvm: guard AMD-V and Intel VT-x hvm_function_table initializers


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Sergiy Kibrik <sergiy_kibrik@xxxxxxxx>
  • Date: Fri, 19 Apr 2024 11:19:42 +0300
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • 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=zlvDNNYdA1pnh2e+ORuh+D4Dlzq9N5H+cqFTU7kvdhU=; b=OTWKE4nGbQot3KUxIMnZph7raM6s5BeOX26APHQT79+bREdBKs9tHCXRWAcm7m3r+t1UAlkqwD3cgw2CxUigK/133AvJJ5tgvGt1SsNVnx18xjbFFkHn2SkF7VMp/dJa1s2D9xiPNBtyEXpszTvyrLdOUZ9LgZ70Qan94MuBbme7wo523peq9Z5FVO4upVceZB69jI4qbrZRv033SlSrR6++jPTymFYZyLXuogqsoaJhxWEd0xjnRsZGoNH+ve4pqMKOnCHXkx8CWEHIaP6OFyEzAUP/4KQqdRileO7srq7FWlE01AE3C8LBWsw7hd5WoMTVZlfHFt9Ju4INSyCB0w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rtvka9jD8hS/8MzYOrg31lGUYRNJHmZZTXicP+YriTnA/ITO+vj8ofnYNF/ZrNY5uP2nig6LLjzKsY8ujx8QXOebDiz4uveKvpSPwfNdKWMsmlcM7vDGJt11oGHuEcRMKmMc4QZDXD77C/tW9SiopMBQpmWJbmGthWywiEsiVLXRmOxJH+KL4zEZ8oHFKg4jTpkWMJ0nzFJmf+vcBz58orDaMDVSFKbu9v31EPgYGy/y0fKqIOOoE4fR7X6BmvzaViuw4ItCvOWZB+N2QW3MIeNjSeb5hwA+KQ2Q1OL1jl6gnJnW8YwVJEFy+rQDjmTXBOiKGMg87myU+Sl27vP0vw==
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Xenia Ragiadakou <xenia.ragiadakou@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 19 Apr 2024 08:20:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

18.04.24 14:18, Jan Beulich:
On 16.04.2024 08:22, Sergiy Kibrik wrote:
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -156,9 +156,9 @@ static int __init cf_check hvm_enable(void)
  {
      const struct hvm_function_table *fns = NULL;
- if ( cpu_has_vmx )
+    if ( IS_ENABLED(CONFIG_VMX) && cpu_has_vmx )
          fns = start_vmx();
-    else if ( cpu_has_svm )
+    else if ( IS_ENABLED(CONFIG_SVM) && cpu_has_svm )
          fns = start_svm();

Do we have or do we foresee any uses of cpu_has_{vmx,svm} that are relevant
when CONFIG_{VMX,SVM}=n respectively? If not, I'd prefer if the IS_ENABLED()
would be folded right into the definitions of cpu_has_{vmx,svm}, as is
already done for a few other CONFIG_*.

Jan

looks nice, will do it

  -Sergiy



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.