]> git.proxmox.com Git - mirror_qemu.git/log
mirror_qemu.git
11 years agoMerge remote-tracking branch 'stefanha/trivial-patches' into staging
Anthony Liguori [Mon, 10 Dec 2012 14:34:29 +0000 (08:34 -0600)]
Merge remote-tracking branch 'stefanha/trivial-patches' into staging

* stefanha/trivial-patches:
  pc_sysfw: Plug memory leak on pc_fw_add_pflash_drv() error path
  qemu-options: Fix space at EOL
  Fix spelling in comments and documentation
  Clean up pci_drive_hot_add()'s use of BlockInterfaceType
  arm: a9mpcore: remove un-used ptimer_iomem field
  target-sparc: Remove t0, t1 from CPUSPARCState
  target-m68k: Remove t1 from CPUM68KState
  target-alpha: Remove t0, t1 from CPUAlphaState
  s390x: Spelling fixes (endianess -> endianness, occured -> occurred)
  Fix comments (adress -> address, layed -> laid, wierd -> weird)
  Fix spelling (prefered -> preferred)
  configure: Remove stray debug output
  sd: Send debug printfery to stderr not stdout

Conflicts:
configure

Resolve spelling conflict in configure.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'kraxel/acpi.1' into staging
Anthony Liguori [Mon, 10 Dec 2012 14:33:11 +0000 (08:33 -0600)]
Merge remote-tracking branch 'kraxel/acpi.1' into staging

* kraxel/acpi.1:
  acpi: drop debug port
  q35: update lpc pci config space according to configured devices
  apci: switch piix4 pci hotplug to memory api
  acpi: remove acpi_gpe_blk
  apci: switch piix4 gpe to memory api
  acpi: fix piix4 smbus mapping
  acpi: switch smbus to memory api
  acpi: cleanup ich9 memory region
  apci: switch ich9 smi to memory api
  apci: switch ich9 gpe to memory api
  acpi: cleanup vt82c686 memory region
  acpi: cleanup piix4 memory region
  apci: switch evt to memory api
  apci: switch cnt to memory api
  apci: switch timer to memory api
  apci: switch vt82c686 to memory api
  apci: switch ich9 to memory api
  apci: switch piix4 to memory api

Conflicts:
hw/lpc_ich9.c

Resolved merge conflict due to apm_init adding an argument.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'aneesh/for-upstream' into staging
Anthony Liguori [Mon, 10 Dec 2012 14:32:15 +0000 (08:32 -0600)]
Merge remote-tracking branch 'aneesh/for-upstream' into staging

* aneesh/for-upstream:
  virtfs-proxy-helper: use setresuid and setresgid

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'kraxel/usb.74' into staging
Anthony Liguori [Mon, 10 Dec 2012 14:31:19 +0000 (08:31 -0600)]
Merge remote-tracking branch 'kraxel/usb.74' into staging

* kraxel/usb.74:
  usb-tablet: Allow connecting to ehci
  ehci: Lower timer freq when the periodic schedule is idle
  usb: Allow overriding of usb_desc at the device level
  usb: Don't allow USB_RET_ASYNC for interrupt packets
  usb: Call wakeup when data becomes available for all devices with int eps
  add pc-1.4

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoconfigure: Default to 'cc', not 'gcc'
Peter Maydell [Fri, 7 Dec 2012 15:39:13 +0000 (15:39 +0000)]
configure: Default to 'cc', not 'gcc'

Default to 'cc' as our compiler, rather than 'gcc'. We used to have
to insist on gcc when we still kept the CPU env in a fixed global
register, but this is no longer necessary and we will now compile OK
on clang as well as gcc.  Using 'cc' should generally result in us
using the most standard and maintained system compiler for the
platform.  (For instance on newer MacOS X 'gcc' exists but is an
elderly compiler provided mostly for legacy reasons, and 'cc'
(which is clang) is definitely the better choice.) On Linux there
will generally be no user-visible change since cc will be gcc.

This changeover necessitates a slight reworking of how we set the
'cc' variable, because GNU cross toolchains generally provide a
'${cross_prefix}gcc' but not a '${cross_prefix}cc'.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agolinux-user: Merge pread/pwrite into pread64/pwrite64
Peter Maydell [Fri, 12 Oct 2012 03:55:51 +0000 (03:55 +0000)]
linux-user: Merge pread/pwrite into pread64/pwrite64

The Linux syscalls underlying pread() and pwrite() take a 64 bit
offset on all architectures, even if some of them name the syscall
"pread/pwrite" rather than "pread64/pwrite64" for historical reasons.
So move the four QEMU target architectures (arm, i386, sparc,
unicore32) which were defining TARGET_NR_pread/pwrite to define
TARGET_NR_pread64/pwrite64 instead, and drop the TARGET_NR_pread/pwrite
implementation code completely.

