Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:GA
xen.30827
xsa435-0-48.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xsa435-0-48.patch of Package xen.30827
# Commit 1e082c9eca04d731dd0b386878f16a40a585a6ab # Date 2023-08-03 19:14:19 +0100 # Author Roger Pau Monne <roger.pau@citrix.com> # Committer Andrew Cooper <andrew.cooper3@citrix.com> libxl: don't ignore the return value from xc_cpuid_apply_policy Also change libxl__cpuid_legacy to propagate the error from xc_cpuid_apply_policy into callers. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Anthony PERARD <anthony.perard@citrix.com> (cherry picked from commit 34990446ca91d9e201ff17bd4e3f43bfe3ad308e) --- a/tools/libxl/libxl_cpuid.c +++ b/tools/libxl/libxl_cpuid.c @@ -418,9 +418,17 @@ int libxl_cpuid_parse_config_xend(libxl_ return 0; } -void libxl_cpuid_apply_policy(libxl_ctx *ctx, uint32_t domid) +int libxl_cpuid_apply_policy(libxl_ctx *ctx, uint32_t domid) { - xc_cpuid_apply_policy(ctx->xch, domid, NULL, 0); + GC_INIT(ctx); + int r; + + r = xc_cpuid_apply_policy(ctx->xch, domid, NULL, 0); + if (r) + LOGEVD(ERROR, -r, domid, "Failed to apply CPUID policy"); + + GC_FREE; + return r ? ERROR_FAIL : 0; } void libxl_cpuid_set(libxl_ctx *ctx, uint32_t domid, --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -615,7 +615,9 @@ int libxl__build_post(libxl__gc *gc, uin if (rc) return rc; - libxl_cpuid_apply_policy(ctx, domid); + rc = libxl_cpuid_apply_policy(ctx, domid); + if (rc) + return rc; if (info->cpuid != NULL) libxl_cpuid_set(ctx, domid, info->cpuid); --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -2174,7 +2174,7 @@ libxl_device_pci *libxl_device_pci_assig int libxl_cpuid_parse_config(libxl_cpuid_policy_list *cpuid, const char* str); int libxl_cpuid_parse_config_xend(libxl_cpuid_policy_list *cpuid, const char* str); -void libxl_cpuid_apply_policy(libxl_ctx *ctx, uint32_t domid); +int libxl_cpuid_apply_policy(libxl_ctx *ctx, uint32_t domid); void libxl_cpuid_set(libxl_ctx *ctx, uint32_t domid, libxl_cpuid_policy_list cpuid); --- a/tools/libxl/libxl_nocpuid.c +++ b/tools/libxl/libxl_nocpuid.c @@ -34,8 +34,9 @@ int libxl_cpuid_parse_config_xend(libxl_ return 0; } -void libxl_cpuid_apply_policy(libxl_ctx *ctx, uint32_t domid) +int libxl_cpuid_apply_policy(libxl_ctx *ctx, uint32_t domid) { + return 0; } void libxl_cpuid_set(libxl_ctx *ctx, uint32_t domid,
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