]> xenbits.xensource.com Git - qemu-xen-4.3-testing.git/log
qemu-xen-4.3-testing.git
16 years agoposix_aio_init: Explicitly unblock SIGUSR1
Ian Jackson [Thu, 11 Dec 2008 17:38:28 +0000 (17:38 +0000)]
posix_aio_init: Explicitly unblock SIGUSR1

On Centos 4.3 as invoked by xend it seems that SIGUSR1 can be blocked.

This is almost certainly a libc bug; I checked by using sigprocmask to
obtain what was allegedly the current signal mask and printing it out
and SIGUSR1 wasn't listed, although my strace showed rt_sigprocmask
calls which clearly implied it was blocked - and indeed it wasn't
delivered.

Explicitly enabling it is an easy workaround.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoMerge branch 'master' of ../qemu-2iwj
Ian Jackson [Thu, 11 Dec 2008 17:22:37 +0000 (17:22 +0000)]
Merge branch 'master' of ../qemu-2iwj

16 years agoAlways treat floppy images as raw
Ian Jackson [Wed, 10 Dec 2008 15:30:49 +0000 (15:30 +0000)]
Always treat floppy images as raw

The fix for the image format guessing vulnerability breaks raw floppy
images.  In our environment it is difficult to apply the same
configuration change as envisaged upstream, so instead we arrange to
always treat a floppy image as raw.

Two-line patch supplied by James Harper <james.harper@bendigoit.com.au>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoblock: make raw aio signaling non-blocking (Gerd Hoffman)
aliguori [Thu, 13 Nov 2008 19:23:17 +0000 (19:23 +0000)]
block: make raw aio signaling non-blocking (Gerd Hoffman)

This patch switches the read handle of the signaling pipe into
non-blocking mode.  This avoids unwanted blocking reads and also
allows to read all bytes out of the signaling pipe in case we got
signaled more that once before the handler ran.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5716 c046a42c-6fe2-441c-8c8c-71466251a162
(cherry picked from commit e20e830bbdc502986d6fd30c26b06c37a5ee0611)

16 years agoMerge ../qemu-iwj
Ian Jackson [Thu, 4 Dec 2008 18:17:04 +0000 (18:17 +0000)]
Merge ../qemu-iwj

16 years agoreintroduce -std-vga option
Ian Jackson [Thu, 4 Dec 2008 18:16:18 +0000 (18:16 +0000)]
reintroduce -std-vga option

For compatibility with xend (which we will change later to remove
this) we support -std-vga again.  This corresponds to the stdvga=1
xmconfig option.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agofix invisibility of PCI Option ROM
Ian Jackson [Thu, 4 Dec 2008 10:40:03 +0000 (10:40 +0000)]
fix invisibility of PCI Option ROM

If 'lspci -v' command on Dom0 shows '[virtual]' as follows,
the option ROM can't be read by the guest.

$ lspci -v -s 0:1
...
        [virtual] Expansion ROM at fdb00000 [disabled] [size=256K]

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
16 years agohw/ide.c: tidy up ide_utterly_broken checks
Ian Jackson [Mon, 1 Dec 2008 12:11:45 +0000 (12:11 +0000)]
hw/ide.c: tidy up ide_utterly_broken checks

Some previous merge seems to have harmlessly duplicated some of these,
and one of the comments needed fixing too.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agocirrus_vga fix save/restore lfb_addr/lfb_end printfs
Ian Jackson [Thu, 27 Nov 2008 12:08:44 +0000 (12:08 +0000)]
cirrus_vga fix save/restore lfb_addr/lfb_end printfs

A couple of printf calls needed casts to (unsigned long) adding to
avoid compiler compliants, following commits
 97e3066c43477c79b56f4afeb08c330fc2c244b7
 ea324bf41565322b370b27253b1a7eaa3cc360b9
(cherry picked from commit 9722cbb9b813974ee2b2149b683485b077daf078)

Conflicts:

hw/cirrus_vga.c

16 years agocirrus_vga fix save/restore endian incompatibility
Ian Jackson [Thu, 27 Nov 2008 11:31:06 +0000 (11:31 +0000)]
cirrus_vga fix save/restore endian incompatibility

