sdk/emulator/qemu.git
12 years agoMerge remote-tracking branch 'qemu-kvm/memory/batch' into staging
Anthony Liguori [Mon, 5 Dec 2011 14:43:38 +0000 (08:43 -0600)]
Merge remote-tracking branch 'qemu-kvm/memory/batch' into staging

12 years agoUpdate version for 1.1 development branch
Anthony Liguori [Mon, 5 Dec 2011 14:39:02 +0000 (08:39 -0600)]
Update version for 1.1 development branch

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoUpdate version for 1.0 release
Anthony Liguori [Thu, 1 Dec 2011 20:04:21 +0000 (14:04 -0600)]
Update version for 1.0 release

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoMakefile: use full path for qapi-generated directory
Michael Roth [Tue, 29 Nov 2011 22:47:49 +0000 (16:47 -0600)]
Makefile: use full path for qapi-generated directory

Generally $(BUILD_DIR) == $(CURDIR), but that isn't necessarilly the
case, so use $(BUILD_DIR)/qapi-generated for generated files to
avoid potentionally sticking generating files in odd places outside
the build's include paths.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoqapi: fix guardname generation
Michael Roth [Tue, 29 Nov 2011 22:47:48 +0000 (16:47 -0600)]
qapi: fix guardname generation

Fix a bug in handling dotted paths, and exclude directory prefixes
from generated guardnames to avoid odd/pseudo-random guardnames in
generated headers.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoUpdate version for 1.0-rc4
Anthony Liguori [Mon, 28 Nov 2011 17:37:57 +0000 (11:37 -0600)]
Update version for 1.0-rc4

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoccid: Fix buffer overrun in handling of VSC_ATR message
Markus Armbruster [Mon, 28 Nov 2011 19:27:37 +0000 (20:27 +0100)]
ccid: Fix buffer overrun in handling of VSC_ATR message

ATR size exceeding the limit is diagnosed, but then we merrily use it
anyway, overrunning card->atr[].

The message is read from a character device.  Obvious security
implications unless the other end of the character device is trusted.

Spotted by Coverity.  CVE-2011-4111.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoRevert "fix out of tree build"
Anthony Liguori [Mon, 28 Nov 2011 18:45:28 +0000 (12:45 -0600)]
Revert "fix out of tree build"

This reverts commit be85c90b74f56dca51782fa3080fcdf88593e045.

This patch is incorrect and breaks the build with a freshly cloned git tree.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoconfigure: avoid screening of --{en, dis}able-usb-redir options
Max Filippov [Thu, 24 Nov 2011 12:11:31 +0000 (16:11 +0400)]
configure: avoid screening of --{en, dis}able-usb-redir options

--*dir) option pattern precede --{en,dis}able-usb-redir) patterns in the
option analysis switch, making the latter options have no effect.

There were some --*dir that are supported by Autoconf and not by QEMU configure.
The aim was to let QEMU packagers use the rpm (or similar) macro that overrides
directories for their distribution.

Replace --*dir with exact option names.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agocutils: Make strtosz & friends leave follow set to callers
Markus Armbruster [Tue, 22 Nov 2011 08:46:06 +0000 (09:46 +0100)]
cutils: Make strtosz & friends leave follow set to callers

strtosz() & friends require the size to be at the end of the string,
or be followed by whitespace or ','.  I find this surprising, because
the name suggests it works like strtol().

The check simplifies callers that accept exactly that follow set
slightly.  No such callers exist.

The check is redundant for callers that accept a smaller follow set,
and thus need to check themselves anyway.  Right now, this is the case
for all but one caller.  All of them neglected to check, or checked
incorrectly, but the previous few commits fixed them up.

Finally, the check is problematic for callers that accept a larger
follow set.  This is the case in monitor_parse_command().
Fortunately, the problems there are relatively harmless.

monitor_parse_command() uses strtosz() for argument type 'o'.  When
the last argument is of type 'o', a trailing ',' is diagnosed
differently than other trailing junk:

    (qemu) migrate_set_speed 1x
    invalid size
    (qemu) migrate_set_speed 1,
    migrate_set_speed: extraneous characters at the end of line

