]> git.proxmox.com Git - mirror_qemu.git/log
mirror_qemu.git
11 years agomemory: manage coalesced mmio via a MemoryListener
Avi Kivity [Tue, 2 Oct 2012 16:21:54 +0000 (18:21 +0200)]
memory: manage coalesced mmio via a MemoryListener

Instead of calling a global function on coalesced mmio changes, which
routes the call to kvm if enabled, add coalesced mmio hooks to
MemoryListener and make kvm use that instead.

The motivation is support for multiple address spaces (which means we
we need to filter the call on the right address space) but the result
is cleaner as well.

Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agoxen: drop no-op MemoryListener callbacks
Avi Kivity [Tue, 2 Oct 2012 14:42:23 +0000 (16:42 +0200)]
xen: drop no-op MemoryListener callbacks

Removes quite a bit of useless code.

Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agokvm: drop no-op MemoryListener callbacks
Avi Kivity [Tue, 2 Oct 2012 14:42:23 +0000 (16:42 +0200)]
kvm: drop no-op MemoryListener callbacks

Removes quite a bit of useless code.

Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agoxen_pt: drop no-op MemoryListener callbacks
Avi Kivity [Tue, 2 Oct 2012 14:42:23 +0000 (16:42 +0200)]
xen_pt: drop no-op MemoryListener callbacks

Removes quite a bit of useless code.

Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agovfio: drop no-op MemoryListener callbacks
Avi Kivity [Tue, 2 Oct 2012 14:42:23 +0000 (16:42 +0200)]
vfio: drop no-op MemoryListener callbacks

Removes quite a bit of useless code.

Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agomemory: drop no-op MemoryListener callbacks
Avi Kivity [Tue, 2 Oct 2012 14:42:23 +0000 (16:42 +0200)]
memory: drop no-op MemoryListener callbacks

Removes quite a bit of useless code.

Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agomemory: provide defaults for MemoryListener operations
Avi Kivity [Tue, 2 Oct 2012 14:39:57 +0000 (16:39 +0200)]
memory: provide defaults for MemoryListener operations

Many listeners don't need to respond to all MemoryListener callbacks;
provide suitable no-op defaults instead.

Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agomemory: maintain a list of address spaces
Avi Kivity [Tue, 2 Oct 2012 13:28:50 +0000 (15:28 +0200)]
memory: maintain a list of address spaces

Instead of embedding knowledge of the memory and I/O address spaces in the
memory core, maintain a list of all address spaces.  This list will later
be extended dynamically for other bus masters.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agomemory: export AddressSpace
Avi Kivity [Tue, 2 Oct 2012 12:59:23 +0000 (14:59 +0200)]
memory: export AddressSpace

The DMA API will use an AddressSpace to differentiate among different
initiators.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agomemory: prepare AddressSpace for exporting
Avi Kivity [Tue, 2 Oct 2012 11:53:41 +0000 (13:53 +0200)]
memory: prepare AddressSpace for exporting

AddressSpace contains a member, current_map, of type FlatView.  Since we
want to limit the leakage of internal types to public headers, switch to
a pointer to a FlatView.  There is no performance impact as this isn't used
during lookups, only address space reconfigurations.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agoxen_pt: use separate MemoryListeners for memory and I/O
Avi Kivity [Sun, 30 Sep 2012 20:21:11 +0000 (22:21 +0200)]
xen_pt: use separate MemoryListeners for memory and I/O

Using an unfiltered memory listener will cause regions to be reported
fails multiple times if we have more than two address spaces.  Use a separate
listener for memory and I/O, and utilize MemoryListener's address space
filtering to fix this.

Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agokvm: use separate MemoryListeners for memory and I/O
Avi Kivity [Sun, 30 Sep 2012 20:21:11 +0000 (22:21 +0200)]
kvm: use separate MemoryListeners for memory and I/O

The construct

   if (address_space == get_system_memory()) {
       // memory thing
   } else {
       // io thing
   }

fails if we have more than two address spaces.  Use a separate listener
for memory and I/O, and utilize MemoryListener's address space filtering to
fix this.

Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agovhost: use MemoryListener filtering to only monitor RAM address space
Avi Kivity [Sun, 30 Sep 2012 20:02:53 +0000 (22:02 +0200)]
vhost: use MemoryListener filtering to only monitor RAM address space

Instead of checking manually, let the listener filter for us.  This prepares
us for DMA address spaces.

Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agomemory: rename 'exec-obsolete.h'
Avi Kivity [Thu, 20 Sep 2012 13:02:51 +0000 (16:02 +0300)]
memory: rename 'exec-obsolete.h'

exec-obsolete.h used to hold pre-memory-API functions that were used from
device code prior to the transition to the memory API.  Now that the
transition is complete, the name no longer describes the file.  The
functions still need to be merged better into the memory core, but there's
no danger of anyone using them.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agoFix popcnt in long mode
malc [Sun, 14 Oct 2012 10:54:38 +0000 (14:54 +0400)]
Fix popcnt in long mode

