]> git.proxmox.com Git - qemu.git/log
qemu.git
12 years agousb: track altsetting in USBDevice
Gerd Hoffmann [Tue, 30 Aug 2011 11:21:27 +0000 (13:21 +0200)]
usb: track altsetting in USBDevice

Also handle {GET,SET}_INTERFACE in common code (usb-desc.c).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agousb: track configuration and interface count in USBDevice.
Gerd Hoffmann [Tue, 30 Aug 2011 09:11:29 +0000 (11:11 +0200)]
usb: track configuration and interface count in USBDevice.

Move fields from USBHostDevice to USBDevice.
Add bits to usb-desc.c to fill them for emulated devices too.
Also allow to set configuration 0 (== None) for emulated devices.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agousb-host: rip out legacy procfs support
Gerd Hoffmann [Fri, 16 Dec 2011 10:54:11 +0000 (11:54 +0100)]
usb-host: rip out legacy procfs support

This patch removes support for parsing /proc/bus/usb/devices for device
discovery.  The code lacks a few features compared to the sysfs code and
is also bitrotting as everybody has sysfs these days.

This implies having sysfs mounted is mandatory now to use the usb-host
driver.  udev isn't required though.  qemu will prefer the udev-managed
device nodes below /dev/bus/usb, but in case this directory isn't preset
qemu will use the device nodes below /proc/bus/usb (default usbfs mount
point).

Bottom line: make sure you have both sysfs and usbfs mounted properly,
and everything should continue to work as it did before.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agocheck-qstring: remove check.h include
Anthony Liguori [Thu, 12 Jan 2012 17:33:22 +0000 (11:33 -0600)]
check-qstring: remove check.h include

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoMAINTAINERS: update tracing repo git URL
Stefan Hajnoczi [Wed, 11 Jan 2012 10:02:43 +0000 (10:02 +0000)]
MAINTAINERS: update tracing repo git URL

I have moved git hosting services.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoSupport for UDP unicast network backend
Benjamin [Wed, 11 Jan 2012 00:20:54 +0000 (09:20 +0900)]
Support for UDP unicast network backend

Signed-off-by: Benjamin MARSILI <mlspirat42@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agocleanup, save a syscall
Lai Jiangshan [Thu, 12 Jan 2012 09:05:35 +0000 (17:05 +0800)]
cleanup, save a syscall

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agocleanup, Remove duplicated code
Lai Jiangshan [Thu, 12 Jan 2012 09:05:34 +0000 (17:05 +0800)]
cleanup, Remove duplicated code

These two blocks of code are exactly the same, remove one.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agotest: eliminate libcheck tests and have make check use gtester
Anthony Liguori [Tue, 10 Jan 2012 19:10:51 +0000 (13:10 -0600)]
test: eliminate libcheck tests and have make check use gtester

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agocheck-qjson: enable disabled tests
Anthony Liguori [Tue, 10 Jan 2012 19:10:50 +0000 (13:10 -0600)]
check-qjson: enable disabled tests

