qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 55ce75: eventfd: making it thread safe


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 55ce75: eventfd: making it thread safe
Date: Wed, 22 Aug 2012 11:00:12 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 55ce75faf253d4369670f60409c608e665e8dde9
      
https://github.com/qemu/qemu/commit/55ce75faf253d4369670f60409c608e665e8dde9
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2012-08-21 (Tue, 21 Aug 2012)

  Changed paths:
    M iohandler.c

  Log Message:
  -----------
  eventfd: making it thread safe

QEMU uses IO handlers to run select() in the main loop.
The handlers list is managed by qemu_set_fd_handler() helper
which works fine when called from the main thread as it is
called when select() is not waiting.

However IO handlers list can be changed in the thread other than
the main one doing os_host_main_loop_wait(), for example, as a result
of a hypercall which changes PCI config space (VFIO on POWER is the case)
and enables/disabled MSI/MSIX which closes/creates eventfd handles.
As the main loop should be waiting on the newly created eventfds,
it has to be restarted.

The patch adds the qemu_notify_event() call to interrupt select()
to make main_loop() restart select() with the updated IO handlers
list.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 0ec64507a5e6366e6d8070a82c866b935f687ed9
      
https://github.com/qemu/qemu/commit/0ec64507a5e6366e6d8070a82c866b935f687ed9
  Author: Jan Kiszka <address@hidden>
  Date:   2012-08-21 (Tue, 21 Aug 2012)

  Changed paths:
    M hw/i82378.c

  Log Message:
  -----------
  i82378: Remove bogus MMIO coalescing

This MMIO area is an entry gate to legacy PC ISA devices, addressed via
PIO over there. Quite a few of the PIO ports have side effects on access
like starting/stopping timers that must be executed properly ordered
/wrt the CPU. So we have to remove the coalescing mark.

Acked-by: Hervé Poussineau <address@hidden>
Acked-by: Andreas Färber <address@hidden>
Signed-off-by: Jan Kiszka <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 4144f122b477164cf466ca69be24cf4ef5c218d3
      
https://github.com/qemu/qemu/commit/4144f122b477164cf466ca69be24cf4ef5c218d3
  Author: Jim Meyering <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M qemu-ga.c

  Log Message:
  -----------
  qemu-ga: don't leak a file descriptor upon failed lockf

Signed-off-by: Jim Meyering <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 0d07fe47d4986271a21ed4ff5237275ff55dd93f
      
https://github.com/qemu/qemu/commit/0d07fe47d4986271a21ed4ff5237275ff55dd93f
  Author: Jim Meyering <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M linux-user/syscall.c

  Log Message:
  -----------
  linux-user: do_msgrcv: don't leak host_mb upon TARGET_EFAULT failure

Also, use g_malloc to avoid NULL-deref upon OOM.

Signed-off-by: Jim Meyering <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: a7e47d4bfcbf256fae06891a8599950ff8e1b61b
      
https://github.com/qemu/qemu/commit/a7e47d4bfcbf256fae06891a8599950ff8e1b61b
  Author: Jim Meyering <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M block/sheepdog.c

  Log Message:
  -----------
  sheepdog: don't leak socket file descriptor upon connection failure

Signed-off-by: Jim Meyering <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 396bef4b3846bf4e80a2bee38e9a2d8554d0f251
      
https://github.com/qemu/qemu/commit/396bef4b3846bf4e80a2bee38e9a2d8554d0f251
  Author: Jim Meyering <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M target-arm/arm-semi.c

  Log Message:
  -----------
  arm-semi: don't leak 1KB user string lock buffer upon TARGET_SYS_OPEN

Always call unlock_user before returning.

Signed-off-by: Jim Meyering <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 15d9e3bc6af8a56af8c61911aab8453a54795db1
      
https://github.com/qemu/qemu/commit/15d9e3bc6af8a56af8c61911aab8453a54795db1
  Author: Jim Meyering <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M softmmu-semi.h

  Log Message:
  -----------
  softmmu-semi: fix lock_user* functions not to deref NULL upon OOM

Return NULL upon malloc failure.

Signed-off-by: Jim Meyering <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: ea776abca628d855e03c4929da3864985afd8aae
      
