qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] e3a0ab: translate-all: use glib for all page


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] e3a0ab: translate-all: use glib for all page descriptor al...
Date: Thu, 30 Apr 2015 06:00:07 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: e3a0abfda71db1fa83be894dcff7c4871b36cc8d
      
https://github.com/qemu/qemu/commit/e3a0abfda71db1fa83be894dcff7c4871b36cc8d
  Author: Emilio G. Cota <address@hidden>
  Date:   2015-04-27 (Mon, 27 Apr 2015)

  Changed paths:
    M translate-all.c

  Log Message:
  -----------
  translate-all: use glib for all page descriptor allocations

Since commit

  b7b5233a "bsd-user/mmap.c: Don't try to override g_malloc/g_free"

the exception we make here for usermode has been unnecessary.
Get rid of it.

Signed-off-by: Emilio G. Cota <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: c2cba0ffe495b60c4cc58080281e99c7a6580d4b
      
https://github.com/qemu/qemu/commit/c2cba0ffe495b60c4cc58080281e99c7a6580d4b
  Author: Fam Zheng <address@hidden>
  Date:   2015-04-27 (Mon, 27 Apr 2015)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  exec: Atomic access to bounce buffer

There could be a race condition when two processes call
address_space_map concurrently and both want to use the bounce buffer.

Add an in_use flag in BounceBuffer to sync it.

Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 02f4035c47b4d34cdc61780292ee288f400b9c49
      
https://github.com/qemu/qemu/commit/02f4035c47b4d34cdc61780292ee288f400b9c49
  Author: Fam Zheng <address@hidden>
  Date:   2015-04-27 (Mon, 27 Apr 2015)

  Changed paths:
    M bsd-user/main.c
    M linux-user/main.c

  Log Message:
  -----------
  linux-user, bsd-user: Remove two calls to cpu_exec_init_all

The function is a nop for user mode, so just remove them.

Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 38e047b50d2bfd1df99fbbca884c9f1db0785ff4
      
https://github.com/qemu/qemu/commit/38e047b50d2bfd1df99fbbca884c9f1db0785ff4
  Author: Fam Zheng <address@hidden>
  Date:   2015-04-27 (Mon, 27 Apr 2015)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  exec: Protect map_client_list with mutex