gtest does the right thing here so there's no need to comment these tests out.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agocheck-qjson: convert to gtest
Anthony Liguori [Tue, 10 Jan 2012 19:10:49 +0000 (13:10 -0600)]
check-qjson: convert to gtest

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agocheck-qlist: convert to gtest
Anthony Liguori [Tue, 10 Jan 2012 19:10:48 +0000 (13:10 -0600)]
check-qlist: convert to gtest

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agocheck-qstring: convert to gtest
Anthony Liguori [Tue, 10 Jan 2012 19:10:47 +0000 (13:10 -0600)]
check-qstring: convert to gtest

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agocheck-qint: convert to gtest
Anthony Liguori [Tue, 10 Jan 2012 19:10:46 +0000 (13:10 -0600)]
check-qint: convert to gtest

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agocheck-qfloat: convert to gtest
Anthony Liguori [Tue, 10 Jan 2012 19:10:45 +0000 (13:10 -0600)]
check-qfloat: convert to gtest

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agocheck-qdict: convert to gtest
Anthony Liguori [Tue, 10 Jan 2012 19:10:44 +0000 (13:10 -0600)]
check-qdict: convert to gtest

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agobuild: split unit test builds to a separate makefile fragment
Anthony Liguori [Tue, 10 Jan 2012 19:10:43 +0000 (13:10 -0600)]
build: split unit test builds to a separate makefile fragment

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agotests: mv tests/* -> tests/tcg
Anthony Liguori [Tue, 10 Jan 2012 19:10:42 +0000 (13:10 -0600)]
tests: mv tests/* -> tests/tcg

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agovga: optimize ppm_save() divisions
Avi Kivity [Tue, 3 Jan 2012 13:32:57 +0000 (15:32 +0200)]
vga: optimize ppm_save() divisions

ppm_save() spends upwards of 50% of its time doing divisions. Replace them
with shifts.

Reviewed-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoFix qapi code generation fix
Avi Kivity [Wed, 28 Dec 2011 10:26:58 +0000 (12:26 +0200)]
Fix qapi code generation fix

The fixes to qapi code generation had multiple bugs:
- the Null class used to drop output was missing some methods
- in some scripts it was never instantiated, leading to a None return,
  which is missing even more methods
- the --source and --header options were swapped

Luckily, all those bugs were hidden by a makefile bug which caused the
old behaviour (with the race) to be invoked.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoetraxfs-dma: Model metadata and eop
Lars Persson [Wed, 21 Dec 2011 14:11:35 +0000 (15:11 +0100)]
etraxfs-dma: Model metadata and eop

- Send EOP flags to the out channels.
- Send data descriptor metadata to the out channels.

Signed-off-by: Lars Persson <larper@axis.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
12 years agomicroblaze: Break the tb at memory barriers
Edgar E. Iglesias [Tue, 10 Jan 2012 09:33:37 +0000 (10:33 +0100)]
microblaze: Break the tb at memory barriers

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
12 years agomicroblaze: Emulate the hw stackprotector
Edgar E. Iglesias [Tue, 10 Jan 2012 09:27:11 +0000 (10:27 +0100)]
microblaze: Emulate the hw stackprotector

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
12 years agomicroblaze: Add support for the clz insn
Edgar E. Iglesias [Tue, 10 Jan 2012 09:17:21 +0000 (10:17 +0100)]
microblaze: Add support for the clz insn

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
12 years agotarget-i386: fix SSE rounding and flush to zero
Aurelien Jarno [Sat, 7 Jan 2012 14:20:12 +0000 (15:20 +0100)]
target-i386: fix SSE rounding and flush to zero

SSE rounding and flush to zero control has never been implemented. However
given that softfloat-native was using a single state for FPU and SSE and
given that glibc is setting both FPU and SSE state in fesetround(), this
was working correctly up to the switch to softfloat.

Fix that by adding an update_sse_status() function similar to
update_fpu_status(), and callin git on write to mxcsr.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
12 years agotarget-i386: fix dpps and dppd SSE2 instructions
Aurelien Jarno [Sat, 7 Jan 2012 14:20:12 +0000 (15:20 +0100)]
target-i386: fix dpps and dppd SSE2 instructions

The helpers implemented dpps and dppd SSE instructions are not passing
the correct argument types to the softfloat functions. While they do
work anyway providing a correct behaviour, this patch fixes that.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
12 years agotarget-i386: fix round{pd,ps,sd,ss} SSE2 instructions
Aurelien Jarno [Sat, 7 Jan 2012 14:20:11 +0000 (15:20 +0100)]
target-i386: fix round{pd,ps,sd,ss} SSE2 instructions

roundps and roundss SSE2 instructions have been broken when switching
target-i386 to softfloat. They use float64_round_to_int to convert a
float32, and while the implicit conversion from float32 to float64 was
correct for softfloat-native, it is not for pure softfloat. Fix that by
using the correct registers and correct functions.

Also fix roundpd and roundsd implementation at the same time, even if
these functions are behaving correctly.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
12 years agotarget-i386: fix {min,max}{pd,ps,sd,ss} SSE2 instructions
Aurelien Jarno [Sat, 7 Jan 2012 14:20:11 +0000 (15:20 +0100)]
target-i386: fix {min,max}{pd,ps,sd,ss} SSE2 instructions

minpd, minps, minsd, minss and maxpd, maxps, maxsd, maxss SSE2
instructions have been broken when switching target-i386 to softfloat.
It's not possible to use comparison instructions on float types anymore
to softfloat, so use the floatXX_lt function instead, as the
float_XX_min and float_XX_max functions can't be used due to the Intel
specific behaviour.

As it implements the correct NaNs behaviour, let's remove the
corresponding entry from the TODO.

It fixes GDM screen display on Debian Lenny.

Thanks to Peter Maydell and Jason Wessel for their analysis of the
problem.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
12 years agowm8750: Fix calculation of number of array elements
Stefan Weil [Mon, 9 Jan 2012 18:32:04 +0000 (19:32 +0100)]
wm8750: Fix calculation of number of array elements

Coverity says that the division by sizeof(*s->rate) might be wrong.
I think that coverity is right.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
12 years agoelf: Improve symbol lookup (optimize, fix for bsd-user)
Stefan Weil [Thu, 5 Jan 2012 14:39:39 +0000 (15:39 +0100)]
elf: Improve symbol lookup (optimize, fix for bsd-user)

Coverity complained about local variable key which was only partially
initiated. Only key.st_value was set. As this was also the only part
of key which was used in function symfind, the code could be optimized
by directly passing a pointer to orig_addr.

In bsd-user/elfload.c, fix ec822001a2f26eef8701194714f6482b6d852de2
was missing. This was a simple replacement of > by >= in symfind, so
I fixed it here without creating an additional patch.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
12 years agohw/integratorcp: Simplify flash remap code
Peter Maydell [Fri, 6 Jan 2012 18:58:28 +0000 (18:58 +0000)]
hw/integratorcp: Simplify flash remap code

Use the new memory mutator API to simplify the flash remap code;
this allows us to drop the flash_mapped flag.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
12 years agohw/integratorcp: Fix sense of REMAP bit
Peter Maydell [Fri, 6 Jan 2012 18:58:27 +0000 (18:58 +0000)]
hw/integratorcp: Fix sense of REMAP bit

Fix the sense of the REMAP bit: 0 should mean "map flash",
1 should mean "map RAM".

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
12 years agoMerge branch 's390-next' of git://repo.or.cz/qemu/agraf
Aurelien Jarno [Tue, 10 Jan 2012 17:24:11 +0000 (18:24 +0100)]
Merge branch 's390-next' of git://repo.or.cz/qemu/agraf

* 's390-next' of git://repo.or.cz/qemu/agraf:
  s390: fix cpu hotplug / cpu activity on interrupts
  s390x: add TR function for EXECUTE
  Expose drive_add on all architectures
  Add generic drive hotplugging
  Compile device-hotplug on all targets
  [S390] Add hotplug support

12 years agoPPC: Fix linker scripts on ppc hosts
Alexander Graf [Mon, 12 Dec 2011 21:36:01 +0000 (22:36 +0100)]
PPC: Fix linker scripts on ppc hosts

When compiling qemu statically with multilib on PPC, we hit the
same issue that commit 845f2c2812d9ed24b36c02a3d06ee83aeafe8b49
is fixing. Do the same here.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
12 years agotarget-sh4: ignore ocbp and ocbwb instructions
Aurelien Jarno [Sat, 7 Jan 2012 14:20:12 +0000 (15:20 +0100)]
target-sh4: ignore ocbp and ocbwb instructions

ocbp and ocbwb controls the writeback of a cache line to memory. They
are supposed to do nothing in case of a cache miss. Given QEMU only
partially emulate caches, it is safe to ignore these instructions.

This fixes a kernel oops when trying to access an rtl8139 NIC with
recent versions.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
12 years agotcg/arm: Use r6 as TCG_AREG0 to avoid clash with Thumb framepointer
Peter Maydell [Mon, 26 Dec 2011 00:02:18 +0000 (00:02 +0000)]
tcg/arm: Use r6 as TCG_AREG0 to avoid clash with Thumb framepointer

On ARM, in Thumb mode r7 is used for the framepointer; this meant
that we would fail to compile in debug mode because we were using r7
for TCG_AREG0. Shift to r6 instead to avoid this clash.
(Bug reported as LP:870990.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
12 years agocris-dis: Clean memory allocation
Stefan Weil [Mon, 9 Jan 2012 18:23:42 +0000 (19:23 +0100)]
cris-dis: Clean memory allocation

The old code used sizeof(const struct cris_opcode **) where it should
have used sizeof(const struct cris_opcode *). As both sizes give the
same value, the resulting binary was ok, but static code analyzers
like coverity and clang complained.

This is fixed here, and the code is also simplified by using g_new0.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
12 years agoMerge remote-tracking branch 'qemu-kvm/fix-vhost-after-memory-listener' into staging
Anthony Liguori [Mon, 9 Jan 2012 14:54:04 +0000 (08:54 -0600)]
Merge remote-tracking branch 'qemu-kvm/fix-vhost-after-memory-listener' into staging

* qemu-kvm/fix-vhost-after-memory-listener:
  vhost: improve region filtering
  vhost: fix mem_sections memory corruption
  vhost: fix incorrect userspace address

12 years agovhost: improve region filtering
Avi Kivity [Mon, 9 Jan 2012 12:01:39 +0000 (14:01 +0200)]
vhost: improve region filtering

vhost memory management doesn't care about non-memory (e.g. PIO) or non-RAM
regions.  Adjust the filtering to reflect that, and move it earlier so it
applies to mem_sections too.

Signed-off-by: Avi Kivity <avi@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
12 years agovhost: fix mem_sections memory corruption
Avi Kivity [Mon, 9 Jan 2012 11:59:50 +0000 (13:59 +0200)]
vhost: fix mem_sections memory corruption

A memset() used to delete an entry in an array did not take into account
the array element's size.

Signed-off-by: Avi Kivity <avi@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
12 years agovhost: fix incorrect userspace address
Avi Kivity [Mon, 9 Jan 2012 11:09:40 +0000 (13:09 +0200)]
vhost: fix incorrect userspace address

MemoryListener::region_add() gives us a slice of a MemoryRegion, not a
region.  Adjust the userspace address to reflect that.

Signed-off-by: Avi Kivity <avi@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
12 years agoFix vmstate_register_ram() for rom/device regions
Avi Kivity [Sun, 8 Jan 2012 11:18:19 +0000 (13:18 +0200)]
Fix vmstate_register_ram() for rom/device regions

rom/device regions have a ram_addr that is composed of both an I/O handler
(low bits) and RAM region (high bits); but qemu_ram_set_idstr() expects just
a RAM region.  Mask the I/O handler to make it happy.

Tested-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomemory: Fix adjust_endianness()
Andreas Färber [Sat, 7 Jan 2012 08:45:15 +0000 (09:45 +0100)]
memory: Fix adjust_endianness()

Commit a621f38de85598a13d8d8524d1a94fc6a1818215 (Direct dispatch
through MemoryRegion) moved byte swaps to a central function.

Add a missing break, so that long-sized byte swaps don't abort.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agomemory: Fix memory_region_wrong_endianness()
Andreas Färber [Sat, 7 Jan 2012 08:45:14 +0000 (09:45 +0100)]
memory: Fix memory_region_wrong_endianness()

Since commit be675c972088eba210e18dc125613e9f205a6bfb (memory: move
endianness compensation to memory core) it was checking for
TARGET_BIG_ENDIAN instead of TARGET_WORDS_BIGENDIAN, thereby not
swapping correctly for Big Endian targets.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agokvm: fix build error in ppc kvm due to memory_region_init_ram_ptr() change
Avi Kivity [Thu, 5 Jan 2012 10:30:31 +0000 (12:30 +0200)]
kvm: fix build error in ppc kvm due to memory_region_init_ram_ptr() change

Commit c5705a772 ("vmstate, memory: decouple vmstate from memory API") changed
the signature of memory_region_init_ram_ptr() but did not update a caller in
the ppc kvm module.  Fix.

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoMerge branch 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm
Aurelien Jarno [Sat, 7 Jan 2012 21:19:14 +0000 (22:19 +0100)]
Merge branch 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm

* 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm:
  arm: add dummy A9-specific cp15 registers
  target-arm: Ignore attempts to set invalid modes in CPSR
  target-arm: Don't use cpu_single_env in bank_number()

12 years agoMerge branch 'ppc-next' of git://repo.or.cz/qemu/agraf
Aurelien Jarno [Sat, 7 Jan 2012 21:01:57 +0000 (22:01 +0100)]
Merge branch 'ppc-next' of git://repo.or.cz/qemu/agraf

* 'ppc-next' of git://repo.or.cz/qemu/agraf:
  PPC: Add description for the Freescale e500mc core.
  pseries: Check for duplicate addresses on the spapr-vio bus
  pseries: Populate "/chosen/linux,stdout-path" in the FDT
  pseries: Add a routine to find a stable "default" vty and use it
  pseries: Emit device tree nodes in reg order
  pseries: FDT NUMA extensions to support multi-node guests
  pseries: Remove hcalls callback
  kvm-ppc: halt secondary cpus when guest reset
  console: Fix segfault on screendump without VGA adapter
  PPC: monitor: add ability to dump SLB entries

12 years agosm501: Fix size of color_reg
Stefan Weil [Wed, 4 Jan 2012 21:50:09 +0000 (22:50 +0100)]
sm501: Fix size of color_reg

color_reg is expected to hold 32 bit values, so it was too small.

This bug was reported by coverity:

hw/sm501.c:624:
result_independent_of_operands:
color_reg >> 16 is 0 regardless of the values of its operands.
This occurs as the bitwise first operand of '&'.

Cc: Shin-ichiro Kawasaki <kawasaki@juno.dti.ne.jp>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
12 years agotarget-sh4: Fix operands for fipr, ftrv instructions
Stefan Weil [Thu, 5 Jan 2012 12:11:48 +0000 (13:11 +0100)]
target-sh4: Fix operands for fipr, ftrv instructions

Coverity complained about right shifts of opcode (16, 18) which were
larger than the size of opcode (16 bit).

Using the correct shift values fixes this.

Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
12 years agomalta: Fix regression (i8259 interrupts did not work)
Stefan Weil [Tue, 29 Nov 2011 05:34:48 +0000 (06:34 +0100)]
malta: Fix regression (i8259 interrupts did not work)

Commit 5632ae46d5bda798e971dae48ebb318ac2c3686a passes the address
of i8259 to qemu_irq_proxy. i8259 is an auto variable with undefined
value outside of mips_malta_init.

This made the interrupt proxy unusable: either QEMU crashes, or
the interrupt handler was not called.

Ethernet for example no longer worked with MIPS Malta.

v2:
While v1 used a static variable for i8259, this patch introduces
a qdev for the malta machine. i8259 is now part of the device status.
This is a minimal qdev implementation to keep the patch small.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
12 years agoMerge remote-tracking branch 'stefanha/trivial-patches' into staging
Anthony Liguori [Fri, 6 Jan 2012 18:51:21 +0000 (12:51 -0600)]
Merge remote-tracking branch 'stefanha/trivial-patches' into staging

* stefanha/trivial-patches:
  qemu-nbd: drop loop which can never loop
  Make python mandatory
  net/socket.c: Fix fd leak in net_socket_listen_init() error paths
  gdbstub: Fix fd leak in gdbserver_open() error path
  configure: Fix test for supported host CPU type
  configure: CONFIG_QEMU_INTERP_PREFIX only for user mode
  scsi virtio-blk usb-msd: Clean up device init error messages
  Strip trailing '\n' from error_report()'s first argument (again)
  qemu-options.hx: fix tls-channel help text

12 years agovirtio-9p-proxy: Fix typo causing compile failure on 32 bit hosts
Peter Maydell [Fri, 6 Jan 2012 18:47:21 +0000 (18:47 +0000)]
virtio-9p-proxy: Fix typo causing compile failure on 32 bit hosts

Fix a compile failure on 32 bit hosts (integer constant is too large
for 'unsigned long' type) by correcting a typo where the mask used
for filling in the second f_fsid word had too many 'F's in it.
Also drop the 'L' suffix that allowed this typo to go undetected on
64 bit hosts.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoqemu-nbd: drop loop which can never loop
Stefan Hajnoczi [Thu, 5 Jan 2012 13:16:07 +0000 (13:16 +0000)]
qemu-nbd: drop loop which can never loop

For some reason nbd_client_thread() has a do..while loop which can never
loop, the condition is bogus because we would take a goto instead.  Drop
the loop.

Reported-by: Dr David Alan Gilbert <davidagilbert@uk.ibm.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoMake python mandatory
Sebastian Herbszt [Sat, 31 Dec 2011 11:14:47 +0000 (12:14 +0100)]
Make python mandatory

The QEMU build depends on Python so make it an explicit requirement.

Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agonet/socket.c: Fix fd leak in net_socket_listen_init() error paths
Peter Maydell [Sat, 24 Dec 2011 23:47:11 +0000 (23:47 +0000)]
net/socket.c: Fix fd leak in net_socket_listen_init() error paths

Fix a leak of a file descriptor due to missing closesocket() calls
in error paths in net_socket_listen_init().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agogdbstub: Fix fd leak in gdbserver_open() error path
Peter Maydell [Sat, 24 Dec 2011 23:37:24 +0000 (23:37 +0000)]
gdbstub: Fix fd leak in gdbserver_open() error path

Fix a leak of a file descriptor in error exit paths in
gdbserver_open().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoconfigure: Fix test for supported host CPU type
Peter Maydell [Sat, 24 Dec 2011 13:07:25 +0000 (13:07 +0000)]
configure: Fix test for supported host CPU type

The test for whether the host CPU is supported had several problems:
 * the attempt to fall back to TCI was done as a duplicate
   test, very late (so "--cpu foo" would fail early but "--cpu unicore32"
   would fail late, differently, and after configure had already
   printed a lot of output)
 * a number of CPUs only supported as guests were included in the
   list of CPUs we would accept as valid hosts, which would result
   in a late compile failure on those systems rather than a
   configure failure or fallback to TCI
 * bailing out for an unsupported CPU happened before the main
   option parsing, so "configure --help" wouldn't work

Fix these by folding the setting of ARCH into the first test for
supported host CPU, removing spurious guest-only CPU names from it,
and moving the "fall back to TCI" code earlier.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoconfigure: CONFIG_QEMU_INTERP_PREFIX only for user mode
Stefan Weil [Thu, 22 Dec 2011 10:26:10 +0000 (11:26 +0100)]
configure: CONFIG_QEMU_INTERP_PREFIX only for user mode

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoscsi virtio-blk usb-msd: Clean up device init error messages
Markus Armbruster [Wed, 21 Dec 2011 10:37:57 +0000 (11:37 +0100)]
scsi virtio-blk usb-msd: Clean up device init error messages

Replace

    error_report("DEVICE-NAME: MESSAGE");

by just

    error_report("MESSAGE");

in block device init functions.

DEVICE-NAME is bogus in some cases: it's "scsi-disk" for device
scsi-hd and scsi-cd, "virtio-blk-pci" for virtio-blk-s390, and
"usb-msd" for usb-storage.

There is no real need to put a device name in the message, because
error_report() points to the offending command line option already:

$ qemu-system-x86_64 --nodefaults --enable-kvm -vnc :0 -S -monitor stdio -usb -device virtio-blk-pci
upstream-qemu: -device virtio-blk-pci: virtio-blk-pci: drive property not set
upstream-qemu: -device virtio-blk-pci: Device 'virtio-blk-pci' could not be initialized

And for a monitor command, it's obvious anyway:

$ qemu-system-x86_64 --nodefaults --enable-kvm -vnc :0 -S -monitor stdio -usb
(qemu) device_add virtio-blk-pci
virtio-blk-pci: drive property not set
Device 'virtio-blk-pci' could not be initialized

Reported-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoStrip trailing '\n' from error_report()'s first argument (again)
Markus Armbruster [Tue, 20 Dec 2011 17:13:08 +0000 (18:13 +0100)]
Strip trailing '\n' from error_report()'s first argument (again)

Commit 6daf194d got rid of them, but Hans and Gerd added some more
lately.  Tracked down with this Coccinelle semantic patch:

@r@
    expression fmt;
    position p;
@@
    error_report(fmt, ...)@p
@script:python@
    fmt << r.fmt;
    p << r.p;
@@
if "\\n" in str(fmt):
    print "%s:%s:%s:%s" % (p[0].file, p[0].line, p[0].column, fmt)

Signed-off-by: Markus Armbruster <armbru@redhat.com>
12 years agoqemu-options.hx: fix tls-channel help text
Alon Levy [Tue, 20 Dec 2011 11:05:18 +0000 (13:05 +0200)]
qemu-options.hx: fix tls-channel help text

Remove the default compiled out tunnel channel, add the always available
cursor channel. Optimally the man page would depend on compiled in
options, but that's harder to do.

RHBZ: 688586

Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoMerge remote-tracking branch 'amit/master' into staging
Anthony Liguori [Fri, 6 Jan 2012 14:15:39 +0000 (08:15 -0600)]
Merge remote-tracking branch 'amit/master' into staging

* amit/master:
  virtio-console: Fix failure on unconnected pty

12 years agoMerge remote-tracking branch 'aneesh/for-upstream' into staging
Anthony Liguori [Fri, 6 Jan 2012 14:14:28 +0000 (08:14 -0600)]
Merge remote-tracking branch 'aneesh/for-upstream' into staging

* aneesh/for-upstream:
  hw/9pfs: Add support to use named socket for proxy FS
  hw/9pfs: man page for proxy helper
  hw/9pfs: Documentation changes related to proxy fs
  hw/9pfs: Proxy getversion
  hw/9pfs: xattr interfaces in proxy filesystem driver
  hw/9pfs: File ownership and others
  hw/9pfs: Add stat/readlink/statfs for proxy FS
  hw/9pfs: Create other filesystem objects
  hw/9pfs: Open and create files
  hw/9pfs: File system helper process for qemu 9p proxy FS
  hw/9pfs: Add new proxy filesystem driver
  hw/9pfs: Add validation to {un}marshal code
  hw/9pfs: Move pdu_marshal/unmarshal code to a seperate file
  hw/9pfs: Move opt validation to FsDriver callback

12 years agoMerge remote-tracking branch 'sstabellini/xen_mem_fix' into staging
Anthony Liguori [Fri, 6 Jan 2012 14:12:23 +0000 (08:12 -0600)]
Merge remote-tracking branch 'sstabellini/xen_mem_fix' into staging

* sstabellini/xen_mem_fix:
  xen: Fix after recent change in dirty bitmap tracking.

12 years agoMerge remote-tracking branch 'kraxel/usb.33' into staging
Anthony Liguori [Fri, 6 Jan 2012 14:11:41 +0000 (08:11 -0600)]
Merge remote-tracking branch 'kraxel/usb.33' into staging

* kraxel/usb.33:
  usb-ohci: td.cbp incorrectly updated near page end
  usb-host: properly release port on unplug & exit
  usb-storage: cancel I/O on reset
  Fix parse of usb device description with multiple configurations

12 years agousb-ohci: td.cbp incorrectly updated near page end
Andriy Gapon [Thu, 22 Dec 2011 09:34:30 +0000 (11:34 +0200)]
usb-ohci: td.cbp incorrectly updated near page end

The current code that updates the cbp value after a transfer looks like this:
td.cbp += ret;
if ((td.cbp & 0xfff) + ret > 0xfff) {
<handle page overflow>
because the 'ret' value is effectively added twice the check may fire too early
when the overflow hasn't happened yet.

Below is one of the possible changes that correct the behavior:

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agousb-host: properly release port on unplug & exit
Gerd Hoffmann [Thu, 5 Jan 2012 14:49:18 +0000 (15:49 +0100)]
usb-host: properly release port on unplug & exit

Factor out port release into a separate function.  Call release function
in exit notifier too.  Add explicit call the USBDEVFS_RELEASE_PORT
ioctl, just closing the hub file handle seems not to be enougth.  Make
sure we release the port before resetting the device, otherwise host
drivers will not re-attach.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agousb-storage: cancel I/O on reset
Gerd Hoffmann [Wed, 4 Jan 2012 17:13:54 +0000 (18:13 +0100)]
usb-storage: cancel I/O on reset

When resetting the usb-storage device we'll have to carefully cancel
and clear any requests which might be in flight, otherwise we'll confuse
the state machine.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12 years agoarm: add dummy A9-specific cp15 registers
Mark Langsdorf [Thu, 5 Jan 2012 15:49:06 +0000 (15:49 +0000)]
arm: add dummy A9-specific cp15 registers

Add dummy register support for the cp15, CRn=c15 registers.

config_base_register and power_control_register currently
default to 0, but may have improved support after the QOM
CPU patches are finished.

Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agotarget-arm: Ignore attempts to set invalid modes in CPSR
Peter Maydell [Thu, 5 Jan 2012 15:49:06 +0000 (15:49 +0000)]
target-arm: Ignore attempts to set invalid modes in CPSR

Ignore attempts to set the CPSR mode field to an invalid value.
This is UNPREDICTABLE, but we should not cpu_abort() for things
a malicious guest (or a confused user on the gdbstub interface)
can provoke.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agotarget-arm: Don't use cpu_single_env in bank_number()
Peter Maydell [Thu, 5 Jan 2012 15:49:06 +0000 (15:49 +0000)]
target-arm: Don't use cpu_single_env in bank_number()

Avoid using cpu_single_env in bank_number() -- if we were
called via the gdb stub reading or writing the CPSR then
it is NULL and we will segfault if we take the cpu_abort().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agoxen: Fix after recent change in dirty bitmap tracking.
Anthony PERARD [Thu, 5 Jan 2012 12:47:08 +0000 (12:47 +0000)]
xen: Fix after recent change in dirty bitmap tracking.

A recent patch set from Avi break the dirty bitmap support of Xen. But
this is because xen_sync_dirty_bitmap will return an error for an
unhandled memory range (a0000 - bffff). However this is not a fatal
error, so we should just continue instead of aborting.

There is now an error printed when the Xen call failed.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
12 years agoMerge remote-tracking branch 'pmaydell/arm-devs.for-upstream' into staging
Anthony Liguori [Wed, 4 Jan 2012 16:06:25 +0000 (10:06 -0600)]
Merge remote-tracking branch 'pmaydell/arm-devs.for-upstream' into staging

* pmaydell/arm-devs.for-upstream:
  add L2x0/PL310 cache controller device
  arm: add dummy gic security registers
  arm: Set frequencies for arm_timer
  arm: add missing scu registers
  hw/omap_gpmc: Fix region map/unmap when configuring prefetch engine
  hw/omap1.c: Drop unused includes
  hw/omap1.c: Separate dpll_ctl from omap_mpu_state
  hw/omap1.c: Separate PWT from omap_mpu_state
  hw/omap1.c: Separate PWL from omap_mpu_state
  hw/omap1.c: omap_mpuio_init() need not be public
  hw/pl110.c: Add post-load hook to invalidate display
  hw/pl181.c: Add save/load support

12 years agohw/9pfs: Add support to use named socket for proxy FS
M. Mohan Kumar [Wed, 14 Dec 2011 08:28:47 +0000 (13:58 +0530)]
hw/9pfs: Add support to use named socket for proxy FS

Add option to use named socket for communicating between proxy helper
and qemu proxy FS. Access to socket can be given by using command line
options -u and -g.

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: man page for proxy helper
M. Mohan Kumar [Wed, 14 Dec 2011 08:28:47 +0000 (13:58 +0530)]
hw/9pfs: man page for proxy helper

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Documentation changes related to proxy fs
M. Mohan Kumar [Wed, 14 Dec 2011 08:28:46 +0000 (13:58 +0530)]
hw/9pfs: Documentation changes related to proxy fs

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Proxy getversion
M. Mohan Kumar [Wed, 14 Dec 2011 08:28:46 +0000 (13:58 +0530)]
hw/9pfs: Proxy getversion

Add proxy getversion to get generation number

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: xattr interfaces in proxy filesystem driver
M. Mohan Kumar [Wed, 14 Dec 2011 08:28:46 +0000 (13:58 +0530)]
hw/9pfs: xattr interfaces in proxy filesystem driver

Add xattr support for proxy FS

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: File ownership and others
M. Mohan Kumar [Wed, 14 Dec 2011 08:28:45 +0000 (13:58 +0530)]
hw/9pfs: File ownership and others

Add file ownership interfaces like chmod/chown, utime update, rename,
remove and truncating files for proxy FS

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Add stat/readlink/statfs for proxy FS
M. Mohan Kumar [Wed, 14 Dec 2011 08:28:45 +0000 (13:58 +0530)]
hw/9pfs: Add stat/readlink/statfs for proxy FS

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Create other filesystem objects
M. Mohan Kumar [Wed, 14 Dec 2011 08:28:45 +0000 (13:58 +0530)]
hw/9pfs: Create other filesystem objects

Add interfaces to create filesystem objects like directory,
device nodes, symbolic links, links for proxy filesytem driver

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Open and create files
M. Mohan Kumar [Wed, 14 Dec 2011 08:28:44 +0000 (13:58 +0530)]
hw/9pfs: Open and create files

Add interfaces to open and create files for proxy file system driver.

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: File system helper process for qemu 9p proxy FS
M. Mohan Kumar [Wed, 14 Dec 2011 08:28:42 +0000 (13:58 +0530)]
hw/9pfs: File system helper process for qemu 9p proxy FS

Provide root privilege access to QEMU 9p proxy filesystem using socket
communication.

Proxy helper is started by root user as:
~ # virtfs-proxy-helper -f|--fd <socket descriptor> -p|--path <path-to-share>

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Add new proxy filesystem driver
M. Mohan Kumar [Wed, 14 Dec 2011 08:19:28 +0000 (13:49 +0530)]
hw/9pfs: Add new proxy filesystem driver

Add new proxy filesystem driver to add root privilege to qemu process.
It needs a helper process to be started by root user.

Following command line can be used to utilize proxy filesystem driver
-virtfs proxy,id=<id>,mount_tag=<tag>,socket_fd=<socket-fd>

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Add validation to {un}marshal code
M. Mohan Kumar [Wed, 14 Dec 2011 08:19:13 +0000 (13:49 +0530)]
hw/9pfs: Add validation to {un}marshal code

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Move pdu_marshal/unmarshal code to a seperate file
M. Mohan Kumar [Wed, 14 Dec 2011 08:19:06 +0000 (13:49 +0530)]
hw/9pfs: Move pdu_marshal/unmarshal code to a seperate file

Move p9 marshaling/unmarshaling code to a separate file so that
proxy filesytem driver can use these calls. Also made marshaling
code generic to accept "struct iovec" instead of V9fsPDU.

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Move opt validation to FsDriver callback
Aneesh Kumar K.V [Wed, 14 Dec 2011 08:18:59 +0000 (13:48 +0530)]
hw/9pfs: Move opt validation to FsDriver callback

This remove all conditional code from common code path and
make opt validation a FSDriver callback.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agoadd L2x0/PL310 cache controller device
Rob Herring [Thu, 29 Dec 2011 06:19:54 +0000 (06:19 +0000)]
add L2x0/PL310 cache controller device

This is just a dummy device for ARM L2 cache controllers, based on the
pl310. The cache type parameter can be defined by a property value
and has a meaningful default.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
[Peter Maydell: removed stray blank line at end]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agoarm: add dummy gic security registers
Rob Herring [Thu, 29 Dec 2011 06:19:53 +0000 (06:19 +0000)]
arm: add dummy gic security registers

Implement handling for the RAZ/WI gic security registers.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agoarm: Set frequencies for arm_timer
Mark Langsdorf [Thu, 29 Dec 2011 06:19:51 +0000 (06:19 +0000)]
arm: Set frequencies for arm_timer

Use qdev properties to allow board modelers to set the frequencies
for the sp804 timer. Each of the sp804's timers can have an
individual frequency. The timers default to 1MHz.

Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agoarm: add missing scu registers
Rob Herring [Thu, 29 Dec 2011 06:19:50 +0000 (06:19 +0000)]
arm: add missing scu registers

Add power control register to a9mpcore

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agohw/omap_gpmc: Fix region map/unmap when configuring prefetch engine
Peter Maydell [Tue, 20 Dec 2011 00:21:56 +0000 (00:21 +0000)]
hw/omap_gpmc: Fix region map/unmap when configuring prefetch engine

When configuring the prefetch engine (and also when resetting from
a state where the prefetch engine was enabled) be careful to adhere
to the "unmap/change config fields/map" ordering, to avoid trying
to delete the wrong MemoryRegions. This fixes an assertion failure
in some cases.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reported-by: Alexander Graf <agraf@suse.de>
Tested-by: Alexander Graf <agraf@suse.de>
12 years agohw/omap1.c: Drop unused includes
Peter Maydell [Tue, 20 Dec 2011 08:11:36 +0000 (08:11 +0000)]
hw/omap1.c: Drop unused includes

Drop includes of qemu-timer.h, qemu-char.h and pc.h as they are no
longer needed.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agohw/omap1.c: Separate dpll_ctl from omap_mpu_state
Juha Riihimäki [Tue, 20 Dec 2011 08:11:34 +0000 (08:11 +0000)]
hw/omap1.c: Separate dpll_ctl from omap_mpu_state

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agohw/omap1.c: Separate PWT from omap_mpu_state
Juha Riihimäki [Tue, 20 Dec 2011 08:11:33 +0000 (08:11 +0000)]
hw/omap1.c: Separate PWT from omap_mpu_state

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agoRemove IO_MEM_SHIFT
Avi Kivity [Mon, 2 Jan 2012 15:21:07 +0000 (17:21 +0200)]
Remove IO_MEM_SHIFT

We no longer use any of the lower bits of a ram_addr, so we might as well
use them for the io table index.  This increases the number of potential
I/O handlers by a factor of 8.

Signed-off-by: Avi Kivity <avi@redhat.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
12 years agoDrop IO_MEM_ROMD
Avi Kivity [Mon, 2 Jan 2012 13:40:52 +0000 (15:40 +0200)]
Drop IO_MEM_ROMD

Unlike ->readonly, ->readable is not inherited from aliase, so we can simply
query the memory region.

Signed-off-by: Avi Kivity <avi@redhat.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
12 years agoRemove IO_MEM_SUBPAGE
Avi Kivity [Mon, 2 Jan 2012 11:20:11 +0000 (13:20 +0200)]
Remove IO_MEM_SUBPAGE

Replace with a MemoryRegion flag.

Signed-off-by: Avi Kivity <avi@redhat.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
12 years agoDirect dispatch through MemoryRegion
Avi Kivity [Mon, 2 Jan 2012 11:12:08 +0000 (13:12 +0200)]
Direct dispatch through MemoryRegion

Now that all mmio goes through MemoryRegions, we can convert
io_mem_opaque to be a MemoryRegion pointer, and remove the thunks
that convert from old-style CPU{Read,Write}MemoryFunc to MemoryRegionOps.

Signed-off-by: Avi Kivity <avi@redhat.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
12 years agoConvert io_mem_watch to be a MemoryRegion
Avi Kivity [Mon, 2 Jan 2012 10:47:48 +0000 (12:47 +0200)]
Convert io_mem_watch to be a MemoryRegion

Signed-off-by: Avi Kivity <avi@redhat.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>