qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qemu-options.hx: Replace deprecated -M example
@ 2025-12-02  0:57 dave
  2025-12-02  7:14 ` Thomas Huth
  0 siblings, 1 reply; 4+ messages in thread
From: dave @ 2025-12-02  0:57 UTC (permalink / raw)
  To: qemu-trivial, mjt, laurent, thuth; +Cc: jak, qemu-devel, Dr. David Alan Gilbert

From: "Dr. David Alan Gilbert" <dave@treblig.org>

The -M option was deprecated by -machine in 2011 by 80f52a669
and isn't actually documented in the manpage, but is still used in
one of the examples.  Replace it by -machine.
-M still gets used all over the place in other docs, and I'm
not sure I realised it was deprecated until Julian pointed out it
wasn't actually documented.

Reported-by: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
---
 qemu-options.hx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qemu-options.hx b/qemu-options.hx
index fca2b7bc74..9cd0b7173c 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -481,7 +481,7 @@ SRST
 
     ::
 
-        -M pc \
+        -machine pc \
         -smp 1,sockets=2,maxcpus=2 \
         -numa node,nodeid=0 -numa node,nodeid=1 \
         -numa cpu,node-id=0,socket-id=0 -numa cpu,node-id=1,socket-id=1
-- 
2.52.0



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

* Re: [PATCH] qemu-options.hx: Replace deprecated -M example
  2025-12-02  0:57 [PATCH] qemu-options.hx: Replace deprecated -M example dave
@ 2025-12-02  7:14 ` Thomas Huth
  2025-12-02  7:47   ` Paolo Bonzini
  2025-12-02 12:30   ` Dr. David Alan Gilbert
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Huth @ 2025-12-02  7:14 UTC (permalink / raw)
  To: dave, qemu-trivial, mjt, laurent; +Cc: jak, qemu-devel

On 02/12/2025 01.57, dave@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <dave@treblig.org>
> 
> The -M option was deprecated by -machine in 2011 by 80f52a669
> and isn't actually documented in the manpage, but is still used in
> one of the examples.  Replace it by -machine.
> -M still gets used all over the place in other docs, and I'm
> not sure I realised it was deprecated until Julian pointed out it
> wasn't actually documented.

-M is not mentioned in docs/about/deprecated.rst, so no, it's not officially 
deprecated. And I think it's a nice short hand feature for an option that is 
used very often, so I also don't think that we should ever remove it. Thus I 
think it would be better to simply add it back to qemu-options.hx instead.

  Thomas



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

* Re: [PATCH] qemu-options.hx: Replace deprecated -M example
  2025-12-02  7:14 ` Thomas Huth
@ 2025-12-02  7:47   ` Paolo Bonzini
  2025-12-02 12:30   ` Dr. David Alan Gilbert
  1 sibling, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2025-12-02  7:47 UTC (permalink / raw)
  To: Thomas Huth, dave, qemu-trivial, mjt, laurent; +Cc: jak, qemu-devel

On 12/2/25 08:14, Thomas Huth wrote:
> On 02/12/2025 01.57, dave@treblig.org wrote:
>> From: "Dr. David Alan Gilbert" <dave@treblig.org>
>>
>> The -M option was deprecated by -machine in 2011 by 80f52a669
>> and isn't actually documented in the manpage, but is still used in
>> one of the examples.  Replace it by -machine.
>> -M still gets used all over the place in other docs, and I'm
>> not sure I realised it was deprecated until Julian pointed out it
>> wasn't actually documented.
> 
> -M is not mentioned in docs/about/deprecated.rst, so no, it's not 
> officially deprecated. And I think it's a nice short hand feature for an 
> option that is used very often, so I also don't think that we should 
> ever remove it. Thus I think it would be better to simply add it back to 
> qemu-options.hx instead.

Yes, its status as a synonym of -machine started only in 2015, in a 
commit that didn't even mention that effect:

     commit 364c3e6b8dd7912e01d19122d791b8c8f6df4f6c
     Author: Marcel Apfelbaum <marcel@redhat.com>
     Date:   Wed Jan 7 14:11:38 2015 +0200

     vl.c: fix regression when reading machine type from config file

     After 'Machine as QOM' series the machine type input triggers
     the creation of the machine class.
     If the machine type is set in the configuration file, the machine
     class is not updated accordingly and remains the default.

     Fixed that by querying the machine options after the configuration
     file is loaded.

     Cc: qemu-stable@nongnu.org
     Reported-by: William Dauchy <william@gandi.net>
     Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
     Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

(I wonder who's the guy that committed it).  But it was a good idea, and 
there's no need to change this.

Paolo



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

* Re: [PATCH] qemu-options.hx: Replace deprecated -M example
  2025-12-02  7:14 ` Thomas Huth
  2025-12-02  7:47   ` Paolo Bonzini
@ 2025-12-02 12:30   ` Dr. David Alan Gilbert
  1 sibling, 0 replies; 4+ messages in thread
From: Dr. David Alan Gilbert @ 2025-12-02 12:30 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-trivial, mjt, laurent, jak, qemu-devel

* Thomas Huth (thuth@redhat.com) wrote:
> On 02/12/2025 01.57, dave@treblig.org wrote:
> > From: "Dr. David Alan Gilbert" <dave@treblig.org>
> > 
> > The -M option was deprecated by -machine in 2011 by 80f52a669
> > and isn't actually documented in the manpage, but is still used in
> > one of the examples.  Replace it by -machine.
> > -M still gets used all over the place in other docs, and I'm
> > not sure I realised it was deprecated until Julian pointed out it
> > wasn't actually documented.
> 
> -M is not mentioned in docs/about/deprecated.rst, so no, it's not officially
> deprecated. And I think it's a nice short hand feature for an option that is
> used very often, so I also don't think that we should ever remove it. Thus I
> think it would be better to simply add it back to qemu-options.hx instead.

Fair enough; I wasn't too sure which way this would go - I'm pretty
sure I'd always used -M, but there again I saw libvirt used -machine
now, and I'd frequently confused -m and -M so it did make some sense
to move away from it.

I'll cut another patch adding -M back.

Dave

>  Thomas
> 
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/


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

end of thread, other threads:[~2025-12-02 12:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-02  0:57 [PATCH] qemu-options.hx: Replace deprecated -M example dave
2025-12-02  7:14 ` Thomas Huth
2025-12-02  7:47   ` Paolo Bonzini
2025-12-02 12:30   ` Dr. David Alan Gilbert

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