Man page: Add -global description
A message that is not in the archive (sent off-list or not yet received): e75eb36d-b680-4cb5-bf90-f95c2273f47c@zmail17.collab.prod.int.phx2.redhat.com
There's only TODO information in qemu man page for -global option. This is a basic description of this option with simple example.
Patch:
--
qemu-options.hx +6 -2
@@ -292,9 +292,13 @@ DEF("global", HAS_ARG, QEMU_OPTION_global, " set a global default for a driver property\n", QEMU_ARCH_ALL) STEXI -@item -global +@item -global @var{driver}.@var{property}=@var{value} @findex -global -TODO +Set a default value of the @var{driver}'s @var{property} to the @var{value}, e.g.: + +@example +qemu -global ide-drive.physical_block_size=524 -drive file=file,if=ide,index=0,media=disk +@end example ETEXI DEF("mtdblock", HAS_ARG, QEMU_OPTION_mtdblock,
Il 13/03/2012 19:09, Miroslav Rezanina ha scritto:
Quoted 3 lines
+@example
+qemu -global ide-drive.physical_block_size=524 -drive file=file,if=ide,index=0,media=disk +@end example
Let's use something that works, such as 4096 instead of 524. :)
Paolo
----- Original Message -----
Quoted 7 lines
From: "Paolo Bonzini" <[email protected]>
To: "Miroslav Rezanina" <[email protected]>
Cc: [email protected]
Sent: Wednesday, March 14, 2012 8:42:00 AM
Subject: Re: Man page: Add -global descriptionIl 13/03/2012 19:09, Miroslav Rezanina ha scritto:
Quoted 9 lines
Quoted 4 lines
+@example
+qemu -global ide-drive.physical_block_size=524 -drive file=file,if=ide,index=0,media=disk
+@end exampleLet's use something that works, such as 4096 instead of 524. :)
Paolo
Yeah, I was thinking what value to use - 524 was choosed as non-standard but used value. However, you're right - something more standard would be probably better and 4096 is the best candidate.
Mirek
PATCH v2 1/1 Man page: Add -global description
In reply to Miroslav RezaninaThere's only TODO information in qemu man page for -global option. This is a basic description of this option with simple example.
Patch:
--
qemu-options.hx +6 -2
@@ -292,9 +292,13 @@ DEF("global", HAS_ARG, QEMU_OPTION_global, " set a global default for a driver property\n", QEMU_ARCH_ALL) STEXI -@item -global +@item -global @var{driver}.@var{property}=@var{value} @findex -global -TODO +Set default value of @var{driver}'s @var{property} to @var{value}, e.g.: + +@example +qemu -global ide-drive.physical_block_size=4096 -drive file=file,if=ide,index=0 +@end example ETEXI DEF("mtdblock", HAS_ARG, QEMU_OPTION_mtdblock,
Quoted 16 lines · Miroslav Rezanina
There's only TODO information in qemu man page for -global option. This is a basic description of this option with simple example.
Signed-off-by Miroslav Rezanina <[email protected]>Patch:
--qemu-options.hx +1
-1@@ -292,9 +292,13 @@ DEF("global", HAS_ARG, QEMU_OPTION_global, " set a global default for a driver property\n", QEMU_ARCH_ALL) STEXI -@item -global +@item -global @var{driver}.@var{property}=@var{value}
qemu-options.hx DEF("global", HAS_ARG, QEMU_OPTION_global, · line 304
Quoted 10 lines
qemu-options.hx +5
-1@findex -global -TODO +Set default value of @var{driver}'s @var{property} to @var{value}, e.g.: + +@example +qemu -global ide-drive.physical_block_size=4096 -drive file=file,if=ide,index=0 +@end example ETEXI DEF("mtdblock", HAS_ARG, QEMU_OPTION_mtdblock,
Much better than nothing. Stefan, would you like to take this through your trivial queue?
Quoted 8 lines · Miroslav Rezanina
qemu-options.hx +0
-0@@ -292,9 +292,13 @@ DEF("global", HAS_ARG, QEMU_OPTION_global, " set a global default for a driver property\n", QEMU_ARCH_ALL)STEXI
-@item -global
+@item -global @var{driver}.@var{property}=@var{value}
We seem to use @var{prop}, not @var{property}, elsewhere in the docs.
Quoted 8 lines
@findex -global
qemu-options.hx +5
-1-TODO +Set default value of @var{driver}'s @var{property} to @var{value}, e.g.: + +@example +qemu -global ide-drive.physical_block_size=4096 -drive file=file,if=ide,index=0 +@end exampleETEXI
This is missing any motivation for why you would want to actually use this option. How about:
"In particular, you can use this to set driver properties for devices which are created automatically by the machine model. (To create a device which is not created automatically and set properties on it, use -device.)"
?
That's still not great, but I think it helps a little.
(ideally if -device/-global are the new standard interface we should have a section explaining the general concepts and syntax and then documentation of how to do specific things like networking via -device, and relegate all the 'legacy' options to a section clearly marked as 'legacy' with pointers back to the new ways of doing the same thing. That would be a much bigger job, though.)
-- PMM
Quoted 30 lines · Peter Maydell
qemu-options.hx DEF("global", HAS_ARG, QEMU_OPTION_global, · line 295
Quoted 8 lines · Miroslav Rezanina
qemu-options.hx +1
-1@@ -292,9 +292,13 @@ DEF("global", HAS_ARG, QEMU_OPTION_global, " set a global default for a driver property\n", QEMU_ARCH_ALL) STEXI -@item -global +@item -global @var{driver}.@var{property}=@var{value}We seem to use @var{prop}, not @var{property}, elsewhere in the docs.
qemu-options.hx DEF("global", HAS_ARG, QEMU_OPTION_global, · line 302
Quoted 8 lines
qemu-options.hx +5
-1@findex -global -TODO +Set default value of @var{driver}'s @var{property} to @var{value}, e.g.: + +@example +qemu -global ide-drive.physical_block_size=4096 -drive file=file,if=ide,index=0 +@end example ETEXIThis is missing any motivation for why you would want to actually use this option. How about:
"In particular, you can use this to set driver properties for devices which are created automatically by the machine model. (To create a device which is not created automatically and set properties on it, use -device.)"
?
Quoted 8 lines
That's still not great, but I think it helps a little.
(ideally if -device/-global are the new standard interface we should have a section explaining the general concepts and syntax and then documentation of how to do specific things like networking via -device, and relegate all the 'legacy' options to a section clearly marked as 'legacy' with pointers back to the new ways of doing the same thing. That would be a much bigger job, though.)
Just while we're here, I'll be posting the following shortly:
commit 82aff428155d469ab705294486cc26cb34947999
Author: Anthony Liguori <[email protected]> Date: Fri Dec 23 11:30:45 2011 -0600
qdev: don't allow globals to be set by bus name
This is technically a compatibility breaker. However:
1) libvirt does not rely on this (it always uses the driver name)
2) This behavior isn't actually documented anywhere (the docs just say driver).
3) I suspect there are less than three people on earth that even know this is possible (minus the people reading this message).
So I think we can safely break it :-)
Regards,
Anthony Liguori
Quoted 3 lines
-- PMM
Quoted 10 lines · Anthony Liguori
Just while we're here, I'll be posting the following shortly:
commit
82aff428155d469ab705294486cc26cb34947999Author: Anthony Liguori <[email protected]> Date: Fri Dec 23 11:30:45 2011 -0600qdev: don't allow globals to be set by bus name
This is technically a compatibility breaker. However:
Quoted 8 lines
1) libvirt does not rely on this (it always uses the driver name)
2) This behavior isn't actually documented anywhere (the docs just say driver).
3) I suspect there are less than three people on earth that even know this is possible (minus the people reading this message).
So I think we can safely break it :-)
Go right ahead. We shouldn't tie ourselves up in knots over undocumented behavior, unless there's clear evidence of use.
Hi,
Quoted 7 lines
commit
82aff428155d469ab705294486cc26cb34947999Author: Anthony Liguori <[email protected]> Date: Fri Dec 23 11:30:45 2011 -0600qdev: don't allow globals to be set by bus name
So I think we can safely break it :-)
There are compat properties using that (turn off new pci features on old releases for all pci devices).
cheers,
Gerd
Il 16/03/2012 10:24, Gerd Hoffmann ha scritto:
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
commit
82aff428155d469ab705294486cc26cb34947999Author: Anthony Liguori <[email protected]> Date: Fri Dec 23 11:30:45 2011 -0600qdev: don't allow globals to be set by bus name
So I think we can safely break it :-)There are compat properties using that (turn off new pci features on old releases for all pci devices).
It could be changed to a compat property on the abstract PCI device class (with changes to look up global properties on the whole hierarchy of course).
Paolo
----- Original Message -----
Quoted 8 lines
From: "Peter Maydell" <[email protected]>
To: "Miroslav Rezanina" <[email protected]>
Cc: [email protected]
Sent: Wednesday, March 14, 2012 7:21:30 PM
Subject: Re: [Qemu-devel] [PATCH v2] Man page: Add -global descriptionOn 14 March 2012 08:53, Miroslav Rezanina <[email protected]> wrote:
Quoted 11 lines
Quoted 8 lines
qemu-options.hx +0
-0@@ -292,9 +292,13 @@ DEF("global", HAS_ARG, QEMU_OPTION_global, " set a global default for a driver property\n", QEMU_ARCH_ALL)STEXI
-@item -global
+@item -global @var{driver}.@var{property}=@var{value}We seem to use @var{prop}, not @var{property}, elsewhere in the docs.
You're right, I reused naming from DEF part...both has to be updated.
Quoted 20 lines
Quoted 10 lines
@findex -global
qemu-options.hx +1
-1-TODO +Set default value of @var{driver}'s @var{property} to @var{value},e.g.:
qemu-options.hx +3
-0+ +@example +qemu -global ide-drive.physical_block_size=4096 -drivefile=file,if=ide,index=0
+@end example
ETEXIThis is missing any motivation for why you would want to actually use this option. How about:
"In particular, you can use this to set driver properties for devices which
are created automatically by the machine model. (To create a device which is
not created automatically and set properties on it, use -device.)"
Quoted 4 lines
?
That's still not great, but I think it helps a little.
Yeah, more use case should be stated but I do not think man page is good place for extensive user motivation.
Quoted 12 lines
(ideally if -device/-global are the new standard interface we should have a
section explaining the general concepts and syntax and then documentation of
how to do specific things like networking via -device, and relegate all the
'legacy' options to a section clearly marked as 'legacy' with pointers back
to the new ways of doing the same thing. That would be a much bigger job,
though.)
Agree, man page is really behind the code. However, I think documenting new interfaces should be done first to agree on them and their usage. After new way is known extracting old interface as legacy stuff would be easier.
Quoted 2 lines
-- PMM
Anyway, I will resend this patch with updates you recommended.
Mirek
PATCH v3 1/1 Man page: Add -global description
In reply to Miroslav RezaninaThere's only TODO information in qemu man page for -global option. This is a basic description of this option with simple example.
Patch:
--
qemu-options.hx +9 -3
@@ -288,13 +288,19 @@ TODO ETEXI DEF("global", HAS_ARG, QEMU_OPTION_global, - "-global driver.property=value\n" + "-global driver.prop=value\n" " set a global default for a driver property\n", QEMU_ARCH_ALL) STEXI -@item -global +@item -global @var{driver}.@var{prop}=@var{value} @findex -global -TODO +Set default value of @var{driver}'s property @var{prop} to @var{value}, e.g.: + +@example +qemu -global ide-drive.physical_block_size=4096 -drive file=file,if=ide,index=0,media=disk +@end example + +In particular, you can use this to set driver properties for devices which are created automatically by the machine model. To create a device which is not created automatically and set properties on it, use -@option{device}. ETEXI DEF("mtdblock", HAS_ARG, QEMU_OPTION_mtdblock,
Quoted 20 lines · Miroslav Rezanina
There's only TODO information in qemu man page for -global option. This is a basic description of this option with simple example.
Signed-off-by Miroslav Rezanina <[email protected]>Patch:
--qemu-options.hx +1
-2@@ -288,13 +288,19 @@ TODO ETEXI DEF("global", HAS_ARG, QEMU_OPTION_global, - "-global driver.property=value\n" + "-global driver.prop=value\n" " set a global default for a driver property\n", QEMU_ARCH_ALL) STEXI -@item -global
qemu-options.hx TODO · line 303
Quoted 10 lines
qemu-options.hx +8
-1+@item -global @var{driver}.@var{prop}=@var{value} @findex -global -TODO +Set default value of @var{driver}'s property @var{prop} to @var{value}, e.g.: + +@example +qemu -global ide-drive.physical_block_size=4096 -drive file=file,if=ide,index=0,media=disk +@end example + +In particular, you can use this to set driver properties for devices which are created automatically by the machine model. To create a device which is not created automatically and set properties on it, use -@option{device}.
Long line, please wrap.
Quoted 3 lines
qemu-options.hx +0
-0ETEXI DEF("mtdblock", HAS_ARG, QEMU_OPTION_mtdblock,
PATCH v4 1/1 Man page: Add -global description
In reply to Miroslav RezaninaThere's only TODO information in qemu man page for -global option. This is a basic description of this option with simple example.
v4:
- break long line
v3:
- add use case description
- use prop instead of property
v2:
- Use better value in example
Patch:
--
qemu-options.hx +11 -3
@@ -288,13 +288,21 @@ TODO ETEXI DEF("global", HAS_ARG, QEMU_OPTION_global, - "-global driver.property=value\n" + "-global driver.prop=value\n" " set a global default for a driver property\n", QEMU_ARCH_ALL) STEXI -@item -global +@item -global @var{driver}.@var{prop}=@var{value} @findex -global -TODO +Set default value of @var{driver}'s property @var{prop} to @var{value}, e.g.: + +@example +qemu -global ide-drive.physical_block_size=4096 -drive file=file,if=ide,index=0,media=disk +@end example + +In particular, you can use this to set driver properties for devices which are +created automatically by the machine model. To create a device which is not +created automatically and set properties on it, use -@option{device}. ETEXI DEF("mtdblock", HAS_ARG, QEMU_OPTION_mtdblock,
Quoted 34 lines · Miroslav Rezanina
There's only TODO information in qemu man page for -global option. This is a basic description of this option with simple example.
Signed-off-by Miroslav Rezanina <[email protected]>v4:
- break long linev3:
- add use case description
- use prop instead of propertyv2:
- Use better value in example
Patch:
--qemu-options.hx +4
-3@@ -288,13 +288,21 @@ TODO ETEXI DEF("global", HAS_ARG, QEMU_OPTION_global, - "-global driver.property=value\n" + "-global driver.prop=value\n" " set a global default for a driver property\n", QEMU_ARCH_ALL) STEXI -@item -global +@item -global @var{driver}.@var{prop}=@var{value} @findex -global -TODO +Set default value of @var{driver}'s property @var{prop} to @var{value}, e.g.: +
qemu-options.hx TODO · line 308
Quoted 10 lines
qemu-options.hx +7
-0+@example +qemu -global ide-drive.physical_block_size=4096 -drive file=file,if=ide,index=0,media=disk +@end example + +In particular, you can use this to set driver properties for devices which are +created automatically by the machine model. To create a device which is not +created automatically and set properties on it, use -@option{device}. ETEXI DEF("mtdblock", HAS_ARG, QEMU_OPTION_mtdblock,
This is a clear improvement. Cc'ing Anthony, the qdev maintainer in all but name ;)
Anthony Liguori
AppliedQuoted 3 lines · Miroslav Rezanina
There's only TODO information in qemu man page for -global option. This is a basic description of this option with simple example.
Signed-off-by Miroslav Rezanina<[email protected]>
Applied. Thanks.
Regards,
Anthony Liguori
Quoted 43 lines
v4:
- break long linev3:
- add use case description
- use prop instead of propertyv2:
- Use better value in example
Patch:
--qemu-options.hx +11
-3@@ -288,13 +288,21 @@ TODO ETEXI DEF("global", HAS_ARG, QEMU_OPTION_global, - "-global driver.property=value\n" + "-global driver.prop=value\n" " set a global default for a driver property\n", QEMU_ARCH_ALL) STEXI -@item -global +@item -global @var{driver}.@var{prop}=@var{value} @findex -global -TODO +Set default value of @var{driver}'s property @var{prop} to @var{value}, e.g.: + +@example +qemu -global ide-drive.physical_block_size=4096 -drive file=file,if=ide,index=0,media=disk +@end example + +In particular, you can use this to set driver properties for devices which are +created automatically by the machine model. To create a device which is not +created automatically and set properties on it, use -@option{device}. ETEXI DEF("mtdblock", HAS_ARG, QEMU_OPTION_mtdblock,