https://github.com/qemu/qemu/commit/ea776abca628d855e03c4929da3864985afd8aae
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M hw/pc_piix.c
    M hw/virtio-blk.c
    M hw/virtio-blk.h

  Log Message:
  -----------
  virtio-blk: hide VIRTIO_BLK_F_CONFIG_WCE from old machine types

QEMU has a policy of keeping a stable guest device ABI.  When new guest device
features are introduced they must not change hardware info seen by existing
guests.  This is important because operating systems or applications may
"fingerprint" the hardware and refuse to run when the hardware changes.  To
always get the latest guest device ABI, run with x86 machine type "pc".

This patch hides the new VIRTIO_BLK_F_CONFIG_WCE virtio feature bit from
existing machine types.  Only pc-1.2 and later will expose this feature
by default.

For more info on the VIRTIO_BLK_F_CONFIG_WCE feature bit, see:

  commit 13e3dce068773c971ff2f19d986378c55897c4a3
  Author: Paolo Bonzini <address@hidden>
  Date:   Thu Aug 9 16:07:19 2012 +0200

      virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE

      Also rename VIRTIO_BLK_F_WCACHE to VIRTIO_BLK_F_WCE for consistency with
      the spec.

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

Anthony Liguori <address@hidden> reported:

  This broke qemu-test because it changed the pc-1.0 machine type:

  Setting guest RANDOM seed to 47167
  *** Running tests ***
  Running test /tests/finger-print.sh...                OK
  --- fingerprints/pc-1.0.x86_64        2011-12-18 13:08:40.000000000 -0600
  +++ fingerprint.txt   2012-08-12 13:30:48.000000000 -0500
  @@ -55,7 +55,7 @@
   /sys/bus/pci/devices/0000:00:06.0/subsystem_device=0x0002
   /sys/bus/pci/devices/0000:00:06.0/class=0x010000
   /sys/bus/pci/devices/0000:00:06.0/revision=0x00
  -/sys/bus/pci/devices/0000:00:06.0/virtio/host-features=0x710006d4
  +/sys/bus/pci/devices/0000:00:06.0/virtio/host-features=0x71000ed4
   /sys/class/dmi/id/bios_vendor=Bochs
   /sys/class/dmi/id/bios_date=01/01/2007
   /sys/class/dmi/id/bios_version=Bochs
  Guest fingerprint changed for pc-1.0!

Reported-by: Anthony Liguori <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 4240abff5a6fb5d88867b51f46c0235518dac564
      
https://github.com/qemu/qemu/commit/4240abff5a6fb5d88867b51f46c0235518dac564
  Author: Andreas Färber <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M hw/alpha_typhoon.c
    M hw/bonito.c
    M hw/dec_pci.c
    M hw/grackle_pci.c
    M hw/gt64xxx.c
    M hw/piix_pci.c
    M hw/ppc4xx_pci.c
    M hw/ppce500_pci.c
    M hw/prep_pci.c
    M hw/spapr_pci.c
    M hw/unin_pci.c

  Log Message:
  -----------
  pci: Make host bridge TypeInfos const

During the QOM migration they were amended with further info but this is
no longer the case. All static TypeInfos can be const these days.

Signed-off-by: Andreas Färber <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 94dd91d651fe821971411280f8c64a6b72e8ca64
      
https://github.com/qemu/qemu/commit/94dd91d651fe821971411280f8c64a6b72e8ca64
  Author: Andreas Färber <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M hw/alpha_typhoon.c

  Log Message:
  -----------
  alpha_typhoon: QOM'ify Typhoon PCI host bridge

Introduce type constant and cast macro. Don't access DeviceState
or PCIHostState indirectly through parent fields.

Signed-off-by: Andreas Färber <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: c5589ee9745319944886231935680fb8d110e6cb
      
https://github.com/qemu/qemu/commit/c5589ee9745319944886231935680fb8d110e6cb
  Author: Andreas Färber <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M hw/bonito.c

  Log Message:
  -----------
  bonito: QOM'ify Bonito PCI host bridge

Introduce type constant. Avoid accessing DeviceState or SysBusDevice
indirectly through PCIHostState field.

Drop global state by passing BonitoState as opaque and adding the IRQs
and a pointer to PCIBonitoState to its state.

