]> xenbits.xensource.com Git - qemu-xen-4.1-testing.git/log
qemu-xen-4.1-testing.git
16 years agoblock-vbd: Fix vbd_aio_flush() no-op case
Ian Jackson [Thu, 19 Feb 2009 17:40:03 +0000 (17:40 +0000)]
block-vbd: Fix vbd_aio_flush() no-op case

Call the completion function if flush features are not supported in blkfront.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
16 years agofix memory/fd leak in pt_msix_init()
Ian Jackson [Mon, 9 Feb 2009 10:40:12 +0000 (10:40 +0000)]
fix memory/fd leak in pt_msix_init()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agofix error recovery in pass-through.c
Ian Jackson [Mon, 9 Feb 2009 10:34:50 +0000 (10:34 +0000)]
fix error recovery in pass-through.c

return NULL when error. fix error recovery path.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agohw/pass-through.c: workaround for old libpci
Ian Jackson [Fri, 6 Feb 2009 16:16:06 +0000 (16:16 +0000)]
hw/pass-through.c: workaround for old libpci

Old versions of libpci (including the ones on the automatic tests
which control Xen staging propagation) do not define
PCI_LIB_VERSION or the PCI_ERR_{UNCOR_MASK,...} constants.

This means that change 8c771eb6294afc5b3754a9e3de51568d4e5986c2 breaks
the build.  In this changeset I apply what is intended to be a
workaround for this problem but it may not be completely correct; this
is therefore perhaps an interim fix.

The potential problem is that the save/restore of some PCI passthrough
error handling registers (across suspend/resume) may not work properly
with old versions of libpci.  However non-passthrough and non-suspect
use cases should now be fine.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoSlightly improve error check in xenstore_vm_write()
Ian Jackson [Thu, 5 Feb 2009 16:26:24 +0000 (16:26 +0000)]
Slightly improve error check in xenstore_vm_write()

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
16 years agoEnable guest OS to program D0-D3hot states of an assigned device
Ian Jackson [Thu, 5 Feb 2009 15:54:13 +0000 (15:54 +0000)]
Enable guest OS to program D0-D3hot states of an assigned device

This patch enables guest OS to program D0-D3hot states of assigned
device.

This patch is revised version based on the review comments.

- Use LIST_FOREACH(). Don't use lh_first, le_next directly.
- Use pci_{read, write}_block instead of "switch(len) case [124]
  pci_{read, write}_{byte, word, long}():".

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoclean up piix3_reset() (no more need to set 0x61..0x63 in pci config)
Ian Jackson [Thu, 5 Feb 2009 14:50:07 +0000 (14:50 +0000)]
clean up piix3_reset() (no more need to set 0x61..0x63 in pci config)

Now #ifdef CONFIG_DM part become bogus because of
477afee37ca29e156e3309874d100de0bf4e6fd0.
So remove it.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agofix PCI ROM handling problem in passthrough
Ian Jackson [Thu, 5 Feb 2009 14:48:50 +0000 (14:48 +0000)]
fix PCI ROM handling problem in passthrough

The ROM BAR doesn't get updated after writing '1' to the
/sys/bus/pci/devices/.../rom which causes ROM mapping problem.

This fix makes the ROM enabling revert to old mechanism (write
ROM BAR directly).

Kouya, thank you for testing the fix!

Reported-by: Kouya Shimura <kouya@jp.fujitsu.com>
Tested-by: Kouya Shimura <kouya@jp.fujitsu.com>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoMerge branch 'master' of ../qemu-iwj
Ian Jackson [Thu, 5 Feb 2009 14:48:10 +0000 (14:48 +0000)]
Merge branch 'master' of ../qemu-iwj

16 years agofix raw_aio_read/write error handling
Ian Jackson [Thu, 5 Feb 2009 14:45:25 +0000 (14:45 +0000)]
fix raw_aio_read/write error handling

Currently when qemu_paio_read or qemu_paio_write return an error we call
qemu_aio_release without removing the request from the list.
I know that in the current implementation qemu_paio_write/read don't return
any error, but still the behavior is wrong, especially considering
that the implementation of these two functions is likely to change in is
the future.
This patch fixes the problem adding a raw_aio_remove function that
removes the callback from the queue and also calls qemu_aio_release.
raw_aio_remove is called by raw_aio_read, raw_aio_write and
raw_aio_cancel.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Backported-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoRestore xenfb.h and atkbd_ translation tables for xenfbfront
Ian Jackson [Tue, 27 Jan 2009 12:06:19 +0000 (12:06 +0000)]
Restore xenfb.h and atkbd_ translation tables for xenfbfront