Thanks to Andriy Gapon for initial problem report.

Signed-off-by: malc <av1474@comtv.ru>
11 years agosun4u: Pass SPARCCPU to cpu_set_ivec_irq()
Andreas Färber [Fri, 12 Oct 2012 02:23:08 +0000 (04:23 +0200)]
sun4u: Pass SPARCCPU to cpu_set_ivec_irq()

Needed for moving halted field to CPUState.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agosun4u: Pass SPARCCPU to cpu_kick_irq()
Andreas Färber [Fri, 12 Oct 2012 02:23:07 +0000 (04:23 +0200)]
sun4u: Pass SPARCCPU to cpu_kick_irq()

Needed for changing qemu_cpu_kick() argument type to CPUState.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agosun4u: Pass SPARCCPU to {,s,hs}tick_irq() and cpu_timer_create()
Andreas Färber [Fri, 12 Oct 2012 02:23:06 +0000 (04:23 +0200)]
sun4u: Pass SPARCCPU to {,s,hs}tick_irq() and cpu_timer_create()

Needed for changing cpu_kick_irq() argument type to SPARCCPU.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agosun4m: Pass SPARCCPU to cpu_kick_irq()
Andreas Färber [Fri, 12 Oct 2012 02:23:05 +0000 (04:23 +0200)]
sun4m: Pass SPARCCPU to cpu_kick_irq()

Needed for changing qemu_cpu_kick() argument type to CPUState.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agosun4m: Pass SPARCCPU to cpu_set_irq()
Andreas Färber [Fri, 12 Oct 2012 02:23:04 +0000 (04:23 +0200)]
sun4m: Pass SPARCCPU to cpu_set_irq()

Needed for changing cpu_kick_irq() argument type to SPARCCPU.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg-sparc: Emit MOVR insns for setcond_i64 and movcond_64
Richard Henderson [Wed, 10 Oct 2012 16:02:47 +0000 (09:02 -0700)]
tcg-sparc: Emit MOVR insns for setcond_i64 and movcond_64

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg-sparc: Emit BPr insns for brcond_i64
Richard Henderson [Wed, 10 Oct 2012 16:02:46 +0000 (09:02 -0700)]
tcg-sparc: Emit BPr insns for brcond_i64

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg-sparc: Dump illegal opode contents
Richard Henderson [Wed, 10 Oct 2012 16:02:45 +0000 (09:02 -0700)]
tcg-sparc: Dump illegal opode contents

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg-sparc: Drop use of Bicc in favor of BPcc
Richard Henderson [Wed, 10 Oct 2012 16:02:44 +0000 (09:02 -0700)]
tcg-sparc: Drop use of Bicc in favor of BPcc

Now that we're always sparcv9, we can not bother using Bicc for
32-bit branches and BPcc for 64-bit branches and instead always
use BPcc.

New interfaces allow less direct use of tcg_out32 and raw numbers
inside the qemu_ld/st routines.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg-sparc: Optimize setcond2 equality compare with 0.
Richard Henderson [Wed, 10 Oct 2012 16:02:43 +0000 (09:02 -0700)]
tcg-sparc: Optimize setcond2 equality compare with 0.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg-sparc: Use Z constraint for %g0
Richard Henderson [Wed, 10 Oct 2012 16:02:42 +0000 (09:02 -0700)]
tcg-sparc: Use Z constraint for %g0

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg-sparc: Fix add2/sub2
Richard Henderson [Wed, 10 Oct 2012 16:02:41 +0000 (09:02 -0700)]
tcg-sparc: Fix add2/sub2

We must care not to clobber the high parts before we consume them.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg-sparc: Fix setcond
Richard Henderson [Wed, 10 Oct 2012 16:02:40 +0000 (09:02 -0700)]
tcg-sparc: Fix setcond

The set of comparisons that can immediately use the carry are LTU/GEU,
not LTU/LEU.  Don't swap operands when we need a temp register; the
register may already be in use from setcond2.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg-sparc: Fix qemu_st for 32-bit
Richard Henderson [Wed, 10 Oct 2012 16:02:39 +0000 (09:02 -0700)]
tcg-sparc: Fix qemu_st for 32-bit

The datalo variable is still live in the miss path.  Use another
when reconstructing the full data value.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg-sparc: Fix setcond2
Richard Henderson [Wed, 10 Oct 2012 16:02:38 +0000 (09:02 -0700)]
tcg-sparc: Fix setcond2

Like brcond2, use tcg_high_cond.  Use movcc instead of branches.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg-sparc: Implement movcond.
Richard Henderson [Wed, 10 Oct 2012 16:02:37 +0000 (09:02 -0700)]
tcg-sparc: Implement movcond.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotcg-sparc: Fix brcond2
Richard Henderson [Wed, 10 Oct 2012 16:02:36 +0000 (09:02 -0700)]
tcg-sparc: Fix brcond2