A related inconsistency exists with non-last arguments.  No such
command exists, but let's use memsave to explore the inconsistency.

The monitor permits, but does not require whitespace between
arguments.  For instance, "memsave (1-1)1024foo" is parsed as command
memsave with three arguments 0, 1024 and "foo".  Yes, this is daft,
but at least it's consistently daft.

If I change memsave's second argument from 'i' to 'o', then "memsave
(1-1)1foo" is rejected, because the size is followed by an 'f'.  But
"memsave (1-1)1," is still accepted, and duly saves to file ",".

We don't have any users of strtosz that profit from the check.  In the
users we have, it appears to encourage sloppy error checking, or gets
in the way.  Drop the bothersome check.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoqemu-img: Tighten parsing of size arguments
Markus Armbruster [Tue, 22 Nov 2011 08:46:05 +0000 (09:46 +0100)]
qemu-img: Tighten parsing of size arguments

strtosz_suffix() fails unless the size is followed by 0, whitespace or
','.  Useless here, because we need to fail for any junk following the
size, even if it starts with whitespace or ','.  Check manually.
Things like "qemu-img create xxx 1024," and "qemu-img convert -S '1024
junk'" are now caught.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agox86/cpuid: Tighten parsing of tsc_freq=FREQ
Markus Armbruster [Tue, 22 Nov 2011 08:46:04 +0000 (09:46 +0100)]
x86/cpuid: Tighten parsing of tsc_freq=FREQ

cpu_x86_find_by_name() uses strtosz_suffix_unit(), but screws up the
error checking.  It detects some failures, but not all.  Undetected
failures result in a zero tsc_khz value (error value -1 divided by
1000), which means "no tsc_freq set".

To reproduce, try "-cpu qemu64,tsc_freq=9999999T".
strtosz_suffix_unit() fails, because the value overflows int64_t,

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agovl: Tighten parsing of -m argument
Markus Armbruster [Tue, 22 Nov 2011 08:46:03 +0000 (09:46 +0100)]
vl: Tighten parsing of -m argument

strtosz_suffix() fails unless the size is followed by 0, whitespace or
','.  Useless here, because we need to fail for any junk following the
size, even if it starts with whitespace or ','.  Check manually.
Things like "-m 1024," are now caught.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agovl: Tighten parsing of -numa's parameter mem
Markus Armbruster [Tue, 22 Nov 2011 08:46:02 +0000 (09:46 +0100)]
vl: Tighten parsing of -numa's parameter mem

strtosz_suffix() fails unless the size is followed by 0, whitespace or
','.  Useless here, because we need to fail for any junk following the
size, even if it starts with whitespace or ','.  Check manually.

Things like

    -smp 4 -numa "node,mem=1024,cpus=0-1" -numa "node,mem=1024 cpus=2-3"

are now caught.  Before, the second -numa's argument was silently
interpreted as just "node,mem=1024".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agocutils: Drop broken support for zero strtosz default_suffix
Markus Armbruster [Tue, 22 Nov 2011 08:46:01 +0000 (09:46 +0100)]
cutils: Drop broken support for zero strtosz default_suffix

Commit 9f9b17a4's strtosz() defaults a missing suffix to 'M', except
it rejects fractions then (switch case 0).

When commit d8427002 introduced strtosz_suffix(), that changed:
fractions are no longer rejected, because we go to switch case 'M' on
missing suffix now.  Not mentioned in commit message, probably
unintentional.  Not worth changing back now.

Because case 0 is still around, you can get the old behavior by
passing a zero default_suffix to strtosz_suffix() or
strtosz_suffix_unit().  Undocumented and not used.  Drop.

Commit d8427002 also neglected to update the function comment.  Fix it
up.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoconfigure: tighten pie toolchain support test for tls variables
Avi Kivity [Wed, 23 Nov 2011 09:24:25 +0000 (11:24 +0200)]
configure: tighten pie toolchain support test for tls variables