Commit ef21d5fda2be46163d9bc3f65d64a6bfd97dd06e removed xenfb.h but
this broke the stubdom build.  Necessary changes to get the build
working again:
  * un-#if-0 atkbd_set2_keycode and atkbd_unxlate_table in xenfb.c
  * make those two tables not `static'
  * restore xenfb.h, with their declarations
  * adjust the comment in the new xenfb.c

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoGet guest uuid from xenstore
Ian Jackson [Tue, 27 Jan 2009 11:39:10 +0000 (11:39 +0000)]
Get guest uuid from xenstore

xenstore_get_guess_uuid() retrieves the guest uuid by using a sysctl
hypercall through libxc now, but when we use the ioemu-stubdom, the
hcall is not allowed to be invoked.
This patch makes ioemu get the guest uuid from xenstore, instead of
using libxc.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
16 years agoReplacement PV xenfb backend (Gerd Hoffman)
Ian Jackson [Mon, 26 Jan 2009 15:07:08 +0000 (15:07 +0000)]
Replacement PV xenfb backend (Gerd Hoffman)

Description from Gerd's message:
    This patch adds a framebuffer (and kbd+mouse) backend driver.  It
    it based on current xen-unstable code.  It has been changed to make
    use of the common backend driver code.  It also has been changed to
    compile with xen headers older than unstable (aka soon-to-be 3.3).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(Applied as-is.)

16 years agouse the sysfs interface to enable the PCI ROM
Ian Jackson [Mon, 26 Jan 2009 12:09:25 +0000 (12:09 +0000)]
use the sysfs interface to enable the PCI ROM

Writing the base address directly to the ROM BAR may cause problem
since the kernel is not aware of the operation.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoadd libpci fixup to handle recent change in PCIUtils
Ian Jackson [Mon, 26 Jan 2009 12:08:54 +0000 (12:08 +0000)]
add libpci fixup to handle recent change in PCIUtils

The following commit of PCIUtils changes what 'base_addr' contains.
Add a fixup to make sure the pass-through works when building against
different versions of PCIUtils.

  commit 6d143c3283855c474445a3cf27c65280ed7ab1b7
  Author: Yu Zhao <yu.zhao@intel.com>
  Date:   Fri Dec 26 09:59:28 2008 +0800

    Fix base address flags when using sysfs method

    The base address flags are ignored when using sysfs method, while
    the proc and generic methods combined the flags into 'base_addr'.
    This inconsistency may fail some applications using libpci.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agocheck mmap return value when mapping MSI-x table
Ian Jackson [Mon, 26 Jan 2009 12:07:15 +0000 (12:07 +0000)]
check mmap return value when mapping MSI-x table

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoMerge branch 'iwj.kraxel'
Ian Jackson [Fri, 16 Jan 2009 16:44:38 +0000 (16:44 +0000)]
Merge branch 'iwj.kraxel'

16 years agoinitialize vram area to 0xff
Ian Jackson [Fri, 16 Jan 2009 16:26:41 +0000 (16:26 +0000)]
initialize vram area to 0xff

Initialize vram memory in xen_vga_populate_vram().
and some fixes.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Modified-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoReplacement PV console backend (Gerd Hoffman)
Ian Jackson [Fri, 16 Jan 2009 16:02:18 +0000 (16:02 +0000)]
Replacement PV console backend (Gerd Hoffman)

Description from Gerd's message:
    xen: add console backend driver.

    This patch adds a xenconsole backend driver.  It it based on current
    xen-unstable code.  It has been changed to make use of the common
    backend driver code.

Note that this driver is not used at all in the default configurations
of upstream Xen.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(Applied as-is.)

16 years agoProvide alternative Xen backend infrastructure (Gerd Hoffman)
Ian Jackson [Fri, 16 Jan 2009 15:52:44 +0000 (15:52 +0000)]
Provide alternative Xen backend infrastructure (Gerd Hoffman)

Description from Gerd's message:

    Subject: [PATCH] xen: backend driver core

    This patch adds infrastructure for xen backend drivers living in qemu,
    so drivers don't need to implement common stuff on their own.  It's
    mostly xenbus management stuff: some functions to access xentore,
    setting up xenstore watches, callbacks on device discovery and state
    changes, handle event channel, ...

In this patch, this is just additional machinery, which will be used
in the forthcoming change(s).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(Applied as-is.)

16 years agoNew options for Xen invocation (Gerd Hoffman)
Ian Jackson [Fri, 16 Jan 2009 15:52:14 +0000 (15:52 +0000)]
New options for Xen invocation (Gerd Hoffman)

Description from Gerd's message:
    [PATCH] xen: groundwork for xen support
    - wind up new machine type.
    - a bunch of smaller tweaks.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(Applied as-is.)

16 years agoAdd *.orig to .gitignore
Ian Jackson [Fri, 16 Jan 2009 15:51:50 +0000 (15:51 +0000)]
Add *.orig to .gitignore

16 years agodon't use magic number 0xff00000 on ia64
Ian Jackson [Thu, 15 Jan 2009 12:36:55 +0000 (12:36 +0000)]
don't use magic number 0xff00000 on ia64

don't use magic number 0xff00000.
define VRAM_RESERVED_ADDRESS and use it.
On ia64, the area is already used by firmware so define it
to 0xfd0000000.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agoDisable battery management on BSD
Ian Jackson [Wed, 14 Jan 2009 16:27:42 +0000 (16:27 +0000)]
Disable battery management on BSD

BSD lacks ioperm, inb, outb, so the battery management support does
not build on BSD.  We therefore disable it there.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
16 years agoDisable buffer cache invalidation on non-linux hosts
Ian Jackson [Wed, 14 Jan 2009 16:26:38 +0000 (16:26 +0000)]
Disable buffer cache invalidation on non-linux hosts

The BLKFLSBUF ioctl is Linux-specific.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
16 years agoMerge branch 'master' of ../qemu-iwj
Ian Jackson [Wed, 14 Jan 2009 11:10:38 +0000 (11:10 +0000)]
Merge branch 'master' of ../qemu-iwj

16 years agoDon't expose MSI/MSI-X capabilities to IA64 HVM guest in ioemu.
Ian Jackson [Wed, 14 Jan 2009 11:09:39 +0000 (11:09 +0000)]
Don't expose MSI/MSI-X capabilities to IA64 HVM guest in ioemu.

At present IA64 Xen doesn't support MSI for passthrough, so let's not
expose MSI/MSI-X capabilities to IA64 HVM guest for now.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
16 years agostdvga improvements - new videoram allocation system
Ian Jackson [Wed, 14 Jan 2009 11:04:04 +0000 (11:04 +0000)]
stdvga improvements - new videoram allocation system

This patch is the "stdvga improvements" patch to qemu-xen-unstable with
the due changes for the new videoram allocation system.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
(This is Stefano's [PATCH 4 of 4] ioemu;
 1 and 2 are already applied and 3 is in xen-unstable. -iwj)

16 years agoRemove unused struct
Ian Jackson [Tue, 13 Jan 2009 15:47:28 +0000 (15:47 +0000)]
Remove unused struct

Remove
    struct xen_remove_from_physmap xrfp;
which is unused now and about to be removed from Xen.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agopopulate guest videoram
Ian Jackson [Tue, 13 Jan 2009 15:41:01 +0000 (15:41 +0000)]
populate guest videoram

This patch applies to qemu-xen-unstable and implements the new way of
populating the videoram in the guest and mapping it in qemu.  Initially
the videoram is populated at the address 0xff000000 in the guest memory
address space.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
(This is Stefano's [PATCH 2 of 4] ioemu;
 1 is in xen-unstable and 3 and 4 will go in shortly -iwj.)

16 years agoContain MSI errors in msi emulation code
Ian Jackson [Tue, 13 Jan 2009 11:28:04 +0000 (11:28 +0000)]
Contain MSI errors in msi emulation code

If msi=0 is specified and guest want to enable msi, qemu finds it can
not enable it and quits.  (This problem is not appicable for xen
unstable since the "msi=x" switch is removed.)  This patch let these
cases be handled inside msi emulation code. If qemu can not enable
msi, guest will not receive MSI.  But Qemu can still go on.  But if
guest driver does not test MSI's functionality, guest device will stop
to function.

Submitted-By: Haitao Shan
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
(cherry picked from commit 35f55c5b0b54e310c787c39bde0f723a1390e839)

Cherry pick requested by Dexuan Cui:
 In the latest Xen-unstable, MSI in xen was disabled temporarily and
 many guests with MSI-capable NIC assigned fail to bootup.  Could you
 please pull the following commit of qemu-xen-3.3-testing.git into
 qemu-xen-unstable.git?

Conflicts:
hw/pass-through.c

16 years agoconstify some xenstore_... functions for -Wwrite-strings
Ian Jackson [Mon, 12 Jan 2009 14:32:13 +0000 (14:32 +0000)]
constify some xenstore_... functions for -Wwrite-strings

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agopassthrough: MSI-INTx interrupt translation support
Ian Jackson [Mon, 12 Jan 2009 14:28:45 +0000 (14:28 +0000)]
passthrough: MSI-INTx interrupt translation support

This patch enables Xen to use MSI for MSI-capable devices as the
underlying interrupt source even if the guest does not explicitly
use it. The guest will still see an IO-APIC based INTx interrupt
translated by Xen from the MSI irq.

If the guest enables MSI or MSI-X for the passthrough device, this
translation is automatically turned off. It can also be disabled in
the config file at domain startup time.

Signed-off-by: Qing He <qing.he@intel.com>
16 years agoWork around old make's broken interpretation of `#' in $(warning ...)
Ian Jackson [Fri, 9 Jan 2009 16:35:07 +0000 (16:35 +0000)]
Work around old make's broken interpretation of `#' in $(warning ...)

