Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
SUSE:SLE-15-SP7:Update
xen.30827
xsa435-0-18.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xsa435-0-18.patch of Package xen.30827
From 433d012c6c2737ad5a9aaa994355a4140d601852 Mon Sep 17 00:00:00 2001 From: Andrew Cooper <andrew.cooper3@citrix.com> Date: Fri, 10 Mar 2023 19:37:56 +0000 Subject: x86/sysctl: Retrofit XEN_SYSCTL_cpu_featureset_{pv,hvm}_max Featuresets are supposed to be disappearing when the CPU policy infrastructure is complete, but that has taken longer than expected, and isn't going to be complete imminently either. In the meantime, Xen does have proper default/max featuresets, and xen-cpuid can even get them via the XEN_SYSCTL_cpu_policy_* interface, but only knows now to render them nicely via the featureset interface. Differences between default and max are a frequent source of errors, frequently too in secret leading up to an embargo, so extend the featureset sysctl to allow xen-cpuid to render them all nicely. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com> Acked-by: Christian Lindig <christian.lindig@cloud.com> --- a/tools/misc/xen-cpuid.c +++ b/tools/misc/xen-cpuid.c @@ -229,10 +229,12 @@ static struct { #define COL_ALIGN "18" static const char *const fs_names[] = { - [XEN_SYSCTL_cpu_featureset_host] = "Host", - [XEN_SYSCTL_cpu_featureset_raw] = "Raw", - [XEN_SYSCTL_cpu_featureset_pv] = "PV", - [XEN_SYSCTL_cpu_featureset_hvm] = "HVM", + [XEN_SYSCTL_cpu_featureset_raw] = "Raw", + [XEN_SYSCTL_cpu_featureset_host] = "Host", + [XEN_SYSCTL_cpu_featureset_pv] = "PV Default", + [XEN_SYSCTL_cpu_featureset_hvm] = "HVM Default", + [XEN_SYSCTL_cpu_featureset_pv_max] = "PV Max", + [XEN_SYSCTL_cpu_featureset_hvm_max] = "HVM Max", }; static void dump_leaf(uint32_t leaf, const char **strs) --- a/tools/ocaml/libs/xc/xenctrl.ml +++ b/tools/ocaml/libs/xc/xenctrl.ml @@ -271,7 +271,13 @@ external version_changeset: handle -> st external version_capabilities: handle -> string = "stub_xc_version_capabilities" -type featureset_index = Featureset_raw | Featureset_host | Featureset_pv | Featureset_hvm +type featureset_index = + | Featureset_raw + | Featureset_host + | Featureset_pv + | Featureset_hvm + | Featureset_pv_max + | Featureset_hvm_max external get_cpu_featureset : handle -> featureset_index -> int64 array = "stub_xc_get_cpu_featureset" external watchdog : handle -> int -> int32 -> int --- a/tools/ocaml/libs/xc/xenctrl.mli +++ b/tools/ocaml/libs/xc/xenctrl.mli @@ -194,7 +194,13 @@ external version_changeset : handle -> s external version_capabilities : handle -> string = "stub_xc_version_capabilities" -type featureset_index = Featureset_raw | Featureset_host | Featureset_pv | Featureset_hvm +type featureset_index = + | Featureset_raw + | Featureset_host + | Featureset_pv + | Featureset_hvm + | Featureset_pv_max + | Featureset_hvm_max external get_cpu_featureset : handle -> featureset_index -> int64 array = "stub_xc_get_cpu_featureset" external pages_to_kib : int64 -> int64 = "stub_pages_to_kib" --- a/xen/arch/x86/sysctl.c +++ b/xen/arch/x86/sysctl.c @@ -292,6 +292,8 @@ long arch_do_sysctl( [XEN_SYSCTL_cpu_featureset_host] = &host_cpuid_policy, [XEN_SYSCTL_cpu_featureset_pv] = &pv_max_cpuid_policy, [XEN_SYSCTL_cpu_featureset_hvm] = &hvm_max_cpuid_policy, + [XEN_SYSCTL_cpu_featureset_pv_max] = &pv_max_cpuid_policy, + [XEN_SYSCTL_cpu_featureset_hvm_max] = &hvm_max_cpuid_policy, }; const struct cpuid_policy *p = NULL; uint32_t featureset[FSCAPINTS]; --- a/xen/include/public/sysctl.h +++ b/xen/include/public/sysctl.h @@ -869,6 +869,8 @@ struct xen_sysctl_cpu_featureset { #define XEN_SYSCTL_cpu_featureset_host 1 #define XEN_SYSCTL_cpu_featureset_pv 2 #define XEN_SYSCTL_cpu_featureset_hvm 3 +#define XEN_SYSCTL_cpu_featureset_pv_max 4 +#define XEN_SYSCTL_cpu_featureset_hvm_max 5 uint32_t index; /* IN: Which featureset to query? */ uint32_t nr_features; /* IN/OUT: Number of entries in/written to * 'features', or the maximum number of features if
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor