Commit graph

20989 commits

Author SHA1 Message Date
Blue Swirl e5f17ac633 ppc: Avoid AREG0 for exception helpers
Add an explicit CPUPPCState parameter instead of relying on AREG0.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2012-06-24 01:04:40 +02:00
Blue Swirl ad71ed6811 ppc: Split exception helpers
Move exception helpers from op_helper.c to excp_helper.c.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2012-06-24 01:04:40 +02:00
Blue Swirl b327c654e5 ppc: Fix coding style in op_helper.c
op_helper.c will be split by the next patches, fix
style issues before that.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2012-06-24 01:04:40 +02:00
Alexander Graf affe518990 TCG: Fix compile breakage in tcg_dump_ops
Commit eeacee4d86 changed the syntax of tcg_dump_ops, but didn't convert
all users (notably missing the ppc ones) to it. Fix them to the new syntax.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: malc <av1474@comtv.ru>
2012-06-24 02:54:33 +04:00
Stefan Weil 6a69226f22 tci: Support INDEX_op_bswap64_i64
Running the Windows 7 (64 bit) boot process needs INDEX_op_bswap64_i64.
It was already implemented, but untested. Remove the TODO() statement.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-22 10:34:21 +01:00
Stefan Weil 09faecf257 target-i386: Use QEMU instead of Qemu
This new 'QEmu' was recently added.
Replace it by the official all upper case 'QEMU'.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-22 10:34:21 +01:00
Peter Maydell 30fd45adb2 Makefile.hw: avoid overly large 'make clean' rm command
Avoid 'make clean' producing an 'rm' command which has a lot
of duplicate 'hw//*.o' arguments, by using $(sort $(dir ..))
rather than $(dir $(sort ..)) so Make's sort function will
remove the duplicates for us. We can also remove the double
'//' safely because $(dir ..) is guaranteed to return a string
ending in '/'.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-22 10:34:21 +01:00
Gerd Hoffmann 9e56edcf8d vga: raise default vgamem size
Old size: 8 MB (traditional upstream qemu value).
New size: 16 MB (traditional qemu-kvm value).

Also adds compat properties so old machine types
keep the old default values.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-22 10:49:55 +02:00
Gerd Hoffmann f1dacf1ced add pc-1.2 2012-06-22 10:49:55 +02:00
Alon Levy 13d1fd44c4 qxl: add vgamem_size_mb and vgamem_size
In preperation for supporting a larger framebuffer for multiple monitors
on a single card, add a property to qxl vgamem_size_mb, and corresponding
byte sized vgamem_size, and use instead of VGA_RAM_SIZE.