(Based on examination of the kernel sources for the four architectures
this patch affects.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-xtensa: use movcond where possible
Max Filippov [Wed, 5 Dec 2012 03:15:27 +0000 (07:15 +0400)]
target-xtensa: use movcond where possible

Use movcond for all sorts of conditional moves, ABS, CLAMPS, MIN/MAX
opcodes.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-xtensa: add s32c1i unit tests
Max Filippov [Wed, 5 Dec 2012 03:15:26 +0000 (07:15 +0400)]
target-xtensa: add s32c1i unit tests

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-xtensa: add SR accessibility unit tests
Max Filippov [Wed, 5 Dec 2012 03:15:25 +0000 (07:15 +0400)]
target-xtensa: add SR accessibility unit tests

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-xtensa: implement MISC SR
Max Filippov [Wed, 5 Dec 2012 03:15:24 +0000 (07:15 +0400)]
target-xtensa: implement MISC SR

The Miscellaneous Special Registers Option provides zero to four scratch
registers within the processor readable and writable by RSR, WSR, and
XSR. These registers are privileged. They may be useful for some
application-specific exception and interrupt processing tasks in the
kernel. The MISC registers are undefined after reset.
See ISA, 4.7.3 for details.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-xtensa: better control rsr/wsr/xsr access to SRs
Max Filippov [Wed, 5 Dec 2012 03:15:23 +0000 (07:15 +0400)]
target-xtensa: better control rsr/wsr/xsr access to SRs

There are read-only (DEBUGCAUSE, PRID) and write-only (INTCLEAR) SRs,
and INTERRUPT/INTSET SR allows rsr/wsr, but not xsr. Raise illeagal
opcode exception on illegal access to these SRs.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-xtensa: restrict available SRs by enabled options
Max Filippov [Wed, 5 Dec 2012 03:15:22 +0000 (07:15 +0400)]
target-xtensa: restrict available SRs by enabled options

Beginning with the RA-2004.1 release, SR access instructions (rsr, wsr,
xsr) are associated with their corresponding SR and raise illegal opcode
exception in case the register is not configured for the core.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-xtensa: implement CACHEATTR SR
Max Filippov [Wed, 5 Dec 2012 03:15:21 +0000 (07:15 +0400)]
target-xtensa: implement CACHEATTR SR

In XEA1, the Options for Memory Protection and Translation and the
corresponding TLB management instructions are not available. Instead,
functionality similar to the Region Protection Option is available
through the cache attribute register. See ISA, A.2.14 for details.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-xtensa: implement ATOMCTL SR
Max Filippov [Wed, 5 Dec 2012 03:15:20 +0000 (07:15 +0400)]
target-xtensa: implement ATOMCTL SR

ATOMCTL SR controls s32c1i opcode behavior depending on targeted memory
type. See ISA, 4.3.12.4 for details.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoMerge branch 'master' of git.qemu-project.org:/pub/git/qemu
Blue Swirl [Sat, 8 Dec 2012 17:50:57 +0000 (17:50 +0000)]
Merge branch 'master' of git.qemu-project.org:/pub/git/qemu

* 'master' of git.qemu-project.org:/pub/git/qemu:
  target-mips: Fix incorrect shift for SHILO and SHILOV
  target-mips: Fix incorrect code and test for INSV
  xilinx_uartlite: Accept input after rx FIFO pop
  xilinx_uartlite: suppress "cannot receive message"
  xilinx_axienet: Implement R_IS behaviour

11 years agofinally kill cpudef config section support
Eduardo Habkost [Tue, 4 Dec 2012 18:32:58 +0000 (16:32 -0200)]
finally kill cpudef config section support

The external CPU models were removed on QEMU 1.2, and the support for
the "cpudef" config sections was documented as deprecated, but the
actual removal of the config section was pending.

Now that QEMU 1.3 was released, we can finally kill the support for
cpudef config sections, and support only the built-in CPU models from
target-i386/cpu.c.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoMerge branch 'memory-ioport' of git://github.com/afaerber/qemu-cpu
Blue Swirl [Sat, 8 Dec 2012 14:28:13 +0000 (14:28 +0000)]
Merge branch 'memory-ioport' of git://github.com/afaerber/qemu-cpu

* 'memory-ioport' of git://github.com/afaerber/qemu-cpu:
  hw/dma.c: Replace register_ioport_*
  hw/pc.c: Replace register_ioport_*
  serial: Replace register_ioport_*
  hw/cirrus_vga.c: Replace register_ioport_*
  hw/apm.c: Replace register_ioport_*
  isa: Add isa_address_space_io()

11 years agoHACKING: List areas where we may rely on impdef C behaviour
Peter Maydell [Wed, 31 Oct 2012 09:30:47 +0000 (09:30 +0000)]
HACKING: List areas where we may rely on impdef C behaviour

Add a section to HACKING saying which version of the C spec
we use and describing the bits of implementation defined C
compiler behaviour which C code in QEMU is allowed to rely on.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agopixman: require 0.18.4 or newer
Gerd Hoffmann [Tue, 27 Nov 2012 12:19:40 +0000 (13:19 +0100)]
pixman: require 0.18.4 or newer

When older versions are found the internal pixman version is prefered.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoTCG: Remove unused global gen_opc_ arrays.
Evgeny Voevodin [Wed, 21 Nov 2012 07:43:07 +0000 (11:43 +0400)]
TCG: Remove unused global gen_opc_ arrays.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoTCG: Use gen_opc_instr_start from context instead of global variable.
Evgeny Voevodin [Wed, 21 Nov 2012 07:43:06 +0000 (11:43 +0400)]
TCG: Use gen_opc_instr_start from context instead of global variable.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoTCG: Use gen_opc_icount from context instead of global variable.
Evgeny Voevodin [Wed, 21 Nov 2012 07:43:05 +0000 (11:43 +0400)]
TCG: Use gen_opc_icount from context instead of global variable.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoTCG: Use gen_opc_pc from context instead of global variable.
Evgeny Voevodin [Wed, 21 Nov 2012 07:43:04 +0000 (11:43 +0400)]
TCG: Use gen_opc_pc from context instead of global variable.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg/tcg.h: Duplicate global TCG gen_opc_ arrays into TCGContext.
Evgeny Voevodin [Wed, 21 Nov 2012 07:43:03 +0000 (11:43 +0400)]
tcg/tcg.h: Duplicate global TCG gen_opc_ arrays into TCGContext.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agocurses: Remove OpenBSD workaround
Brad Smith [Mon, 19 Nov 2012 09:22:12 +0000 (04:22 -0500)]
curses: Remove OpenBSD workaround

I removed the same sort of workaround for OpenBSD within the
configure script with commit 4dcc3f5876fa638d5c35bd47be3b717ea74cc2e7
but didn't bother to grep further to come across this same chunk
of code in the curses code itself. So the following diff removes
the same workaround chunk within the curses code.

Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoexec: Advise huge pages for the TCG code gen buffer
Richard Henderson [Thu, 1 Nov 2012 22:20:46 +0000 (09:20 +1100)]
exec: Advise huge pages for the TCG code gen buffer

After allocating 32MB or more contiguous memory, huge pages
would seem to be ideal.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agopc_sysfw: Plug memory leak on pc_fw_add_pflash_drv() error path
Markus Armbruster [Fri, 23 Nov 2012 18:12:18 +0000 (19:12 +0100)]
pc_sysfw: Plug memory leak on pc_fw_add_pflash_drv() error path

Harmless, because we the error inevitably leads to another, fatal one
in pc_system_flash_init(): PC system firmware (pflash) not available.
Fix it anyway.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoqemu-options: Fix space at EOL
Michal Privoznik [Fri, 23 Nov 2012 08:52:39 +0000 (09:52 +0100)]
qemu-options: Fix space at EOL

There's no need to add a space at the end of line.
Moreover, it can make problems in some projects that
store the help output into a file (and run couple of
tests based on that) and have space at EOL forbidden.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoFix spelling in comments and documentation
Stefan Weil [Fri, 23 Nov 2012 06:26:04 +0000 (07:26 +0100)]
Fix spelling in comments and documentation

These spelling bugs were found by codespell:

supressing -> suppressing
transfered -> transferred

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoClean up pci_drive_hot_add()'s use of BlockInterfaceType
Markus Armbruster [Thu, 22 Nov 2012 14:16:36 +0000 (15:16 +0100)]
Clean up pci_drive_hot_add()'s use of BlockInterfaceType

pci_drive_hot_add() parameter type has the wrong type: int instead of
BlockInterfaceType.  It's actually redundant, so we can just drop it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoarm: a9mpcore: remove un-used ptimer_iomem field
Peter Crosthwaite [Mon, 19 Nov 2012 05:13:49 +0000 (15:13 +1000)]
arm: a9mpcore: remove un-used ptimer_iomem field

I'm guessing this is a hangover from a previous coreification of the mptimer
sub-module. This field is completely unused - removed.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agotarget-sparc: Remove t0, t1 from CPUSPARCState
Richard Henderson [Thu, 1 Nov 2012 21:36:37 +0000 (08:36 +1100)]
target-sparc: Remove t0, t1 from CPUSPARCState

These fields are no longer used.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agotarget-m68k: Remove t1 from CPUM68KState
Richard Henderson [Thu, 1 Nov 2012 21:36:36 +0000 (08:36 +1100)]
target-m68k: Remove t1 from CPUM68KState

This field is no longer used.

Cc: Paul Brook <paul@codesourcery.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agotarget-alpha: Remove t0, t1 from CPUAlphaState
Richard Henderson [Thu, 1 Nov 2012 21:36:35 +0000 (08:36 +1100)]
target-alpha: Remove t0, t1 from CPUAlphaState

These fields are no longer (or were never?) used.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agos390x: Spelling fixes (endianess -> endianness, occured -> occurred)
Stefan Weil [Fri, 2 Nov 2012 07:35:54 +0000 (08:35 +0100)]
s390x: Spelling fixes (endianess -> endianness, occured -> occurred)

Replace also "write into" by "write to".

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoFix comments (adress -> address, layed -> laid, wierd -> weird)
Stefan Weil [Fri, 2 Nov 2012 07:29:53 +0000 (08:29 +0100)]
Fix comments (adress -> address, layed -> laid, wierd -> weird)

Remove also a duplicated 'the'.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoFix spelling (prefered -> preferred)
Stefan Weil [Fri, 2 Nov 2012 07:14:12 +0000 (08:14 +0100)]
Fix spelling (prefered -> preferred)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoconfigure: Remove stray debug output
Peter Maydell [Sat, 20 Oct 2012 19:37:04 +0000 (20:37 +0100)]
configure: Remove stray debug output

Rather than printing a message saying we're silently falling
back to gthread coroutines when running on MacOS, actually
do it silently.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agosd: Send debug printfery to stderr not stdout
Peter Crosthwaite [Thu, 15 Nov 2012 06:32:53 +0000 (16:32 +1000)]
sd: Send debug printfery to stderr not stdout

Some debug printfs for SD are coming up in stdout. Redirected them to stderr
instead.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agotarget-mips: Fix incorrect shift for SHILO and SHILOV
Petar Jovanovic [Tue, 4 Dec 2012 23:29:10 +0000 (00:29 +0100)]
target-mips: Fix incorrect shift for SHILO and SHILOV

helper_shilo has not been shifting an accumulator value correctly for negative
values in 'shift' field. Minor optimization for shift=0 case.
This change also adds tests that will trigger issue and check for regressions.

Signed-off-by: Petar Jovanovic <petarj@mips.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Eric Johnson <ericj@mips.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agotarget-mips: Fix incorrect code and test for INSV
Petar Jovanovic [Mon, 26 Nov 2012 15:13:21 +0000 (16:13 +0100)]
target-mips: Fix incorrect code and test for INSV

Content of register rs should be shifted for pos before applying a mask.
This change contains both fix for the instruction and to the existing test.

Signed-off-by: Petar Jovanovic <petarj@mips.com>
Reviewed-by: Eric Johnson <ericj@mips.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agovirtfs-proxy-helper: use setresuid and setresgid
Paolo Bonzini [Thu, 11 Oct 2012 12:20:23 +0000 (14:20 +0200)]
virtfs-proxy-helper: use setresuid and setresgid

The setfsuid and setfsgid system calls are obscure and they complicate
the error checking (that glibc's warn_unused_result "feature" forces
us to do).  Switch to the standard setresuid and setresgid functions.

Signed-off-by: Paolo Bonzini <pbonini@redhat.com
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
11 years agoxilinx_uartlite: Accept input after rx FIFO pop
Peter Crosthwaite [Wed, 5 Dec 2012 06:53:44 +0000 (16:53 +1000)]
xilinx_uartlite: Accept input after rx FIFO pop

The device return false from the can receive function when the FIFO is
full. This mean the device should check for buffered input whenever a byte is
popped from the FIFO.

Reported-by: Jason Wu <huanyu@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoxilinx_uartlite: suppress "cannot receive message"
Peter Crosthwaite [Wed, 5 Dec 2012 06:53:43 +0000 (16:53 +1000)]
xilinx_uartlite: suppress "cannot receive message"

This message is not an error condition, its just informing the user that
the device is corking the uart traffic to not drop characters.

Reported-by: Jason Wu <huanyu@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agoxilinx_axienet: Implement R_IS behaviour
Peter Crosthwaite [Wed, 5 Dec 2012 06:53:42 +0000 (16:53 +1000)]
xilinx_axienet: Implement R_IS behaviour

The interrupt status register R_IS is the standard clear-on-write behaviour.
This was unimplemented and defaulting to updating the register to the written
value. Implemented clear-on-write.

Reported-by: Jason Wu <huanyu@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
11 years agohw/dma.c: Replace register_ioport_*
Julien Grall [Wed, 19 Sep 2012 11:50:09 +0000 (12:50 +0100)]
hw/dma.c: Replace register_ioport_*

Replace all register_ioport_*() with the new Memory API functions.
This permits to use the new Memory stuff like listeners.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Avi Kivity <avi@redhat.com>
[AF: Rebased onto hwaddr]
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agohw/pc.c: Replace register_ioport_*
Julien Grall [Wed, 19 Sep 2012 11:50:08 +0000 (12:50 +0100)]
hw/pc.c: Replace register_ioport_*

Replace all register_ioport_*() with portio_*() or a MemoryRegion.
This permits to use the new Memory stuff like listeners.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Avi Kivity <avi@redhat.com>
[AF: Rebased onto hwaddr]
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agoserial: Replace register_ioport_*
Julien Grall [Wed, 19 Sep 2012 11:50:07 +0000 (12:50 +0100)]
serial: Replace register_ioport_*

Replace all register_ioport_*() with a MemoryRegion.
This permits to use the new Memory stuff like listeners.

For more flexibility, the IO address space is passed as an argument.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Avi Kivity <avi@redhat.com>
[AF: Rebased onto serial split]
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agohw/cirrus_vga.c: Replace register_ioport_*
Julien Grall [Wed, 19 Sep 2012 11:50:06 +0000 (12:50 +0100)]
hw/cirrus_vga.c: Replace register_ioport_*

Replace all register_ioport_*() with the new Memory API.
This permits to use the new Memory stuff like listeners.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Avi Kivity <avi@redhat.com>
[AF: Rebased onto hwaddr]
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agohw/apm.c: Replace register_ioport_*
Julien Grall [Wed, 19 Sep 2012 11:50:03 +0000 (12:50 +0100)]
hw/apm.c: Replace register_ioport_*

Replace all register_ioport_*() with a MemoryRegion.
This permits to use the new Memory stuff like listeners.

Moreover, the PCI device is added as an argument for apm_init(),
so we can register IO inside the PCI IO address space.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Avi Kivity <avi@redhat.com>
[AF: Rebased onto hwaddr and q35]
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agoisa: Add isa_address_space_io()
Julien Grall [Wed, 19 Sep 2012 11:50:02 +0000 (12:50 +0100)]
isa: Add isa_address_space_io()

This function permits to retrieve ISA IO address space.
It will be usefull when we need to pass IO address space as argument.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
11 years agousb-tablet: Allow connecting to ehci
Hans de Goede [Sat, 17 Nov 2012 11:47:18 +0000 (12:47 +0100)]
usb-tablet: Allow connecting to ehci

Our ehci code has is capable of significantly lowering the wakeup rate
for the hcd emulation while the device is idle. It is possible to add
similar code ot the uhci emulation, but that simply is not there atm,
and there is no reason why a (virtual) usb-tablet can not be a USB-2 device.

Making usb-hid devices connect to the emulated ehci controller instead
of the emulated uhci controller on vms which have both lowers the cpuload
for a fully idle vm from 20% to 2-3% (on my laptop).

An alternative implementation to using a property to select the tablet
type, would be simply making it a new device type, ie usb-tablet2, but the
downside of that is that this will require libvirt changes to be available
through libvirt at all, and then management tools changes to become the
default for new vms, where as using a property will automatically get
any pc-1.3 type vms the lower cpuload.

[ kraxel: adapt compat property for post-1.3 merge ]

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
tablet compat fixup

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoehci: Lower timer freq when the periodic schedule is idle
Hans de Goede [Sat, 17 Nov 2012 11:47:17 +0000 (12:47 +0100)]
ehci: Lower timer freq when the periodic schedule is idle

Lower the timer freq if no iso schedule packets complete for 64 frames in
a row.

We can safely do this, without adding latency, because:
1) If there is isoc traffic this will never trigger
2) For async handled interrupt packets (only usb-host), the completion handler
   will immediately schedule the frame_timer from a bh