Some toolchains don't support pie properly when tls variables are
in use.  Disallow pie when such toolchains are detected.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agousb-redir: Don't try to write to the chardev after a close event
Hans de Goede [Sat, 19 Nov 2011 09:22:47 +0000 (10:22 +0100)]
usb-redir: Don't try to write to the chardev after a close event

Since we handle close async in a bh, do_write and thus write can get
called after receiving a close event. This patch adds a check to
the usb-redir write callback to not call qemu_chr_fe_write on a closed
backend.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agousb-redir: Device disconnect + re-connect robustness fixes
Hans de Goede [Sat, 19 Nov 2011 09:22:46 +0000 (10:22 +0100)]
usb-redir: Device disconnect + re-connect robustness fixes

These fixes mainly target the other side sending some (error status)
packets after a disconnect packet. In some cases these would get queued
up and then reported to the controller when a new device gets connected.

* Fully reset device state on disconnect
* Don't allow a connect message when already connected
* Ignore iso and interrupt status messages when disconnected

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agousb-redir: Call qemu_chr_fe_open/close
Hans de Goede [Sat, 19 Nov 2011 09:22:45 +0000 (10:22 +0100)]
usb-redir: Call qemu_chr_fe_open/close

To let the chardev now we're ready start receiving data. This is necessary
with the spicevmc chardev to get it registered with the spice-server.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agospice-qemu-char: Generate chardev open/close events
Hans de Goede [Sat, 19 Nov 2011 09:22:44 +0000 (10:22 +0100)]
spice-qemu-char: Generate chardev open/close events

Define a state callback and make that generate chardev open/close events when
called by the spice-server.

Notes:

1) For all but the newest spice-server versions (which have a fix for this)
the code ignores these events for a spicevmc with a subtype of vdagent, this
subtype specific knowledge is undesirable, but unavoidable for now, see:
http://lists.freedesktop.org/archives/spice-devel/2011-July/004837.html

2) This code deliberately sends the events immediately rather then from a
bh. This is done this way because:
a) There is no need to do it from a bh; and
b) Doing it from a bh actually causes issues because the spice-server may send
data immediately after the open and when the open runs from a bh, then
qemu_chr_be_can_write will return 0 for the first write which the spice-server
does not expect, when this happens the spice-server will never retry the write
causing communication to stall.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoqemu-char: rename qemu_chr_event to qemu_chr_be_event and make it public
Hans de Goede [Sat, 19 Nov 2011 09:22:43 +0000 (10:22 +0100)]
qemu-char: rename qemu_chr_event to qemu_chr_be_event and make it public

Rename qemu_chr_event to qemu_chr_be_event, since it is only to be
called by backends and make it public so that it can be used by chardev
code which lives outside of qemu-char.c

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years ago9pfs: improve portability to older systems
Aneesh Kumar K.V [Wed, 23 Nov 2011 06:16:27 +0000 (11:46 +0530)]
9pfs: improve portability to older systems

I guess we can also make sure we don't  call local_ioc_getversion at
all.

Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agotci: Make flush_icache_range() inline
Stefan Weil [Thu, 24 Nov 2011 22:16:10 +0000 (23:16 +0100)]
tci: Make flush_icache_range() inline

This is standard for other tcg targets and improves tci, too.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoeepro100: Fix alignment requirement for statistical counters
Stefan Weil [Wed, 23 Nov 2011 21:20:30 +0000 (22:20 +0100)]
eepro100: Fix alignment requirement for statistical counters

According to Intel's Open Source Software Developer Manual,
the dump counters address must be Dword aligned.

The new code enforces this alignment, so s->statsaddr may now
be used with stw_le_pci_dma() and stl_le_pci_dma().

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agovirtio: add and use virtio_set_features
Paolo Bonzini [Thu, 24 Nov 2011 12:28:52 +0000 (13:28 +0100)]
virtio: add and use virtio_set_features

vdev->guest_features is not masking features that are not supported by
the guest.  Fix this by introducing a common wrapper to be used by all
virtio bus implementations.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years ago9pfs: improve portability to older systems
Paolo Bonzini [Mon, 21 Nov 2011 08:29:11 +0000 (09:29 +0100)]
9pfs: improve portability to older systems