It seems unable to cope with it even like this
 $(warning "### something ###")
so we will change the ### to === instead and hope that works.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoMerge branch 'qemu'
Ian Jackson [Fri, 9 Jan 2009 12:00:10 +0000 (12:00 +0000)]
Merge branch 'qemu'

16 years agoRemove duplicate copy of announce_self_create.
Ian Jackson [Fri, 9 Jan 2009 11:59:37 +0000 (11:59 +0000)]
Remove duplicate copy of announce_self_create.

In 73b0037b2278812fcadadec9d8eac656f1716074,
 `send arp like packets for hvm live migration',
another copy of announce_self_create was introduced.

We remove it in favour of the qemu upstream one, and shuffle a few
bits around to make the build work.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoFix syntax error in xen-hooks.mak
Ian Jackson [Fri, 9 Jan 2009 11:44:02 +0000 (11:44 +0000)]
Fix syntax error in xen-hooks.mak

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoMerge branch 'qemu'
Ian Jackson [Thu, 8 Jan 2009 19:09:22 +0000 (19:09 +0000)]
Merge branch 'qemu'

16 years agosend arp like packets for hvm live migration
Ian Jackson [Thu, 8 Jan 2009 19:07:45 +0000 (19:07 +0000)]
send arp like packets for hvm live migration

When two servers connect different switch/hub and do live migration
between them, network connect will no reponse about 30 seconds,
it caused by migration finished, target server do not broadcast
guest os's network info.

In pvm, when backend changed, netfront driver will send fake arp
to network, so, hvm also need this.

Uri Lublin [wrote] the patch for it:
http://www.mail-archive.com/qemu-devel@nongnu.org/msg09306.html

I [Joe] add send arp like packets at tap_receive(), and it looked like
work fine.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
Tested-by: Deepak Patel <deepak.patel@oracle.com>
CC: Keir Fraser <keir.fraser@eu.citrix.com>
CC: Kurt C. Hackel <kurt.hackel@oracle.com>
16 years agoMerge branch 'master' of ../qemu-iwj
Ian Jackson [Wed, 7 Jan 2009 15:18:06 +0000 (15:18 +0000)]
Merge branch 'master' of ../qemu-iwj

16 years agofix usb-hid emulation SET_IDLE
Ian Jackson [Wed, 7 Jan 2009 15:16:04 +0000 (15:16 +0000)]
fix usb-hid emulation SET_IDLE

there is a bug in the current usb-hid emulation code that affects the
way the idle flag is handled: the spec clearly states that when SET_IDLE
is called with a value == 0 means "do not send any event unless there is
an actual change". However we are currently assuming the opposite
meaning of the flag.
This patch fixes it and it also fixes a possible initialization issue
that is uncovered by using the default idle flag set to 0.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
[supplied patch also trivially changed by Ian Jackson]

16 years agoxen-hooks.mak: Do not print `***' when compiling unless we fall over
Ian Jackson [Tue, 6 Jan 2009 16:07:04 +0000 (16:07 +0000)]
xen-hooks.mak: Do not print `***' when compiling unless we fall over

make prints `***' when it stops due to an error.  With make -j, and/or
with automated build systems, this error marker can be in the middle
of a large logfile.  It is useful to be able to search for it.

