Commit Graph

69 Commits

Author SHA1 Message Date
Paolo Bonzini e8105ebb94 vl.c: avoid preprocessor directives in a printf call
Similar to the qemu-img.c patch, but I also have to unescape remaining
% signs in qemu-options.hx.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>
2010-02-08 12:12:40 +03:00
Paolo Bonzini bec7c2d414 do not interpolate % from vl.c to qemu-options.h
Since qemu-options.h is only used in vl.c, we can avoid using
brittle interpolation from a generated file.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>
2010-02-08 12:12:40 +03:00
Markus Armbruster 40ea285c14 qdev: update help on -device
While there, use "property" rather than "option", for consistency with
-global.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03 12:39:01 -06:00
Stefan Weil 95d5f08bad Documentation: Add missing texi description for command line options
Some more command line options had entries for command line help,
but documentation for texi and derived formats (man, html, info)
was missing.

For conditional options, the texi documentation was added
unconditionally.

This seems reasonable because typically man pages are
shared, and html users expect to see one documentation
(not several nearly identical documents for the different
systems).

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-26 15:42:01 -06:00
Stefan Weil 69a319d131 Documentation: Improve command line help for -device option
* Fix column for help text.

* Give some more help, especially for the new '?' parameters.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-26 15:42:01 -06:00
Anthony Liguori 292444cb87 Load global config files by default
A new option, -nodefconfig is introduced to prevent loading from the default
config location.  Otherwise, two configuration files will be searched for,
qemu.conf and target-<TARGET_NAME>.conf.

To ensure that the default configuration is overridden by a user specified
config, we introduce a two stage option parsing mechanism.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-24 09:37:26 -06:00
Amit Shah 98b19252cf virtio-console: qdev conversion, new virtio-serial-bus
This commit converts the virtio-console device to create a new
virtio-serial bus that can host console and generic serial ports. The
file hosting this code is now called virtio-serial-bus.c.

The virtio console is now a very simple qdev device that sits on the
virtio-serial-bus and communicates between the bus and qemu's chardevs.

This commit also includes a few changes to the virtio backing code for
pci and s390 to spawn the virtio-serial bus.

As a result of the qdev conversion, we get rid of a lot of legacy code.
The old-style way of instantiating a virtio console using

    -virtioconsole ...

is maintained, but the new, preferred way is to use

    -device virtio-serial -device virtconsole,chardev=...

With this commit, multiple devices as well as multiple ports with a
single device can be supported.

For multiple ports support, each port gets an IO vq pair. Since the
guest needs to know in advance how many vqs a particular device will
need, we have to set this number as a property of the virtio-serial
device and also as a config option.

In addition, we also spawn a pair of control IO vqs. This is an internal
channel meant for guest-host communication for things like port
open/close, sending port properties over to the guest, etc.

This commit is a part of a series of other commits to get the full
implementation of multiport support. Future commits will add other
support as well as ride on the savevm version that we bump up here.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-20 08:25:23 -06:00
Naphtali Sprei 3f3ed5933a Added drives' readonly option
Signed-off-by: Naphtali Sprei <nsprei@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-20 08:25:22 -06:00
Stefan Weil 3dbf2c7fc5 Documentation: Add missing documentation for qdev related command line options
The command line options -device, -nodefaults, -readconfig,
-writeconfig had entries for command line help, but
documentation for texi and derived formats (man, html, info)
was missing.

This also required moving "@end table" to the end of
qemu-options.hx again.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-20 08:25:22 -06:00
Bruce Rogers ca1a8a0658 make help output be a little more self-consistent
Signed-off-by: Bruce Rogers <brogers@novell.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11 13:41:00 -06:00
H. Peter Anvin c9f398e53f debugcon: support for debugging consoles (e.g. Bochs port 0xe9)
Add generic support for debugging consoles (simple I/O ports which
when written to cause debugging output to be written to a target.)
The current implementation matches Bochs' port 0xe9, allowing the same
debugging code to be used for both Bochs and Qemu.

There is no vm state associated with the debugging port, simply
because it has none -- the entire interface is a single, stateless,
write-only port.

Most of the code was cribbed from the serial port driver.