3) All devices using NAK to signal no data for interrupt endpoints now use
   wakeup, which will immediately schedule the frame_timer from a bh

The advantage of this is that when we only have interrupt packets in the
periodic schedule, async_stepdown can do its work and significantly lower
the frequency at which the frame_timer runs.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agousb: Allow overriding of usb_desc at the device level
Hans de Goede [Sat, 17 Nov 2012 11:47:16 +0000 (12:47 +0100)]
usb: Allow overriding of usb_desc at the device level

This allows devices to present a different set of descriptors based on
device properties.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agousb: Don't allow USB_RET_ASYNC for interrupt packets
Hans de Goede [Sat, 17 Nov 2012 11:47:15 +0000 (12:47 +0100)]
usb: Don't allow USB_RET_ASYNC for interrupt packets

It is tempting to use USB_RET_ASYNC for interrupt packets, rather then the
current NAK + polling approach, but this causes issues for migration, as
an async completed packet will not getting written back to guest memory until
the next poll time, and if a migration happens in between it will get lost!

Make an exception for host devices, because:
1) host-linux actually uses async completion for interrupt endpoints
2) host devices don't migrate anyways

Ideally we would convert host-linux.c to handle (input) interrupt endpoints in
a buffered manner like it does for isoc endpoints, keeping multiple urbs
submitted to ensure the devices timing requirements are met, as well as making
its interrupt ep handling the same as other usb-devices.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agousb: Call wakeup when data becomes available for all devices with int eps
Hans de Goede [Sat, 17 Nov 2012 11:47:14 +0000 (12:47 +0100)]
usb: Call wakeup when data becomes available for all devices with int eps