Much the same problem as recently fixed for hppa.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Don't compute full flags value so often
Richard Henderson [Tue, 9 Oct 2012 21:50:00 +0000 (14:50 -0700)]
target-sparc: Don't compute full flags value so often

Avoid speculatively computing flags before every potentially trapping
operation and instead do the flags computation when a trap actually
occurs.  This gives approximately 30% speedup in emulation.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Avoid unnecessary local temporaries
Richard Henderson [Tue, 9 Oct 2012 21:49:59 +0000 (14:49 -0700)]
target-sparc: Avoid unnecessary local temporaries

Now that save_state never ends a BB, we don't need to copy
values into local temps around it.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Optimize CC_OP_LOGIC conditions
Richard Henderson [Tue, 9 Oct 2012 21:49:58 +0000 (14:49 -0700)]
target-sparc: Optimize CC_OP_LOGIC conditions

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Fix optimized %icc comparisons
Richard Henderson [Tue, 9 Oct 2012 21:49:57 +0000 (14:49 -0700)]
target-sparc: Fix optimized %icc comparisons

Signed-off-by: Richard Henderson <rth@twiddle.net>
Tested-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoMerge remote-tracking branch 'pmaydell/arm-devs.for-upstream' into staging
Anthony Liguori [Fri, 12 Oct 2012 16:20:14 +0000 (11:20 -0500)]
Merge remote-tracking branch 'pmaydell/arm-devs.for-upstream' into staging

* pmaydell/arm-devs.for-upstream:
  arm_gic: Rename gic_state to GICState
  zynq_slcr: Fixed ResetValues enum
  versatilepb: add gpio pl061 support
  hw/ds1338: Implement state save/restore
  hw/ds1338: Remove 'now' field from state struct
  hw/ds1338: Recapture current time when register pointer wraps around
  hw/ds1338: Fix mishandling of register pointer
  hw/arm_gic.c: Fix improper DPRINTF output.
  cadence_ttc: Fix 'clear on read' behavior

11 years agoMerge remote-tracking branch 'stefanha/trivial-patches' into staging
Anthony Liguori [Fri, 12 Oct 2012 16:19:56 +0000 (11:19 -0500)]
Merge remote-tracking branch 'stefanha/trivial-patches' into staging

* stefanha/trivial-patches:
  vnc: fix "info vnc" with "-vnc ..., reverse=on"
  sheepdog: use bool for boolean variables
  configure: Tidy up remnants of non-64-bit physaddrs

11 years agoMerge remote-tracking branch 'kraxel/usb.67' into staging
Anthony Liguori [Fri, 12 Oct 2012 14:14:32 +0000 (09:14 -0500)]
Merge remote-tracking branch 'kraxel/usb.67' into staging

* kraxel/usb.67:
  uhci: Raise interrupt when requested even for non active tds
  usb-redir: Don't make migration fail in none seamless case
  usb-redir: Change usbredir_open_chardev into usbredir_create_parser

11 years agoMerge remote-tracking branch 'mdroth/qga-pull-10-9-12' into staging
Anthony Liguori [Fri, 12 Oct 2012 14:14:23 +0000 (09:14 -0500)]
Merge remote-tracking branch 'mdroth/qga-pull-10-9-12' into staging

* mdroth/qga-pull-10-9-12:
  qemu-ga: ga_open_pidfile(): add new line to pidfile
  qemu-ga: use state dir from CONFIG_QEMU_LOCALSTATEDIR
  configure: add --localstatedir

11 years agoMerge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20121008.0' into staging
Anthony Liguori [Fri, 12 Oct 2012 14:14:14 +0000 (09:14 -0500)]
Merge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20121008.0' into staging

* awilliam/tags/vfio-pci-for-qemu-20121008.0:
  vfio-pci: Fix BAR->VFIODevice translation in
  vfio-pci: Clang cleanup
  vfio-pci: Cleanup on INTx setup failure
  vfio-pci: Extend reset
  vfio-pci: Remove setting of MSI qsize
  vfio-pci: Use uintptr_t for void* cast
  vfio-pci: Don't peak at msi_supported
  vfio-pci: Roll the header into the .c file
  vfio-pci: No spurious MSIs
  vfio-pci: Rework MSIX setup/teardown
  vfio-pci: Unmap and retry DMA mapping
  vfio-pci: Re-order map/unmap
  vfio-pci: Update slow path INTx algorithm

11 years agoMerge remote-tracking branch 'stefanha/net' into staging
Anthony Liguori [Fri, 12 Oct 2012 14:14:04 +0000 (09:14 -0500)]
Merge remote-tracking branch 'stefanha/net' into staging

* stefanha/net:
  net: consolidate NetClientState header files into one
  virtio-net: update nc.link_down in virtio_net_load()
  e1000: update nc.link_down in e1000_post_load()
  rtl8139: implement 8139cp link status

11 years agoMerge remote-tracking branch 'spice/spice.v61' into staging
Anthony Liguori [Fri, 12 Oct 2012 14:13:58 +0000 (09:13 -0500)]
Merge remote-tracking branch 'spice/spice.v61' into staging

