* Re: [Qemu-devel] Re: [FOR 0.12 PATCH v3 10/21] default devices: add global cmd line option.
[not found] <1236361906.1375741260288537008.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com>
@ 2009-12-08 16:11 ` Paolo Bonzini
2009-12-08 16:32 ` Daniel P. Berrange
2009-12-08 16:34 ` Gerd Hoffmann
0 siblings, 2 replies; 6+ messages in thread
From: Paolo Bonzini @ 2009-12-08 16:11 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
> > > Add global command line option to disable default devices.
> >
> > Should -readconfig imply this?
>
> Hmm, not sure. Why do you think this would be useful?
Here is my thinking: if you used -writeconfig, your machine description
is (at least in theory) entirely included in the config file including
(again in theory) the default devices. So, if the machine description
has no parallel port, QEMU should not create a default one when you load
it with -readconfig.
It's not really about usefulness in other words; it's more whether you
think it fits in -{read,write}config's design or not.
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Re: [FOR 0.12 PATCH v3 10/21] default devices: add global cmd line option.
2009-12-08 16:11 ` [Qemu-devel] Re: [FOR 0.12 PATCH v3 10/21] default devices: add global cmd line option Paolo Bonzini
@ 2009-12-08 16:32 ` Daniel P. Berrange
2009-12-08 16:34 ` Gerd Hoffmann
1 sibling, 0 replies; 6+ messages in thread
From: Daniel P. Berrange @ 2009-12-08 16:32 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Gerd Hoffmann, qemu-devel
On Tue, Dec 08, 2009 at 11:11:29AM -0500, Paolo Bonzini wrote:
> > > > Add global command line option to disable default devices.
> > >
> > > Should -readconfig imply this?
> >
> > Hmm, not sure. Why do you think this would be useful?
>
> Here is my thinking: if you used -writeconfig, your machine description
> is (at least in theory) entirely included in the config file including
> (again in theory) the default devices. So, if the machine description
> has no parallel port, QEMU should not create a default one when you load
> it with -readconfig.
Shouldn't -writeconfig just add '-nodefaults' to the config it
generates ?
That way if someone instead creates a configfile by hand, copying in
their existing QEMU args they still get default devices which matches
behaviour of their existing CLI args.
Regards,
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Re: [FOR 0.12 PATCH v3 10/21] default devices: add global cmd line option.
2009-12-08 16:11 ` [Qemu-devel] Re: [FOR 0.12 PATCH v3 10/21] default devices: add global cmd line option Paolo Bonzini
2009-12-08 16:32 ` Daniel P. Berrange
@ 2009-12-08 16:34 ` Gerd Hoffmann
2009-12-08 16:39 ` Paolo Bonzini
1 sibling, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2009-12-08 16:34 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
On 12/08/09 17:11, Paolo Bonzini wrote:
>>>> Add global command line option to disable default devices.
>>>
>>> Should -readconfig imply this?
>>
>> Hmm, not sure. Why do you think this would be useful?
>
> Here is my thinking: if you used -writeconfig, your machine description
> is (at least in theory) entirely included in the config file including
> (again in theory) the default devices.
The default devices are *not* included by in the file created by
-writeconfig. So I tend to thing -readconfig should not automagically
turn on -nodefaults to avoid unpleasent surprises for users.
Devices created via -readconfig are treated like devices created via
[device] sections in the config file. So it doesn't matter whenever you
configure your isa-serial device via command line or config file, in any
case it will make qemu not create the default serial port.
cheers,
Gerd
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Re: [FOR 0.12 PATCH v3 10/21] default devices: add global cmd line option.
2009-12-08 16:34 ` Gerd Hoffmann
@ 2009-12-08 16:39 ` Paolo Bonzini
0 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2009-12-08 16:39 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
> > Here is my thinking: if you used -writeconfig, your machine description
> > is (at least in theory) entirely included in the config file including
> > (again in theory) the default devices.
>
> The default devices are *not* included by in the file created by
> -writeconfig.
Yes, that's why I wrote "at least in theory". It doesn't now but that
would be a bug, because it makes -nodefaults another legacy option that
has to be remembered and passed again upon -readconfig.
> Devices created via -readconfig are treated like devices created via
> [device] sections in the config file. So it doesn't matter whenever you
> configure your isa-serial device via command line or config file, in any
> case it will make qemu not create the default serial port.
I was thinking about the case when you don't want at all a particular
default device.
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration.
@ 2009-12-07 12:42 Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 10/21] default devices: add global cmd line option Gerd Hoffmann
0 siblings, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
Hi,
Qemu creates a bunch of default devices (serial, parallel, vga, ...) if
the user didn't specify one on the command line. Unfortunaly this
doesn't work well with the qdev way of doing things because this logic
is tied to the -serial, -parallel, ... command line switches. Devices
created via -device are ignored. This patch set fixes this. It also
adds a command line switch to disable all default devices and does a few
cleanups in the code touched anyway.
New in v3: Rebased against latest master. Two patches (qmp monitor +
s390 console) came into the way. Because the way how serial lines and
the monitor are initialized changes quite heavily it looked alot cleaner
to me just revert those patches, apply the v2 patches, then reimplement
the two patches on top of that.
For the snake of simplifying testing of this series three patches where
added (patches 13,14,15) which are already in staging. They can just be
dropped when merging. When needed I can create a v4 without them (after
they got merged into master).
Luiz + Alex, please have a closer look at this.
http://repo.or.cz/w/qemu/kraxel.git/shortlog/refs/heads/default.v3
thanks,
Gerd
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [FOR 0.12 PATCH v3 10/21] default devices: add global cmd line option.
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
@ 2009-12-07 12:42 ` Gerd Hoffmann
2009-12-08 12:46 ` [Qemu-devel] " Paolo Bonzini
0 siblings, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2009-12-07 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, agraf, lcapitulino
Add global command line option to disable default devices.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
qemu-options.hx | 5 +++++
vl.c | 6 ++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/qemu-options.hx b/qemu-options.hx
index b65fd74..70929fa 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1878,6 +1878,11 @@ DEF("incoming", HAS_ARG, QEMU_OPTION_incoming, \
STEXI
ETEXI
+DEF("nodefaults", 0, QEMU_OPTION_nodefaults, \
+ "-nodefaults don't create default devices.\n")
+STEXI
+ETEXI
+
#ifndef _WIN32
DEF("chroot", HAS_ARG, QEMU_OPTION_chroot, \
"-chroot dir Chroot to dir just before starting the VM.\n")
diff --git a/vl.c b/vl.c
index a99e0fe..f02b333 100644
--- a/vl.c
+++ b/vl.c
@@ -5460,6 +5460,12 @@ int main(int argc, char **argv, char **envp)
case QEMU_OPTION_incoming:
incoming = optarg;
break;
+ case QEMU_OPTION_nodefaults:
+ default_serial = 0;
+ default_parallel = 0;
+ default_monitor = 0;
+ default_vga = 0;
+ break;
#ifndef _WIN32
case QEMU_OPTION_chroot:
chroot_dir = optarg;
--
1.6.5.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-12-08 16:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1236361906.1375741260288537008.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com>
2009-12-08 16:11 ` [Qemu-devel] Re: [FOR 0.12 PATCH v3 10/21] default devices: add global cmd line option Paolo Bonzini
2009-12-08 16:32 ` Daniel P. Berrange
2009-12-08 16:34 ` Gerd Hoffmann
2009-12-08 16:39 ` Paolo Bonzini
2009-12-07 12:42 [Qemu-devel] [FOR 0.12 PATCH v3 00/21] default devices: qdev integration Gerd Hoffmann
2009-12-07 12:42 ` [Qemu-devel] [FOR 0.12 PATCH v3 10/21] default devices: add global cmd line option Gerd Hoffmann
2009-12-08 12:46 ` [Qemu-devel] " Paolo Bonzini
2009-12-08 15:58 ` Gerd Hoffmann
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).