This is necessary for proper interaction with the xhci controller, and it
will allow other hcds to lower there frame timer while waiting for interrupt
data.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoadd pc-1.4
Gerd Hoffmann [Tue, 4 Dec 2012 13:39:16 +0000 (14:39 +0100)]
add pc-1.4

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoacpi: drop debug port
Gerd Hoffmann [Tue, 27 Nov 2012 07:24:42 +0000 (08:24 +0100)]
acpi: drop debug port

I'm pretty sure this isn't needed any more.  I think this predates the
switch to seabios, and the seabios DSDT table has a DBUG() aml macro
which writes stuff to the seabios debug port (0x402).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoq35: update lpc pci config space according to configured devices
Gerd Hoffmann [Fri, 23 Nov 2012 14:02:18 +0000 (15:02 +0100)]
q35: update lpc pci config space according to configured devices

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoapci: switch piix4 pci hotplug to memory api
Gerd Hoffmann [Fri, 23 Nov 2012 15:03:19 +0000 (16:03 +0100)]
apci: switch piix4 pci hotplug to memory api

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoacpi: remove acpi_gpe_blk
Gerd Hoffmann [Fri, 23 Nov 2012 14:37:05 +0000 (15:37 +0100)]
acpi: remove acpi_gpe_blk

With gpe being switched to memory api this is no longer needed.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoapci: switch piix4 gpe to memory api
Gerd Hoffmann [Fri, 23 Nov 2012 14:35:13 +0000 (15:35 +0100)]
apci: switch piix4 gpe to memory api

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoacpi: fix piix4 smbus mapping
Gerd Hoffmann [Fri, 23 Nov 2012 13:58:04 +0000 (14:58 +0100)]
acpi: fix piix4 smbus mapping