* spice/spice.v61:
  qxl: set default revision to 4
  spice: raise requirement to 0.12
  hw/qxl: qxl_dirty_surfaces: use uintptr_t
  hw/qxl: fix condition for exiting guest_bug
  hw/qxl: exit on failure to register qxl interface
  qxl: fix range check for rev3 io commands.
  qxl/update_area_io: cleanup invalid parameters handling
  qxl: always update displaysurface on resize

11 years agoarm_gic: Rename gic_state to GICState
Peter Maydell [Fri, 12 Oct 2012 10:54:39 +0000 (11:54 +0100)]
arm_gic: Rename gic_state to GICState

Rename the gic_state struct to match QEMU's coding style conventions
for structure names, since the impending KVM-for-ARM patches will
create another subclass of it. This patch was created using:
  sed -i 's/gic_state/GICState/g' hw/arm_gic.c hw/arm_gic_common.c \
    hw/arm_gic_internal.h hw/armv7m_nvic.c

Acked-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agozynq_slcr: Fixed ResetValues enum
Peter A. G. Crosthwaite [Fri, 12 Oct 2012 10:54:39 +0000 (11:54 +0100)]
zynq_slcr: Fixed ResetValues enum

There is a gap in the reset region of the address space at offset 0x208. This
throws out all these enum values by one when translating them to address offsets.
Fixed by putting the corresponding gap in the enum as well.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agoversatilepb: add gpio pl061 support
Jean-Christophe PLAGNIOL-VILLARD [Fri, 12 Oct 2012 10:54:39 +0000 (11:54 +0100)]
versatilepb: add gpio pl061 support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agohw/ds1338: Implement state save/restore
Peter Maydell [Fri, 12 Oct 2012 10:54:38 +0000 (11:54 +0100)]
hw/ds1338: Implement state save/restore

Implement state save/restore for the DS1338. This requires
the usual minor adjustment of types in the state struct to
get fixed-width ones with vmstate macros.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agohw/ds1338: Remove 'now' field from state struct
Peter Maydell [Fri, 12 Oct 2012 10:54:38 +0000 (11:54 +0100)]
hw/ds1338: Remove 'now' field from state struct

The 'struct tm now' field in the state structure is in fact only
ever used as a temporary (the actual RTC state is held in 'offset').
Remove it from the state structure in favour of using local variables
to avoid confusion about whether it needs to be saved on migration.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agohw/ds1338: Recapture current time when register pointer wraps around
Peter Maydell [Fri, 12 Oct 2012 10:54:38 +0000 (11:54 +0100)]
hw/ds1338: Recapture current time when register pointer wraps around

The DS1338 datasheet documents that the current time is captured into
the secondary registers when the register pointer wraps round to zero
as well as at a START condition. Implement this.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agohw/ds1338: Fix mishandling of register pointer
Peter Maydell [Fri, 12 Oct 2012 10:54:38 +0000 (11:54 +0100)]
hw/ds1338: Fix mishandling of register pointer

Correct several deficiencies in the handling of the register pointer:
 * it should wrap around after 0x3f, not 0xff
 * guard against the caller handing us an out of range pointer
   (on h/w this can never happen, because only a 7 bit value is
   transferred over the I2C bus)
 * there was confusion over whether nvram[] holds only the 56 bytes
   of guest-accessible NVRAM, or also the secondary registers
   which hold the value of the clock captured at the start of a
   multibyte read. Correct to consistently be the latter, by fixing
   the array size and the offset used for NVRAM writes.
 * ds1338_send was attempting to use 'data' as both the data and
   the register offset simultaneously, which meant that writes to
   any register were broken; fix to use the register pointer.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agohw/arm_gic.c: Fix improper DPRINTF output.
Evgeny Voevodin [Fri, 12 Oct 2012 10:54:37 +0000 (11:54 +0100)]
hw/arm_gic.c: Fix improper DPRINTF output.

s->cpu_enabled is an array, so s->cpu_enabled ? "En" : "Dis" returns
"En" always. We should use s->cpu_enabled[cpu] here.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agocadence_ttc: Fix 'clear on read' behavior
Soren Brinkmann [Fri, 12 Oct 2012 10:54:37 +0000 (11:54 +0100)]
cadence_ttc: Fix 'clear on read' behavior

A missing call to qemu_set_irq() when reading the IRQ register
required SW to write to the IRQ register to acknowledge an
interrupt. With this patch the behavior is fixed:
 - Reading the interrupt register clears it and updates the timers
   interrupt status
 - Writes to the interrupt register are ignored

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agovnc: fix "info vnc" with "-vnc ..., reverse=on"
Paolo Bonzini [Wed, 10 Oct 2012 12:30:58 +0000 (14:30 +0200)]
vnc: fix "info vnc" with "-vnc ..., reverse=on"

