Commit Graph

70 Commits

Author SHA1 Message Date
MORITA Kazutaka 33b1db1c88 block: add sheepdog driver for distributed storage support
Sheepdog is a distributed storage system for QEMU. It provides highly
available block level storage volumes to VMs like Amazon EBS.  This
patch adds a qemu block driver for Sheepdog.

Sheepdog features are:
- No node in the cluster is special (no metadata node, no control
  node, etc)
- Linear scalability in performance and capacity
- No single point of failure
- Autonomous management (zero configuration)
- Useful volume management support such as snapshot and cloning
- Thin provisioning
- Autonomous load balancing

The more details are available at the project site:
    http://www.osrg.net/sheepdog/

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-07-06 17:05:50 +02:00
Blue Swirl 08af49da7e piix4: compile only once
Compile piix4 in hwlib. Two compilations less for the full build.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-03 06:49:47 +00:00
Huacai Chen 016512f3d4 MIPS: Initial support of VIA IDE controller used by fulong mini pc
Signed-off-by: Huacai Chen <zltjiangshi@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-29 23:07:52 +02:00
Venkateswararao Jujjuri (JV) 758e8e38eb virtio-9p: Make infrastructure for the new security model.
This patch adds required infrastructure for the new security model.

- A new configure option for attr/xattr.
- if CONFIG_VIRTFS will be defined if both CONFIG_LINUX and CONFIG_ATTR defined.
- Defines routines related to both security models.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-22 15:15:50 -05:00
Anthony Liguori a4673e2762 Merge remote branch 'kwolf/for-anthony' into staging
Conflicts:
	hw/pc.c
2010-06-14 10:33:36 -05:00
Blue Swirl b0cb640ac1 Compile OS specific files only once for all targets
OS specific files are not target dependent, so they can be compiled
once for all targets.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 05:49:30 +00:00
Jes Sorensen 59a5264b99 Introduce OS specific cmdline argument handling and move SMB arg to os-posix.c
Introduce OS specific cmdline argument handling by calling
os_parse_cmd_args() at the end of switch() statement. Move option
enum to qemu-options.h and have it included from os-posix.c and
os-win32.c in addition to vl.c.

In addition move SMB argument to os-posix.c

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:15 +03:00
Jes Sorensen 9f16732a06 Rename qemu-options.h to qemu-options.def
Rename qemu-options.h to qemu-options.def as it is not a header file
for general use and this leaves space for a proper qemu-options.h

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:15 +03:00
Jes Sorensen 86b645e753 Introduce os-posix.c and create os_setup_signal_handling()
Introcuce os-posix.c and move posix specific signal handling
there.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:14 +03:00
Jes Sorensen 19113504de Introduce os-win32.c and move polling functions from vl.c
This introduces os-win32.c. It is meant to carry win32 specific
functions thata are not relevant for all of QEMU as well as win32
versions of various pieces like signal handling etc.

Move win32 polling handler helper functions from vl.c to os-win32.c

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:14 +03:00
Markus Armbruster 666daa6823 blockdev: Collect block device code in new blockdev.c
Anything that moves hundreds of lines out of vl.c can't be all bad.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-06-04 15:20:47 +02:00
Corentin Chary 380282b07d vnc: add basic tight support
Add support for tight encoding [1]. This patch only add support
for "basic" tight compression without any filter.

[1] http://tigervnc.org/cgi-bin/rfbproto#tight-encoding.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01 12:53:09 -05:00
Gerd Hoffmann 254e59506e cursor: add cursor functions.
Add a new cursor type to console.h and a bunch of functions to
deal with cursors the (new) cursor.c file.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-24 15:18:23 -05:00
Blue Swirl 4556bd8b25 Compile dma only once
Use a qemu_irq to request CPU exit.

7 compilations less for the full build.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22 08:00:52 +00:00
Blue Swirl 956a3e6bb7 Compile pckbd only once
Use a qemu_irq to indicate A20 line changes. Move I/O port 92
to pckbd.c.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22 07:59:01 +00:00
Blue Swirl c69ea0dff2 Compile acpi_piix4, apm and pm_smbus only once
12 compilations less for the full build.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-17 19:32:37 +00:00
Blue Swirl d08555c17a Compile virtio-9p-debug and virtio-9p-local once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-14 19:31:53 +00:00
Gautham R Shenoy 74db920c32 virtio-9p: Create a commandline option -fsdev
This patch creates a new command line option named -fsdev to hold any file
system specific information.

