From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Jan Beulich <jbeulich@suse.com>
Subject: [PATCH v3 06/52] xen/arch/x86/cpu/vpmu.c: let custom parameter parsing routines return errno
Date: Wed, 16 Aug 2017 14:51:33 +0200 [thread overview]
Message-ID: <20170816125219.5255-7-jgross@suse.com> (raw)
In-Reply-To: <20170816125219.5255-1-jgross@suse.com>
Modify the custom parameter parsing routines in:
xen/arch/x86/cpu/vpmu.c
to indicate whether the parameter value was parsed successfully.
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
---
xen/arch/x86/cpu/vpmu.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c
index 90954ca884..e0c87a68d4 100644
--- a/xen/arch/x86/cpu/vpmu.c
+++ b/xen/arch/x86/cpu/vpmu.c
@@ -53,7 +53,7 @@ CHECK_pmu_params;
static unsigned int __read_mostly opt_vpmu_enabled;
unsigned int __read_mostly vpmu_mode = XENPMU_MODE_OFF;
unsigned int __read_mostly vpmu_features = 0;
-static void parse_vpmu_params(char *s);
+static int parse_vpmu_params(const char *s);
custom_param("vpmu", parse_vpmu_params);
static DEFINE_SPINLOCK(vpmu_lock);
@@ -61,7 +61,7 @@ static unsigned vpmu_count;
static DEFINE_PER_CPU(struct vcpu *, last_vcpu);
-static int parse_vpmu_param(char *s, unsigned int len)
+static int parse_vpmu_param(const char *s, unsigned int len)
{
if ( !*s || !len )
return 0;
@@ -76,9 +76,9 @@ static int parse_vpmu_param(char *s, unsigned int len)
return 0;
}
-static void __init parse_vpmu_params(char *s)
+static int __init parse_vpmu_params(const char *s)
{
- char *sep, *p = s;
+ const char *sep, *p = s;
switch ( parse_bool(s) )
{
@@ -104,10 +104,11 @@ static void __init parse_vpmu_params(char *s)
opt_vpmu_enabled = 1;
break;
}
- return;
+ return 0;
error:
printk("VPMU: unknown flags: %s - vpmu disabled!\n", s);
+ return -EINVAL;
}
void vpmu_lvtpc_update(uint32_t val)
--
2.12.3
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-08-16 12:52 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 12:51 [PATCH v3 00/52] Support for modifying parameters at runtime Juergen Gross
2017-08-16 12:51 ` [PATCH v3 01/52] xen/arch/arm/acpi/boot.c: let custom parameter parsing routines return errno Juergen Gross
2017-08-16 12:51 ` [PATCH v3 02/52] xen/arch/arm/domain_build.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 03/52] xen/arch/arm/traps.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 04/52] xen/arch/x86/apic.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 05/52] xen/arch/x86/cpu/mcheck/mce.c: " Juergen Gross
2017-08-16 12:51 ` Juergen Gross [this message]
2017-08-16 12:51 ` [PATCH v3 07/52] xen/arch/x86/dom0_build.c: " Juergen Gross
2017-08-16 13:58 ` Jan Beulich
2017-08-16 12:51 ` [PATCH v3 08/52] xen/arch/x86/genapic/probe.c: " Juergen Gross
2017-08-16 13:59 ` Jan Beulich
2017-08-16 12:51 ` [PATCH v3 09/52] xen/arch/x86/hvm/viridian.c: " Juergen Gross
2017-08-21 8:33 ` Paul Durrant
2017-08-21 11:02 ` Juergen Gross
2017-08-21 11:45 ` Paul Durrant
2017-08-16 12:51 ` [PATCH v3 10/52] xen/arch/x86/hvm/vmx/vmcs.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 11/52] xen/arch/x86/io_apic.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 12/52] xen/arch/x86/irq.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 13/52] xen/arch/x86/microcode.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 14/52] xen/arch/x86/mm.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 15/52] xen/arch/x86/nmi.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 16/52] xen/arch/x86/numa.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 17/52] xen/arch/x86/oprofile/nmi_int.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 18/52] xen/arch/x86/psr.c: " Juergen Gross
2017-08-22 9:51 ` Jan Beulich
2017-08-23 11:30 ` Juergen Gross
2017-08-16 12:51 ` [PATCH v3 19/52] xen/arch/x86/setup.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 20/52] xen/arch/x86/shutdown.c: " Juergen Gross
2017-08-22 9:53 ` Jan Beulich
[not found] ` <599C1B340200007800171DD1@suse.com>
2017-08-23 8:40 ` Juergen Gross
2017-08-23 8:48 ` Jan Beulich
2017-08-16 12:51 ` [PATCH v3 21/52] xen/arch/x86/time.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 22/52] xen/arch/x86/x86_64/mmconfig-shared.c: " Juergen Gross
2017-08-22 9:55 ` Jan Beulich
2017-08-23 11:49 ` Juergen Gross
2017-08-16 12:51 ` [PATCH v3 23/52] xen/common/core_parking.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 24/52] xen/common/domain.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 25/52] xen/common/efi/boot.c: " Juergen Gross
2017-08-22 9:56 ` Jan Beulich
2017-08-16 12:51 ` [PATCH v3 26/52] xen/common/kexec.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 27/52] xen/common/memory.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 28/52] xen/common/sched_credit2.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 29/52] xen/drivers/acpi/tables.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 30/52] xen/drivers/char/console.c: " Juergen Gross
2017-08-16 12:51 ` [PATCH v3 31/52] xen/drivers/cpufreq/cpufreq.c: " Juergen Gross
2017-08-22 10:01 ` Jan Beulich
2017-08-16 12:51 ` [PATCH v3 32/52] xen/drivers/passthrough/amd/iommu_acpi.c: " Juergen Gross
2017-08-16 12:52 ` [PATCH v3 33/52] xen/drivers/passthrough/iommu.c: " Juergen Gross
2017-08-22 10:04 ` Jan Beulich
[not found] ` <599C1DC70200007800171E22@suse.com>
2017-08-23 9:27 ` Juergen Gross
2017-08-23 9:37 ` Jan Beulich
[not found] ` <599D68F302000078001726B9@suse.com>
2017-08-23 9:49 ` Juergen Gross
2017-08-16 12:52 ` [PATCH v3 34/52] xen/drivers/passthrough/pci.c: " Juergen Gross
2017-08-22 10:07 ` Jan Beulich
[not found] ` <599C1E770200007800171E25@suse.com>
2017-08-23 9:28 ` Juergen Gross
2017-08-16 12:52 ` [PATCH v3 35/52] xen/drivers/passthrough/vtd/dmar.c: " Juergen Gross
2017-08-16 12:52 ` [PATCH v3 36/52] xen/drivers/passthrough/vtd/quirks.c: " Juergen Gross
2017-08-16 12:52 ` [PATCH v3 37/52] xen/drivers/video/vesa.c: " Juergen Gross
2017-08-16 12:52 ` [PATCH v3 38/52] xen/xsm/flask/flask_op.c: " Juergen Gross
2017-08-16 12:52 ` [PATCH v3 39/52] xen: check parameter validity when parsing command line Juergen Gross
2017-08-22 11:24 ` Jan Beulich
[not found] ` <599C307A0200007800171EFF@suse.com>
2017-08-23 9:30 ` Juergen Gross
2017-08-23 9:38 ` Jan Beulich
2017-08-23 12:42 ` Juergen Gross
2017-08-23 13:18 ` Jan Beulich
[not found] ` <599D9CC10200007800172970@suse.com>
2017-08-23 14:21 ` Juergen Gross
2017-08-23 14:38 ` Jan Beulich
2017-08-16 12:52 ` [PATCH v3 40/52] xen/arch/x86/apic.c: remove custom_param() error messages Juergen Gross
2017-08-16 12:52 ` [PATCH v3 41/52] xen/arch/x86/cpu/mcheck/mce.c: " Juergen Gross
2017-08-16 12:52 ` [PATCH v3 42/52] xen/arch/x86/hvm/viridian.c: " Juergen Gross
2017-08-16 12:52 ` [PATCH v3 43/52] xen/arch/x86/io_apic.c: " Juergen Gross
2017-08-16 12:52 ` [PATCH v3 44/52] xen/common/kexec.c: " Juergen Gross
2017-08-16 12:52 ` [PATCH v3 45/52] xen/common/sched_credit2.c: " Juergen Gross
2017-08-16 12:52 ` [PATCH v3 46/52] xen: carve out a generic parsing function from _cmdline_parse() Juergen Gross
2017-08-16 12:52 ` [PATCH v3 47/52] xen: add basic support for runtime parameter changing Juergen Gross
2017-08-22 11:27 ` Jan Beulich
2017-08-16 12:52 ` [PATCH v3 48/52] xen: add hypercall for setting parameters at runtime Juergen Gross
2017-08-22 11:31 ` Jan Beulich
[not found] ` <599C32330200007800171F47@suse.com>
2017-08-23 9:52 ` Juergen Gross
2017-08-23 10:02 ` Jan Beulich
2017-08-16 12:52 ` [PATCH v3 49/52] libxc: add function to set hypervisor parameters Juergen Gross
2017-08-22 14:15 ` Wei Liu
2017-08-16 12:52 ` [PATCH v3 50/52] libxl: add libxl_set_parameters() function Juergen Gross
2017-08-22 14:15 ` Wei Liu
2017-08-16 12:52 ` [PATCH v3 51/52] xl: add new xl command set-parameters Juergen Gross
2017-08-16 12:52 ` [PATCH v3 52/52] xen: make some console related parameters settable at runtime Juergen Gross
2017-08-22 11:33 ` Jan Beulich
2017-08-22 14:16 ` Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170816125219.5255-7-jgross@suse.com \
--to=jgross@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).