When reverse connection is in use, there is no active VNC server
socket.  Because of this, getsockopt(-1, ...) is attempted and
the following error is emitted:

    $ socat TCP-LISTEN:5900,reuseaddr TCP-LISTEN:5901,reuseaddr &
    $ x86_64-softmmu/qemu-system-x86_64 -vnc localhost:5900,reverse -monitor stdio
    QEMU 1.2.50 monitor - type 'help' for more information
    (qemu) info vnc
    An undefined error has occurred

Because however the host, family, service and auth fields are
optional, we can just exit if there is no active server socket.

    $ x86_64-softmmu/qemu-system-x86_64 -vnc localhost:5900,reverse -monitor stdio
    QEMU 1.2.50 monitor - type 'help' for more information
    (qemu) info vnc
    Server:
    Client:
         address: 127.0.0.1:5900
      x509_dname: none
        username: none

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agosheepdog: use bool for boolean variables
MORITA Kazutaka [Sat, 6 Oct 2012 16:57:14 +0000 (01:57 +0900)]
sheepdog: use bool for boolean variables

This improves readability.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoconfigure: Tidy up remnants of non-64-bit physaddrs
Peter Maydell [Fri, 5 Oct 2012 16:33:22 +0000 (17:33 +0100)]
configure: Tidy up remnants of non-64-bit physaddrs

Tidy up some remnants of code to support non-64-bit physaddrs
which were accidentally omitted from commit 4be403c8.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agouhci: Raise interrupt when requested even for non active tds
Hans de Goede [Wed, 10 Oct 2012 13:50:36 +0000 (15:50 +0200)]
uhci: Raise interrupt when requested even for non active tds

According to the spec we must raise an interrupt when one is requested
even for non active tds.

Linux depends on this, for bulk transfers it runs an inactivity timer
to work around a bug in early uhci revisions, when we take longer then
200 ms to process a packet, this timer goes of, and as part of the
handling Linux then unlinks the qh, and relinks it after the frindex
has increased by atleast 1, the problem is Linux only checks for the
frindex increases on an interrupt, and we don't send that, causing
the qh to go inactive for more then 32 frames, at which point we
consider the packet cancelled.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agousb-redir: Don't make migration fail in none seamless case
Hans de Goede [Thu, 27 Sep 2012 15:25:45 +0000 (17:25 +0200)]
usb-redir: Don't make migration fail in none seamless case

Instead simple disconnect the device like host redirection does on
migration.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agousb-redir: Change usbredir_open_chardev into usbredir_create_parser
Hans de Goede [Thu, 27 Sep 2012 15:25:44 +0000 (17:25 +0200)]
usb-redir: Change usbredir_open_chardev into usbredir_create_parser

As we need to create the parser at more places.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agossi: Add slave autoconnect helper
Peter Crosthwaite [Mon, 1 Oct 2012 02:34:37 +0000 (12:34 +1000)]
ssi: Add slave autoconnect helper

Added helper function to automatically connect SPI slaves based on the QOM child
nodes of a device. A SSI master device can call this routine to automatically
hook-up all child nodes to its SPI bus.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
11 years agoMAINTAINERS: Added maintainerships for SSI
Peter A. G. Crosthwaite [Mon, 6 Aug 2012 01:38:19 +0000 (11:38 +1000)]
MAINTAINERS: Added maintainerships for SSI

Added maintainership for SSI, M25P80 and the Xilinx SPI controllers.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
11 years agoxilinx_zynq: Added SPI controllers + flashes
Peter A. G. Crosthwaite [Fri, 3 Aug 2012 06:08:48 +0000 (16:08 +1000)]
xilinx_zynq: Added SPI controllers + flashes

Added the two SPI controllers to the zynq machine model. Attached two SPI flash
devices to each controller.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
11 years agoxilinx_spips: Xilinx Zynq SPI cntrlr device model
Peter A. G. Crosthwaite [Wed, 1 Aug 2012 10:52:36 +0000 (20:52 +1000)]
xilinx_spips: Xilinx Zynq SPI cntrlr device model

Added device model for the Xilinx Zynq SPI controller (SPIPS).

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
11 years agopetalogix-ml605: added SPI controller with n25q128
Peter A. G. Crosthwaite [Tue, 27 Mar 2012 07:57:47 +0000 (17:57 +1000)]
petalogix-ml605: added SPI controller with n25q128

Added SPI controller to the reference design, with two n25q128 spi-flashes
connected.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
11 years agoxilinx_spi: Initial impl. of Xilinx SPI controller
Peter A. G. Crosthwaite [Mon, 26 Mar 2012 12:59:55 +0000 (22:59 +1000)]
xilinx_spi: Initial impl. of Xilinx SPI controller

Device model for xilinx XPS SPI controller (v2.0)

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
11 years agom25p80: Initial implementation of SPI flash device
Peter A. G. Crosthwaite [Mon, 26 Mar 2012 12:10:59 +0000 (22:10 +1000)]
m25p80: Initial implementation of SPI flash device