The option will currently hold the following attributes:
-fsdev fstype id=id,path=path_to_share
where
fstype: Type of the file system.
id:     Identifier used to refer to this fsdev
path:   The path on the host that is identified by this fsdev.

[aneesh.kumar@linux.vnet.ibm.com: Abstraction using FsContext]
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-03 12:17:37 -05:00
Corentin Chary 70a4568fe0 vnc: split encoding in specific files
This will allow to implement new encodings (tight, zrle, ..)
in a cleaner way. This may hurt performances, because some
functions like vnc_convert_pixel are not static anymore, but
should not be a problem with gcc 4.5 and the new -flto.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-03 12:09:47 -05:00
Christoph Hellwig 84a12e6648 block: separate raw images from the file protocol
We're running into various problems because the "raw" file access, which
is used internally by the various image formats is entangled with the
"raw" image format, which maps the VM view 1:1 to a file system.

This patch renames the raw file backends to the file protocol which
is treated like other protocols (e.g. nbd and http) and adds a new
"raw" image format which is just a wrapper around calls to the underlying
protocol.

The patch is surprisingly simple, besides changing the probing logical
in block.c to only look for image formats when using bdrv_open and
renaming of the old raw protocols to file there's almost nothing in there.

For creating images, a new bdrv_create_file is introduced which guesses the
protocol to use. This allows using qemu-img create -f raw (or just using the
default) for both files and host devices. Converting the other format drivers
to use this function to create their images is left for later patches.

The only issues still open are in the handling of the host devices.
Firstly in current qemu we can specifiy the host* format names
on various command line acceping images, but the new code can't
do that without adding some translation.  Second the layering breaks
the no_zero_init flag in the BlockDriver used by qemu-img.  I'm not
happy how this is done per-driver instead of per-state so I'll
prepare a separate patch to clean this up.

There's some more cleanup opportunity after this patch, e.g. using
separate lists and registration functions for image formats vs
protocols and maybe even host drivers, but this can be done at a
later stage.

Also there's a check for protocol in bdrv_open for the BDRV_O_SNAPSHOT
case that I don't quite understand, but which I fear won't work as
expected - possibly even before this patch.

Note that this patch requires various recent block patches from Kevin
and me, which should all be in his block queue.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-05-03 10:07:30 +02:00
Amit Shah e4d5639dbb iov: Introduce a new file for helpers around iovs, add iov_from_buf()
The virtio-net code uses iov_fill() which fills an iov from a linear
buffer. The virtio-serial-bus code does something similar in an
open-coded function.

Create a new iov.c file that has iov_from_buf().

Convert virtio-net and virtio-serial-bus over to use this functionality.
virtio-net used ints to hold sizes, the new function is going to use
size_t types.

Later commits will add the opposite functionality -- going from an iov
to a linear buffer.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-04-28 08:58:22 -05:00
Kevin Wolf 25920d6ad6 Make qemu-config available for tools
To be able to use config files for blkdebug, we need to make these functions
available in the tools. This involves moving two functions that can only be
built in the context of the emulator.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-04-23 16:08:45 +02:00
Kevin Wolf 6a1437273c blkdebug: Basic request passthrough
This isn't doing anything interesting. It creates the blkdebug block driver as
a protocol which just passes everything through to raw.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-04-23 16:08:45 +02:00
Blue Swirl d3538b45ea Compile event_notifier only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-19 19:47:49 +00:00
Blue Swirl 04c9a0cbc2 Compile vl.c once
Since kvm.h can be used in files compiled once,
we can partially revert
b33612d035.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-19 19:46:13 +00:00
Artyom Tarasenko 676d9b9b88 sparc32 use empty_slot for missing RAM v1
use empty_slot device for the RAM which is not installed

Models without ECC don't trap when missing ram is accessed.

v0->v1 compile only once and fix indentation

Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-18 08:55:20 +00:00
Paul Brook 61d3cf93e2 OHCI qdev conversion
Convert remaining OHCI devices to QDEV interface.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2010-04-05 19:57:40 +01:00
Paul Brook a67ba3b6f8 Revert "Compile usb-ohci only once"
This reverts commit f1698408f1.