v2: removed non-ISA variants (they can be introduced when/if someone
wants them, using code from the serial port); added configurable
readback (Bochs returns 0xe9 on a read from this register, mimic that
by default)  This retains the apparently somewhat controversial user
friendly option, however.

v3: reimplemented the user friendly option as a synthetic option
("-debugcon foo" basically ends up being a parser-level shorthand for
"-chardev stdio,id=debugcon -device isa-debugcon,chardev=debugcon") --
this dramatically reduced the complexity while keeping the same level
of user friendliness.

v4: spaces, not tabs.

v5: update to match current top of tree.  Calling qemu_chr_open()
already during parsing no longer works; defer until we are parsing the
other console-like devices.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-08 09:58:40 -06:00
Michael Tokarev 19e65b47f6 Add missing newline at the end of options list
In qemu-kvm this place looks even more "interesting":

 -runas user     Change to user id user just before starting the VM.
 -readconfig <file>
 -writeconfig <file>
                read/write config file-no-kvm         disable KVM hardware virtualization
 -no-kvm-irqchip disable KVM kernel mode PIC/IOAPIC/LAPIC
 -no-kvm-pit     disable KVM kernel mode PIT

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-28 15:22:22 +01:00
Gerd Hoffmann 6ca5582d4f add -qmp convinience switch
Acts like -monitor but switched into qmp mode.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-12 07:59:43 -06:00
Gerd Hoffmann 22a0e04b9b add new -mon switch
Add -mon switch which maps pretty straight forward into the QemuOpts
internal representation:

  -mon chardev=<name>[,mode=[control|readline]][,[no]default]

Via config file:

[mon]
   chardev = "<name>"
   mode = "readline"
   default = "on"

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-12 07:59:43 -06:00
Gerd Hoffmann d8c208dd8a default devices: add global cmd line option.
Add global command line option to disable default devices.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-12 07:59:43 -06:00
Gerd Hoffmann 4e307fc883 Revert "monitor: Command-line flag to enable control mode"
This reverts commit adcb181afe.

Conflicts:

	monitor.h

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-12 07:59:41 -06:00
Gerd Hoffmann d0fef6fbea qdev: add command line option to set global defaults for properties.
This patch adds infrastructure and command line option for setting
global defaults for device properties, i.e. you can for example use

  -global virtio-blk-pci.vectors=0

to turn off msi by default for all virtio block devices.  The config
file syntax is:

[global]
  driver = "virtio-blk-pci"
  property = "vectors"
  value = "0"

This can also be used to set properties for devices which are not
created via -device but implicitly via machine init, i.e.

  -global isa-fdc,driveA=<name>

This patch uses the mechanism which configures properties for the
compatibility machine types (pc-0.10 & friends).  The command line
takes precedence over the machine type values.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-12 07:59:40 -06:00
Luiz Capitulino adcb181afe monitor: Command-line flag to enable control mode
This commit adds a flag called 'control' to the '-monitor'
command-line option. This flag enables control mode.

The syntax is:

qemu [...] -monitor control,<device>

Where <device> is a chardev (excluding 'vc', for obvious reasons).

For example:

$ qemu [...] -monitor control,tcp:localhost:4444,server

Will run QEMU in control mode, waiting for a client TCP connection
on localhost port 4444.

NOTE: I've tried using QemuOpts for this, but turns out that it
will try to parse the device part, which should be untouched.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03 09:41:21 -06:00
Gerd Hoffmann 715a664ac4 QemuOpts: command line switches for the config file.
Adds -readconfig and -writeconfig command line switches to read/write
QemuOpts from config file.

In theory you should be able to do:

  qemu < machine config cmd line switches here > -writeconfig vm.cfg
  qemu -readconfig vm.cfg

In practice it will not work.  Not all command line switches are
converted to QemuOpts, so you'll have to keep the not-yet converted ones
on the second line.  Also there might be bugs lurking which prevent even
the converted ones from working correctly.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-09 08:43:13 -06:00
Matthew Booth 7273a2dbcc Documentation: Add documentation for -chardev
Adds documentation for all -chardev backends.

