Skip to contentSkip to conversation

linux-user: Drop deprecated -p option

PATCH In review Peter Maydell 6 participants 7 messages Aug 28, 2025 – Aug 30, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user: Drop deprecated -p option

The user-mode '-p' option has been deprecated since 9.0 and doesn't do anything except emit a warning. We are well past our minimum deprecation period, so drop the option.

---
 docs/about/deprecated.rst       | 10 ----------
 docs/about/removed-features.rst |  8 ++++++++
 bsd-user/main.c                 |  8 --------
 linux-user/main.c               | 12 ------------
 4 files changed, 8 insertions(+), 30 deletions(-)
docs/about/deprecated.rst +0 -10
index 58bce715f9c..dfb7882e3da 100644
@@ -68,16 +68,6 @@ configurations (e.g. -smp drawers=1,books=1,clusters=1 for x86 PC machine) is
 marked deprecated since 9.0, users have to ensure that all the topology members
 described with -smp are supported by the target machine.
 
-User-mode emulator command line arguments
------------------------------------------
-
-``-p`` (since 9.0)
-''''''''''''''''''
-
-The ``-p`` option pretends to control the host page size.  However,
-it is not possible to change the host page size, and using the
-option only causes failures.
-
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
 
docs/about/removed-features.rst +8 -0
index b1b3d1b1b3f..06f186991ac 100644
@@ -583,6 +583,14 @@ The ``-singlestep`` option has been given a name that better reflects
 what it actually does. For both linux-user and bsd-user, use the
 ``-one-insn-per-tb`` option instead.
 
+``-p`` (removed in 10.2)
+''''''''''''''''''''''''
+
+The ``-p`` option pretends to control the host page size.  However,
+it is not possible to change the host page size; we stopped trying
+to do anything with the option except print a warning from 9.0,
+and now the option is removed entirely.
+
 
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
bsd-user/main.c +0 -8
index 7e5d4bbce09..9ba69642f50 100644
@@ -367,14 +367,6 @@ int main(int argc, char **argv)
             }
         } else if (!strcmp(r, "L")) {
             interp_prefix = argv[optind++];
-        } else if (!strcmp(r, "p")) {
-            unsigned size, want = qemu_real_host_page_size();
-
-            r = argv[optind++];
-            if (qemu_strtoui(r, NULL, 10, &size) || size != want) {
-                warn_report("Deprecated page size option cannot "
-                            "change host page size (%u)", want);
-            }
         } else if (!strcmp(r, "g")) {
             gdbstub = g_strdup(argv[optind++]);
         } else if (!strcmp(r, "r")) {
linux-user/main.c +0 -12
index 6edeeecef38..7b0ccb6fd60 100644
@@ -340,16 +340,6 @@ static void handle_arg_ld_prefix(const char *arg)
     interp_prefix = strdup(arg);
 }
 
-static void handle_arg_pagesize(const char *arg)
-{
-    unsigned size, want = qemu_real_host_page_size();
-
-    if (qemu_strtoui(arg, NULL, 10, &size) || size != want) {
-        warn_report("Deprecated page size option cannot "
-                    "change host page size (%u)", want);
-    }
-}
-
 static void handle_arg_seed(const char *arg)
 {
     seed_optarg = arg;
@@ -522,8 +512,6 @@ static const struct qemu_argument arg_table[] = {
      "range[,...]","filter logging based on address range"},
     {"D",          "QEMU_LOG_FILENAME", true, handle_arg_log_filename,
      "logfile",     "write logs to 'logfile' (default stderr)"},
-    {"p",          "QEMU_PAGESIZE",    true,  handle_arg_pagesize,
-     "pagesize",   "deprecated change to host page size"},
     {"one-insn-per-tb",
                    "QEMU_ONE_INSN_PER_TB",  false, handle_arg_one_insn_per_tb,
      "",           "run with one guest instruction per emulated TB"},
Signature · 1 line
2.43.0
#1 lore raw
Quoted 11 lines · Peter Maydell

The user-mode '-p' option has been deprecated since 9.0 and doesn't do anything except emit a warning. We are well past our minimum deprecation period, so drop the option.

---

docs/about/deprecated.rst       | 10 ----------
docs/about/removed-features.rst |  8 ++++++++
bsd-user/main.c                 |  8 --------
linux-user/main.c               | 12 ------------
4 files changed, 8 insertions(+), 30 deletions(-)

What about docs/user/main.rst?

Quoted 94 lines
docs/about/deprecated.rst +0 -0
index 58bce715f9c..dfb7882e3da 100644
@@ -68,16 +68,6 @@ configurations (e.g. -smp drawers=1,books=1,clusters=1 for x86 PC machine) is

marked deprecated since 9.0, users have to ensure that all the topology members described with -smp are supported by the target machine.

docs/about/deprecated.rst +0 -10
-User-mode emulator command line arguments
------------------------------------------
-
-``-p`` (since 9.0)
-''''''''''''''''''
-
-The ``-p`` option pretends to control the host page size.  However,
-it is not possible to change the host page size, and using the
-option only causes failures.
-

QEMU Machine Protocol (QMP) commands
------------------------------------

docs/about/removed-features.rst +0 -0
index b1b3d1b1b3f..06f186991ac 100644
@@ -583,6 +583,14 @@ The ``-singlestep`` option has been given a name that better reflects

what it actually does. For both linux-user and bsd-user, use the ``-one-insn-per-tb`` option instead.

+``-p`` (removed in 10.2)
+''''''''''''''''''''''''

docs/about/removed-features.rst +6 -0
+
+The ``-p`` option pretends to control the host page size.  However,
+it is not possible to change the host page size; we stopped trying
+to do anything with the option except print a warning from 9.0,
+and now the option is removed entirely.
+

QEMU Machine Protocol (QMP) commands
------------------------------------

bsd-user/main.c +0 -8
index 7e5d4bbce09..9ba69642f50 100644
@@ -367,14 +367,6 @@ int main(int argc, char **argv)
            }
        } else if (!strcmp(r, "L")) {
            interp_prefix = argv[optind++];
-        } else if (!strcmp(r, "p")) {
-            unsigned size, want = qemu_real_host_page_size();
-
-            r = argv[optind++];
-            if (qemu_strtoui(r, NULL, 10, &size) || size != want) {
-                warn_report("Deprecated page size option cannot "
-                            "change host page size (%u)", want);
-            }
        } else if (!strcmp(r, "g")) {
            gdbstub = g_strdup(argv[optind++]);
        } else if (!strcmp(r, "r")) {
linux-user/main.c +0 -12
index 6edeeecef38..7b0ccb6fd60 100644
@@ -340,16 +340,6 @@ static void handle_arg_ld_prefix(const char *arg)
    interp_prefix = strdup(arg);
 }
 