So that accesses from multiple threads are safe.

Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
[Remove #if from cpu_exec_init_all. - Paolo]
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 33b6c2edf6214f02b9beaea61b169506c01f90aa
      
https://github.com/qemu/qemu/commit/33b6c2edf6214f02b9beaea61b169506c01f90aa
  Author: Fam Zheng <address@hidden>
  Date:   2015-04-27 (Mon, 27 Apr 2015)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  exec: Notify cpu_register_map_client caller if the bounce buffer is available

The caller's workflow is like

    if (!address_space_map()) {
  ...
  cpu_register_map_client();
    }

If bounce buffer became available after address_space_map() but before
cpu_register_map_client(), the caller could miss it and has to wait for the
next bounce buffer notify, which may never happen in the worse case.

Just notify the list in cpu_register_map_client().

Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e95205e1f9cd2c4262b7a7b1c992a94512c86d0e
      
https://github.com/qemu/qemu/commit/e95205e1f9cd2c4262b7a7b1c992a94512c86d0e
  Author: Fam Zheng <address@hidden>
  Date:   2015-04-27 (Mon, 27 Apr 2015)

  Changed paths:
    M dma-helpers.c
    M exec.c
    M include/exec/cpu-common.h

  Log Message:
  -----------
  dma-helpers: Fix race condition of continue_after_map_failure and 
dma_aio_cancel

If DMA's owning thread cancels the IO while the bounce buffer's owning thread
is notifying the "cpu client list", a use-after-free happens:

     continue_after_map_failure               dma_aio_cancel
     ------------------------------------------------------------------
     aio_bh_new
                                        qemu_bh_delete
     qemu_bh_schedule (use after free)

Also, the old code doesn't run the bh in the right AioContext.

Fix both problems by passing a QEMUBH to cpu_register_map_client.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Message-Id: <address@hidden>
[Remove unnecessary forward declaration. - Paolo]
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 37d7c08413cd4307f53c83d43b1b06cf2701d7a7
      
https://github.com/qemu/qemu/commit/37d7c08413cd4307f53c83d43b1b06cf2701d7a7
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-04-27 (Mon, 27 Apr 2015)

  Changed paths:
    M include/exec/memory.h
    M memory.c

  Log Message:
  -----------
  memory: add memory_region_ram_resize

This is a simple MemoryRegion wrapper for qemu_ram_resize.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 339240b5cd42bd13d4f6629f2aedf8b4b07459fb
      
https://github.com/qemu/qemu/commit/339240b5cd42bd13d4f6629f2aedf8b4b07459fb
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-04-27 (Mon, 27 Apr 2015)

  Changed paths:
    M hw/core/loader.c
    M hw/i386/acpi-build.c
    M include/hw/loader.h

  Log Message:
  -----------
  acpi-build: remove dependency from ram_addr.h

ram_addr_t is an internal interface, everyone should go through
MemoryRegion.  Clean it up by making rom_add_blob return a
MemoryRegion* and using the new qemu_ram_resize infrastructure.

Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 0e1cd6576c55269b6e5251dc739a7fc819f9b4a6
      
https://github.com/qemu/qemu/commit/0e1cd6576c55269b6e5251dc739a7fc819f9b4a6
  Author: Mark Cave-Ayland <address@hidden>
  Date:   2015-04-27 (Mon, 27 Apr 2015)

  Changed paths:
    M hw/misc/slavio_misc.c

  Log Message:
  -----------
  sun4m: fix slavio sysctrl and led register sizes

These were being incorrectly declared as MISC_SIZE (1 byte) rather than
4 bytes and 2 bytes respectively. As a result accesses clamped to the
real register size would unexpectedly fail.

Signed-off-by: Mark Cave-Ayland <address@hidden>
CC: Paolo Bonzini <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 3337d0b2794131425d0b5cb525e67c5989f4a9dd
      
https://github.com/qemu/qemu/commit/3337d0b2794131425d0b5cb525e67c5989f4a9dd
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-04-27 (Mon, 27 Apr 2015)

  Changed paths:
    M hw/audio/sb16.c

  Log Message:
  -----------
  sb16: remove useless mixer_write_indexw

ioport.c is already able to split a 16-bit access into two 8-bit
accesses to consecutive ports.  Tested with Epic Pinball.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 54da54e543eea8e689a625fcb3dada1b296f5d3d
      
https://github.com/qemu/qemu/commit/54da54e543eea8e689a625fcb3dada1b296f5d3d
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-04-27 (Mon, 27 Apr 2015)

  Changed paths:
    M hw/audio/gus.c

  Log Message:
  -----------
  gus: clean up MemoryRegionPortio

Remove 16-bit reads/writes, since ioport.c is able to synthesize them.
Remove the two MIDI registers (0x300 and 0x301) from gus_portio_list1,
and add the second MIDI register (0x301) to gus_portio_list2.

Tested with Second Reality.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e477317cce98c399a2299d025bcb6bf0fd69df49
      
https://github.com/qemu/qemu/commit/e477317cce98c399a2299d025bcb6bf0fd69df49
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-04-27 (Mon, 27 Apr 2015)

  Changed paths:
    M hw/ide/core.c

  Log Message:
  -----------
  ide: there is only one data port

IDE PIO data must be written, for example, at 0x1f0.  You cannot
do word or dword writes to 0x1f1..0x1f3 to access the data register.
Adjust the ide_portio_list accordingly.

Cc: John Snow <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 30476b2282c69c9ec1e44e33a4c0b5d5f4bc884e
      
https://github.com/qemu/qemu/commit/30476b2282c69c9ec1e44e33a4c0b5d5f4bc884e
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-04-27 (Mon, 27 Apr 2015)

  Changed paths:
    M ioport.c

  Log Message:
  -----------
  ioport: remove wrong comment

ioport.c has not been using an alias since commit b40acf9 (ioport:
Switch dispatching to memory core layer, 2013-06-24).  Remove the
obsolete comment.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 147ed379838176d4780688157891c06f49403b19
      
https://github.com/qemu/qemu/commit/147ed379838176d4780688157891c06f49403b19
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-04-27 (Mon, 27 Apr 2015)

  Changed paths:
    M ioport.c

  Log Message:
  -----------
  ioport: loosen assertions on emulation of 16-bit ports

Right now, ioport.c assumes that the entire range specified with
MemoryRegionPortio includes a region with size == 1.  This however
is not true for the VBE DISPI ports, which are 16-bit only.  The
next patch will make these regions' length equal to two, which can
cause the assertions to trigger.  Replace them with simple conditionals.

Also, ioport.c will emulate a 16-bit ioport with two distinct reads
or writes, even if one of the two accesses is out of the bounds given
by the MemoryRegionPortio array.  Do not do this anymore, instead
discard writes to the incorrect register and read it as all-ones.
This ensures that the mrp->read and mrp->write callbacks get an
in-range ioport number.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 4080a13c11398d684668d286da27b6f8ee668e44
      
https://github.com/qemu/qemu/commit/4080a13c11398d684668d286da27b6f8ee668e44
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-04-27 (Mon, 27 Apr 2015)

  Changed paths:
    M ioport.c

  Log Message:
  -----------
  ioport: reserve the whole range of an I/O port in the AddressSpace

When an I/O port is more than 1 byte long, ioport.c is currently
creating "short" regions, for example 0x1ce-0x1ce for the 16-bit
Bochs index port.  When I/O ports are memory mapped, and thus
accessed via a subpage_ops memory region, subpage_accepts gets
confused because it finds a hole at 0x1cf and rejects the access.

In order to fix this, modify registration of the region to cover
the whole size of the I/O port.  Attempts to access an invalid
port will be blocked by find_portio returning NULL.

This only affects the VBE DISPI regions.  For all other cases,
the MemoryRegionPortio entries for 2- or 4-byte accesses overlap
an entry for 1-byte accesses, thus the size of the memory region
is not affected.

Reported-by: Zoltan Balaton <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 23820dbfc79d1c9dce090b4c555994f2bb6a69b3
      
https://github.com/qemu/qemu/commit/23820dbfc79d1c9dce090b4c555994f2bb6a69b3
  Author: Peter Crosthwaite <address@hidden>
  Date:   2015-04-27 (Mon, 27 Apr 2015)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  exec: Respect as_translate_internal length clamp

address_space_translate_internal will clamp the *plen length argument
based on the size of the memory region being queried. The iommu walker
logic in addresss_space_translate was ignoring this by discarding the
post fn call value of *plen. Fix by just always using *plen as the
length argument throughout the fn, removing the len local variable.

This fixes a bootloader bug when a single elf section spans multiple
QEMU memory regions.

Signed-off-by: Peter Crosthwaite <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 2847b46958ab0bd604e1b3fcafba0f5ba4375833
      
https://github.com/qemu/qemu/commit/2847b46958ab0bd604e1b3fcafba0f5ba4375833
  Author: Fam Zheng <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: Add support for tcmalloc

This adds "--enable-tcmalloc" and "--disable-tcmalloc" to allow linking
to libtcmalloc from gperftools.

tcmalloc is a malloc implementation that works well with threads and is
fast, so it is good for performance.

It is disabled by default, because the MALLOC_PERTURB_ flag we use in
tests doesn't work with tcmalloc. However we can enable tcmalloc
specific heap checker and profilers later.

An IOPS gain can be observed with virtio-blk-dataplane, other parts of
QEMU will directly benefit from it as well:

==========================================================
                 glibc malloc
----------------------------------------------------------
rw         bs         iodepth    bw     iops       latency
read       4k         1          150    38511      24
----------------------------------------------------------

==========================================================
                   tcmalloc
----------------------------------------------------------
rw         bs         iodepth    bw     iops       latency
read       4k         1          156    39969      23
----------------------------------------------------------

Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 738e4171de478da2516180c7a139f1b762443618
      
https://github.com/qemu/qemu/commit/738e4171de478da2516180c7a139f1b762443618
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M hw/display/Makefile.objs

  Log Message:
  -----------
  milkymist: do not modify libs-softmmu

This is better and prepares for the next patch.  When we copy
libs_softmmu's value into LIBS with a := assignment, we cannot
anymore modify libs_softmmu in the Makefiles.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 7398dfc7799a50097803db4796c7edb6cd7d47a1
      
https://github.com/qemu/qemu/commit/7398dfc7799a50097803db4796c7edb6cd7d47a1
  Author: Wei Liu <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M Makefile.target

  Log Message:
  -----------
  Makefile.target: prepend $libs_softmmu to $LIBS

I discovered a problem when trying to build QEMU statically with gcc.
libm is an element of LIBS while libpixman-1 is an element in
libs_softmmu. Libpixman references functions in libm, so the original
ordering makes linking fail.

This fix is to reorder $libs_softmmu and $LIBS to make -lm appear after
-lpixman-1. However I'm not quite sure if this is the right fix, hence
the RFC tag.

Normally QEMU is built with c++ compiler which happens to link in libm
(at least this is the case with g++), so building QEMU statically
normally just works and nobody notices this issue.

Signed-off-by: Wei Liu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: b8eb5512fd8a115f164edbbe897cdf8884920ccb
      
https://github.com/qemu/qemu/commit/b8eb5512fd8a115f164edbbe897cdf8884920ccb
  Author: Nadav Amit <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M hw/intc/apic_common.c

  Log Message:
  -----------
  target-i386: disable LINT0 after reset

Due to old Seabios bug, QEMU reenable LINT0 after reset. This bug is long gone
and therefore this hack is no longer needed.  Since it violates the
specifications, it is removed.

Signed-off-by: Nadav Amit <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 510a647fa27a12b66be40da4c2c098430003225c
      
https://github.com/qemu/qemu/commit/510a647fa27a12b66be40da4c2c098430003225c
  Author: Emilio G. Cota <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M translate-all.c

  Log Message:
  -----------
  translate-all: use bitmap helpers for PageDesc's bitmap

Here we have an open-coded byte-based bitmap implementation.
Get rid of it since there's a ulong-based implementation to be
used by all code.

Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: d064d9f381b00538e41f14104b88a1ae85d78865
      
https://github.com/qemu/qemu/commit/d064d9f381b00538e41f14104b88a1ae85d78865
  Author: Bogdan Purcareata <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M nbd.c

  Log Message:
  -----------
  nbd/trivial: fix type cast for ioctl

This fixes ioctl behavior on powerpc e6500 platforms with 64bit kernel and 32bit
userspace. The current type cast has no effect there and the value passed to the
kernel is still 0. Probably an issue related to the compiler, since I'm assuming
the same configuration works on a similar setup on x86.

Also ensure consistency with previous type cast in TRACE message.

Signed-off-by: Bogdan Purcareata <address@hidden>
Message-Id: <address@hidden>
Cc: address@hidden
[Fix parens as noticed by Michael. - Paolo]
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 06feaacfb4cfef10cc0c93d97df7bfc8a71dbc7e
      
https://github.com/qemu/qemu/commit/06feaacfb4cfef10cc0c93d97df7bfc8a71dbc7e
  Author: Peter Maydell <address@hidden>
  Date:   2015-04-30 (Thu, 30 Apr 2015)

  Changed paths:
    M Makefile.target
    M bsd-user/main.c
    M configure
    M dma-helpers.c
    M exec.c
    M hw/audio/gus.c
    M hw/audio/sb16.c
    M hw/core/loader.c
    M hw/display/Makefile.objs
    M hw/i386/acpi-build.c
    M hw/ide/core.c
    M hw/intc/apic_common.c
    M hw/misc/slavio_misc.c
    M include/exec/cpu-common.h
    M include/exec/memory.h
    M include/hw/loader.h
    M ioport.c
    M linux-user/main.c
    M memory.c
    M nbd.c
    M translate-all.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging

- miscellaneous cleanups for TCG (Emilio) and NBD (Bogdan)
- next part in the thread-safe address_space_* saga: atomic access
  to the bounce buffer and the map_clients list, from Fam
- optional support for linking with tcmalloc, also from Fam
- reapplying Peter Crosthwaite's "Respect as_translate_internal
  length clamp" after fixing the SPARC fallout.
- build system fix from Wei Liu
- small acpi-build and ioport cleanup by myself

# gpg: Signature made Wed Apr 29 09:34:00 2015 BST using RSA key ID 78C7AE83
# gpg: Good signature from "Paolo Bonzini <address@hidden>"
# gpg:                 aka "Paolo Bonzini <address@hidden>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini/tags/for-upstream: (22 commits)
  nbd/trivial: fix type cast for ioctl
  translate-all: use bitmap helpers for PageDesc's bitmap
  target-i386: disable LINT0 after reset
  Makefile.target: prepend $libs_softmmu to $LIBS
  milkymist: do not modify libs-softmmu
  configure: Add support for tcmalloc
  exec: Respect as_translate_internal length clamp
  ioport: reserve the whole range of an I/O port in the AddressSpace
  ioport: loosen assertions on emulation of 16-bit ports
  ioport: remove wrong comment
  ide: there is only one data port
  gus: clean up MemoryRegionPortio
  sb16: remove useless mixer_write_indexw
  sun4m: fix slavio sysctrl and led register sizes
  acpi-build: remove dependency from ram_addr.h
  memory: add memory_region_ram_resize
  dma-helpers: Fix race condition of continue_after_map_failure and 
dma_aio_cancel
  exec: Notify cpu_register_map_client caller if the bounce buffer is available
  exec: Protect map_client_list with mutex
  linux-user, bsd-user: Remove two calls to cpu_exec_init_all
  ...

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/a1fe58f6ad22...06feaacfb4cf

reply via email to

[Prev in Thread] Current Thread [Next in Thread]