Signed-off-by: Matthew Booth <mbooth@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-09 08:43:12 -06:00
Mark McLoughlin baf74c9580 net: add a vnet_hdr=on|off parameter
This allows people to disable the IFF_VNET_HDR flag, e.g. for debugging
purposes or if they know they may migrate the guest to a machine without
IFF_VNET_HDR support.

It also allows making the lack of IFF_VNET_HDR support an error
condition, e.g. in the case where a guest is being migrated from a host
which does support it.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:29:00 -05:00
Mark McLoughlin 76682299a8 net: import linux tap ioctl definitions
Making features dependent on the availability of newer versions if_tun.h
is going to get seriously clumsy, so let's just import the definitions
we need. It's only a small handful.

If and when we're comfortable depending on 2.6.30 headers, we can remove
this again.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:29:00 -05:00
Kevin Wolf be8b28a940 Documentation: Move msmouse description to an appropriate place
Putting it right in the middle of the explanation for "-serial udp" probably
wasn't the best idea.

Patchworks-ID: 35603
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-15 09:32:03 -05:00
Kevin Wolf 4e257e5e81 Documentation: Add missing tags to placeholders
Not all placeholders in options descriptions had the @var tag on them. Add the
tag so that it's clearly visible that they are placeholders.

Patchworks-ID: 35602
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-15 09:32:03 -05:00
Kevin Wolf b3f046c296 Documentation: Highlight placeholders in suboptions
Currently, suboptions (i.e. something like file=file for -drive) are rendered
as @code, so we're losing any @var highlighting in the man pages.

Replace them by @option, so that you actually can see what is a placeholder and
what is meant verbatim.

Patchworks-ID: 35601
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-15 09:32:03 -05:00
Mark McLoughlin a1ea458fdf net: add -netdev option
Patchworks-ID: 35506
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-15 09:32:01 -05:00
Dustin Kirkland 0ca9f8a42d offer right-ctrl as a grab option
Add support for -ctrl-grab to use the right-ctrl button to grab/release
the mouse in SDL.

The multi-button ctrl-alt and ctrl-alt-shift grab buttons present an
accessibility problem to users who cannot press more than one button
at a time.

https://bugs.edge.launchpad.net/ubuntu/+source/qemu-kvm/+bug/237635

Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-06 14:36:09 -05:00
Jan Kiszka 6875204c78 Enable host-clock-based RTC
Switch RTC emulations to the new host_clock instead of vm_clock by
default. This has the advantage that the emulated RTC will follow
automatically the host time while it might be tuned via NTP. vm_clock
can still be selected by passing '-rtc clock=vm' on the command line.

Note that some RTC emulations (at least M48T59) already use the host
time unconditionally while others (namely MC146818) do not. This patch
introduces the required infrastructure for selecting the base clock but
only converts MC146818 for now.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-05 09:32:45 -05:00
Jan Kiszka 1ed2fc1fa3 Refactor RTC command line switches
Deprecate -localtime, -setdate and -rtc-td-hack in favor of a new
unified command line switch:

    -rtc [base=utc|localtime|date][,driftfix=none|slew]

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-05 09:32:45 -05:00
Gerd Hoffmann 191bc01bc9 switch chardev to QemuOpts: infrastructure, null device
start switching chardevs to QemuOpts.  This patch adds the
infrastructure and converts the null device.

The patch brings two new functions:

qemu_chr_open_opts()
	same as qemu_chr_open(), but uses QemuOpts instead of a
	option char string.

qemu_chr_parse_compat()
	accepts a traditional chardev option string, returns the
	corresponding QemuOpts instance, to handle backward
	compatibility.

The patch also adds a new -chardev switch which can be used to create
named+unconnected chardevs, like this:

	-chardev null,id=test

This uses the new qemu_chr_open_opts.  Thus with this patch alone only
the null device works.  The other devices will follow ...

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11 10:19:47 -05:00
Andre Przywara 58a04db187 add documentation for multi-core features
extend QEMU's internal help and man page to cover the recently
added multi-core feature.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:26 -05:00
Christoph Hellwig 5c6c3a6c54 raw-posix: add Linux native AIO support
Now that do have a nicer interface to work against we can add Linux native
AIO support.  It's an extremly thing layer just setting up an iocb for
the io_submit system call in the submission path, and registering an
eventfd with the qemu poll handler to do complete the iocbs directly
from there.