Added device model for m25p80 style SPI flash family.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
11 years agohw: Added generic FIFO API.
Peter A. G. Crosthwaite [Wed, 1 Aug 2012 10:26:12 +0000 (20:26 +1000)]
hw: Added generic FIFO API.

Added a FIFO API that can be used to create and operate byte FIFOs.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
11 years agostellaris: Removed SSI mux
Peter A. G. Crosthwaite [Tue, 31 Jul 2012 06:42:04 +0000 (16:42 +1000)]
stellaris: Removed SSI mux

Removed the explicit SSI mux and wired the CS line directly up to the SSI
devices.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
11 years agoqdev: allow multiple qdev_init_gpio_in() calls
Peter A. G. Crosthwaite [Tue, 31 Jul 2012 02:24:06 +0000 (12:24 +1000)]
qdev: allow multiple qdev_init_gpio_in() calls

Allow multiple qdev_init_gpio_in() calls for the one device. The first call will
define GPIOs 0-N-1, the next GPIOs N- ... . Allows different GPIOs to be handled
with different handlers. Needed when two levels of the QOM class heirachy both
define GPIO functionality, as a single GPIO handler with an index selecter is
not possible.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
11 years agossi: Added create_slave_no_init()
Peter A. G. Crosthwaite [Tue, 24 Jul 2012 03:56:27 +0000 (13:56 +1000)]
ssi: Added create_slave_no_init()

Slave creation function that can be used to create an SSI slave without
qdev_init() being called. This give machine models a chance to set properties.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
11 years agossi: Implemented CS behaviour
Peter A. G. Crosthwaite [Tue, 24 Jul 2012 02:23:22 +0000 (12:23 +1000)]
ssi: Implemented CS behaviour

Added default CS behaviour for SSI slaves. SSI devices can set a property
to enable CS behaviour which will create a GPIO on the device which is the
CS. Tristating of the bus on SSI transfers is implemented.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
11 years agossi: Support for multiple attached devices
Peter A. G. Crosthwaite [Tue, 24 Jul 2012 00:55:15 +0000 (10:55 +1000)]
ssi: Support for multiple attached devices

Removed assertion that only one device is attached to the SSI bus.

When multiple devices are attached, all slaves have their transfer function
called for transfers. Each device is responsible for knowing whether or not its
CS is active, and if not returning 0. The returned data is the logical or of
all responses from the (mulitple) devices.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
11 years agoqemu-ga: ga_open_pidfile(): add new line to pidfile
Luiz Capitulino [Wed, 3 Oct 2012 21:40:01 +0000 (18:40 -0300)]
qemu-ga: ga_open_pidfile(): add new line to pidfile

FHS requires that pid files should end with a new line. Also change to
snprintf() while there.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
11 years agoqemu-ga: use state dir from CONFIG_QEMU_LOCALSTATEDIR
Luiz Capitulino [Wed, 3 Oct 2012 21:35:58 +0000 (18:35 -0300)]
qemu-ga: use state dir from CONFIG_QEMU_LOCALSTATEDIR

Has the side effect of changing the default directory used to
save the freeze status file from /tmp to ${prefix}/var/run.

This is a beneficial change for two reasons:

  1. FHS states that programs must not assume that files in /tmp will
     still exist between invocations of the program. This defeats
 the purpose of the freeze status file

  2. FHS dictates that /var/run must be cleaned on boot, this
     ensures that a stale freeze status file will be removed on boot

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
11 years agoconfigure: add --localstatedir
Luiz Capitulino [Wed, 3 Oct 2012 21:35:57 +0000 (18:35 -0300)]
configure: add --localstatedir

Next commit wants to use it.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
11 years agovfio-pci: Fix BAR->VFIODevice translation in
Jan Kiszka [Mon, 8 Oct 2012 14:45:31 +0000 (08:45 -0600)]
vfio-pci: Fix BAR->VFIODevice translation in

DO_UPCAST is supposed to translate from the first member of a struct to
that struct, not from arbitrary ones. And it (usually) breaks the build
when neglecting this rule. Use container_of to fix the build breakage
and likely also the runtime behavior.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
aw: runtime behavior is actually the same, but clearly misuse of DO_UPCAST
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11 years agovfio-pci: Clang cleanup
Alex Williamson [Mon, 8 Oct 2012 14:45:31 +0000 (08:45 -0600)]
vfio-pci: Clang cleanup

Blue Swirl reports that Clang doesn't like the structure we define to
avoid dynamic allocation for a number of calls to VFIO_DEVICE_SET_IRQS.
Adding an element after a variable sized type is a GNU extension.
Switch back to dynamic allocation, which really isn't a problem since
this is only done on interrupt setup changes.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11 years agovfio-pci: Cleanup on INTx setup failure
Alex Williamson [Mon, 8 Oct 2012 14:45:30 +0000 (08:45 -0600)]
vfio-pci: Cleanup on INTx setup failure