PCI is always little-endian. Having a user-visible "be" property is just
plain wrong.
2010-04-04 21:18:26 +01:00
Aurelien Jarno 903ec55cc0 ia64 disas support
Taken from binutils SVN, using last GPLv2 version.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-01 21:51:59 +02:00
Anthony Liguori 087431d1d1 virtio-pci: compile per-target
With vhost, virtio-pci needs to include kvm.h and kvm.h needs to be built
per-target.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-04-01 13:56:19 -05:00
Anthony Liguori b33612d035 Fix -enable-kvm
Make vl.o compiled per target and fix a thinko in hw/acpi.c.  It's not trivial
to make kvm.h consumable by compiled-once files.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-04-01 09:58:48 -05:00
Blue Swirl 2b5eb37123 Compile most PPC devices only once
Make byte swapping unconditional since PPC is big endian.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-30 17:36:23 +00:00
Blue Swirl add85a76bb Compile prep_pci only once
Make byte swapping unconditional since PPC is big endian.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:24:04 +00:00
Blue Swirl 29e922b61f Compile qemu-timer only once
Arrange various declarations so that also non-CPU code can access
them, adjust users.

Move CPU specific code to cpus.c.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:24:00 +00:00
Blue Swirl 5c4532ee78 Compile openpic only once
Replace TARGET_PAGE_SIZE with 4096. Make byte swapping unconditional
since PPC is big endian.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:23:59 +00:00
Blue Swirl 02c7c992f0 Compile ide/macio only once
Replace TARGET_PAGE_SIZE with 4096. Make byte swapping unconditional
since PPC is big endian.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:23:57 +00:00
Blue Swirl 3d08ff698b Compile pflash_cfi01 only once
Push TARGET_WORDS_BIGENDIAN dependency to board level.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:23:56 +00:00
Blue Swirl 5f9fc5ad7e Compile pflash_cfi02 only once
Push TARGET_WORDS_BIGENDIAN dependency to board level.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:23:55 +00:00
Blue Swirl 53b67b3052 Compile acpi only once
Use qemu_irqs to trigger CMOS S3 and SMI events.

Avoid using kvm.h, which uses CPUState.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:23:52 +00:00
Blue Swirl ad96090a01 Refactor target specific handling, compile vl.c only once
Move target specific functions and RAM handling to arch_init.c.

Add a flag to QEMUOptions structure to indicate for which
architectures the option is allowed, check the flag
in run time and remove conditional code in option handling.

Now that no target dependencies remain, compile vl.c only once
for all targets.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:23:52 +00:00
Blue Swirl 57448a975e Compile vmware_vga only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-27 18:18:17 +00:00
Blue Swirl b970ea8f8d Compile some MIPS devices only once
Move CPU specific declarations to a separate file.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-27 07:26:16 +00:00
Blue Swirl f7736b91c4 Compile ide/core only once
Make win2k install hack unconditional as it is still restricted to
x86 only in vl.c.

Replace TARGET_PAGE_SIZE and 4096 with PAGE_SIZE.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-27 06:20:53 +00:00
Alexander Graf b305b9d7d6 target-s390: Don't compile in virtio-pci
As soon as virtio-pci.c gets compiled and used on S390 the internal qdev magic
gets confused and tries to give us PCI devices instead of S390 virtio devices.

Since we don't have PCI on S390, we can safely not compile virtio-pci at all.

In order to do this I added a new config option "CONFIG_VIRTIO_PCI" that I
enabled for every platform except S390. Thanks to this the change should be a
complete nop for every other platform.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-26 23:41:10 +01:00
Blue Swirl 8f51bdab44 Compile virtio-pci only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-22 20:18:58 +00:00
Blue Swirl 70615c38de Compile sound devices only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-22 20:18:40 +00:00
Blue Swirl 952760bb7b Compile pci_host only once
Convert pci_host_conf_register_mmio_noswap(x) to
pci_host_conf_register_mmio(x, 0).

Convert pci_host_conf_register_mmio(x) to
pci_host_conf_register_mmio(x, 1) for big endian hosts, all cases
happen to be BE.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:15 +00:00
Blue Swirl c1f63a9d43 Compile pcie_host only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:14 +00:00
Blue Swirl 6842a08ee0 Compile pci only once
Move coalesced_mmio declarations to a more accessible location.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:13 +00:00
Blue Swirl f1698408f1 Compile usb-ohci only once
Push TARGET_WORDS_BIGENDIAN dependency to board level.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:12 +00:00