Make write to the smbus base register and enable bit actually work.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoacpi: switch smbus to memory api
Gerd Hoffmann [Fri, 23 Nov 2012 13:57:01 +0000 (14:57 +0100)]
acpi: switch smbus to memory api

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoacpi: cleanup ich9 memory region
Gerd Hoffmann [Thu, 22 Nov 2012 13:01:20 +0000 (14:01 +0100)]
acpi: cleanup ich9 memory region

Nothing left to do, everything handled by subregions,
we can zap the reaw/write handlers now.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoapci: switch ich9 smi to memory api
Gerd Hoffmann [Thu, 22 Nov 2012 12:51:35 +0000 (13:51 +0100)]
apci: switch ich9 smi to memory api

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoapci: switch ich9 gpe to memory api
Gerd Hoffmann [Thu, 22 Nov 2012 12:43:17 +0000 (13:43 +0100)]
apci: switch ich9 gpe to memory api

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoacpi: cleanup vt82c686 memory region
Gerd Hoffmann [Fri, 23 Nov 2012 08:00:25 +0000 (09:00 +0100)]
acpi: cleanup vt82c686 memory region

Nothing left to do, everything handled by subregions,
we can zap the reaw/write handlers now.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoacpi: cleanup piix4 memory region
Gerd Hoffmann [Thu, 22 Nov 2012 12:27:04 +0000 (13:27 +0100)]
acpi: cleanup piix4 memory region

