qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2] Machine queue, 2018-06-25
@ 2018-06-25 22:41 Eduardo Habkost
  2018-06-25 22:41 ` [Qemu-devel] [PULL 1/2] vl.c: do not allow --daemonize in combination with --preconfig CLI option Eduardo Habkost
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Eduardo Habkost @ 2018-06-25 22:41 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel
  Cc: Marcel Apfelbaum, Paolo Bonzini, Markus Armbruster,
	Michael S. Tsirkin, Eduardo Habkost

The following changes since commit 35e238c9330669882487f9929e0aa97900431853:

  Merge remote-tracking branch 'remotes/kraxel/tags/audio-20180625-pull-request' into staging (2018-06-25 15:25:26 +0100)

are available in the Git repository at:

  git://github.com/ehabkost/qemu.git tags/machine-next-pull-request

for you to fetch changes up to 08fe68244eb44f3c8ccecd35066eca8392d1345a:

  hw/i386: Deprecate the machine types pc-0.10 and pc-0.11 (2018-06-25 14:10:01 -0300)

----------------------------------------------------------------
Machine queue, 2018-06-25

* Don't support --daemonize and --preconfig together
* Deprecate machine types pc-0.10 and pc-0.11

----------------------------------------------------------------

Queue for Machine Core patches


Igor Mammedov (1):
  vl.c: do not allow --daemonize in combination with --preconfig CLI
    option

Thomas Huth (1):
  hw/i386: Deprecate the machine types pc-0.10 and pc-0.11

 include/hw/boards.h |  3 +++
 hw/i386/pc_piix.c   |  1 +
 vl.c                | 16 ++++++++++++++--
 qemu-doc.texi       |  5 +++++
 4 files changed, 23 insertions(+), 2 deletions(-)

-- 
2.18.0.rc1.1.g3f1ff2140

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

* [Qemu-devel] [PULL 1/2] vl.c: do not allow --daemonize in combination with --preconfig CLI option
  2018-06-25 22:41 [Qemu-devel] [PULL 0/2] Machine queue, 2018-06-25 Eduardo Habkost
@ 2018-06-25 22:41 ` Eduardo Habkost
  2018-06-25 22:41 ` [Qemu-devel] [PULL 2/2] hw/i386: Deprecate the machine types pc-0.10 and pc-0.11 Eduardo Habkost
  2018-06-26 12:54 ` [Qemu-devel] [PULL 0/2] Machine queue, 2018-06-25 Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Eduardo Habkost @ 2018-06-25 22:41 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel
  Cc: Marcel Apfelbaum, Paolo Bonzini, Markus Armbruster,
	Michael S. Tsirkin, Eduardo Habkost, Igor Mammedov

From: Igor Mammedov <imammedo@redhat.com>

some users when using --daemonize expect that QEMU will parse CLI options,
initialize VM and only then complete daemonzation by signalling lead
process to exit and start listening on monitor socket. So users treat
parent process exit as sync point to connect to QEMU's monitor.

That however doesn't work when --preconfig options is used, since it
provides monitor before completing daemonization and expects user to
issue exit-preconfig command when additional configuration via monitor
is finished. We also can't move completing daemonization before
preconfig monitor becomes available, since that would imply:
  * partially loosing ability to configure QEMU instance in --preconfig
    mode since QEMU might drop privileges, chroot and do other things
    when daemonization is completed
  * lead to loss of error messages in case they would happen after
    daemonization

Be proactive now and make options mutually exclusive, so users would
get clear error message instead of waiting for lead process exit
indefinitely before connecting to monitor.