Small requirements on "new" features have percolated to virtio-9p-local.c.
In particular, the utimensat wrapper actually only supports dirfd = AT_FDCWD
and flags = AT_SYMLINK_NOFOLLOW in the fallback code.  Remove the arguments
so that virtio-9p-local.c will not use AT_* constants.

At the same time, fail local_ioc_getversion if the ioctl is not supported
by the host.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoMerge remote-tracking branch 'kwolf/block-stable' into staging
Anthony Liguori [Mon, 28 Nov 2011 17:15:10 +0000 (11:15 -0600)]
Merge remote-tracking branch 'kwolf/block-stable' into staging

12 years agoMerge remote-tracking branch 'kraxel/usb.32' into staging
Anthony Liguori [Mon, 28 Nov 2011 17:12:39 +0000 (11:12 -0600)]
Merge remote-tracking branch 'kraxel/usb.32' into staging

12 years agoMerge remote-tracking branch 'stefanha/trivial-patches' into staging
Anthony Liguori [Mon, 28 Nov 2011 17:11:09 +0000 (11:11 -0600)]
Merge remote-tracking branch 'stefanha/trivial-patches' into staging

12 years agoRevert "i386: derive '-cpu host' from KVM_GET_SUPPORTED_CPUID"
Anthony Liguori [Sun, 27 Nov 2011 17:13:01 +0000 (11:13 -0600)]
Revert "i386: derive '-cpu host' from KVM_GET_SUPPORTED_CPUID"

This reverts commit 66e3dd9282141b5ae75637c9676002cf3ceeb988.

From Avi,

 "Anthony, I think we should revert that commit and refactor cpuid for
  1.1.  The logic is spread over too many places which makes it hard to
  reason about."

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoomap_l4: rename omap_l4_attach_region() to omap_l4_attach()
Avi Kivity [Mon, 28 Nov 2011 13:40:49 +0000 (15:40 +0200)]
omap_l4: rename omap_l4_attach_region() to omap_l4_attach()

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap_l4: remove omap_l4_attach()
Avi Kivity [Mon, 28 Nov 2011 13:37:30 +0000 (15:37 +0200)]
omap_l4: remove omap_l4_attach()

No longer used.

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap_i2c: convert to memory API
Benoît Canet [Fri, 25 Nov 2011 14:21:37 +0000 (15:21 +0100)]
omap_i2c: convert to memory API

Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap_lcdc: convert to memory API
Benoît Canet [Mon, 28 Nov 2011 12:53:36 +0000 (13:53 +0100)]
omap_lcdc: convert to memory API

Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap_spi: convert to memory API
Benoît Canet [Mon, 28 Nov 2011 12:53:35 +0000 (13:53 +0100)]
omap_spi: convert to memory API

Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap_sx1: convert to memory API
Benoît Canet [Mon, 28 Nov 2011 12:53:34 +0000 (13:53 +0100)]
omap_sx1: convert to memory API

Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap_l4: convert to memory API
Benoît Canet [Fri, 25 Nov 2011 14:21:36 +0000 (15:21 +0100)]
omap_l4: convert to memory API

Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap_dss: convert to memory API
Avi Kivity [Mon, 28 Nov 2011 11:10:11 +0000 (13:10 +0200)]
omap_dss: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap2: convert to memory API (part II)
Avi Kivity [Sun, 27 Nov 2011 09:53:29 +0000 (11:53 +0200)]
omap2: convert to memory API (part II)

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap2: convert to memory API (part I)
Avi Kivity [Sun, 27 Nov 2011 09:53:29 +0000 (11:53 +0200)]
omap2: convert to memory API (part I)

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agosysbus: rename sysbus_init_mmio_region() to sysbus_init_mmio()
Avi Kivity [Sun, 27 Nov 2011 09:38:10 +0000 (11:38 +0200)]
sysbus: rename sysbus_init_mmio_region() to sysbus_init_mmio()

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agosysbus: remove sysbus_init_mmio()
Avi Kivity [Sun, 27 Nov 2011 09:32:34 +0000 (11:32 +0200)]
sysbus: remove sysbus_init_mmio()

