This makes it behave slightly more like a regular boolean option.
Signed-off-by: Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>
Slightly RFC, because there is no easy way of making the opposite "normal
boolean" case work for no-vpmu.
---
xen/arch/x86/cpu/vpmu.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c
index 4fedc7c57012..501d4f0af94e 100644
--- a/xen/arch/x86/cpu/vpmu.c
+++ b/xen/arch/x86/cpu/vpmu.c
@@ -66,7 +66,9 @@ static int __init cf_check parse_vpmu_params(const char *s)
if ( !ss )
ss = strchr(s, '\0');
- if ( (val = parse_bool(s, ss)) >= 0 )
+ if ( s == ss )
+ opt_vpmu_enabled = true;
+ else if ( (val = parse_bool(s, ss)) >= 0 )
{
opt_vpmu_enabled = val;
if ( !val )
--
2.11.0