]> xenbits.xensource.com Git - people/aperard/xen-unstable.git/commitdiff
x86: introduce AMD-V and Intel VT-x Kconfig options
authorXenia Ragiadakou <burzalodowa@gmail.com>
Thu, 1 Aug 2024 11:53:37 +0000 (13:53 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 1 Aug 2024 11:53:37 +0000 (13:53 +0200)
Introduce two new Kconfig options, AMD_SVM and INTEL_VMX, to allow code
specific to each virtualization technology to be separated and, when not
required, stripped.
CONFIG_AMD_SVM will be used to enable virtual machine extensions on platforms
that implement the AMD Virtualization Technology (AMD-V).
CONFIG_INTEL_VMX will be used to enable virtual machine extensions on platforms
that implement the Intel Virtualization Technology (Intel VT-x).

Both features depend on HVM support.

Since, at this point, disabling any of them would cause Xen to not compile,
the options are enabled by default if HVM and are not selectable by the user.

No functional change intended.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/Kconfig
xen/arch/x86/hvm/Makefile
xen/arch/x86/mm/Makefile
xen/arch/x86/mm/hap/Makefile

index 7e03e4bc55466fee4a1fa7af4f99e5799fb426ad..fa5405e0d3430adf9b3df82958134e41a9d90bc0 100644 (file)
@@ -122,6 +122,12 @@ config HVM
 
          If unsure, say Y.
 
+config AMD_SVM
+       def_bool HVM
+
+config INTEL_VMX
+       def_bool HVM
+
 config XEN_SHSTK
        bool "Supervisor Shadow Stacks"
        depends on HAS_AS_CET_SS
index 3464191544601a1a05ca018ef1e21024172d9fda..4c1fa5c6c2bf75d336b39f343241bfced5b91b09 100644 (file)
@@ -1,5 +1,5 @@
-obj-y += svm/
-obj-y += vmx/
+obj-$(CONFIG_AMD_SVM) += svm/
+obj-$(CONFIG_INTEL_VMX) += vmx/
 obj-y += viridian/
 
 obj-y += asid.o
index 0803ac929725835bb51c04a6ce9feac1a20727e1..52c5abdfee5da85b9dc53f4cbc1e639ac3c5ba8f 100644 (file)
@@ -10,6 +10,7 @@ obj-$(CONFIG_MEM_SHARING) += mem_sharing.o
 obj-$(CONFIG_HVM) += nested.o
 obj-$(CONFIG_HVM) += p2m.o
 obj-y += p2m-basic.o
-obj-$(CONFIG_HVM) += p2m-ept.o p2m-pod.o p2m-pt.o
+obj-$(CONFIG_INTEL_VMX) += p2m-ept.o
+obj-$(CONFIG_HVM) += p2m-pod.o p2m-pt.o
 obj-y += paging.o
 obj-y += physmap.o
index 8ef54b1faa500385366e4a13bc85dd0a116553ba..67c29b2162397641136b671464b4d6a84a44b79e 100644 (file)
@@ -3,4 +3,4 @@ obj-y += guest_walk_2.o
 obj-y += guest_walk_3.o
 obj-y += guest_walk_4.o
 obj-y += nested_hap.o
-obj-y += nested_ept.o
+obj-$(CONFIG_INTEL_VMX) += nested_ept.o