-static void handle_arg_pagesize(const char *arg)
-{
-    unsigned size, want = qemu_real_host_page_size();
-
-    if (qemu_strtoui(arg, NULL, 10, &size) || size != want) {
-        warn_report("Deprecated page size option cannot "
-                    "change host page size (%u)", want);
-    }
-}
-
 static void handle_arg_seed(const char *arg)
 {
    seed_optarg = arg;
@@ -522,8 +512,6 @@ static const struct qemu_argument arg_table[] = {
     "range[,...]","filter logging based on address range"},
    {"D",          "QEMU_LOG_FILENAME", true, handle_arg_log_filename,
     "logfile",     "write logs to 'logfile' (default stderr)"},
-    {"p",          "QEMU_PAGESIZE",    true,  handle_arg_pagesize,
-     "pagesize",   "deprecated change to host page size"},
    {"one-insn-per-tb",
                   "QEMU_ONE_INSN_PER_TB",  false, handle_arg_one_insn_per_tb,
     "",           "run with one guest instruction per emulated TB"},
Signature · 1 line
2.43.0
#2 lore raw
Quoted 13 lines · Manos Pitsidianakis
Quoted 11 lines · Peter Maydell

The user-mode '-p' option has been deprecated since 9.0 and doesn't do anything except emit a warning. We are well past our minimum deprecation period, so drop the option.

---

docs/about/deprecated.rst       | 10 ----------
docs/about/removed-features.rst |  8 ++++++++
bsd-user/main.c                 |  8 --------
linux-user/main.c               | 12 ------------
4 files changed, 8 insertions(+), 30 deletions(-)
Quoted 1 line

What about docs/user/main.rst?

Thanks. I've squashed that removal while applying.

r~

Reviewed-by on v1 1/1
#3 lore raw
In reply to Peter Maydell
Quoted 11 lines · Peter Maydell

The user-mode '-p' option has been deprecated since 9.0 and doesn't do anything except emit a warning. We are well past our minimum deprecation period, so drop the option.

---
  docs/about/deprecated.rst       | 10 ----------
  docs/about/removed-features.rst |  8 ++++++++
  bsd-user/main.c                 |  8 --------
  linux-user/main.c               | 12 ------------
  4 files changed, 8 insertions(+), 30 deletions(-)
Reviewed-by on v1 1/1
#5 lore raw
In reply to Peter Maydell
Quoted 11 lines · Peter Maydell

The user-mode '-p' option has been deprecated since 9.0 and doesn't do anything except emit a warning. We are well past our minimum deprecation period, so drop the option.

---
  docs/about/deprecated.rst       | 10 ----------
  docs/about/removed-features.rst |  8 ++++++++
  bsd-user/main.c                 |  8 --------
  linux-user/main.c               | 12 ------------
  4 files changed, 8 insertions(+), 30 deletions(-)

r~

Reviewed-by on v1 1/1
#6 lore raw
In reply to Peter Maydell
Quoted 11 lines · Peter Maydell

The user-mode '-p' option has been deprecated since 9.0 and doesn't do anything except emit a warning. We are well past our minimum deprecation period, so drop the option.

---
  docs/about/deprecated.rst       | 10 ----------
  docs/about/removed-features.rst |  8 ++++++++
  bsd-user/main.c                 |  8 --------
  linux-user/main.c               | 12 ------------
  4 files changed, 8 insertions(+), 30 deletions(-)