unsigned int max_cstate __read_mostly = UINT_MAX;
unsigned int max_csubstate __read_mostly = UINT_MAX;
-static int __init parse_cstate(const char *s)
+static int __init cf_check parse_cstate(const char *s)
{
max_cstate = simple_strtoul(s, &s, 0);
if ( *s == ',' )
uint32_t system_reset_counter = 1;
-static int __init parse_acpi_sleep(const char *s)
+static int __init cf_check parse_acpi_sleep(const char *s)
{
const char *ss;
unsigned int flag = 0;
* Original code written by Keir Fraser.
*/
-static int __init lapic_disable(const char *str)
+static int __init cf_check lapic_disable(const char *str)
{
enable_local_apic = -1;
setup_clear_cpu_cap(X86_FEATURE_APIC);
custom_param("nolapic", lapic_disable);
boolean_param("lapic", enable_local_apic);
-static int __init apic_set_verbosity(const char *str)
+static int __init cf_check apic_set_verbosity(const char *str)
{
if (strcmp("debug", str) == 0)
apic_verbosity = APIC_DEBUG;
#endif
int mce_verbosity;
-static int __init mce_set_verbosity(const char *str)
+static int __init cf_check mce_set_verbosity(const char *str)
{
if ( strcmp("verbose", str) == 0 )
mce_verbosity = MCE_VERBOSE;
* optional. If the EFI has forced which of the multiboot payloads is to be
* used, only nmi=<bool> is parsed.
*/
-static int __init parse_ucode(const char *s)
+static int __init cf_check parse_ucode(const char *s)
{
const char *ss;
int val, rc = 0;
static DEFINE_PER_CPU(struct vcpu *, last_vcpu);
-static int __init parse_vpmu_params(const char *s)
+static int __init cf_check parse_vpmu_params(const char *s)
{
const char *ss;
int rc = 0, val;
return rc;
}
-static void __init _parse_xen_cpuid(unsigned int feat, bool val)
+static void __init cf_check _parse_xen_cpuid(unsigned int feat, bool val)
{
if ( !val )
setup_clear_cpu_cap(feat);
setup_force_cpu_cap(X86_FEATURE_RDRAND);
}
-static int __init parse_xen_cpuid(const char *s)
+static int __init cf_check parse_xen_cpuid(const char *s)
{
return parse_cpuid(s, _parse_xen_cpuid);
}
static uint32_t __initdata dom0_enable_feat[FSCAPINTS];
static uint32_t __initdata dom0_disable_feat[FSCAPINTS];
-static void __init _parse_dom0_cpuid(unsigned int feat, bool val)
+static void __init cf_check _parse_dom0_cpuid(unsigned int feat, bool val)
{
__set_bit (feat, val ? dom0_enable_feat : dom0_disable_feat);
__clear_bit(feat, val ? dom0_disable_feat : dom0_enable_feat );
}
-static int __init parse_dom0_cpuid(const char *s)
+static int __init cf_check parse_dom0_cpuid(const char *s)
{
dom0_cpuid_cmdline = true;
return 0;
}
-static int __init parse_dom0_mem(const char *s)
+static int __init cf_check parse_dom0_mem(const char *s)
{
int ret;
static unsigned int __initdata opt_dom0_max_vcpus_min = 1;
static unsigned int __initdata opt_dom0_max_vcpus_max = UINT_MAX;
-static int __init parse_dom0_max_vcpus(const char *s)
+static int __init cf_check parse_dom0_max_vcpus(const char *s)
{
if ( *s == '-' ) /* -M */
opt_dom0_max_vcpus_max = simple_strtoul(s + 1, &s, 0);
{ [0 ... MAX_NUMNODES - 1] = ~0 };
bool __initdata dom0_affinity_relaxed;
-static int __init parse_dom0_nodes(const char *s)
+static int __init cf_check parse_dom0_nodes(const char *s)
{
const char *ss;
int rc = 0;
bool __initdata opt_dom0_verbose = IS_ENABLED(CONFIG_VERBOSE_DEBUG);
bool __initdata opt_dom0_msr_relaxed;
-static int __init parse_dom0_param(const char *s)
+static int __init cf_check parse_dom0_param(const char *s)
{
const char *ss;
int rc = 0;
}
}
-static int __init genapic_apic_force(const char *str)
+static int __init cf_check genapic_apic_force(const char *str)
{
int i, rc = -EINVAL;
static bool __initdata force_hpet_broadcast;
boolean_param("hpetbroadcast", force_hpet_broadcast);
-static int __init parse_hpet_param(const char *s)
+static int __init cf_check parse_hpet_param(const char *s)
{
const char *ss;
int val, rc = 0;
HVM_REGISTER_SAVE_RESTORE(VIRIDIAN_VCPU, viridian_save_vcpu_ctxt,
viridian_load_vcpu_ctxt, 1, HVMSR_PER_VCPU);
-static int __init parse_viridian_version(const char *arg)
+static int __init cf_check parse_viridian_version(const char *arg)
{
const char *t;
unsigned int n[3];
static s8 __read_mostly opt_ept_ad = -1;
int8_t __read_mostly opt_ept_exec_sp = -1;
-static int __init parse_ept_param(const char *s)
+static int __init cf_check parse_ept_param(const char *s)
{
const char *ss;
int val, rc = 0;
opt_ept_exec_sp);
}
-static void __init init_ept_param(struct param_hypfs *par)
+static void __init cf_check init_ept_param(struct param_hypfs *par)
{
update_ept_param();
custom_runtime_set_var(par, opt_ept_setting);
}
-static int parse_ept_param_runtime(const char *s);
+static int cf_check parse_ept_param_runtime(const char *s);
custom_runtime_only_param("ept", parse_ept_param_runtime, init_ept_param);
-static int parse_ept_param_runtime(const char *s)
+static int cf_check parse_ept_param_runtime(const char *s)
{
struct domain *d;
int val;
return 0; /* don't check for pending */
}
-static int __init setup_ioapic_ack(const char *s)
+static int __init cf_check setup_ioapic_ack(const char *s)
{
if ( !strcmp(s, "old") )
{
#include <irq_vectors.h>
#include <public/physdev.h>
-static int parse_irq_vector_map_param(const char *s);
-
/* opt_noirqbalance: If true, software IRQ balancing/affinity is disabled. */
bool __read_mostly opt_noirqbalance;
boolean_param("noirqbalance", opt_noirqbalance);
/* This default may be changed by the AMD IOMMU code */
int __read_mostly opt_irq_vector_map = OPT_IRQ_VECTOR_MAP_DEFAULT;
-custom_param("irq_vector_map", parse_irq_vector_map_param);
/* Max number of guests IRQ could be shared with */
static unsigned char __read_mostly irq_max_guests;
static unsigned int __read_mostly irq_ratelimit_threshold = 10000;
integer_param("irq_ratelimit", irq_ratelimit_threshold);
-static int __init parse_irq_vector_map_param(const char *s)
+static int __init cf_check parse_irq_vector_map_param(const char *s)
{
const char *ss;
int rc = 0;
return rc;
}
+custom_param("irq_vector_map", parse_irq_vector_map_param);
/* Must be called when irq disabled */
void lock_vector_lock(void)
static s8 __read_mostly opt_mmio_relax;
-static int __init parse_mmio_relax(const char *s)
+static int __init cf_check parse_mmio_relax(const char *s)
{
if ( !*s )
opt_mmio_relax = 1;
/* watchdog_force: If true, process unknown NMIs when running the watchdog. */
bool watchdog_force;
-static int __init parse_watchdog(const char *s)
+static int __init cf_check parse_watchdog(const char *s)
{
if ( !*s )
{
/* opt_watchdog_timeout: Number of seconds to wait before panic. */
static unsigned int opt_watchdog_timeout = 5;
-static int parse_watchdog_timeout(const char *s)
+static int __init cf_check parse_watchdog_timeout(const char *s)
{
const char *q;
#include <xen/sched.h>
#include <xen/softirq.h>
-static int numa_setup(const char *s);
-custom_param("numa", numa_setup);
-
#ifndef Dprintk
#define Dprintk(x...)
#endif
}
/* [numa=off] */
-static __init int numa_setup(const char *opt)
+static int __init cf_check numa_setup(const char *opt)
{
if ( !strncmp(opt,"off",3) )
numa_off = true;
return 0;
}
+custom_param("numa", numa_setup);
/*
* Setup early cpu_to_node.
static int force_arch_perfmon;
-static int force_cpu_type(const char *str)
+static int __init cf_check force_cpu_type(const char *str)
{
if (!strcmp(str, "arch_perfmon")) {
force_arch_perfmon = 1;
return false;
}
-static int __init parse_psr_param(const char *s)
+static int __init cf_check parse_psr_param(const char *s)
{
const char *ss, *val_delim;
const char *q;
int8_t __read_mostly opt_pv32 = -1;
#endif
-static __init int parse_pv(const char *s)
+static int __init cf_check parse_pv(const char *s)
{
const char *ss;
int val, rc = 0;
[PCID_NOXPTI] = "noxpti",
};
-static void __init opt_pcid_init(struct param_hypfs *par)
+static void __init cf_check opt_pcid_init(struct param_hypfs *par)
{
custom_runtime_set_var(par, opt_pcid_2_string[opt_pcid]);
}
#endif
-static int parse_pcid(const char *s);
+static int cf_check parse_pcid(const char *s);
custom_runtime_param("pcid", parse_pcid, opt_pcid_init);
-static int parse_pcid(const char *s)
+static int cf_check parse_pcid(const char *s)
{
int rc = 0;
static uint64_t __initdata shim_min_nrpages;
static uint64_t __initdata shim_max_nrpages;
-static int __init parse_shim_mem(const char *s)
+static int __init cf_check parse_shim_mem(const char *s)
{
do {
if ( !strncmp(s, "min:", 4) )
/* "acpi=ht": Limit ACPI just to boot-time to enable HT. */
/* "acpi=noirq": Disables ACPI interrupt routing. */
/* "acpi=verbose": Enables more verbose ACPI boot time logging. */
-static int parse_acpi_param(const char *s);
-custom_param("acpi", parse_acpi_param);
/* **** Linux config option: propagated to domain0. */
/* noapic: Disable IOAPIC setup. */
#define opt_xen_shstk false
#endif
-static int __init parse_cet(const char *s)
+static int __init cf_check parse_cet(const char *s)
{
const char *ss;
int val, rc = 0;
*/
static struct domain *__initdata dom0;
-static int __init parse_smep_param(const char *s)
+static int __init cf_check parse_smep_param(const char *s)
{
if ( !*s )
{
#define SMAP_HVM_ONLY (-2)
static s8 __initdata opt_smap = -1;
-static int __init parse_smap_param(const char *s)
+static int __init cf_check parse_smap_param(const char *s)
{
if ( !*s )
{
bool __initdata acpi_force;
static char __initdata acpi_param[10] = "";
-static int __init parse_acpi_param(const char *s)
+static int __init cf_check parse_acpi_param(const char *s)
{
/* Interpret the parameter for use within Xen. */
if ( !parse_bool(s, NULL) )
return 0;
}
+custom_param("acpi", parse_acpi_param);
static const module_t *__initdata initial_images;
static unsigned int __initdata nr_initial_images;
*/
static enum reboot_type reboot_type = BOOT_INVALID;
-static int __init set_reboot_type(const char *str)
+static int __init cf_check set_reboot_type(const char *str)
{
int rc = 0;
static int8_t __initdata opt_srb_lock = -1;
-static int __init parse_spec_ctrl(const char *s)
+static int __init cf_check parse_spec_ctrl(const char *s)
{
const char *ss;
int val, rc = 0;
}
}
-static __init int parse_xpti(const char *s)
+static int __init cf_check parse_xpti(const char *s)
{
const char *ss;
int val, rc = 0;
int8_t __read_mostly opt_pv_l1tf_hwdom = -1;
int8_t __read_mostly opt_pv_l1tf_domu = -1;
-static __init int parse_pv_l1tf(const char *s)
+static int __init cf_check parse_pv_l1tf(const char *s)
{
const char *ss;
int val, rc = 0;
* tsc=skewed: Assume TSCs are individually reliable, but skewed across CPUs.
* tsc=stable:socket: Assume TSCs are reliable across sockets.
*/
-static int __init tsc_parse(const char *s)
+static int __init cf_check tsc_parse(const char *s)
{
if ( !strcmp(s, "unstable") )
{
int8_t __read_mostly cpu_has_tsx_ctrl = -1;
bool __read_mostly rtm_disabled;
-static int __init parse_tsx(const char *s)
+static int __init cf_check parse_tsx(const char *s)
{
int rc = 0, val = parse_bool(s, NULL);
unsigned int pci_probe = PCI_PROBE_CONF1 | PCI_PROBE_MMCONF;
-static int __init parse_mmcfg(const char *s)
+static int __init cf_check parse_mmcfg(const char *s)
{
const char *ss;
int rc = 0;
static bool __read_mostly opt_argo;
static bool __read_mostly opt_argo_mac_permissive;
-static int __init parse_argo(const char *s)
+static int __init cf_check parse_argo(const char *s)
{
const char *ss;
int val, rc = 0;
PERFORMANCE_FIRST
} core_parking_controller __initdata = POWER_FIRST;
-static int __init setup_core_parking_option(const char *str)
+static int __init cf_check setup_core_parking_option(const char *str)
{
if ( !strcmp(str, "power") )
core_parking_controller = POWER_FIRST;
static bool debugtrace_used;
static DEFINE_SPINLOCK(debugtrace_lock);
-static int __init debugtrace_parse_param(const char *s)
+static int __init cf_check debugtrace_parse_param(const char *s)
{
unsigned long bytes;
static unsigned int __read_mostly extra_hwdom_irqs;
static unsigned int __read_mostly extra_domU_irqs = 32;
-static int __init parse_extra_guest_irqs(const char *s)
+static int __init cf_check parse_extra_guest_irqs(const char *s)
{
if ( isdigit(*s) )
extra_domU_irqs = simple_strtoul(s, &s, 0);
static bool __initdata efi_map_uc;
-static int __init parse_efi_param(const char *s)
+static int __init cf_check parse_efi_param(const char *s)
{
const char *ss;
int rc = 0, val;
custom_runtime_set_var_sz(par, parval, GRANT_CUSTOM_VAL_SZ);
}
-static void __init gnttab_max_frames_init(struct param_hypfs *par)
+static void __init cf_check gnttab_max_frames_init(struct param_hypfs *par)
{
update_gnttab_par(opt_max_grant_frames, par, opt_max_grant_frames_val);
}
-static void __init max_maptrack_frames_init(struct param_hypfs *par)
+static void __init cf_check max_maptrack_frames_init(struct param_hypfs *par)
{
update_gnttab_par(opt_max_maptrack_frames, par,
opt_max_maptrack_frames_val);
return 0;
}
-static int parse_gnttab_max_frames(const char *arg);
+static int cf_check parse_gnttab_max_frames(const char *arg);
custom_runtime_param("gnttab_max_frames", parse_gnttab_max_frames,
gnttab_max_frames_init);
-static int parse_gnttab_max_frames(const char *arg)
+static int cf_check parse_gnttab_max_frames(const char *arg)
{
return parse_gnttab_limit(arg, &opt_max_grant_frames,
param_2_parfs(parse_gnttab_max_frames),
opt_max_grant_frames_val);
}
-static int parse_gnttab_max_maptrack_frames(const char *arg);
+static int cf_check parse_gnttab_max_maptrack_frames(const char *arg);
custom_runtime_param("gnttab_max_maptrack_frames",
parse_gnttab_max_maptrack_frames,
max_maptrack_frames_init);
-static int parse_gnttab_max_maptrack_frames(const char *arg)
+static int cf_check parse_gnttab_max_maptrack_frames(const char *arg)
{
return parse_gnttab_limit(arg, &opt_max_maptrack_frames,
param_2_parfs(parse_gnttab_max_maptrack_frames),
#define opt_grant_transfer false
#endif
-static int __init parse_gnttab(const char *s)
+static int __init cf_check parse_gnttab(const char *s)
{
const char *ss, *e;
int val, rc = 0;
* < and below are synonyomous, the latter being useful for grub2 systems
* which would otherwise require escaping of the < option
*/
-static int __init parse_crashkernel(const char *str)
+static int __init cf_check parse_crashkernel(const char *str)
{
const char *cur;
int rc = 0;
* - all will allocate additional structures such as domain and vcpu structs
* low so the crash kernel can perform an extended analysis of state.
*/
-static int __init parse_low_crashinfo(const char *str)
+static int __init cf_check parse_low_crashinfo(const char *str)
{
if ( !strlen(str) )
*
* <addr> will be rounded down to the nearest power of two. Defaults to 64G
*/
-static int __init parse_crashinfo_maxaddr(const char *str)
+static int __init cf_check parse_crashinfo_maxaddr(const char *str)
{
u64 addr;
const char *q;
static unsigned int __read_mostly ptdom_max_order = CONFIG_PTDOM_MAX_ORDER;
#endif
-static int __init parse_max_order(const char *s)
+static int __init cf_check parse_max_order(const char *s)
{
if ( *s != ',' )
domu_max_order = simple_strtoul(s, &s, 0);
* https://bugs.llvm.org/show_bug.cgi?id=39707
*/
static enum bootscrub_mode __read_mostly opt_bootscrub = BOOTSCRUB_IDLE;
-static int __init parse_bootscrub_param(const char *s)
+static int __init cf_check parse_bootscrub_param(const char *s)
{
/* Interpret 'bootscrub' alone in its positive boolean form */
if ( *s == '\0' )
return -EINVAL;
}
-static int __init sched_select_granularity(const char *str)
+static int __init cf_check sched_select_granularity(const char *str)
{
return sched_gran_get(str, &opt_sched_granularity);
}
};
static int __read_mostly opt_runqueue = OPT_RUNQUEUE_SOCKET;
-static int __init parse_credit2_runqueue(const char *s)
+static int __init cf_check parse_credit2_runqueue(const char *s)
{
unsigned int i;
return 0;
}
-static int __init acpi_parse_apic_instance(const char *str)
+static int __init cf_check acpi_parse_apic_instance(const char *str)
{
const char *q;
[TSM_RAW] = "raw",
};
-static void con_timestamp_mode_upd(struct param_hypfs *par)
+static void cf_check con_timestamp_mode_upd(struct param_hypfs *par)
{
const char *val = con_timestamp_mode_2_string[opt_con_timestamp_mode];
#define con_timestamp_mode_upd(par)
#endif
-static int parse_console_timestamps(const char *s);
+static int cf_check parse_console_timestamps(const char *s);
custom_runtime_param("console_timestamps", parse_console_timestamps,
con_timestamp_mode_upd);
static int __read_mostly xenlog_guest_lower_thresh =
XENLOG_GUEST_LOWER_THRESHOLD;
-static int parse_loglvl(const char *s);
-static int parse_guest_loglvl(const char *s);
+static int cf_check parse_loglvl(const char *s);
+static int cf_check parse_guest_loglvl(const char *s);
#ifdef CONFIG_HYPFS
#define LOGLVL_VAL_SZ 16
snprintf(val, LOGLVL_VAL_SZ, "%s/%s", lvl2opt[lower], lvl2opt[upper]);
}
-static void __init xenlog_init(struct param_hypfs *par)
+static void __init cf_check xenlog_init(struct param_hypfs *par)
{
xenlog_update_val(xenlog_lower_thresh, xenlog_upper_thresh, xenlog_val);
custom_runtime_set_var(par, xenlog_val);
}
-static void __init xenlog_guest_init(struct param_hypfs *par)
+static void __init cf_check xenlog_guest_init(struct param_hypfs *par)
{
xenlog_update_val(xenlog_guest_lower_thresh, xenlog_guest_upper_thresh,
xenlog_guest_val);
return *s ? -EINVAL : 0;
}
-static int parse_loglvl(const char *s)
+static int cf_check parse_loglvl(const char *s)
{
int ret;
return ret;
}
-static int parse_guest_loglvl(const char *s)
+static int cf_check parse_guest_loglvl(const char *s)
{
int ret;
((loglvl < upper_thresh) && printk_ratelimit()));
}
-static int parse_console_timestamps(const char *s)
+static int cf_check parse_console_timestamps(const char *s)
{
switch ( parse_bool(s, NULL) )
{
static int __init cpufreq_cmdline_parse(const char *s);
-static int __init setup_cpufreq_option(const char *str)
+static int __init cf_check setup_cpufreq_option(const char *str)
{
const char *arg = strpbrk(str, ",:");
int choice;
return dev_length;
}
-static int __init parse_ivrs_ioapic(const char *str)
+static int __init cf_check parse_ivrs_ioapic(const char *str)
{
const char *s = str;
unsigned long id;
}
custom_param("ivrs_ioapic[", parse_ivrs_ioapic);
-static int __init parse_ivrs_hpet(const char *str)
+static int __init cf_check parse_ivrs_hpet(const char *str)
{
const char *s = str;
unsigned long id;
* Format:
* ivmd=<start>[-<end>][=<bdf1>[-<bdf1>'][,<bdf2>[-<bdf2>'][,...]]][;<start>...]
*/
-static int __init parse_ivmd_param(const char *s)
+static int __init cf_check parse_ivmd_param(const char *s)
{
do {
unsigned long start, end;
DEFINE_PER_CPU(bool_t, iommu_dont_flush_iotlb);
-static int __init parse_iommu_param(const char *s)
+static int __init cf_check parse_iommu_param(const char *s)
{
const char *ss;
int val, rc = 0;
}
custom_param("iommu", parse_iommu_param);
-static int __init parse_dom0_iommu_param(const char *s)
+static int __init cf_check parse_dom0_iommu_param(const char *s)
{
const char *ss;
int rc = 0;
} phantom_devs[8];
static unsigned int nr_phantom_devs;
-static int __init parse_phantom_dev(const char *str)
+static int __init cf_check parse_phantom_dev(const char *str)
{
const char *s;
unsigned int seg, bus, slot;
static u16 __read_mostly command_mask;
static u16 __read_mostly bridge_ctl_mask;
-static int __init parse_pci_param(const char *s)
+static int __init cf_check parse_pci_param(const char *s)
{
const char *ss;
int rc = 0;
* If a segment is specified for other than the first device, and it does not
* match the one specified for the first one, an error will be reported.
*/
-static int __init parse_rmrr_param(const char *str)
+static int __init cf_check parse_rmrr_param(const char *str)
{
const char *s = str, *cur, *stmp;
unsigned int seg, bus, dev, func, dev_count;
}
}
-static int __init parse_snb_timeout(const char *s)
+static int __init cf_check parse_snb_timeout(const char *s)
{
int t;
const char *q = NULL;
static unsigned int __initdata vram_remap;
static unsigned int __initdata font_height;
-static int __init parse_font_height(const char *s)
+static int __init cf_check parse_font_height(const char *s)
{
if ( simple_strtoul(s, &s, 10) == 8 && (*s++ == 'x') )
font_height = simple_strtoul(s, &s, 10);
#define _copy_from_guest copy_from_guest
enum flask_bootparam_t __read_mostly flask_bootparam = FLASK_BOOTPARAM_ENFORCING;
-static int parse_flask_param(const char *s);
-custom_param("flask", parse_flask_param);
bool __read_mostly flask_enforcing = true;
extern int ss_initialized;
-static int __init parse_flask_param(const char *s)
+static int __init cf_check parse_flask_param(const char *s)
{
if ( !strcmp(s, "enforcing") )
flask_bootparam = FLASK_BOOTPARAM_ENFORCING;
return (flask_bootparam == FLASK_BOOTPARAM_INVALID) ? -EINVAL : 0;
}
+custom_param("flask", parse_flask_param);
static int domain_has_security(struct domain *d, u32 perms)
{
XSM_BOOTPARAM_DUMMY;
#endif
-static int __init parse_xsm_param(const char *s)
+static int __init cf_check parse_xsm_param(const char *s)
{
int rc = 0;