This started out based on Anthony's earlier AIO patch, but after
estimated 42,000 rewrites and just as many build system changes
there's not much left of it.

To enable native kernel aio use the aio=native sub-command on the
drive command line.  I have also added an option to qemu-io to
test the aio support without needing a guest.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 20:30:22 -05:00
Anthony Liguori 0d6b0b1d81 Make the e1000 the default network adapter for the pc target.
The ne2k is an ancient card that performs pretty terribly under QEMU.  In many
modern OSes, there is no longer drivers available for the ne2k.

Switch the default network adapter to e1000.  This card is more widely
suppported and performs rather well under QEMU.  There may be very old OSes
that had a ne2k driver but not an e1000 driver but I think this is likely the
exception.

I think the average user is better served with an e1000 vs ne2k.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:46:48 -05:00
Anthony Liguori 4a1418e07b Unbreak large mem support by removing kqemu
kqemu introduces a number of restrictions on the i386 target.  The worst is that
it prevents large memory from working in the default build.

Furthermore, kqemu is fundamentally flawed in a number of ways.  It relies on
the TSC as a time source which will not be reliable on a multiple processor
system in userspace.  Since most modern processors are multicore, this severely
limits the utility of kqemu.

kvm is a viable alternative for people looking to accelerate qemu and has the
benefit of being supported by the upstream Linux kernel.  If someone can
implement work arounds to remove the restrictions introduced by kqemu, I'm
happy to avoid and/or revert this patch.

N.B. kqemu will still function in the 0.11 series but this patch removes it from
the 0.12 series.

Paul, please Ack or Nack this patch.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:02:55 -05:00
Gerd Hoffmann d058fe03e5 QemuOpts: add -set option
One use case will be file for drives (no filename quoting issues), i.e.

	-drive id=test,if=virtio
	-set drive.test.file=/vmdisk/test-virtio.img

It will work for any other option (assuming handled by QemuOpts) though.
Except for id= for obvious reasons ;).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:
2009-08-10 13:05:26 -05:00
Jes Sorensen 6be68d7eb9 Introduce -smp , maxcpus= flag to specify maximum number of CPUS.
Follow on patch will use it to determine the size of the MADT and
other BIOS tables.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-27 14:09:14 -05:00
Gerd Hoffmann bd3c948db7 qdev: add -device command line option.
The -device switch is the users frontend to the qdev_device_add function
added by the previous patch.

Also adds a linked list where command line options can be saved.
Use it for the new -device and for the -usbdevice and -bt switches.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-27 08:39:29 -05:00
Jan Kiszka 2221dde5d4 Update boot option documentation
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16 08:28:12 -05:00
Anthony Liguori 52249f0f3c Disable kqemu by default at run time
-no-kqemu -> -enable-kqemu

kqemu is still present at compile time by default

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-09 17:28:08 -05:00
Andi Kleen 1889465a1c Allow setting qemu process name v2
Set the Linux process name to the name argument specified with name. I find
this useful to see which guests are taking CPU time in top.

This doesn't affect ps, which checks argv[0], but rewriting the
environment uses much more code, so I only used this simple way.

v2: Use separate process= argument, no prefixes.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-09 16:58:08 -05:00
Kevin Wolf 0aa217e461 qcow2: Make cache=writethrough default
The performance of qcow2 has improved meanwhile, so we don't need to
special-case it any more. Switch the default to write-through caching
like all other block drivers.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-09 16:06:37 -05:00
Mark McLoughlin fc5b81d1f6 net: set a default value for sndbuf=
On reflection, perhaps it does make sense to set a default value for
the sndbuf= tap parameter.

For best effect, sndbuf= should be set to just below the capacity of
the physical NIC.

Setting it higher will cause packets to be dropped before the limit
is hit. Setting it much lower will not cause any problems unless
you set it low enough such that the guest cannot queue up new packets
before the NIC has emptied its queue.

In Linux, txqueuelen=1000 by default for ethernet NICs. Given a 1500
byte MTU, 1Mb is a good choice for sndbuf.