PS:
In case someone would come up with usecase where both options should
be enabled at the same time we could drop this restriction as far
as daemonization point is left where it is now (os_setup_post).

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <1529501059-163139-1-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 vl.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/vl.c b/vl.c
index d451f45dc5..a37dfe4684 100644
--- a/vl.c
+++ b/vl.c
@@ -4134,6 +4134,12 @@ int main(int argc, char **argv, char **envp)
     }
 
     if (is_daemonized()) {
+        if (!preconfig_exit_requested) {
+            error_report("'preconfig' and 'daemonize' options are "
+                         "mutually exclusive");
+            exit(EXIT_FAILURE);
+        }
+
         /* According to documentation and historically, -nographic redirects
          * serial port, parallel port and monitor to stdio, which does not work
          * with -daemonize.  We can redirect these to null instead, but since
-- 
2.18.0.rc1.1.g3f1ff2140

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

* [Qemu-devel] [PULL 2/2] hw/i386: Deprecate the machine types pc-0.10 and pc-0.11
  2018-06-25 22:41 [Qemu-devel] [PULL 0/2] Machine queue, 2018-06-25 Eduardo Habkost
  2018-06-25 22:41 ` [Qemu-devel] [PULL 1/2] vl.c: do not allow --daemonize in combination with --preconfig CLI option Eduardo Habkost
@ 2018-06-25 22:41 ` Eduardo Habkost
  2018-06-26 12:54 ` [Qemu-devel] [PULL 0/2] Machine queue, 2018-06-25 Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Eduardo Habkost @ 2018-06-25 22:41 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel
  Cc: Marcel Apfelbaum, Paolo Bonzini, Markus Armbruster,
	Michael S. Tsirkin, Eduardo Habkost, Thomas Huth

From: Thomas Huth <thuth@redhat.com>

The oldest machine type which is still used in a still maintained distro
is a pc-0.12 based machine type in RHEL6, so everything that is older
than pc-0.12 should not be used anymore. Thus let's deprecate pc-0.10
and pc-0.11 so that we can finally remove them in a future release.

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1529917512-10528-1-git-send-email-thuth@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 include/hw/boards.h |  3 +++
 hw/i386/pc_piix.c   |  1 +
 vl.c                | 10 ++++++++--
 qemu-doc.texi       |  5 +++++
 4 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/include/hw/boards.h b/include/hw/boards.h
index ef7457f5dd..79069ddcbe 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -107,6 +107,8 @@ typedef struct {
 
 /**
  * MachineClass:
+ * @deprecation_reason: If set, the machine is marked as deprecated. The
+ *    string should provide some clear information about what to use instead.
  * @max_cpus: maximum number of CPUs supported. Default: 1
  * @min_cpus: minimum number of CPUs supported. Default: 1
  * @default_cpus: number of CPUs instantiated if none are specified. Default: 1
@@ -166,6 +168,7 @@ struct MachineClass {
     char *name;
     const char *alias;
     const char *desc;
+    const char *deprecation_reason;
 
     void (*init)(MachineState *state);
     void (*reset)(void);
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index e9b6f064fb..d357907b0b 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -956,6 +956,7 @@ static void pc_i440fx_0_11_machine_options(MachineClass *m)
 {
     pc_i440fx_0_12_machine_options(m);
     m->hw_version = "0.11";
+    m->deprecation_reason = "use a newer machine type instead";
     SET_MACHINE_COMPAT(m, PC_COMPAT_0_11);
 }
 
diff --git a/vl.c b/vl.c
index a37dfe4684..d26f19b06d 100644
--- a/vl.c
+++ b/vl.c
@@ -2560,8 +2560,9 @@ static gint machine_class_cmp(gconstpointer a, gconstpointer b)
             if (mc->alias) {
                 printf("%-20s %s (alias of %s)\n", mc->alias, mc->desc, mc->name);
             }
-            printf("%-20s %s%s\n", mc->name, mc->desc,
-                   mc->is_default ? " (default)" : "");
+            printf("%-20s %s%s%s\n", mc->name, mc->desc,
+                   mc->is_default ? " (default)" : "",
+                   mc->deprecation_reason ? " (deprecated)" : "");
         }
     }
 
@@ -4263,6 +4264,11 @@ int main(int argc, char **argv, char **envp)
 
     configure_accelerator(current_machine);
 
+    if (!qtest_enabled() && machine_class->deprecation_reason) {
+        error_report("Machine type '%s' is deprecated: %s",
+                     machine_class->name, machine_class->deprecation_reason);
+    }
+
     /*
      * Register all the global properties, including accel properties,
      * machine properties, and user-specified ones.
diff --git a/qemu-doc.texi b/qemu-doc.texi
index 282bc3dc35..16fcb47901 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -2943,6 +2943,11 @@ support page sizes < 4096 any longer.
 
 @section System emulator machines
 
+@subsection pc-0.10 and pc-0.11 (since 3.0)
+
+These machine types are very old and likely can not be used for live migration
+from old QEMU versions anymore. A newer machine type should be used instead.
+
 @section Device options
 
 @subsection Block device options
-- 
2.18.0.rc1.1.g3f1ff2140

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

* Re: [Qemu-devel] [PULL 0/2] Machine queue, 2018-06-25
  2018-06-25 22:41 [Qemu-devel] [PULL 0/2] Machine queue, 2018-06-25 Eduardo Habkost
  2018-06-25 22:41 ` [Qemu-devel] [PULL 1/2] vl.c: do not allow --daemonize in combination with --preconfig CLI option Eduardo Habkost
  2018-06-25 22:41 ` [Qemu-devel] [PULL 2/2] hw/i386: Deprecate the machine types pc-0.10 and pc-0.11 Eduardo Habkost
@ 2018-06-26 12:54 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2018-06-26 12:54 UTC (permalink / raw)
  To: Eduardo Habkost
  Cc: QEMU Developers, Marcel Apfelbaum, Paolo Bonzini,
	Markus Armbruster, Michael S. Tsirkin

On 25 June 2018 at 23:41, Eduardo Habkost <ehabkost@redhat.com> wrote:
> The following changes since commit 35e238c9330669882487f9929e0aa97900431853:
>
>   Merge remote-tracking branch 'remotes/kraxel/tags/audio-20180625-pull-request' into staging (2018-06-25 15:25:26 +0100)
>
> are available in the Git repository at:
>
>   git://github.com/ehabkost/qemu.git tags/machine-next-pull-request
>
> for you to fetch changes up to 08fe68244eb44f3c8ccecd35066eca8392d1345a:
>
>   hw/i386: Deprecate the machine types pc-0.10 and pc-0.11 (2018-06-25 14:10:01 -0300)
>
> ----------------------------------------------------------------
> Machine queue, 2018-06-25
>
> * Don't support --daemonize and --preconfig together
> * Deprecate machine types pc-0.10 and pc-0.11
>
> ----------------------------------------------------------------
Applied, thanks.

-- PMM

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

end of thread, other threads:[~2018-06-26 12:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-25 22:41 [Qemu-devel] [PULL 0/2] Machine queue, 2018-06-25 Eduardo Habkost
2018-06-25 22:41 ` [Qemu-devel] [PULL 1/2] vl.c: do not allow --daemonize in combination with --preconfig CLI option Eduardo Habkost
2018-06-25 22:41 ` [Qemu-devel] [PULL 2/2] hw/i386: Deprecate the machine types pc-0.10 and pc-0.11 Eduardo Habkost
2018-06-26 12:54 ` [Qemu-devel] [PULL 0/2] Machine queue, 2018-06-25 Peter Maydell

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).