[ kraxel: simplify property handling, add sanity checks ]
[ kraxel: fix mode copying ]

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-22 10:49:45 +02:00
Stefan Weil 4e1797f9a5 configure: Fix typo
The typo did not cause an error because open_by_handle_at
was only compared to "yes".

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-22 09:47:47 +01:00
Gerd Hoffmann 4a1e244eb6 vga: make vram size configurable
Zap the global VGA_RAM_SIZE #define, make the vga ram size configurable
for standard vga and vmware vga.  cirrus and qxl are left with a fixed
size (and private VGA_RAM_SIZE #define) for now.

qxl needs some non-trivial adjustments in the mode list handling deal
with a runtime-configurable size, which calls for a separate qxl patch.

cirrus emulates cards which have 2 MB (isa) and 4 MB (pci), so I guess
it would make sense to use these sizes.  That change would break
migration though, so I left it fixed at 8 MB size.  Making it
configurabls is pretty pointless for cirrus as we have to match real
hardware.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-22 10:46:12 +02:00
Gerd Hoffmann e9c6149f6a vga: raise xres+yres limits
The vgabios will check whenever any given video mode will fit into the
given video memory before adding it to the list of available modes, so
there is no need to keep xmax * ymax * 32bpp lower than VGA_RAM_SIZE.

Lets raise the limits a bit.  Should be good for a few years, display
sizes are not growing that fast.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-22 10:46:12 +02:00
Alon Levy a5f68c22e7 qxl: reset current_async on qxl_soft_reset
Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-22 10:46:12 +02:00
Alon Levy 087e6a42ed hw/qxl: ignore guest from guestbug until reset
soft_reset is called from any of:
 * QXL_IO_RESET
 * vga io
 * pci reset handler

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-22 10:46:12 +02:00
Alon Levy 0f7bfd8198 qxl: stop dirty loging when not in vga mode
Tested with linux guest. Not sure how to check actual performance affect
of this. Checked with the previously send traceevent that the kvm ioctl
to start/stop dirty logging is being called.
(KVM_SET_USER_MEMORY_REGION).

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-22 10:46:12 +02:00
Alon Levy 0a530548a1 hw/qxl: s/qxl_guest_bug/qxl_set_guest_bug/
Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-22 10:46:12 +02:00
Alon Levy 160c31f78f ui/spice-display.c: add missing initialization for valgrind
We can't initialize QXLDevSurfaceCreate field by field because it has a
pa hole, and so 4 bytes remain uninitialized when building on x86-64, so
just memset.

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-22 10:46:12 +02:00
Peter A. G. Crosthwaite 5eb9840171 arm_gic: Send dbg msgs to stderr not stdout
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-22 09:41:31 +01:00
Stefan Weil 9964d8f942 checkpatch: Add QEMU specific rule
The new rule detects two wrong variants of QEMU.
It was tested with commit b5a8fe5e.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-22 09:41:31 +01:00
Stefan Weil bf7eaa5ffc qemu-config: Use QEMU instead of Qemu
This new 'Qemu' was recently added.
Replace it by the official all upper case 'QEMU'.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-22 09:41:31 +01:00
Andreas Färber b34d259516 libqtest: Fix socket_accept() to pass address_len
accept() expects address_len to point to the length of the sockaddr on
input. Initialize it accordingly.

Resolves an assertion due to EFAULT on illumos.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-22 09:41:31 +01:00
Andreas Färber fc8c5b8c41 Makefile.user: Define CONFIG_USER_ONLY for libuser/
In *-*-user/ build dirs CONFIG_USER_ONLY is defined via config-target.h.
In libuser/ it is not defined.

Add it via QEMU_CFLAGS.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-22 09:41:31 +01:00
Stefan Weil 8f0e5c6bb7 Makefile: Remove macro qapi-dir
As qapi-dir was now a constant, it can be replaced by its value.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-22 09:41:31 +01:00
Stefan Weil f69a9c666b Makefile: Remove BUILD_DIR from qapi-dir
qapi-dir does not need an absolute path. All other build directories
are relative. When BUILD_DIR is removed, the build output looks better
(no long lines with absolute paths when everything else uses short
lines):

  GEN   qapi-generated/qga-qapi-types.c
  CC    qapi-generated/qga-qapi-types.o
  GEN   qapi-generated/qga-qapi-visit.c
  CC    qapi-generated/qga-qapi-visit.o
  GEN   qapi-generated/qga-qmp-marshal.c
  CC    qapi-generated/qga-qmp-marshal.o

Using a relative path also avoids potential problems when BUILD_DIR
includes blanks.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-22 09:41:30 +01:00
Frédéric Boiteux 471fbf4ab8 Install 'bepo' keymap already included in Qemu source
The 'bepo' layout (a french dvorak-like keyboard layout) was added
about one year ago, (see commit 2a3c633c1e),
but I missed to declare to install it.

Signed-off-by: Frédéric Boiteux <fboiteux@free.fr>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-22 09:41:30 +01:00
Paolo Bonzini eab5fd5989 qemu-ga: add guest-fstrim command
FITRIM is a mounted filesystem feature to discard (or "trim") blocks which
are not in use by the filesystem. This is useful for solid-state drives
(SSDs) and thinly-provisioned storage.  Provide access to the feature
from the host so that filesystems can be trimmed periodically or before
migration.

Here is an example using scsi_debug:

    # modprobe scsi_debug lbpu=1 lbpws=1
    # sg_vpd -p0xb2 /dev/sdb
    Logical block provisioning VPD page (SBC):
      Unmap command supported (LBPU): 1
      Write same (16) with unmap bit supported (LBWS): 1
      Write same (10) with unmap bit supported (LBWS10): 0
    # mke2fs /dev/sdb
    # cat /sys/bus/pseudo/drivers/scsi_debug/map
    1-616,16257-16383
    # mount /dev/sdb /run/media/pbonzini/test
    # dd if=/dev/zero of=/run/media/pbonzini/test/file
    # cat map
    1-616,645-1588,1599-4026,4029-16383
    # rm /run/media/pbonzini/test/file
    # ./qemu-ga /dev/fd/0
    {"execute":"guest-fstrim"}
    {"return": {}}
    # cat map
    1-612

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2012-06-21 17:59:27 -05:00
Paolo Bonzini af02203fbe qemu-ga: make names more generic for mount list functions
We will use these functions and types for more than FSFREEZE, so rename them.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2012-06-21 17:59:18 -05:00
Blue Swirl 47ecbdf07e libcacard: build fixes
Link trace objects to fix these errors:
  LINK  vscclient
oslib-posix.o: In function `trace_qemu_vfree':
/src/qemu/obj-amd64/./trace.h:39: undefined reference to `trace1'
oslib-posix.o: In function `trace_qemu_memalign':
/src/qemu/obj-amd64/./trace.h:31: undefined reference to `trace3'
oslib-posix.o: In function `trace_qemu_vmalloc':
/src/qemu/obj-amd64/./trace.h:35: undefined reference to `trace2'

Add LDFLAGS to vscclient link command.

Clean up also in subdirectories of libcacard.

Use quiet-command for sed invocation.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alon Levy <alevy@redhat.com>
2012-06-21 20:04:24 +00:00
Blue Swirl 3359847e9d qtest: add a fuzz test to fdc-test
Add a simple register fuzzing test to floppy controller tests.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-21 18:45:26 +00:00
Blue Swirl cced7a13a2 fdc: use LOG_UNIMP logging
Convert uses of FLOPPY_ERROR to either FLOPPY_DPRINTF
(for implemented cases) or to use LOG_UNIMP (unimplemented).

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-21 18:45:24 +00:00
Blue Swirl 71547a3bf3 qemu-log: use LOG_UNIMP for some target CPU cases
Use LOG_UNIMP for some target CPU cases.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Acked-by: Alexander Graf <agraf@suse.de>
2012-06-21 18:45:22 +00:00
Blue Swirl dafdf1abfd qemu-log: add log category for unimplemented functionality
Add new log category (LOG_UNIMP) for unimplemented functionality.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-21 18:45:20 +00:00
Blue Swirl eeacee4d86 qemu-log: cleanup
Don't use global variables directly but via accessor functions. Rename globals.

Convert macros to functions, add GCC format attributes.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-21 18:45:18 +00:00
Blue Swirl 5726c27fa9 qemu-log: move logging to qemu-log.c
Move logging functions from exec.c to qemu-log.c,
compile it only once.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-21 18:45:16 +00:00
Jiang Yunhong 3854ca577d Introduce Xen PCI Passthrough, MSI
A more complete history can be found here:
git://xenbits.xensource.com/qemu-xen-unstable.git

Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2012-06-21 16:06:11 +00:00
Anthony PERARD 9886c23aed Introduce apic-msidef.h
This patch move the msi definition from apic.c to apic-msidef.h. So it can be
used also by other .c files.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
2012-06-21 16:06:11 +00:00
Allen Kay 93d7ae8e77 Introduce Xen PCI Passthrough, PCI config space helpers
A more complete history can be found here:
git://xenbits.xensource.com/qemu-xen-unstable.git

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: Guy Zana <guy@neocleus.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2012-06-21 16:06:11 +00:00
Allen Kay eaab4d60d3 Introduce Xen PCI Passthrough, qdevice
A more complete history can be found here:
git://xenbits.xensource.com/qemu-xen-unstable.git

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: Guy Zana <guy@neocleus.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2012-06-21 16:06:10 +00:00
Anthony PERARD 679042f0e1 qdev-properties: Introduce pci-host-devaddr.
This new property will be used to specify a host pci device address.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2012-06-21 16:06:10 +00:00
Anthony PERARD 7aa8cbb921 pci.c: Add opaque argument to pci_for_each_device.
The purpose is to have a more generic pci_for_each_device by passing an extra
argument to the function called on every device.

This patch will be used in a next patch.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-06-21 16:06:10 +00:00
Anthony PERARD 396af688fc Introduce XenHostPCIDevice to access a pci device on the host.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-06-21 16:06:10 +00:00
Anthony PERARD eb6fda0f51 configure: Introduce --enable-xen-pci-passthrough.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-06-21 16:06:10 +00:00
Anthony PERARD 9ff706c815 pci_ids: Add INTEL_82599_SFP_VF id.
We are using this in our quirk lookup provided by patch
titled: Introduce Xen PCI Passthrough, PCI config space helpers.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-06-21 16:06:10 +00:00
Peter A. G. Crosthwaite 7798a8828a xilinx_timer: Fixed deadlock issue
The timer was deadlocking when the interval was set too low. It would cause a
flood of timer events and the CPU would halt indefinately. This is a known issue
and theres a generic workaround in place in ptimer on ptimer_set_limit(),
however the Xilinx timer uses ptimer_set_count() instead of set_limit. Changed
the call to set_count() to an equivalent call of set_limit() instead, which
brings the workaround into play.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-06-21 15:19:16 +02:00
Peter A. G. Crosthwaite fc3511d4d8 xilinx_timer: Removed include of qemu-timer
The Xilinx timer does not interact with the qemu_timer API, so dont include it.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-06-21 15:19:16 +02:00
Anthony PERARD e108a3c110 xenstore: Use <xenstore.h>
In the next release of Xen (4.2), xs.h became deprecated.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2012-06-21 11:44:35 +00:00
Anthony PERARD b41f671972 xen: Reorganize includes of Xen headers.
Because xs.h will be remove in future release of Xen, this patch removes the
extra includes of this headers.

Also, it removes the extra includes of xenctrl.h and xen/io/xenbus.h as there
already are in xen_common.h.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2012-06-21 11:43:59 +00:00
Gerd Hoffmann 77fa9aee38 uhci: fix uhci_async_cancel_all
We update the QTAILQ in the loop, thus we must use the SAFE version
to make sure we don't touch the queue struct after freeing it.

https://bugzilla.novell.com/show_bug.cgi?id=766310

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-20 14:46:02 +02:00
Gerd Hoffmann a229c0535b usb-host: live migration support
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-20 14:46:02 +02:00