Nothing left to do, everything handled by subregions,
we can zap the reaw/write handlers now.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoapci: switch evt to memory api
Gerd Hoffmann [Thu, 22 Nov 2012 12:25:10 +0000 (13:25 +0100)]
apci: switch evt to memory api

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoapci: switch cnt to memory api
Gerd Hoffmann [Thu, 22 Nov 2012 12:17:57 +0000 (13:17 +0100)]
apci: switch cnt to memory api

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoapci: switch timer to memory api
Gerd Hoffmann [Thu, 22 Nov 2012 11:12:30 +0000 (12:12 +0100)]
apci: switch timer to memory api

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoapci: switch vt82c686 to memory api
Gerd Hoffmann [Fri, 23 Nov 2012 07:29:27 +0000 (08:29 +0100)]
apci: switch vt82c686 to memory api

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoapci: switch ich9 to memory api
Gerd Hoffmann [Thu, 22 Nov 2012 11:08:22 +0000 (12:08 +0100)]
apci: switch ich9 to memory api

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoapci: switch piix4 to memory api
Gerd Hoffmann [Thu, 22 Nov 2012 10:34:44 +0000 (11:34 +0100)]
apci: switch piix4 to memory api

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoOpen up 1.4 development branch
Anthony Liguori [Mon, 3 Dec 2012 20:08:40 +0000 (14:08 -0600)]
Open up 1.4 development branch

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoUpdate version for 1.3.0 release
Anthony Liguori [Mon, 3 Dec 2012 14:02:50 +0000 (08:02 -0600)]
Update version for 1.3.0 release

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoe1000: Discard packets that are too long if !SBP and !LPE
Michael Contreras [Mon, 3 Dec 2012 04:11:22 +0000 (20:11 -0800)]
e1000: Discard packets that are too long if !SBP and !LPE