This patch fixes the cirrus_vga save/restore functions to keep
compatibility with older ioemu statefiles.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agocirrus rop bounds checks (CVE-2007-1320)
Ian Jackson [Wed, 26 Nov 2008 17:25:12 +0000 (17:25 +0000)]
cirrus rop bounds checks (CVE-2007-1320)

This patch adds bounds checks to the new cirrus rop functions,
completing the fix for CVE-2007-1320.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoMerge branch 'master' of latara:/usr/groups/xencore/HG/qemu-xen-unstable
Ian Jackson [Mon, 24 Nov 2008 17:16:19 +0000 (17:16 +0000)]
Merge branch 'master' of latara:/usr/groups/xencore/HG/qemu-xen-unstable

16 years agofix a few variable initializations
Ian Jackson [Mon, 24 Nov 2008 17:03:16 +0000 (17:03 +0000)]
fix a few variable initializations

Fix few variable initializations.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agostubdom: fix xenstore VM parameters read
Keir Fraser [Mon, 10 Nov 2008 10:45:28 +0000 (10:45 +0000)]
stubdom: fix xenstore VM parameters read

For now, stub domains can not read the uuid, and thus
xenstore_vm_key_path fails(). We have to cope with that instead of
passing NULL to xs_read().

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
16 years agoFix few variable initializations.
Keir Fraser [Mon, 10 Nov 2008 10:44:48 +0000 (10:44 +0000)]
Fix few variable initializations.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agousb-linux.c: provide our own copy of <linux/usbdevice_fs.h>
Ian Jackson [Tue, 28 Oct 2008 10:25:11 +0000 (10:25 +0000)]
usb-linux.c: provide our own copy of <linux/usbdevice_fs.h>

The version on the Xensource build machines is too old.  And since
this is a stable ABI it is permitted to copy the headers from Linux
into applications.

Original-Author: Thomas Sailer <sailer@ife.ee.ethz.ch>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agousb-uchi: post-merge: Revert asynchronous completion changes
Ian Jackson [Mon, 27 Oct 2008 15:32:19 +0000 (15:32 +0000)]
usb-uchi: post-merge: Revert asynchronous completion changes

Previously, during the merge, I resolved the changeset
  2cfc40201be5562a942615452fc2c4ee45d1165c
  usb-uhci: correctly deal with interrupt in asynchronous completion
which came from xen-unstable
  changeset:   12775:60bbcf799384d779c2a561b9d9ba30f28e31d970
  date:        Thu Dec 07 11:52:26 2006 +0000
  files:       tools/ioemu/hw/usb-hid.c tools/ioemu/hw/usb-uhci.c
  description:
  [HVM] qemu mouse: Adds support for USB mouse/tablet status check and
  ...
  And UHC should leave a TD active when receiving NAK and execute this
  incompleted TD in a subseqent frame. UHC only generates an interrupt
  on complete after the TD with ICO bit is completed.
  ...
Signed-off-by: Xinmei Huang <xinmei.huang@intel.com>
with the new uhci controller in upstream qemu.

However, in the context of the new uhci controller this is a broken
change; it causes the polling of the usb tablet (for example) to cease
after the first two polls.

So I'm reverting it.

16 years agomerge fixup: ram_save_live return value
Ian Jackson [Mon, 27 Oct 2008 12:07:28 +0000 (12:07 +0000)]
merge fixup: ram_save_live return value

ram_save_live should return 1 for saving to work.

16 years agovga.c: Call dpy_update when stealing vram
Ian Jackson [Fri, 24 Oct 2008 18:09:49 +0000 (19:09 +0100)]
vga.c: Call dpy_update when stealing vram

When we steal the vram, we copy the old data into it.  It may be the
case that the display output is already running - eg a VNC client
already connected.  In this case it is necessary to call dpy_update to
ensure that the data is sent to the client.

Without this change the initial screen clearing (done by the BIOS
before vram is stole) may be missed if the vnc client is fast at VM
startup, resulting in a white vnc screen with bits of black-backed
text painted over (which can be rectified by asking for a screen
refresh).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agovnc.c: fix visible_[xywh] computations for multiple-update-requesters
Ian Jackson [Fri, 24 Oct 2008 18:07:32 +0000 (19:07 +0100)]
vnc.c: fix visible_[xywh] computations for multiple-update-requesters

The spec is unclear about the semantics of several update requests
with various different regions.  Some clients (eg tightvnc 1.3.9-4 as
in etch) send a number of small nonincremental requests for areas they
have lost, followed by a large incremental one.