Signed-off-by: Andreas Färber <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: ab6153673727cc1b88258675fa02113cf3271aa8
      
https://github.com/qemu/qemu/commit/ab6153673727cc1b88258675fa02113cf3271aa8
  Author: Andreas Färber <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M hw/dec_pci.c
    M hw/dec_pci.h

  Log Message:
  -----------
  dec_pci: QOM'ify DEC 21154 PCI-PCI bridge

Introduce type constant. Introduce cast macro and drop dummy busdev
field used with FROM_SYSBUS() that would've broken SYS_BUS_DEVICE().
Avoid accessing parent fields directly.

Signed-off-by: Andreas Färber <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 0e655047c5b394b54ffec6dddf37641b2aa5df55
      
https://github.com/qemu/qemu/commit/0e655047c5b394b54ffec6dddf37641b2aa5df55
  Author: Andreas Färber <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M hw/grackle_pci.c
    M hw/ppc_mac.h

  Log Message:
  -----------
  grackle_pci: QOM'ify Grackle PCI host bridge

Introduce type constant. Introduce cast macro to drop dummy busdev field
used with FROM_SYSBUS() that would've broken SYS_BUS_DEVICE().
Avoid accessing parent fields directly.

Drop no-op reset function.

Signed-off-by: Andreas Färber <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 8d43d7e591c2078cc64534b867365d46ad394d04
      
https://github.com/qemu/qemu/commit/8d43d7e591c2078cc64534b867365d46ad394d04
  Author: Andreas Färber <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M hw/gt64xxx.c

  Log Message:
  -----------
  gt64xxx: QOM'ify GT64120 PCI host bridge

Introduce type constant. Introduce cast macro to drop dummy busdev field
used with FROM_SYSBUS() macro that would've broken SYS_BUS_DEVICE().
Avoid accessing DeviceState indirectly through PCIHostState.

Signed-off-by: Andreas Färber <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 42c281a2832a67ee1d0cc08744c5b9ebb4f6b802
      
https://github.com/qemu/qemu/commit/42c281a2832a67ee1d0cc08744c5b9ebb4f6b802
  Author: Andreas Färber <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M hw/ppc440_bamboo.c
    M hw/ppc4xx.h
    M hw/ppc4xx_pci.c

  Log Message:
  -----------
  ppc4xx_pci: QOM'ify ppc4xx PCI host bridge

Introduce type constant and cast macro. Avoid accessing its parent field
directly.

Signed-off-by: Andreas Färber <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 9c1a61f0e583a0ae3f601465ffa22da5954c9bfc
      
https://github.com/qemu/qemu/commit/9c1a61f0e583a0ae3f601465ffa22da5954c9bfc
  Author: Andreas Färber <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M hw/ppce500_pci.c

  Log Message:
  -----------
  ppce500_pci: QOM'ify e500 PCI host bridge

Introduce type constant and cast macro. Avoid accessing parent fields
directly.

Signed-off-by: Andreas Färber <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 03a6b667702b0af0e7b36754489aed6aa82d30a1
      
https://github.com/qemu/qemu/commit/03a6b667702b0af0e7b36754489aed6aa82d30a1
  Author: Andreas Färber <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M hw/prep_pci.c

  Log Message:
  -----------
  prep_pci: QOM'ify Raven PCI host bridge

Introduce type constant and cast macro. Avoid accessing parent fields
directly.

Also add missing space and braces.

Signed-off-by: Andreas Färber <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 8c9f64df3dd76c253e4961c5d2f075bffcc29e1d
      
https://github.com/qemu/qemu/commit/8c9f64df3dd76c253e4961c5d2f075bffcc29e1d
  Author: Andreas Färber <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M hw/spapr.c
    M hw/spapr_pci.c
    M hw/spapr_pci.h

  Log Message:
  -----------
  spapr_pci: QOM'ify sPAPR PCI host bridge

Introduce type constant. Introduce cast macro to drop bogus busdev field
that would've broken SYS_BUS_DEVICE(). Avoid accessing parent fields
directly.

Free the identifier phb as acronym for PCI_HOST_BRIDGE.

Updated against conflicting merge from branch 'agraf/ppc-for-upstream'
(0d16fdd732d1b211842fa96b7c90ddf9e6bde0e4), which removed busdev field
differently, moved some code around and added new occurrences of 'phb'.

