Message ID | f6bfed3cd9e9fff25cbe0c5e16d8d88541be212f.1720501197.git.Sergiy_Kibrik@epam.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | x86: make CPU virtualisation support configurable | expand |
On 09.07.2024 07:45, Sergiy Kibrik wrote: > From: Xenia Ragiadakou <burzalodowa@gmail.com> > > Introduce two new Kconfig options, SVM and VMX, to allow code > specific to each virtualization technology to be separated and, when not > required, stripped. > CONFIG_SVM will be used to enable virtual machine extensions on platforms that > implement the AMD Virtualization Technology (AMD-V). > CONFIG_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> > --- > changes in v3: > - tag added And then removed again in v4? My prior ack stands, but - as before - conditional upon us being certain that we want to go with the ambiguous ... > changes in v2: > - simplify kconfig expression to def_bool HVM > - keep file list in Makefile in alphabetical order > changes in v1: > - change kconfig option name AMD_SVM/INTEL_VMX -> SVM/VMX ... result of this change (firmly ambiguous for SVM, latently for VMX). Jan
09.07.24 10:11, Jan Beulich: > On 09.07.2024 07:45, Sergiy Kibrik wrote: >> From: Xenia Ragiadakou <burzalodowa@gmail.com> >> >> Introduce two new Kconfig options, SVM and VMX, to allow code >> specific to each virtualization technology to be separated and, when not >> required, stripped. >> CONFIG_SVM will be used to enable virtual machine extensions on platforms that >> implement the AMD Virtualization Technology (AMD-V). >> CONFIG_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> >> --- >> changes in v3: >> - tag added > > And then removed again in v4? My prior ack stands, but - as before - conditional > upon us being certain that we want to go with the ambiguous ... > >> changes in v2: >> - simplify kconfig expression to def_bool HVM >> - keep file list in Makefile in alphabetical order >> changes in v1: >> - change kconfig option name AMD_SVM/INTEL_VMX -> SVM/VMX > > ... result of this change (firmly ambiguous for SVM, latently for VMX). > I've put my thoughts about naming in the series' cover letter, however I'm not strongly preferring current naming and if it finds no advocates I'll rename it in next series. -Sergiy
On 10.07.2024 12:21, Sergiy Kibrik wrote: > 09.07.24 10:11, Jan Beulich: >> On 09.07.2024 07:45, Sergiy Kibrik wrote: >>> From: Xenia Ragiadakou <burzalodowa@gmail.com> >>> >>> Introduce two new Kconfig options, SVM and VMX, to allow code >>> specific to each virtualization technology to be separated and, when not >>> required, stripped. >>> CONFIG_SVM will be used to enable virtual machine extensions on platforms that >>> implement the AMD Virtualization Technology (AMD-V). >>> CONFIG_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> >>> --- >>> changes in v3: >>> - tag added >> >> And then removed again in v4? My prior ack stands, but - as before - conditional >> upon us being certain that we want to go with the ambiguous ... >> >>> changes in v2: >>> - simplify kconfig expression to def_bool HVM >>> - keep file list in Makefile in alphabetical order >>> changes in v1: >>> - change kconfig option name AMD_SVM/INTEL_VMX -> SVM/VMX >> >> ... result of this change (firmly ambiguous for SVM, latently for VMX). > > I've put my thoughts about naming in the series' cover letter, however > I'm not strongly preferring current naming and if it finds no advocates > I'll rename it in next series. Just to clarify: Did anyone ask for the name change done in v1? If so, maybe that request cam with some justification? Jan
10.07.24 13:28, Jan Beulich: > On 10.07.2024 12:21, Sergiy Kibrik wrote: >> 09.07.24 10:11, Jan Beulich: >>> On 09.07.2024 07:45, Sergiy Kibrik wrote: >>>> From: Xenia Ragiadakou <burzalodowa@gmail.com> >>>> >>>> Introduce two new Kconfig options, SVM and VMX, to allow code >>>> specific to each virtualization technology to be separated and, when not >>>> required, stripped. >>>> CONFIG_SVM will be used to enable virtual machine extensions on platforms that >>>> implement the AMD Virtualization Technology (AMD-V). >>>> CONFIG_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> >>>> --- >>>> changes in v3: >>>> - tag added >>> >>> And then removed again in v4? My prior ack stands, but - as before - conditional >>> upon us being certain that we want to go with the ambiguous ... >>> >>>> changes in v2: >>>> - simplify kconfig expression to def_bool HVM >>>> - keep file list in Makefile in alphabetical order >>>> changes in v1: >>>> - change kconfig option name AMD_SVM/INTEL_VMX -> SVM/VMX >>> >>> ... result of this change (firmly ambiguous for SVM, latently for VMX). >> >> I've put my thoughts about naming in the series' cover letter, however >> I'm not strongly preferring current naming and if it finds no advocates >> I'll rename it in next series. > > Just to clarify: Did anyone ask for the name change done in v1? If so, > maybe that request cam with some justification? > yes, that request came from you: https://lore.kernel.org/xen-devel/e29e375f-3d30-0eb1-7e28-b93f2d831b43@suse.com/ Though I understand that a lot has changed since v1 was published, so original concerns about vendor names may not be valid anymore.. -Sergiy
On 10.07.2024 12:52, Sergiy Kibrik wrote: > 10.07.24 13:28, Jan Beulich: >> On 10.07.2024 12:21, Sergiy Kibrik wrote: >>> 09.07.24 10:11, Jan Beulich: >>>> On 09.07.2024 07:45, Sergiy Kibrik wrote: >>>>> From: Xenia Ragiadakou <burzalodowa@gmail.com> >>>>> >>>>> Introduce two new Kconfig options, SVM and VMX, to allow code >>>>> specific to each virtualization technology to be separated and, when not >>>>> required, stripped. >>>>> CONFIG_SVM will be used to enable virtual machine extensions on platforms that >>>>> implement the AMD Virtualization Technology (AMD-V). >>>>> CONFIG_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> >>>>> --- >>>>> changes in v3: >>>>> - tag added >>>> >>>> And then removed again in v4? My prior ack stands, but - as before - conditional >>>> upon us being certain that we want to go with the ambiguous ... >>>> >>>>> changes in v2: >>>>> - simplify kconfig expression to def_bool HVM >>>>> - keep file list in Makefile in alphabetical order >>>>> changes in v1: >>>>> - change kconfig option name AMD_SVM/INTEL_VMX -> SVM/VMX >>>> >>>> ... result of this change (firmly ambiguous for SVM, latently for VMX). >>> >>> I've put my thoughts about naming in the series' cover letter, however >>> I'm not strongly preferring current naming and if it finds no advocates >>> I'll rename it in next series. >> >> Just to clarify: Did anyone ask for the name change done in v1? If so, >> maybe that request cam with some justification? > > yes, that request came from you: > > https://lore.kernel.org/xen-devel/e29e375f-3d30-0eb1-7e28-b93f2d831b43@suse.com/ Hmm, how unfortunate. I definitely want to take back that comment, for the reason given (in context) above. I'm sorry for the back and forth then, also to you, Xenia. Jan
diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index 7e03e4bc55..8c9f8431f0 100644 --- a/xen/arch/x86/Kconfig +++ b/xen/arch/x86/Kconfig @@ -122,6 +122,12 @@ config HVM If unsure, say Y. +config SVM + def_bool HVM + +config VMX + def_bool HVM + config XEN_SHSTK bool "Supervisor Shadow Stacks" depends on HAS_AS_CET_SS diff --git a/xen/arch/x86/hvm/Makefile b/xen/arch/x86/hvm/Makefile index 3464191544..8434badc64 100644 --- a/xen/arch/x86/hvm/Makefile +++ b/xen/arch/x86/hvm/Makefile @@ -1,5 +1,5 @@ -obj-y += svm/ -obj-y += vmx/ +obj-$(CONFIG_SVM) += svm/ +obj-$(CONFIG_VMX) += vmx/ obj-y += viridian/ obj-y += asid.o diff --git a/xen/arch/x86/mm/Makefile b/xen/arch/x86/mm/Makefile index 0803ac9297..0128ca7ab6 100644 --- a/xen/arch/x86/mm/Makefile +++ b/xen/arch/x86/mm/Makefile @@ -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_VMX) += p2m-ept.o +obj-$(CONFIG_HVM) += p2m-pod.o p2m-pt.o obj-y += paging.o obj-y += physmap.o diff --git a/xen/arch/x86/mm/hap/Makefile b/xen/arch/x86/mm/hap/Makefile index 8ef54b1faa..98c8a87819 100644 --- a/xen/arch/x86/mm/hap/Makefile +++ b/xen/arch/x86/mm/hap/Makefile @@ -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_VMX) += nested_ept.o