Missing some unwind code.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11 years agovfio-pci: Extend reset
Alex Williamson [Mon, 8 Oct 2012 14:45:30 +0000 (08:45 -0600)]
vfio-pci: Extend reset

Take what we've learned from pci-assign and apply it to vfio-pci.
On reset, disable previous interrupt config, perform a device
reset if available, re-enable INTx, and disable memory regions on
the device to prevent continuing DMA.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11 years agovfio-pci: Remove setting of MSI qsize
Alex Williamson [Mon, 8 Oct 2012 14:45:30 +0000 (08:45 -0600)]
vfio-pci: Remove setting of MSI qsize

This was a misinterpretation of the spec, hardware doesn't get to
specify how many were actually enabled through this field.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11 years agovfio-pci: Use uintptr_t for void* cast
Alex Williamson [Mon, 8 Oct 2012 14:45:30 +0000 (08:45 -0600)]
vfio-pci: Use uintptr_t for void* cast

We don't seem to run into any sign extension problems, but
unsigned looks more correct.

Signed-off-by: Alex williamson <alex.williamson@redhat.com>
11 years agovfio-pci: Don't peak at msi_supported
Alex Williamson [Mon, 8 Oct 2012 14:45:30 +0000 (08:45 -0600)]
vfio-pci: Don't peak at msi_supported

Let the init function fail, just don't warn for -ENOTSUP.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11 years agovfio-pci: Roll the header into the .c file
Alex Williamson [Mon, 8 Oct 2012 14:45:30 +0000 (08:45 -0600)]
vfio-pci: Roll the header into the .c file

It's only ~100 lines and nobody else should be using this.
Suggested by Michael Tsirkin.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11 years agovfio-pci: No spurious MSIs
Alex Williamson [Mon, 8 Oct 2012 14:45:29 +0000 (08:45 -0600)]
vfio-pci: No spurious MSIs

FreeBSD doesn't like these spurious MSIs, remove them as they're
mostly paranoia anyway.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11 years agovfio-pci: Rework MSIX setup/teardown
Alex Williamson [Mon, 8 Oct 2012 14:45:29 +0000 (08:45 -0600)]
vfio-pci: Rework MSIX setup/teardown

