All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] tools/xl: Fix regular expression for autobaloon mode detection based on xen command line.
       [not found] <cover.1631555561.git.isaikin-dmitry@yandex.ru>
@ 2021-09-13 18:26 ` Dmitry Isaikin
  2021-09-14 11:08   ` Ian Jackson
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Isaikin @ 2021-09-13 18:26 UTC (permalink / raw)
  To: xen-devel; +Cc: Dmitry Isaikin, Ian Jackson, Wei Liu, Anthony PERARD

The case of specifying a negative size was handled incorrectly.

From misc/xen-command-line documentation:

dom0_mem (x86)
= List of ( min:<sz> | max:<sz> | <sz> )

If a size is positive, it represents an absolute value.
If a size is negative, it is subtracted from the total available memory.
---
 tools/xl/xl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/xl/xl.c b/tools/xl/xl.c
index 4107d10fd4..a9f7e769fd 100644
--- a/tools/xl/xl.c
+++ b/tools/xl/xl.c
@@ -81,7 +81,7 @@ static int auto_autoballoon(void)
         return 1; /* default to on */
 
     ret = regcomp(&regex,
-                  "(^| )dom0_mem=((|min:|max:)[0-9]+[bBkKmMgG]?,?)+($| )",
+                  "(^| )dom0_mem=((|min:|max:)-?[0-9]+[bBkKmMgG]?,?)+($| )",
                   REG_NOSUB | REG_EXTENDED);
     if (ret)
         return 1;
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] tools/xl: Fix regular expression for autobaloon mode detection based on xen command line.
  2021-09-13 18:26 ` [PATCH 1/1] tools/xl: Fix regular expression for autobaloon mode detection based on xen command line Dmitry Isaikin
@ 2021-09-14 11:08   ` Ian Jackson
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Jackson @ 2021-09-14 11:08 UTC (permalink / raw)
  To: Dmitry Isaikin; +Cc: xen-devel, Wei Liu, Anthony PERARD

Dmitry Isaikin writes ("[PATCH 1/1] tools/xl: Fix regular expression for autobaloon mode detection based on xen command line."):
> The case of specifying a negative size was handled incorrectly.

Thank you.  The change looks good to me.  Did you test that after your
change, the functionality works ?

Ian.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-14 11:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1631555561.git.isaikin-dmitry@yandex.ru>
2021-09-13 18:26 ` [PATCH 1/1] tools/xl: Fix regular expression for autobaloon mode detection based on xen command line Dmitry Isaikin
2021-09-14 11:08   ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.