No longer used - replaced by sysbus_init_mmio_region().

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agobonito: convert cop to memory API
Benoît Canet [Thu, 24 Nov 2011 13:31:22 +0000 (14:31 +0100)]
bonito: convert cop to memory API

Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agobonito: convert ldma to memory API
Benoît Canet [Thu, 24 Nov 2011 13:31:21 +0000 (14:31 +0100)]
bonito: convert ldma to memory API

Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agobonito: convert south bridge pci config to memory API
Benoît Canet [Thu, 24 Nov 2011 13:31:20 +0000 (14:31 +0100)]
bonito: convert south bridge pci config to memory API

Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agobonito: convert north bridge pci config to memory API
Benoît Canet [Thu, 24 Nov 2011 13:31:19 +0000 (14:31 +0100)]
bonito: convert north bridge pci config to memory API

Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agobonito: convert north bridge register mapping to memory API
Benoît Canet [Thu, 24 Nov 2011 13:31:18 +0000 (14:31 +0100)]
bonito: convert north bridge register mapping to memory API

Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agolm32_sys: convert to memory API
Benoît Canet [Thu, 24 Nov 2011 13:31:17 +0000 (14:31 +0100)]
lm32_sys: convert to memory API

Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agolm32_uart: convert to memory API
Benoît Canet [Thu, 24 Nov 2011 13:31:16 +0000 (14:31 +0100)]
lm32_uart: convert to memory API

Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomcf_intc: convert to memory API
Benoît Canet [Thu, 24 Nov 2011 13:31:15 +0000 (14:31 +0100)]
mcf_intc: convert to memory API

Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomcf_fec: convert to memory API
Benoît Canet [Thu, 24 Nov 2011 13:31:14 +0000 (14:31 +0100)]
mcf_fec: convert to memory API

Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomcf_uart: convert to memory API
Benoît Canet [Thu, 24 Nov 2011 13:31:13 +0000 (14:31 +0100)]
mcf_uart: convert to memory API

Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomcf5206: convert to memory API
Benoît Canet [Thu, 24 Nov 2011 13:31:12 +0000 (14:31 +0100)]
mcf5206: convert to memory API

Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap_gpio: convert to memory API
Avi Kivity [Thu, 24 Nov 2011 12:32:34 +0000 (14:32 +0200)]
omap_gpio: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap_dma: convert to memory API
Avi Kivity [Thu, 24 Nov 2011 12:32:34 +0000 (14:32 +0200)]
omap_dma: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap_sdrc: convert to memory API
Avi Kivity [Thu, 24 Nov 2011 12:32:34 +0000 (14:32 +0200)]
omap_sdrc: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap_gp_timer: convert to memory API
Avi Kivity [Thu, 24 Nov 2011 12:32:34 +0000 (14:32 +0200)]
omap_gp_timer: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap_synctimer: convert to memory API
Avi Kivity [Thu, 24 Nov 2011 12:32:34 +0000 (14:32 +0200)]
omap_synctimer: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap_tap: convert to memory API
Avi Kivity [Thu, 24 Nov 2011 09:58:20 +0000 (11:58 +0200)]
omap_tap: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap_mmc: convert to memory API
Avi Kivity [Thu, 24 Nov 2011 09:49:29 +0000 (11:49 +0200)]
omap_mmc: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap_l4: add memory API variant of omap_l4_attach()
Avi Kivity [Wed, 23 Nov 2011 13:17:36 +0000 (15:17 +0200)]
omap_l4: add memory API variant of omap_l4_attach()

Also add omap_l4_region_size(), since memory API functions need
the size during initialization.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap: eliminate l4_register_io_memory
Avi Kivity [Wed, 23 Nov 2011 12:58:10 +0000 (14:58 +0200)]
omap: eliminate l4_register_io_memory

This is a trivial wrapper around cpu_register_io_memory(), adding
no value.  Inline it into all callers.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap: remove L4_MUX_HACK
Avi Kivity [Wed, 23 Nov 2011 12:06:31 +0000 (14:06 +0200)]
omap: remove L4_MUX_HACK