If it turns out that txqueuelen is actually much lower than this, then
sndbuf is essentially disabled. In the event that txqueuelen is much
higher, it's unlikely that the NIC will be able to empty a 1Mb queue.

Thanks to Herbert Xu for this logic.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Cc: Herbert Xu <herbert.xu@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-09 16:06:37 -05:00
Markus Armbruster 7d4c3d535c Replace -no-virtio-balloon by -balloon
We want to do (at least) two things to the virtio-balloon device:
suppress it, and control its PCI address.  Option -no-virtio-balloon
lets us do only the former.  To get the latter, replace
-no-virtio-balloon with

    -balloon none   disable balloon device
    -balloon virtio[,addr=str]
                    enable virtio balloon device (default)

Syntax suggested by Anthony Liguori.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:08 -05:00
Alexander Graf 7677f05d84 Add documentation for Multiboot
The documentation shows how to use -kernel and friends for booting Linux,
but obviously knows nothing about multiboot yet.

Let's include some documentation for multiboot, so people know how to fully
exploit this cool new feature.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:06 -05:00
Jan Kiszka 3c6a05803c slirp: Bind support for host forwarding rules
Extend the hostfwd rule format so that the user can specify on which
host interface qemu should listen for incoming connections. If omitted,
binding will takes place against all interfaces.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 08:52:45 -05:00
Jan Kiszka c92ef6a22d slirp: Rework external configuration interface
With the internal IP configuration made more flexible, we can now
enhance the user interface. This patch adds a number of new options to
"-net user": net (address and mask), host, dhcpstart, dns and smbserver.
It also renames "redir" to "hostfwd" and "channel" to "guestfwd" in
order to (hopefully) clarify their meanings. The format of guestfwd is
extended so that the user can define not only the port but also the
virtual server's IP address the forwarding starts from.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 08:52:45 -05:00
Jan Kiszka ad196a9d0c slirp: Move smb, redir, tftp and bootp parameters and -net channel
So far a couple of slirp-related parameters were expressed via
stand-alone command line options. This it inconsistent and unintuitive.
Moreover, it prevents both dynamically reconfigured (host_net_add/
delete) and multi-instance slirp.

This patch refactors the configuration by turning -smb, -redir, -tftp
and -bootp as well as -net channel into options of "-net user". The old
stand-alone command line options are still processed, but no longer
advertised. This allows smooth migration of management applications to
to the new syntax and also the extension of that syntax later in this
series.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 08:52:44 -05:00
Michael S. Tsirkin ffe6370c9f qemu/net: flag to control the number of vectors a nic has
Add an option to specify the number of MSI-X vectors for PCI NIC cards. This
can also be used to disable MSI-X, for compatibility with old qemu. This
option currently only affects virtio cards.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-24 09:09:15 -05:00
Mark McLoughlin 0df0ff6de7 net: add '-net tap,sndbuf=nbytes'
2.6.30 adds a new TUNSETSNDBUF ioctl() which allows a send buffer limit
for the tap device to be specified. When this limit is reached, a tap
write() will return EAGAIN and poll() will indicate the fd isn't
writable.

This allows people to tune their setups so as to avoid e.g. UDP packet
loss when the sending application in the guest out-runs the NIC in the
host.

There is no obviously sensible default setting - a suitable value
depends mostly on the capabilities of the physical NIC through which the
packets are being sent.

Also, note that when using a bridge with netfilter enabled, we currently
never get EAGAIN because netfilter causes the packet to be immediately
orphaned. Set /proc/sys/net/bridge/bridge nf-call-iptables to zero to
disable this behaviour.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-22 10:15:30 -05:00
Markus Armbruster c2cc47a449 Support addr=... in option argument of -drive if=virtio
Make drive_init() accept addr=, put the value into struct DriveInfo.
Use it in all the places that create virtio-blk-pci devices:
pc_init1(), bamboo_init(), mpc8544ds_init().

Don't support addr= in third argument of monitor command pci_add and
second argument of drive_add, because that clashes with their first
arguments.  Admittedly unelegant.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-22 10:15:29 -05:00