Our code will throw away the `modified' bits for areas outside our
idea of the client's visible area, and redraw them if that idea grows
again.  So any client which sends many sequential requests in this way
will end up with some pointless retransmissions.

So what we do here is a bit of a workaround: we avoid shrinking the
visible window on a nonincremental update.  We assume that a client's
incremental update specifies a new visible area (possibly shrinking)
but a nonincremental one may only grow it.  Hopefully the client which
has really had its visible area reduced will shortly send us an
incremental update request.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoMerge cleanup: delete some leftover junk from #includes
Ian Jackson [Fri, 24 Oct 2008 18:03:52 +0000 (19:03 +0100)]
Merge cleanup: delete some leftover junk from #includes

16 years agohw/xen_machine_*: set max_cpus
Ian Jackson [Fri, 24 Oct 2008 18:01:33 +0000 (19:01 +0100)]
hw/xen_machine_*: set max_cpus

The merged qemu checks the cpus requested against the machine's
max_cpus, so we need to set these to 1.

16 years agoPost stubdom merge compilation fixes
Ian Jackson [Thu, 23 Oct 2008 16:43:06 +0000 (17:43 +0100)]
Post stubdom merge compilation fixes

16 years agoMerge branch 'qemu'
Ian Jackson [Thu, 23 Oct 2008 15:11:36 +0000 (16:11 +0100)]
Merge branch 'qemu'

16 years agobt-host.c: Indirect disabling via NO_BLUETOOTH_PASSTHROUGH
Ian Jackson [Thu, 23 Oct 2008 15:11:23 +0000 (16:11 +0100)]
bt-host.c: Indirect disabling via NO_BLUETOOTH_PASSTHROUGH

We set NO_BLUETOOTH_PASSTHROUGH on _WIN32.  This allows other
configurations to disable it too.  (Eg, Xen stubdomains.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
16 years agoMerge branch 'master' of ../qemu-iwj
Ian Jackson [Thu, 23 Oct 2008 15:01:35 +0000 (16:01 +0100)]
Merge branch 'master' of ../qemu-iwj

16 years agoconst-correctness fixes for xen-specific code
Ian Jackson [Thu, 23 Oct 2008 15:01:11 +0000 (16:01 +0100)]
const-correctness fixes for xen-specific code

hw/pass-through.c and xenstore.c had a few cases of a string "..."
being assigned to a char*, which causes a warning with

16 years agoMerge branch 'master' of ../qemu-iwj
Ian Jackson [Thu, 23 Oct 2008 14:06:53 +0000 (15:06 +0100)]
Merge branch 'master' of ../qemu-iwj

Conflicts:

xen-hooks.mak

16 years agoBattery management - disable for stubdom
Ian Jackson [Thu, 23 Oct 2008 09:26:02 +0000 (10:26 +0100)]
Battery management - disable for stubdom

The battery management arrangements do not compile for stubdom as they
use direct IO, so for the moment I have stubbed them out.

16 years agoBattery management - compilation fixes
Ian Jackson [Thu, 23 Oct 2008 09:21:41 +0000 (10:21 +0100)]
Battery management - compilation fixes

 * xenstore_refresh_battery_status declaration and definition
   was missing void (interpreted in C as K&R syntax)
 * a couple of functions returning int returned NULL on failure

16 years agoBattery Management
Ian Jackson [Wed, 22 Oct 2008 17:38:26 +0000 (18:38 +0100)]
Battery Management

qemu side change for battery support within HVM guest.
(as revised by Kamala `rev1' Tue, 21 Oct 2008 19:15:41 GMT)

Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
16 years ago.gitignore: Add qemu-nbd-xen and i386-dm/gdbstub-xml.c
Ian Jackson [Wed, 22 Oct 2008 17:17:26 +0000 (18:17 +0100)]
.gitignore: Add qemu-nbd-xen and i386-dm/gdbstub-xml.c

16 years agoMerge branch 'qemu'
Ian Jackson [Wed, 22 Oct 2008 17:17:08 +0000 (18:17 +0100)]
Merge branch 'qemu'

Conflicts:

block.c
hw/scsi-disk.c
vl.c

16 years agoMerge branch 'upstream' into qemu
Ian Jackson [Wed, 22 Oct 2008 17:08:52 +0000 (18:08 +0100)]
Merge branch 'upstream' into qemu