The e1000_receive function for the e1000 needs to discard packets longer than
1522 bytes if the SBP and LPE flags are disabled. The linux driver assumes
this behavior and allocates memory based on this assumption.

Signed-off-by: Michael Contreras <michael@inetric.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoUpdate version for 1.3.0-rc2
Anthony Liguori [Fri, 30 Nov 2012 21:04:16 +0000 (15:04 -0600)]
Update version for 1.3.0-rc2

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'kraxel/seabios-b1c35f2' into staging
Anthony Liguori [Fri, 30 Nov 2012 16:24:57 +0000 (10:24 -0600)]
Merge remote-tracking branch 'kraxel/seabios-b1c35f2' into staging

* kraxel/seabios-b1c35f2:
  seabios: update binaries in pc-bios/
  roms: also copy the dsdt when updating seabios.
  seabios: update to b1c35f2b28cc0c94ebed8176ff61ac0e0b377798

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'kwolf/for-anthony' into staging
Anthony Liguori [Fri, 30 Nov 2012 16:24:24 +0000 (10:24 -0600)]
Merge remote-tracking branch 'kwolf/for-anthony' into staging

* kwolf/for-anthony:
  coroutine-sigaltstack.c: Use stack_t, not struct sigaltstack
  stream: fix ratelimit_set_speed
  atapi: make change media detection for guests easier
  Documentation: Update image format information
  Documentation: Update block cache mode information

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'spice/spice.v65' into staging
Anthony Liguori [Fri, 30 Nov 2012 16:20:36 +0000 (10:20 -0600)]
Merge remote-tracking branch 'spice/spice.v65' into staging

* spice/spice.v65:
  qxl: reload memslots after migration, when qxl is in UNDEFINED mode

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'kraxel/usb.73' into staging
Anthony Liguori [Fri, 30 Nov 2012 16:20:21 +0000 (10:20 -0600)]
Merge remote-tracking branch 'kraxel/usb.73' into staging

* kraxel/usb.73:
  ehci-sysbus: Attach DMA context.
  usb: fail usbdevice_create() when there is no USB bus
  usb: tag usb host adapters as not hotpluggable.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'qmp/queue/qmp' into staging
Anthony Liguori [Fri, 30 Nov 2012 16:19:54 +0000 (10:19 -0600)]
Merge remote-tracking branch 'qmp/queue/qmp' into staging

* qmp/queue/qmp:
  qapi: fix qapi_dealloc_type_size parameter type

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoseabios: update binaries in pc-bios/
Gerd Hoffmann [Fri, 30 Nov 2012 15:24:59 +0000 (16:24 +0100)]
seabios: update binaries in pc-bios/

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoroms: also copy the dsdt when updating seabios.
Gerd Hoffmann [Fri, 30 Nov 2012 15:24:40 +0000 (16:24 +0100)]
roms: also copy the dsdt when updating seabios.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoRevert "audio/wavcapture: Clarify licensing"
Anthony Liguori [Fri, 30 Nov 2012 15:04:47 +0000 (09:04 -0600)]
Revert "audio/wavcapture: Clarify licensing"

This reverts commit 456a84d156a7c42f18b1da176dd6219e2dffd043.

This patch wasn't submitted to the list and did not get Acked by other
copyright holders in the file.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoRevert "audio/audio_pt_int: Clarify licensing"
Anthony Liguori [Fri, 30 Nov 2012 15:04:08 +0000 (09:04 -0600)]
Revert "audio/audio_pt_int: Clarify licensing"

This reverts commit 72bc6f1bf710e205f175af9b1fc8bbd83e8da71f.

This patch wasn't submitted to the list and did not get Acked by other
copyright holders in the file.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoseabios: update to b1c35f2b28cc0c94ebed8176ff61ac0e0b377798
Gerd Hoffmann [Fri, 30 Nov 2012 15:02:58 +0000 (16:02 +0100)]
seabios: update to b1c35f2b28cc0c94ebed8176ff61ac0e0b377798

This patch updates the seabios submodule to commit
b1c35f2b28cc0c94ebed8176ff61ac0e0b377798.

Most important change is that seabios sets the busmaster bit
in the pci config space for the lsi and esp scsi host adapters.
Since commit 1c380f9460522f32c8dd2577b2a53d518ec91c6d qemu
is strict here and disallows any dma access when the bit is
clear.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agomultiboot: fix e801 memory map
Paolo Bonzini [Thu, 29 Nov 2012 17:11:50 +0000 (18:11 +0100)]
multiboot: fix e801 memory map