We try to do lazy initialization of MSIX since we don't actually need
to setup anything until MSIX vectors start getting used.  This leads
to problems if MSIX is enabled, but never used (we can end up trying
to re-enable INTx while it's still enabled).  We also run into
problems trying to expand our reset function to tear down interrupts
as we can then get vector release notifications after we've released
data structures.  By making explicit initialization and teardown we
can avoid both of these problems and behave more similar to bare
metal.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11 years agovfio-pci: Unmap and retry DMA mapping
Alex Williamson [Mon, 8 Oct 2012 14:45:29 +0000 (08:45 -0600)]
vfio-pci: Unmap and retry DMA mapping

Occasionally we get regions added that overlap with existing mappings.
These always seems to be in the VGA ROM range.  VFIO returns EBUSY
for these mapping attempts.  We can try a little harder and assume
that the latest mapping is correct by removing any overlapping ranges
and retrying the original request.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11 years agovfio-pci: Re-order map/unmap
Alex Williamson [Mon, 8 Oct 2012 14:45:29 +0000 (08:45 -0600)]
vfio-pci: Re-order map/unmap

This cleans up the next patch that calls unmap from map.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11 years agovfio-pci: Update slow path INTx algorithm
Alex Williamson [Mon, 8 Oct 2012 14:45:29 +0000 (08:45 -0600)]
vfio-pci: Update slow path INTx algorithm

We can't afford the overhead of switching out and back into mmap mode
around each interrupt, but we can do it lazily via a timer.  On INTx
interrupt, disable the mmap'd memory regions and set a timer.  On
every interrupt, push the timer out.  If the timer expires and the
interrupt is no longer pending, switch back to mmap mode.

This has the benefit that things like graphics cards, which rarely or
never, fire an interrupt don't need manual user intervention to add
the x-intx=off parameter.  They'll just remain in mmap mode until they
trigger an interrupt, and if they don't continue to regularly fire
interrupts, they'll switch back.

The default timeout is tuned for network cards so that a ping is just
enough to keep them in non-mmap mode, where they have much better
latency.  It is tunable with an experimental option,
x-intx-mmap-timeout-ms.  A value of 0 keeps the device in non-mmap
mode after the first interrupt.

It's possible we could look at the class code of devices and come up
with reasonable per-class defaults based on expected interrupt
frequency and latency.  None of this is used for MSI interrupts and
also won't be used if we can bypass through KVM.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
11 years agonet: consolidate NetClientState header files into one
Paolo Bonzini [Mon, 17 Sep 2012 16:43:51 +0000 (18:43 +0200)]
net: consolidate NetClientState header files into one

This patch doesn't seem much useful alone, I must admit.  However,
it makes sense as part of the upcoming directory reorganization,
where I want to have include/net/tap.h as the net<->hw interface
for tap.  Then having both net/tap.h and include/net/tap.h does
not work.  "Fixed" by moving all the init functions to a single
header file net/clients.h.

The patch also adopts a uniform style for including net/*.h files
from net/*.c, without the net/ path.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
11 years agovirtio-net: update nc.link_down in virtio_net_load()
Amos Kong [Fri, 28 Sep 2012 02:06:02 +0000 (10:06 +0800)]
virtio-net: update nc.link_down in virtio_net_load()

nc.link_down could not be migrated, this patch updates link_down in
virtio_post_load() to keep it coincident with real link status.

Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
11 years agoe1000: update nc.link_down in e1000_post_load()
Amos Kong [Fri, 28 Sep 2012 02:06:01 +0000 (10:06 +0800)]
e1000: update nc.link_down in e1000_post_load()

This patch introduced e1000_post_load(), it will be called in the end of
migration. nc.link_down could not be migrated, this patch updates
link_down in e1000_post_load() to keep it coincident with real link
status.

Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
11 years agortl8139: implement 8139cp link status
Jason Wang [Fri, 28 Sep 2012 02:06:00 +0000 (10:06 +0800)]
rtl8139: implement 8139cp link status

Add a link status chang callback and change the link status bit in BMSR
& MSR accordingly. Tested in Linux/Windows guests.

The link status bit of MediaStatus is infered from BasicModeStatus,
they are inverse.

nc.link_down could not be migrated, this patch updates link_down in
rtl8139_post_load() to keep it coincident with real link status.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
11 years agoqxl: set default revision to 4
Gerd Hoffmann [Mon, 8 Oct 2012 08:05:22 +0000 (10:05 +0200)]
qxl: set default revision to 4

Set qxl pci revision to 4 (for pc-1.3+) so guests know
spice-server 0.12 features are available.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agospice: raise requirement to 0.12
Gerd Hoffmann [Mon, 24 Sep 2012 08:23:40 +0000 (10:23 +0200)]
spice: raise requirement to 0.12

With the next qemu version (1.3) we are going to bump the qxl device
revision to 4.  The new features available require a recent spice-server
version, so raise up the bar.  Otherwise we would end up with different
qxl revisions depending on the spice-server version installed, which
would be a major PITA when it comes to compat properties.

Clear out a big bunch of #ifdefs which are not needed any more.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agohw/qxl: qxl_dirty_surfaces: use uintptr_t
Alon Levy [Sun, 7 Oct 2012 15:03:35 +0000 (17:03 +0200)]
hw/qxl: qxl_dirty_surfaces: use uintptr_t

As suggested by Paolo Bonzini, to avoid possible integer overflow issues.

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agohw/qxl: fix condition for exiting guest_bug
Alon Levy [Tue, 2 Oct 2012 09:39:14 +0000 (11:39 +0200)]
hw/qxl: fix condition for exiting guest_bug

Reported and suggested by Paolo Bonzini, thanks.

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agohw/qxl: exit on failure to register qxl interface
Alon Levy [Wed, 3 Oct 2012 18:13:58 +0000 (20:13 +0200)]
hw/qxl: exit on failure to register qxl interface

This prevents a segfault later on when the device reset handler
tries to access a NULL ssd.worker since interface_attach_worker has
not been called.

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoqxl: fix range check for rev3 io commands.
Gerd Hoffmann [Tue, 25 Sep 2012 11:56:40 +0000 (13:56 +0200)]
qxl: fix range check for rev3 io commands.

Enables QXL_IO_FLUSH_SURFACES_ASYNC and QXL_IO_FLUSH_RELEASE
which are part of the qxl rev3 feature set.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoqxl/update_area_io: cleanup invalid parameters handling
Michael Tokarev [Wed, 19 Sep 2012 13:41:26 +0000 (17:41 +0400)]
qxl/update_area_io: cleanup invalid parameters handling

This cleans up two additions of almost the same code in commits
511b13e2c9 and ccc2960d654.  While at it, make error paths
consistent (always use 'break' instead of 'return').

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Cc: Dunrong Huang <riegamaths@gmail.com>
Cc: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoqxl: always update displaysurface on resize
Gerd Hoffmann [Fri, 14 Sep 2012 20:09:23 +0000 (22:09 +0200)]
qxl: always update displaysurface on resize

Don't try to be clever and skip displaysurface reinitialization in case
the size hasn't changed.  Other parameters might have changed
nevertheless, for example depth or stride, resulting in rendering being
broken then.

Trigger: boot linux guest with vesafb, start X11, make sure both vesafb
and X11 use the display same resolution.  Then watch X11 screen being
upside down.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoMerge branch 'master' of git.qemu.org:/pub/git/qemu
Blue Swirl [Sun, 7 Oct 2012 18:42:18 +0000 (18:42 +0000)]
Merge branch 'master' of git.qemu.org:/pub/git/qemu

* 'master' of git.qemu.org:/pub/git/qemu:
  qemu-barrier: Fix compilation on i386 hosts