Conflicts:

block.h
linux-user/elfload.c

16 years agoMerge branch 'master' of ../qemu-iwj
Ian Jackson [Wed, 22 Oct 2008 16:46:08 +0000 (17:46 +0100)]
Merge branch 'master' of ../qemu-iwj

16 years agoMerge branch 'qemu'
Ian Jackson [Wed, 22 Oct 2008 16:45:28 +0000 (17:45 +0100)]
Merge branch 'qemu'

Conflicts:

Makefile
audio/sys-queue.h
block-cow.c
block-raw-posix.c
configure
console.c
console.h
exec-all.h
hw/cirrus_vga.c
hw/ide.c
hw/ne2000.c
hw/pc.c
hw/pcnet.c
hw/rtl8139.c
hw/scsi-disk.c
hw/serial.c
hw/usb-hid.c
hw/usb-uhci.c
hw/vga.c
monitor.c
sdl.c
vl.c
vnc.c
vnc_keysym.h
vnchextile.h

16 years agoOptimize redundant cp15 coprocessor access control register writes.
pbrook [Wed, 22 Oct 2008 16:14:08 +0000 (16:14 +0000)]
Optimize redundant cp15 coprocessor access control register writes.

Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5512 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoUpdate old fashioned function prototypes.
pbrook [Wed, 22 Oct 2008 15:55:18 +0000 (15:55 +0000)]
Update old fashioned function prototypes.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5511 c046a42c-6fe2-441c-8c8c-71466251a162