This was introduced apparently to overcome a limitation on the number of
cpu_register_io_memory() calls.  477b24ef91175 (July 2008) removed use
of the hack, but retained the code.  This patch removes the code as well.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andrzej Zaborowski <balrogg@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoomap_uart: convert to memory API
Avi Kivity [Tue, 22 Nov 2011 13:06:46 +0000 (15:06 +0200)]
omap_uart: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agotci: Add entry to MAINTAINERS
Stefan Weil [Thu, 24 Nov 2011 22:20:43 +0000 (23:20 +0100)]
tci: Add entry to MAINTAINERS

This should have be part of my TCI patch series.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoMAINTAINERS: add checkpatch
Blue Swirl [Sat, 26 Nov 2011 09:51:23 +0000 (09:51 +0000)]
MAINTAINERS: add checkpatch

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agocheckpatch.pl: fix CAST detection
Florian Mickler [Fri, 25 Nov 2011 09:24:16 +0000 (10:24 +0100)]
checkpatch.pl: fix CAST detection

We should only claim that something is a cast if we did not encouter a
token before, that did set av_pending.

This fixes the operator * in the line below to be detected as binary (vs
unary).

kmalloc(sizeof(struct alphatrack_ocmd) * true_size, GFP_KERNEL);

Reported-by: Peter Chubb <nicta.com.au>
Signed-off-by: Florian Mickler <florian@mickler.org>
(cherry-picked from Linux kernel commit c023e4734c3e8801e0ecb5e81b831d42a374d861)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agotarget-xtensa: fix MMUv3 initialization
Max Filippov [Tue, 22 Nov 2011 07:59:16 +0000 (11:59 +0400)]
target-xtensa: fix MMUv3 initialization