Therefore change occurrences of `*' to `#' for information and warning
messages.  `***' is reserved for cases where the build stops.

A corresponding change is being submitted to xen-unstable.hg.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agomagic ioport 0x10 protocol - give owner names
Ian Jackson [Wed, 31 Dec 2008 16:18:01 +0000 (16:18 +0000)]
magic ioport 0x10 protocol - give owner names

Product IDs should have named owners to discourage reuse and identify
who is supposed to be using them.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agomagic ioport 0x10 protocol - allocate for "gplpv-windows"
Ian Jackson [Wed, 31 Dec 2008 16:16:56 +0000 (16:16 +0000)]
magic ioport 0x10 protocol - allocate for "gplpv-windows"

Allocate code 2 for James Harper's GPL-PV Windows drivers.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agomagic ioport 0x10 protocol - allocate "experimental"
Ian Jackson [Wed, 31 Dec 2008 16:15:40 +0000 (16:15 +0000)]
magic ioport 0x10 protocol - allocate "experimental"

Allocate product code 0xffff == 65535 for experimental pre-release
drivers.  This will help by giving developers something to use which
doesn't tread on anyone's toes.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agomagic ioport 0x10 protocol - clean up document
Ian Jackson [Wed, 31 Dec 2008 16:12:51 +0000 (16:12 +0000)]
magic ioport 0x10 protocol - clean up document

Clean up the README and product number registry comment:
 - removing mail headers
 - specifying that the magic number will be reversed
   if the drivers are blacklisted
 - clarifying that logging is permitted if drivers are
   blacklisted
 - specifying clearly when people should allocate new numbers

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agodisable qemu PCI devices in HVM domains - protocol document
Ian Jackson [Wed, 31 Dec 2008 16:02:18 +0000 (16:02 +0000)]
disable qemu PCI devices in HVM domains - protocol document

This is the protocol specification for the IO port 0x10 feature as
posted to xen-devel by Steven Smith.

Contributed-By: Steven Smith <steven.smith@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agodisable qemu PCI devices in HVM domains
Ian Jackson [Wed, 31 Dec 2008 16:00:20 +0000 (16:00 +0000)]
disable qemu PCI devices in HVM domains

Magic ioport (0x10) protocol for negotating with guest PV drivers
during startup, and allowing PV drivers to disable hardware emulations
thus preventing guest from seeing the same device through two paths.

Protocol and implementation from the Citrix Xenserver product line.
Documentation (protocol spec) will follow in a moment.

Contributed-By: Steven Smith <steven.smith@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoDo not install signal handlers in qemu-dm
Ian Jackson [Tue, 30 Dec 2008 16:49:29 +0000 (16:49 +0000)]
Do not install signal handlers in qemu-dm

Instead, if we get a terminating signal, just die.  This means that
xend can kill us.  Unlike upstream qemu, we are not at risk from being
sent random console signals as an attempt to cleanly terminate the
domain.

Thanks to report from Dexuan Cui <dexuan.cui@intel.com>.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agostubdom: Fix live migration of HVM domain
Ian Jackson [Wed, 17 Dec 2008 11:39:21 +0000 (11:39 +0000)]
stubdom: Fix live migration of HVM domain

Live-migration fails because stubdom-dm doesn't respond to the request
from xc_save for the logdirty bitmap segment. The attached patch
simply generated from old ioemu tree will fix the issue, then.

Derived from old xen internal tools/ioemu tree.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
16 years agoposix_aio_init: Explicitly unblock SIGUSR2 not USR1
Ian Jackson [Tue, 16 Dec 2008 16:03:12 +0000 (16:03 +0000)]
posix_aio_init: Explicitly unblock SIGUSR2 not USR1

In 1f4f23ae9fc220eec55aa742f67f5bb47716bcc6 I arranged to explicitly
unblock the wrong signal - the occurrence of SIGUSR1 was a leftover
from my various debugging trees.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agousb-hid.c: fix usb mouse wheel
Ian Jackson [Thu, 11 Dec 2008 18:04:47 +0000 (18:04 +0000)]
usb-hid.c: fix usb mouse wheel

This patch fixes the usb mouse wheel of usb devices.

[ Previously, tablets would fail to subtract dz from e->dz thus
  producing an infinite stream of reports; also the wheel direction
  inversions had been multipled by merge damage resulting in the wrong
  number of inversions for mice. -iwj ]

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
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