16 years ago* Use function pointers for symbol lookup (currently for elf32 and elf64,
pbrook [Wed, 22 Oct 2008 15:11:31 +0000 (15:11 +0000)]
* Use function pointers for symbol lookup (currently for elf32 and elf64,
  could be expanded).  This also fixes the bug with mips elf64 symbols
  in current Qemu trunk.

* Use quicksort and binary search for symbol lookup.

* Remove unneeded entries from symbol table.  This reduced a typical table
  size (linux mips kernel) from 1764487 to 11656 entries.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5510 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoKeep usb host scanning from leaking file descriptors
aliguori [Tue, 21 Oct 2008 16:34:20 +0000 (16:34 +0000)]
Keep usb host scanning from leaking file descriptors

If the first case does not succeed, then the usb scanning code will leak file
descriptors on every scan.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5509 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-ppc: convert branch related instructions to TCG
aurel32 [Tue, 21 Oct 2008 16:31:31 +0000 (16:31 +0000)]
target-ppc: convert branch related instructions to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5508 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix broken USB support for Linux host (Bjorn Danielsson)
aliguori [Tue, 21 Oct 2008 16:27:28 +0000 (16:27 +0000)]
Fix broken USB support for Linux host (Bjorn Danielsson)

Make "host:" usb devices work again on systems that have the
file /proc/bus/usb/devices. This was broken in r5441 due to
incorrect logic for the USB_FS_SYS case in usb_host_scan().

Signed-off-by: Bjorn Danielsson <bdq@dax.nu>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5507 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-ppc: convert logical instructions to TCG
aurel32 [Tue, 21 Oct 2008 11:31:27 +0000 (11:31 +0000)]
target-ppc: convert logical instructions to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5506 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-ppc: convert crf related instructions to TCG
aurel32 [Tue, 21 Oct 2008 11:31:14 +0000 (11:31 +0000)]
target-ppc: convert crf related instructions to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5505 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoTCG: add tcg_const_local_tl()
aurel32 [Tue, 21 Oct 2008 11:30:45 +0000 (11:30 +0000)]
TCG: add tcg_const_local_tl()

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5504 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-ppc: use the new TCG logical operations
aurel32 [Tue, 21 Oct 2008 11:29:55 +0000 (11:29 +0000)]
target-ppc: use the new TCG logical operations

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5503 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-alpha: use the new TCG logical operations
aurel32 [Tue, 21 Oct 2008 11:29:11 +0000 (11:29 +0000)]
target-alpha: use the new TCG logical operations

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5502 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoTCG: add logical operations found on alpha and powerpc processors
aurel32 [Tue, 21 Oct 2008 11:28:59 +0000 (11:28 +0000)]
TCG: add logical operations found on alpha and powerpc processors

- andc_i32/i64 t0, t1, t2
- eqv_i32/i64 t0, t1, t2
- nand_i32/i64 t0, t1, t2
- nor_i32/i64 t0, t1, t2
- orc_i32/i64 t0, t1, t2

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5501 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-ppc: Convert XER accesses to TCG
aurel32 [Tue, 21 Oct 2008 11:28:46 +0000 (11:28 +0000)]
target-ppc: Convert XER accesses to TCG

Define XER bits as a single register and access them individually to
avoid defining 5 32-bit registers (TCG doesn't permit to map 8-bit
registers).

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5500 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoadded explicit license
bellard [Fri, 17 Oct 2008 17:31:57 +0000 (17:31 +0000)]
added explicit license

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5499 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoallow SLIRP to make an ARP request to get the client MAC address. It is useful if...
bellard [Fri, 17 Oct 2008 17:28:58 +0000 (17:28 +0000)]
allow SLIRP to make an ARP request to get the client MAC address. It is useful if an inbound connection is done to a VM which did not send outbound IP packets

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5498 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoscsi-generic: correct error management
aurel32 [Fri, 17 Oct 2008 08:08:56 +0000 (08:08 +0000)]
scsi-generic: correct error management

this patch allows to fully use a tape device connected to qemu through
the scsi-generic interface.

Previous patch introduced tape SCSI commands management, this one
improve error case management:

- the SCSI controller command completion must be called with the status
value, not the sense value. In the case of scsi-generic, the SCSI status
is given by the field status of sg_io_hdr_t (the value is left shifted
by one regarding status codes defined in /usr/include/scsi/scsi.h)

- when a read is aborted due to a mark/EOF/EOD/EOM, the len reported to
controller can be 0. LSI controller emulation doesn't know how to manage
this. A workaround found is to call the completion routine with
SCSI_REASON_DONE just after calling it with SCSI_REASON_DATA with len=0.

This patch also manages correctly the block size of the tape device.

This patch has been tested with a real tape device "HP C5683A", linux
guest (debian etch) and tools like "mt", "tar" and "btape".

Windows guest is not better supported than before...

Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5497 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoi386/SVM: return amount of ASIDs
aurel32 [Fri, 17 Oct 2008 08:08:48 +0000 (08:08 +0000)]
i386/SVM: return amount of ASIDs

With SVM the TLB supports tagging to distinguish TLB entries from
different virtual CPUs. This tag is called an ASID. The amount of ASIDs is
given in EBX of the SVM-CPUID-leaf. Currently we return 0, which might
break hypervisors. Let's better return something >0 here, say 0x10.
Since we're flushing the complete TLB on every VM entry and exit we're not
making use of the ASID information anyways.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5496 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agocirrus vga save/restore and lfb_addr/lfb_end
Ian Jackson [Thu, 16 Oct 2008 17:31:04 +0000 (18:31 +0100)]
cirrus vga save/restore and lfb_addr/lfb_end

Cirrus VGA save and restore functions cast lfb_addr into an uint64_t
pointer while lfb_addr is only an unsigned long.
Same thing happened to lfb_end, causing pci_dev to be partially
overwritten by mistake.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoadd qemu-nbd.pod to .gitignore
Ian Jackson [Thu, 16 Oct 2008 16:40:24 +0000 (17:40 +0100)]
add qemu-nbd.pod to .gitignore

16 years agoMerge branch 'upstream' into qemu
Ian Jackson [Thu, 16 Oct 2008 16:37:38 +0000 (17:37 +0100)]
Merge branch 'upstream' into qemu

Conflicts:

.gitignore
Makefile
audio/sys-queue.h
block-raw-posix.c
block.c
block.h
configure
hw/ide.c
hw/usb-uhci.c
osdep.c
osdep.h
qemu_socket.h
usb-linux.c
vl.c

16 years agoMerge branch 'qemu'
Ian Jackson [Thu, 16 Oct 2008 14:22:32 +0000 (15:22 +0100)]
Merge branch 'qemu'

16 years agoenable usb uhci save/restore
Ian Jackson [Thu, 16 Oct 2008 09:29:00 +0000 (10:29 +0100)]
enable usb uhci save/restore

enables the usb uhci save and restore functions that
for some reasons were commented out.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
[ These were commented out in 1e4146791b46f0a798589c58a09f18b2841a9212
  aka svn://svn.savannah.nongnu.org/qemu/trunk@3609
  c046a42c-6fe2-441c-8c8c-71466251a162
  apparently by mistake.  This commit reverts 1e414679
  -Ian Jackson ]

16 years agoMerge branch 'qemu'
Ian Jackson [Thu, 16 Oct 2008 09:37:49 +0000 (10:37 +0100)]
Merge branch 'qemu'

16 years agoenable usb uhci save/restore
Ian Jackson [Thu, 16 Oct 2008 09:29:00 +0000 (10:29 +0100)]
enable usb uhci save/restore

enables the usb uhci save and restore functions that
for some reasons were commented out.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
[ These were commented out in 1e4146791b46f0a798589c58a09f18b2841a9212
  aka svn://svn.savannah.nongnu.org/qemu/trunk@3609
  c046a42c-6fe2-441c-8c8c-71466251a162
  apparently by mistake.  This commit reverts 1e414679
  -Ian Jackson ]

16 years agofix cirrus_vga_load
Ian Jackson [Thu, 16 Oct 2008 09:22:00 +0000 (10:22 +0100)]
fix cirrus_vga_load

Fixes a problem in cirrus_vga_load introduced by the "use
main memory for video memory" patch.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoPPC: fix dcbi instruction
aurel32 [Wed, 15 Oct 2008 22:25:21 +0000 (22:25 +0000)]
PPC: fix dcbi instruction

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5495 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoPPC: convert SPE logical instructions to TCG
aurel32 [Wed, 15 Oct 2008 17:00:45 +0000 (17:00 +0000)]
PPC: convert SPE logical instructions to TCG

(Nathan Froyd)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5494 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoppc: convert integer load/store to TCG
aurel32 [Wed, 15 Oct 2008 17:00:37 +0000 (17:00 +0000)]
ppc: convert integer load/store to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5493 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-ppc: fix a TCG local variable creation
aurel32 [Wed, 15 Oct 2008 17:00:29 +0000 (17:00 +0000)]
target-ppc: fix a TCG local variable creation

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5492 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoPPC: convert SPE effective address computation to TCG
aurel32 [Wed, 15 Oct 2008 17:00:18 +0000 (17:00 +0000)]
PPC: convert SPE effective address computation to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5491 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoPPC: convert effective address computation to TCG
aurel32 [Tue, 14 Oct 2008 19:55:54 +0000 (19:55 +0000)]
PPC: convert effective address computation to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5490 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agogdbstub: remove unused local variable
aurel32 [Tue, 14 Oct 2008 19:23:35 +0000 (19:23 +0000)]
gdbstub: remove unused local variable

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5489 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-i386: Add Core Duo Definition
aurel32 [Tue, 14 Oct 2008 19:20:52 +0000 (19:20 +0000)]
target-i386: Add Core Duo Definition

This patch adds a CPU definition for the Core Duo CPU. I tried to
resemble the original as closely as possible and document what features
are missing still. This patch enables the use of a recent CPU definition
on 32 bit platforms.

It also fixes two issues that went along the line:

- invalid xlevel in core2duo spec
  While looking though the CPUIDs again, I found that xlevel is actually 8.

- non-PSE36 support
  The CoreDuo CPUID does not expose the PSE36 capability, but CPUID
0x80000008 is tied to 36 bits. This broke Windows XP installation for
me, so I just set it to 32 bits width when PSE36 is not available. The
original CPU also exposes 32 bit width in CPUID 0x80000008.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5488 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix previous commit (spotted by Robert Riebisch).
aliguori [Tue, 14 Oct 2008 18:14:47 +0000 (18:14 +0000)]
Fix previous commit (spotted by Robert Riebisch).

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5487 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoDefine O_DSYNC as O_SYNC if necessary.
aliguori [Tue, 14 Oct 2008 18:00:38 +0000 (18:00 +0000)]
Define O_DSYNC as O_SYNC if necessary.

O_DSYNC isn't available on OS X.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5486 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoExpand cache= option and use write-through caching by default
aliguori [Tue, 14 Oct 2008 14:42:54 +0000 (14:42 +0000)]
Expand cache= option and use write-through caching by default

This patch changes the cache= option to accept none, writeback, or writethough
to control the host page cache behavior.  By default, writethrough caching is
now used which internally is implemented by using O_DSYNC to open the disk
images.  When using -snapshot, writeback is used by default since data integrity
it not at all an issue.

cache=none has the same behavior as cache=off previously.  The later syntax is
still supported by now deprecated.  I also cleaned up the O_DIRECT
implementation to avoid many of the #ifdefs.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5485 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix blktap device backend patch check
Ian Jackson [Tue, 14 Oct 2008 10:46:53 +0000 (11:46 +0100)]
Fix blktap device backend patch check

Regarding http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1367,
it appears that the expected backend path check is too strict for'
blktap devices.  Therefore if the devtype is `vbd' we allow the
backend to be `tap'.

Thanks to report and inspiration from Yosuke Iwamatsu.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agolinux-user: implement msg* syscalls
aurel32 [Mon, 13 Oct 2008 21:08:55 +0000 (21:08 +0000)]
linux-user: implement msg* syscalls

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5484 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agolinux-user: fix and cleanup IPCOP_msg* ipc calls handling
aurel32 [Mon, 13 Oct 2008 21:08:44 +0000 (21:08 +0000)]
linux-user: fix and cleanup IPCOP_msg* ipc calls handling

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5483 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoopen() can also return EPERM for O_RDWR on a readonly device
aurel32 [Mon, 13 Oct 2008 21:08:34 +0000 (21:08 +0000)]
open() can also return EPERM for O_RDWR on a readonly device

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5482 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFreeBSD also has clock_gettime
aurel32 [Mon, 13 Oct 2008 21:08:25 +0000 (21:08 +0000)]
FreeBSD also has clock_gettime

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5481 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agolinux-user: fix getdents* syscalls
aurel32 [Mon, 13 Oct 2008 21:08:17 +0000 (21:08 +0000)]
linux-user: fix getdents* syscalls

glibc's structs dirent and dirent64 is different from in-kernel dirent
and dirent64. Kernel headers doesn't provide structs dirent(64) any
more. So we should add it to qemu headers.

To avoid conflict with glibc it called struct linux_dirent(64).

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5480 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agolinux-user: Add readahead syscall
aurel32 [Mon, 13 Oct 2008 21:08:07 +0000 (21:08 +0000)]
linux-user: Add readahead syscall

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5479 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoIntroduce TCP live migration protocol
aliguori [Mon, 13 Oct 2008 03:14:31 +0000 (03:14 +0000)]
Introduce TCP live migration protocol

This patch introduces a tcp protocol for live migration.  It can be used as
follows:

qemu-system-x86_64 -hda ~/images/linux-test.img -monitor stdio
 <vm runs for a while>
(qemu) migrate tcp:localhost:1025

On the same system:

qemu-system-x86_64 -hda ~/images/linux-test.img -incoming
tcp:localhost:1025

The monitor can be interacted with while waiting for an incoming live
migration.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5478 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoIntroduce ethernet announcement function.
aliguori [Mon, 13 Oct 2008 03:13:12 +0000 (03:13 +0000)]
Introduce ethernet announcement function.

This patch adds an ethernet announce function that will minimize downtime
when doing a live migration.  This code originates from KVM.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5477 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoIntroduce UI for live migration
aliguori [Mon, 13 Oct 2008 03:12:02 +0000 (03:12 +0000)]
Introduce UI for live migration

This patch introduces a command line parameter and monitor command for starting
a live migration.  The next patch will provide an example of how to use these
parameters.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5476 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoIntroduce a buffered file wrapper for QEMUFile
aliguori [Mon, 13 Oct 2008 03:10:22 +0000 (03:10 +0000)]
Introduce a buffered file wrapper for QEMUFile

This patch introduces a buffered QEMUFile wrapper.  This allows QEMUFile's to be
rate limited.  It also makes it easier to implement a QEMUFile that is
asynchronous since the current QEMUFile API requires that all reads and writes
be synchronous.

The only real non-obvious part of the API is the "frozen" concept.  If the
backend returns EAGAIN, the QEMUFile is said to be "frozen".  This means no
additional output will be sent to the backend until the file is unfrozen.
qemu_file_put_notify can be used to unfreeze a frozen file.

A synchronous interface is also provided to wait for an unfreeze event.  This is
used during the final part of live migration when the VM is no longer running.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5475 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix some issues with QEMUFile
aliguori [Mon, 13 Oct 2008 03:07:56 +0000 (03:07 +0000)]
Fix some issues with QEMUFile

This patch allows QEMUFile's read and write operations to return
negative error codes.  This is necessary to detect things like closed
streams during live migration.

It also removes unused code for QEMUFileFD write path.  Finally, it
makes sure to avoid attempting to flush an output buffer if the file
is only being used for input.  This was spotted by Uri Lublin.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5474 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoSH4: Implement MOVUA.L
aurel32 [Sun, 12 Oct 2008 23:32:59 +0000 (23:32 +0000)]
SH4: Implement MOVUA.L

 * target-sh4/translate.c (_decode_opc): Implement
   MOVUA.L.

(Vladimir Prus)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5473 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoSH4: fix single-stepping
aurel32 [Sun, 12 Oct 2008 23:32:48 +0000 (23:32 +0000)]
SH4: fix single-stepping

* target-sh/translate.c (gen_intermediate_code_internal): If
  singlestep is enabled, update PC before stopping.

(Vladimir Prus)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5472 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoSH4: Fix swap.b
aurel32 [Sun, 12 Oct 2008 23:32:40 +0000 (23:32 +0000)]
SH4: Fix swap.b

The SH4 manual documents the swap.b instruction as follows:

        SWAP.B Rm,Rn
                Rm → swap lower 2 bytes → Rn

Current QEMU code, in addition to the above, also clears the high
16 bits. The immediate breakage I saw is that htonl function applied
to  netmask of 255.255.255.0 gives 0, which breaks all networking.

(Vladimir Prus)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5471 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoMake sure to initialize fd_sets in aio.c
aliguori [Sun, 12 Oct 2008 21:19:57 +0000 (21:19 +0000)]
Make sure to initialize fd_sets in aio.c

This was spotted by valgrind.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5470 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agohw/apic.c: use functions from host-utils.h
aurel32 [Sun, 12 Oct 2008 20:16:03 +0000 (20:16 +0000)]
hw/apic.c: use functions from host-utils.h

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5469 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoCOPYING: update from FSF
aurel32 [Sun, 12 Oct 2008 17:54:42 +0000 (17:54 +0000)]
COPYING: update from FSF

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5468 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoDefine macro QEMU_GNUC_PREREQ and use it
aurel32 [Sun, 12 Oct 2008 16:15:04 +0000 (16:15 +0000)]
Define macro QEMU_GNUC_PREREQ and use it

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5467 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoOnly use __builtin_* with GCC >= 3.4
aurel32 [Sun, 12 Oct 2008 11:44:36 +0000 (11:44 +0000)]
Only use __builtin_* with GCC >= 3.4

Fix gcc 3.3 builds, broken in revision 5465.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5466 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agohw/apic.c: use __builtin funtions instead of assembly code
aurel32 [Sun, 12 Oct 2008 00:53:17 +0000 (00:53 +0000)]
hw/apic.c: use __builtin funtions instead of assembly code

Suggested by malc.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5465 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoOptimize some host-utils function with gcc builtins
aurel32 [Sun, 12 Oct 2008 00:53:08 +0000 (00:53 +0000)]
Optimize some host-utils function with gcc builtins

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5464 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoGet rid of sys/poll.h
aurel32 [Sun, 12 Oct 2008 00:52:58 +0000 (00:52 +0000)]
Get rid of sys/poll.h

(C.W. Betts)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5463 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoCRIS: Initialize the arch version preg to v32.
edgar_igl [Sat, 11 Oct 2008 19:36:17 +0000 (19:36 +0000)]
CRIS: Initialize the arch version preg to v32.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5462 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoCRIS: Handle GDB writes to pregs.
edgar_igl [Sat, 11 Oct 2008 19:32:21 +0000 (19:32 +0000)]
CRIS: Handle GDB writes to pregs.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5461 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd feature_to_c.sh.
pbrook [Sat, 11 Oct 2008 18:23:22 +0000 (18:23 +0000)]
Add feature_to_c.sh.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5460 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd GDB XML register description support.
pbrook [Sat, 11 Oct 2008 17:55:29 +0000 (17:55 +0000)]
Add GDB XML register description support.

Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5459 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix some debugging mistakes/leftovers
malc [Sat, 11 Oct 2008 17:37:25 +0000 (17:37 +0000)]
Fix some debugging mistakes/leftovers

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5458 c046a42c-6fe2-441c-8c8c-71466251a162