The e801 memory sizes in the multiboot structures hard-code the available
low memory to 640.  However, the value should not include the size of the
EBDA.  Fill the value in the option ROM, getting the size of low memory
from the BIOS.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoseccomp: adding new syscalls (bugzilla 855162)
Eduardo Otubo [Thu, 29 Nov 2012 15:56:41 +0000 (13:56 -0200)]
seccomp: adding new syscalls (bugzilla 855162)

According to the bug 855162[0] - there's the need of adding new syscalls
to the whitelist when using Qemu with Libvirt.

[0] - https://bugzilla.redhat.com/show_bug.cgi?id=855162

Reported-by: Paul Moore <pmoore@redhat.com>
Tested-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agocoroutine-sigaltstack.c: Use stack_t, not struct sigaltstack
Peter Maydell [Sat, 10 Nov 2012 21:47:52 +0000 (21:47 +0000)]
coroutine-sigaltstack.c: Use stack_t, not struct sigaltstack

Use the POSIX-specified stack_t type as the argument to sigaltstack()
rather than the legacy struct sigaltstack. This allows us to compile
on MacOSX with --with-coroutine=sigaltstack.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
11 years agostream: fix ratelimit_set_speed
Dietmar Maurer [Wed, 24 Oct 2012 10:10:47 +0000 (12:10 +0200)]
stream: fix ratelimit_set_speed

The formula to compute slice_quota was wrong since commit 6ef228fc.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
11 years agoatapi: make change media detection for guests easier
Pavel Hrdina [Mon, 26 Nov 2012 15:37:39 +0000 (16:37 +0100)]
atapi: make change media detection for guests easier

If you have a guest with a media in the optical drive and you change
it, the windows guest cannot properly recognize this media change.

Windows needs to detect sense "NOT_READY with ASC_MEDIUM_NOT_PRESENT"
before we send sense "UNIT_ATTENTION with ASC_MEDIUM_MAY_HAVE_CHANGED".

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
11 years agoDocumentation: Update image format information
Kevin Wolf [Wed, 21 Nov 2012 13:21:47 +0000 (14:21 +0100)]
Documentation: Update image format information

Document new and yet undocumented options and image formats. The
qemu-img man page contains information only for raw and qcow2 now and
references the HTML documentation for a more detailed description of
other formats.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoDocumentation: Update block cache mode information
Kevin Wolf [Wed, 21 Nov 2012 11:26:56 +0000 (12:26 +0100)]
Documentation: Update block cache mode information

Somehow we forgot to update this when cache=writeback became the
default. While changing the information on the default, also make the
description of all caches modes a bit more accurate.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agovirtio: limit avail bytes lookahead
Michael S. Tsirkin [Thu, 29 Nov 2012 22:02:56 +0000 (00:02 +0200)]
virtio: limit avail bytes lookahead

Commit 0d8d7690850eb0cf2b2b60933cf47669a6b6f18f introduced
a regression in virtio-net performance because it looks
into the ring aggressively while we really only care
about a single packet worth of buffers.
Reported as bugzilla 1066055 in launchpad.

To fix, add parameters limiting lookahead, and
use in virtqueue_avail_bytes.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reported-by: Edivaldo de Araujo Pereira <edivaldoapereira@yahoo.com.br>
Tested-by: Edivaldo de Araujo Pereira <edivaldoapereira@yahoo.com.br>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoqemu-tech.texi: update implemented xtensa features list
Max Filippov [Thu, 29 Nov 2012 15:53:20 +0000 (19:53 +0400)]
qemu-tech.texi: update implemented xtensa features list

Debug option is available since QEMU-1.2; FP coprocessor and
coprocessor context is available since QEMU-1.3.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoqdev: relax bus type check in qdev_device_add() (v2)
Anthony Liguori [Thu, 29 Nov 2012 13:46:23 +0000 (07:46 -0600)]
qdev: relax bus type check in qdev_device_add() (v2)

We are currently checking for an exact type match.  Use QOM dynamic_cast to
check for a compatible type instead.

Cc: Konrad Frederic <fred.konrad@greensocs.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
v1 -> v2:
 - also add cast to qbus_find_recursive (Peter)
 - simplify by doing object_dynamic_cast instead of messing with classes

11 years agoqapi: fix qapi_dealloc_type_size parameter type
Bruce Rogers [Tue, 27 Nov 2012 20:11:25 +0000 (13:11 -0700)]
qapi: fix qapi_dealloc_type_size parameter type

The second parameter to qapi_dealloc_type_size should be a uint64_t *,
not a size_t *. This was causing our 32 bit x86 build to fail, since
warnings are treated as errors.

Signed-off-by: Bruce Rogers <brogers@suse.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>