Signed-off-by: Andreas Färber <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 57fd7b7fce9098cdac58a8442033cb91412400b9
      
https://github.com/qemu/qemu/commit/57fd7b7fce9098cdac58a8442033cb91412400b9
  Author: Andreas Färber <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M hw/unin_pci.c

  Log Message:
  -----------
  unin_pci: QOM'ify UniNorth PCI host bridges

Introduce type constants and cast macros.
Avoid accessing parent fields directly.

Signed-off-by: Andreas Färber <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: b44ff9d430c5f2b51872f542d9562a15f0061a82
      
https://github.com/qemu/qemu/commit/b44ff9d430c5f2b51872f542d9562a15f0061a82
  Author: Andreas Färber <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M hw/pci_host.c
    M hw/pci_host.h

  Log Message:
  -----------
  pci_host: Turn into SysBus-derived QOM type

The preceding commits fixed misuses of FROM_SYSBUS() that led people to
add a bogus busdev field. For qdev the field order was less relevant but
for QOM the PCIHostState field (including the SysBusDevice actually
initialized with a value) must be placed first within the state struct.

To facilitate accessing the PCIHostState fields, derive all PCI host
bridges from TYPE_PCI_HOST_BRIDGE rather than TYPE_SYS_BUS_DEVICE.

We can now access PCIHostState QOM-style, with PCI_HOST_BRIDGE() macro.

Signed-off-by: Anthony Liguori <address@hidden>
Signed-off-by: Wanpeng Li <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 8558d942b665a9ff0847851615e107308f6386a5
      
https://github.com/qemu/qemu/commit/8558d942b665a9ff0847851615e107308f6386a5
  Author: Andreas Färber <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M hw/alpha_typhoon.c
    M hw/bonito.c
    M hw/dec_pci.c
    M hw/grackle_pci.c
    M hw/gt64xxx.c
    M hw/piix_pci.c
    M hw/ppc4xx_pci.c
    M hw/ppc_prep.c
    M hw/ppce500_pci.c
    M hw/prep_pci.c
    M hw/spapr.c
    M hw/spapr_pci.c
    M hw/unin_pci.c

  Log Message:
  -----------
  pci: Derive PCI host bridges from TYPE_PCI_HOST_BRIDGE

Use PCIHostState and PCI_HOST_BRIDGE() where appropriate.

Signed-off-by: Andreas Färber <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 67c332fd12326a6ef572f07b9d71370ada6a287f
      
https://github.com/qemu/qemu/commit/67c332fd12326a6ef572f07b9d71370ada6a287f
  Author: Andreas Färber <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M hw/alpha_typhoon.c
    M hw/dec_pci.c
    M hw/grackle_pci.c
    M hw/gt64xxx.c
    M hw/piix_pci.c
    M hw/ppc4xx_pci.c
    M hw/ppce500_pci.c
    M hw/prep_pci.c
    M hw/spapr_pci.h
    M hw/unin_pci.c

  Log Message:
  -----------
  pci: Tidy up PCI host bridges

Adopt the QOM parent field name and enforce QOM-style access via casts.
Don't just typedef PCIHostState, either use it directly or embed it.

Signed-off-by: Andreas Färber <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 99afc91d6ccdbe45258cff66fd0ce0142820c366
      
https://github.com/qemu/qemu/commit/99afc91d6ccdbe45258cff66fd0ce0142820c366
  Author: Daniel P. Berrange <address@hidden>
  Date:   2012-08-22 (Wed, 22 Aug 2012)

  Changed paths:
    M arch_init.c
    M configure
    M qapi-schema.json
    M qmp-commands.hx

  Log Message:
  -----------
  qapi: add 'query-target' command to return target arch

Add a 'query-target' QAPI command to allow management applications
to determine what target architecture a QEMU binary is emulating
without having to parse the binary name or -help output

  $ qmp-shell -p /tmp/qemu
  (QEMU) query-target
  {   u'return': {   u'arch': u'x86_64' }}

Signed-off-by: Daniel P. Berrange <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


Compare: https://github.com/qemu/qemu/compare/682527c00409...99afc91d6ccd

reply via email to

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