- ITLB/DTLB ways 5 and 6 have 4 and 8 entries respectively;
- ITLB/DTLB way 6 attr field is set to 3 on reset.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoprep_pci: convert to memory API
Avi Kivity [Mon, 21 Nov 2011 15:16:57 +0000 (17:16 +0200)]
prep_pci: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoppce500_pci: convert to memory API
Avi Kivity [Sun, 20 Nov 2011 09:52:58 +0000 (11:52 +0200)]
ppce500_pci: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoppc4xx_pci: convert to memory API
Avi Kivity [Sun, 20 Nov 2011 09:44:37 +0000 (11:44 +0200)]
ppc4xx_pci: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agolm32_timer: convert to memory API
Avi Kivity [Sun, 20 Nov 2011 09:44:25 +0000 (11:44 +0200)]
lm32_timer: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agosh_serial: convert to memory API
Benoît Canet [Thu, 17 Nov 2011 13:23:02 +0000 (14:23 +0100)]
sh_serial: convert to memory API

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agosh_intc: convert interrupt controller to memory API
Benoît Canet [Thu, 17 Nov 2011 13:23:01 +0000 (14:23 +0100)]
sh_intc: convert interrupt controller to memory API

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agosh_timer: convert to memory API
Benoît Canet [Thu, 17 Nov 2011 13:23:00 +0000 (14:23 +0100)]
sh_timer: convert to memory API

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agosh7750: convert cache and tlb to memory API
Benoît Canet [Thu, 17 Nov 2011 13:22:59 +0000 (14:22 +0100)]
sh7750: convert cache and tlb to memory API

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agosh7750: convert memory controller/ioport to memory API
Benoît Canet [Thu, 17 Nov 2011 13:22:58 +0000 (14:22 +0100)]
sh7750: convert memory controller/ioport to memory API

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoslavio_timer: convert to memory API
Benoît Canet [Tue, 15 Nov 2011 11:14:02 +0000 (12:14 +0100)]
slavio_timer: convert to memory API

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoslavio_intctl: convert slaves interrupt controllers to memory API
Benoît Canet [Tue, 15 Nov 2011 11:14:00 +0000 (12:14 +0100)]
slavio_intctl: convert slaves interrupt controllers to memory API

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoslavio_intctl: convert master interrupt controller to memory API
Benoît Canet [Tue, 15 Nov 2011 11:13:59 +0000 (12:13 +0100)]
slavio_intctl: convert master interrupt controller to memory API

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoslavio_misc: convert aux2 to memory API
Benoît Canet [Tue, 15 Nov 2011 11:13:58 +0000 (12:13 +0100)]
slavio_misc: convert aux2 to memory API

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoslavio_misc: convert aux1 to memory API
Benoît Canet [Tue, 15 Nov 2011 11:13:57 +0000 (12:13 +0100)]
slavio_misc: convert aux1 to memory API

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoslavio_misc: convert system control to memory API
Benoît Canet [Tue, 15 Nov 2011 11:13:56 +0000 (12:13 +0100)]
slavio_misc: convert system control to memory API

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoslavio_misc: convert leds to memory API
Benoît Canet [Tue, 15 Nov 2011 11:13:55 +0000 (12:13 +0100)]
slavio_misc: convert leds to memory API

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoslavio_misc: convert modem to memory API
Benoît Canet [Tue, 15 Nov 2011 11:13:54 +0000 (12:13 +0100)]
slavio_misc: convert modem to memory API

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoslavio_misc: convert diagnostic to memory API
Benoît Canet [Tue, 15 Nov 2011 11:13:53 +0000 (12:13 +0100)]
slavio_misc: convert diagnostic to memory API

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoslavio_misc: convert configuration to memory API
Benoît Canet [Tue, 15 Nov 2011 11:13:52 +0000 (12:13 +0100)]
slavio_misc: convert configuration to memory API

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoslavio_misc: convert apc to memory API
Benoît Canet [Tue, 15 Nov 2011 11:13:51 +0000 (12:13 +0100)]
slavio_misc: convert apc to memory API

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoxilinx_axienet: convert to memory API
Avi Kivity [Tue, 15 Nov 2011 10:26:54 +0000 (12:26 +0200)]
xilinx_axienet: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoxilinx_axidma: convert to memory API
Avi Kivity [Tue, 15 Nov 2011 10:26:54 +0000 (12:26 +0200)]
xilinx_axidma: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agosun4c_intctl: convert to memory API
Avi Kivity [Tue, 15 Nov 2011 09:56:16 +0000 (11:56 +0200)]
sun4c_intctl: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agosun4m_iommu: convert to memory API
Avi Kivity [Tue, 15 Nov 2011 09:56:16 +0000 (11:56 +0200)]
sun4m_iommu: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agogrlib_irqmp: convert to memory API
Avi Kivity [Mon, 14 Nov 2011 12:23:17 +0000 (14:23 +0200)]
grlib_irqmp: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agogrlib_gptimer: convert to memory API
Avi Kivity [Mon, 14 Nov 2011 12:23:17 +0000 (14:23 +0200)]
grlib_gptimer: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agogrlib_apbuart: convert to memory API
Avi Kivity [Mon, 14 Nov 2011 11:10:13 +0000 (13:10 +0200)]
grlib_apbuart: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomusicpal: avoid call to sysbus_init_mmio()
Avi Kivity [Mon, 14 Nov 2011 10:59:29 +0000 (12:59 +0200)]
musicpal: avoid call to sysbus_init_mmio()

Instead of calling sysbus_init_mmio() with a null region,
create a dummy region using the memory API.

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agobitbang_i2c: avoid call to sysbus_init_mmio()
Avi Kivity [Mon, 14 Nov 2011 10:59:29 +0000 (12:59 +0200)]
bitbang_i2c: avoid call to sysbus_init_mmio()

Instead of calling sysbus_init_mmio() with a null region,
create a dummy region using the memory API.

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agosparc32_dma: convert to memory API
Avi Kivity [Mon, 14 Nov 2011 09:55:27 +0000 (11:55 +0200)]
sparc32_dma: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agopxa2xx_dma: convert to memory API
Avi Kivity [Mon, 14 Nov 2011 09:55:27 +0000 (11:55 +0200)]
pxa2xx_dma: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoaxis_dev88: convert to memory API
Avi Kivity [Mon, 14 Nov 2011 09:17:21 +0000 (11:17 +0200)]
axis_dev88: convert to memory API

Signed-off-by: Avi Kivity <avi@redhat.com>