xen/hypfs: fix loglvl parameter setting
PATCH 1/1 xen/hypfs: fix loglvl parameter setting
Writing the runtime parameters loglvl or guest_loglvl omits setting the new length of the resulting parameter value.
--- xen/drivers/char/console.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-)
xen/drivers/char/console.c +15 -4
@@ -241,14 +241,25 @@ static int _parse_loglvl(const char *s, int *lower, int *upper, char *val)static int parse_loglvl (const char *s) { -return _parse_loglvl (s, &xenlog_lower_thresh, &xenlog_upper_thresh, - xenlog_val); +int ret; + + ret =_parse_loglvl (s, &xenlog_lower_thresh, &xenlog_upper_thresh, + xenlog_val); +custom_runtime_set_var (param_2_parfs (parse_loglvl), xenlog_val); + +return ret; }static int parse_guest_loglvl (const char *s) { -return _parse_loglvl (s, &xenlog_guest_lower_thresh, - &xenlog_guest_upper_thresh, xenlog_guest_val); +int ret; + + ret =_parse_loglvl (s, &xenlog_guest_lower_thresh, + &xenlog_guest_upper_thresh, xenlog_guest_val); +custom_runtime_set_var (param_2_parfs (parse_guest_loglvl), + xenlog_guest_val); + +return ret; }static char *loglvl_str (int lvl)
Signature · 1 line
2.26.2
Hi Juergen,
Quoted 5 lines · Juergen Gross
Writing the runtime parameters loglvl or
guest_loglvlomits setting the new length of the resulting parameter value.Reported-by George Dunlap <[email protected]>Signed-off-by Juergen Gross <[email protected]>
Although one unrelated comment below.
Quoted 9 lines
--- xen/drivers/char/console.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-)xen/drivers/char/console.c +0
-0
xen/drivers/char/console.c static int _parse_loglvl(const char *s, int *lower, int *upper, char *val) · line 248
Quoted 10 lines
xen/drivers/char/console.c +5
-2@@ -241,14 +241,25 @@ static int _parse_loglvl(const char *s, int *lower, int *upper, char *val)static int parse_loglvl (const char *s) { -return _parse_loglvl (s, &xenlog_lower_thresh, &xenlog_upper_thresh, - xenlog_val); +int ret; + + ret =_parse_loglvl (s, &xenlog_lower_thresh, &xenlog_upper_thresh, + xenlog_val); +custom_runtime_set_var (param_2_parfs (parse_loglvl), xenlog_val);
Mixing function and variable name is pretty confusing. It took me sometimes to go through the macro maze to figure out what's happening.
It might be worth thinking to document more the custom_runtime_* interface.
Cheers,
Signature · 1 line
Julien Grall
Quoted 35 lines · Julien Grall
Hi Juergen,
Quoted 5 lines · Juergen Gross
Writing the runtime parameters loglvl or
guest_loglvlomits setting the new length of the resulting parameter value.Reported-by George Dunlap <[email protected]>Signed-off-by Juergen Gross <[email protected]>Reviewed-by Julien Grall <[email protected]>Although one unrelated comment below.
Quoted 9 lines
---
xen/drivers/char/console.c| 19 +++++++++++++++----1 file changed, 15 insertions(+), 4 deletions(-)xen/drivers/char/console.c +0
-0xen/drivers/char/console.c static int _parse_loglvl(const char *s, int · line 248
Quoted 10 lines
xen/drivers/char/console.c +5
-2@@ -241,14 +241,25 @@ static int _parse_loglvl(const char *s, int *lower, int *upper, char *val) static int parse_loglvl(const char *s) { - return _parse_loglvl(s, &xenlog_lower_thresh, &xenlog_upper_thresh, - xenlog_val); + int ret; + + ret = _parse_loglvl(s, &xenlog_lower_thresh, &xenlog_upper_thresh, + xenlog_val); + custom_runtime_set_var(param_2_parfs(parse_loglvl), xenlog_val);Mixing function and variable name is pretty confusing. It took me sometimes to go through the macro maze to figure out what's happening.
Quoted 1 line
It might be worth thinking to document more the custom_runtime_* interface.
I have already some streamlining ideas for 4.15.
Juergen
Quoted 38 lines · Jürgen Groß
Quoted 36 lines · Julien Grall
Hi Juergen,
Quoted 5 lines · Juergen Gross
Writing the runtime parameters loglvl or
guest_loglvlomits setting the new length of the resulting parameter value.Reported-by George Dunlap <[email protected]>Signed-off-by Juergen Gross <[email protected]>Reviewed-by Julien Grall <[email protected]>Although one unrelated comment below.
Quoted 9 lines
--- xen/drivers/char/console.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-)xen/drivers/char/console.c +0
-0xen/drivers/char/console.c static int _parse_loglvl(const char *s, int · line 248
Quoted 10 lines
xen/drivers/char/console.c +5
-2@@ -241,14 +241,25 @@ static int _parse_loglvl(const char *s, int *lower, int *upper, char *val)static int parse_loglvl (const char *s) { -return _parse_loglvl (s, &xenlog_lower_thresh, &xenlog_upper_thresh, - xenlog_val); +int ret; + + ret =_parse_loglvl (s, &xenlog_lower_thresh, &xenlog_upper_thresh, + xenlog_val); +custom_runtime_set_var (param_2_parfs (parse_loglvl), xenlog_val);Mixing function and variable name is pretty confusing. It took me sometimes to go through the macro maze to figure out what's happening.
Quoted 3 lines
Quoted 1 line
It might be worth thinking to document more the custom_runtime_* interface.
I have already some streamlining ideas for 4.15.
Cool! I will commit it tomorrow morning.
Cheers,
Quoted 39 lines · Julien Grall
Quoted 38 lines · Jürgen Groß
Quoted 36 lines · Julien Grall
Hi Juergen,
Quoted 5 lines · Juergen Gross
Writing the runtime parameters loglvl or
guest_loglvlomits setting the new length of the resulting parameter value.Reported-by George Dunlap <[email protected]>Signed-off-by Juergen Gross <[email protected]>Reviewed-by Julien Grall <[email protected]>Although one unrelated comment below.
Quoted 9 lines
--- xen/drivers/char/console.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-)xen/drivers/char/console.c +0
-0xen/drivers/char/console.c static int _parse_loglvl(const char *s, int · line 248
Quoted 10 lines
xen/drivers/char/console.c +5
-2@@ -241,14 +241,25 @@ static int _parse_loglvl(const char *s, int *lower, int *upper, char *val)static int parse_loglvl (const char *s) { -return _parse_loglvl (s, &xenlog_lower_thresh, &xenlog_upper_thresh, - xenlog_val); +int ret; + + ret =_parse_loglvl (s, &xenlog_lower_thresh, &xenlog_upper_thresh, + xenlog_val); +custom_runtime_set_var (param_2_parfs (parse_loglvl), xenlog_val);Mixing function and variable name is pretty confusing. It took me sometimes to go through the macro maze to figure out what's happening.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
It might be worth thinking to document more the custom_runtime_* interface.
I have already some streamlining ideas for 4.15.
Cool! I will commit it tomorrow morning.
Actually I am missing a Released-acked-by from Paul on this patch.
Cheers,
Signature · 1 line
Julien Grall
Quoted 52 lines
-----Original Message-----
From: Julien Grall <[email protected]>
Sent: 11 June 2020 10:20
To: Julien Grall <[email protected]>; Jürgen Groß <[email protected]>; Paul Durrant <[email protected]>
Cc: xen-devel <[email protected]>; Andrew Cooper <[email protected]>; George Dunlap <[email protected]>; Ian Jackson <[email protected]>; Jan Beulich <[email protected]>; Stefano Stabellini <[email protected]>; Wei Liu <[email protected]>
Subject: Re: [PATCH for-4.14] xen/hypfs: fix loglvl parameter settingQuoted 39 lines · Julien Grall
Quoted 38 lines · Jürgen Groß
Quoted 36 lines · Julien Grall
Hi Juergen,
Quoted 5 lines · Juergen Gross
Writing the runtime parameters loglvl or
guest_loglvlomits setting the new length of the resulting parameter value.Reported-by George Dunlap <[email protected]>Signed-off-by Juergen Gross <[email protected]>Reviewed-by Julien Grall <[email protected]>Although one unrelated comment below.
Quoted 9 lines
--- xen/drivers/char/console.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-)xen/drivers/char/console.c +0
-0xen/drivers/char/console.c static int _parse_loglvl(const char *s, int · line 248
Quoted 10 lines
xen/drivers/char/console.c +5
-2@@ -241,14 +241,25 @@ static int _parse_loglvl(const char *s, int *lower, int *upper, char *val)static int parse_loglvl (const char *s) { -return _parse_loglvl (s, &xenlog_lower_thresh, &xenlog_upper_thresh, - xenlog_val); +int ret; + + ret =_parse_loglvl (s, &xenlog_lower_thresh, &xenlog_upper_thresh, + xenlog_val); +custom_runtime_set_var (param_2_parfs (parse_loglvl), xenlog_val);Mixing function and variable name is pretty confusing. It took me sometimes to go through the macro maze to figure out what's happening.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
It might be worth thinking to document more the custom_runtime_* interface.
I have already some streamlining ideas for 4.15.
Cool! I will commit it tomorrow morning.
Actually I am missing a Released-acked-by from Paul on this patch.
Quoted 4 lines
Cheers,
--
Julien Grall