qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] c40957: qemu-char: fix tcp_get_fds


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] c40957: qemu-char: fix tcp_get_fds
Date: Tue, 25 Nov 2014 03:30:07 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: c409572678936d3ffa8694f5a1dae531c2212e21
      
https://github.com/qemu/qemu/commit/c409572678936d3ffa8694f5a1dae531c2212e21
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2014-11-23 (Sun, 23 Nov 2014)

  Changed paths:
    M qemu-char.c

  Log Message:
  -----------
  qemu-char: fix tcp_get_fds

tcp_get_fds API discards fds if there's more than 1 of these.

It's tricky to fix this without API changes in the generic case.

However, this API is only used by tests ATM, and tests know how
many fds they expect.

So let's not waste cycles trying to fix this properly:
simply assume at most 16 fds (tests use at most 8 now).
assert if some test tries to get more.

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


  Commit: b8865591d4d5680b4f766c25ca1db110320b4d15
      
https://github.com/qemu/qemu/commit/b8865591d4d5680b4f766c25ca1db110320b4d15
  Author: Igor Mammedov <address@hidden>
  Date:   2014-11-23 (Sun, 23 Nov 2014)

  Changed paths:
    M hw/i386/pc.c
    M include/sysemu/kvm.h
    M kvm-all.c
    M kvm-stub.c

  Log Message:
  -----------
  pc: kvm: check if KVM has free memory slots to avoid abort()

When more memory devices are used than available
KVM memory slots, QEMU crashes with:

kvm_alloc_slot: no free slot available
Aborted (core dumped)

Fix this by checking that KVM has a free slot before
attempting to map memory in guest address space.

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


  Commit: 34dde13685ebc2c07923f32ad69e40b27c0e0bb4
      
https://github.com/qemu/qemu/commit/34dde13685ebc2c07923f32ad69e40b27c0e0bb4
  Author: Igor Mammedov <address@hidden>
  Date:   2014-11-23 (Sun, 23 Nov 2014)

  Changed paths:
    M hw/i386/pc.c

  Log Message:
  -----------
  pc: make pc_dimm_plug() more readble

split addr initialization from declaration so that
later when new local vars are added property getter
wouldn't drift off of error check.

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 92a37a04d6e034b73ea1ba4825ba4d5860f0a810
      
https://github.com/qemu/qemu/commit/92a37a04d6e034b73ea1ba4825ba4d5860f0a810
  Author: Igor Mammedov <address@hidden>
  Date:   2014-11-23 (Sun, 23 Nov 2014)

  Changed paths:
    M hw/i386/pc.c
    M hw/mem/pc-dimm.c
    M include/hw/mem/pc-dimm.h

  Log Message:
  -----------
  pc: limit DIMM address and size to page aligned values

When running in KVM mode, kvm_set_phys_mem() will silently
fail if registered MemoryRegion address/size is not page
aligned. Causing memory hotplug failure in guest.

Mapping non aligned MemoryRegion in TCG mode 'works', but
sane guest OS still expects page aligned memory module
and fails to initialize it if it's not aligned.

So do not allow non aligned (i.e. valid) address/size
values for DIMM to avoid either KVM failure or guest
issues caused by it.

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: a2b257d6212ade772473f86bf0637480b2578a7e
      
https://github.com/qemu/qemu/commit/a2b257d6212ade772473f86bf0637480b2578a7e
  Author: Igor Mammedov <address@hidden>
  Date:   2014-11-23 (Sun, 23 Nov 2014)

  Changed paths:
    M exec.c
    M include/exec/exec-all.h
    M include/exec/memory.h
    M include/qemu/osdep.h
    M memory.c
    M target-s390x/kvm.c
    M util/oslib-posix.c
    M util/oslib-win32.c

  Log Message:
  -----------
  memory: expose alignment used for allocating RAM as MemoryRegion API

introduce memory_region_get_alignment() that returns
underlying memory block alignment or 0 if it's not
relevant/implemented for backend.

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 91aa70ab2a748e3a72004d1a729248221b7bb24a
      
https://github.com/qemu/qemu/commit/91aa70ab2a748e3a72004d1a729248221b7bb24a
  Author: Igor Mammedov <address@hidden>
  Date:   2014-11-23 (Sun, 23 Nov 2014)

  Changed paths:
    M hw/i386/pc.c
    M hw/i386/pc_piix.c
    M hw/i386/pc_q35.c
    M include/hw/i386/pc.h

  Log Message:
  -----------
  pc: align DIMM's address/size by backend's alignment value

Performance wise it's better to align GVA by the backend's
page size.

Also do not allow to create DIMM device with suboptimal
size (i.e. not aligned to backends page size) to aviod
memory loss.

Do above only for 2.2 and newer machine types to avoid
breaking working configs with 2.1 machine type.

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 0c0de1b681bc11a8ebc94bd45e99d6f4e8fafd80
      
https://github.com/qemu/qemu/commit/0c0de1b681bc11a8ebc94bd45e99d6f4e8fafd80
  Author: Igor Mammedov <address@hidden>
  Date:   2014-11-23 (Sun, 23 Nov 2014)

  Changed paths:
    M hw/mem/pc-dimm.c

  Log Message:
  -----------
  pc: pc-dimm: use backend alignment during address auto allocation

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: b03541fa7722d64a1c961a8467d778d7e086a933
      
https://github.com/qemu/qemu/commit/b03541fa7722d64a1c961a8467d778d7e086a933
  Author: Igor Mammedov <address@hidden>
  Date:   2014-11-24 (Mon, 24 Nov 2014)

  Changed paths:
    M hw/i386/pc.c

  Log Message:
  -----------
  pc: explicitly check maxmem limit when adding DIMM

Currently maxmem limit is not checked and depends on
hotplug region container not being able to fit more RAM
than maxmem. Do check explicitly so that it would
be possible to change hotplug container size later
to deal with fragmentation.

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 085f8e88ba73b7ff80298b0085f6e615d3b5c45f
      
https://github.com/qemu/qemu/commit/085f8e88ba73b7ff80298b0085f6e615d3b5c45f
  Author: Igor Mammedov <address@hidden>
  Date:   2014-11-24 (Mon, 24 Nov 2014)

  Changed paths:
    M hw/i386/pc.c

  Log Message:
  -----------
  pc: count in 1Gb hugepage alignment when sizing hotplug-memory container

if DIMMs with different size/alignment are interleaved
in creation order, it could lead to hotplug-memory
container fragmentation and following inability to use
all RAM upto maxmem.
For example:
    -m 4G,slots=3,maxmem=7G
    -object memory-backend-file,id=mem-1,size=256M,mem-path=/pagesize-2MB
    -device pc-dimm,id=mem1,memdev=mem-1
    -object memory-backend-file,id=mem-2,size=1G,mem-path=/pagesize-1GB
    -device pc-dimm,id=mem2,memdev=mem-2
    -object memory-backend-file,id=mem-3,size=256M,mem-path=/pagesize-2MB
    -device pc-dimm,id=mem3,memdev=mem-3

fragments hotplug-memory container and doesn't allow
to use 1GB hugepage backend to consume remainig 1Gb.

To ease managment factor count in max 1Gb alignment for
each memory slot when sizing hotplug-memory region so
that regadless of fragmentaion it would be possible to
add max aligned DIMM.

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 109e90e47029f415783cd6e9a0eb9d0f10954c18
      
https://github.com/qemu/qemu/commit/109e90e47029f415783cd6e9a0eb9d0f10954c18
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2014-11-24 (Mon, 24 Nov 2014)

  Changed paths:
    M hw/pci/shpc.c

  Log Message:
  -----------
  hw/pci: fix crash on shpc error flow

If the pci bridge enters in error flow as part
of init process it will only delete the shpc mmio
subregion but not remove it from the properties list,
resulting in segmentation fault when the bridge runs
the exit function.

Example: add a pci bridge without specifing the chassis number:
    <qemu-bin> ... -device pci-bridge,id=p1
Result:
    (qemu) qemu-system-x86_64: -device pci-bridge,id=p1: Bridge chassis not 
specified. Each bridge is required to be assigned a unique chassis id > 0.
    qemu-system-x86_64: -device pci-bridge,id=p1: Device
    initialization failed.
    Segmentation fault (core dumped)

    if (child->class->unparent) {
    #0  0x00005555558d629b in object_finalize_child_property 
(obj=0x555556d2e830, name=0x555556d30630 "shpc-mmio[0]", opaque=0x555556a42fc8) 
at qom/object.c:1078
    #1  0x00005555558d4b1f in object_property_del_all (obj=0x555556d2e830) at 
qom/object.c:367
    #2  0x00005555558d4ca1 in object_finalize (data=0x555556d2e830) at 
qom/object.c:412
    #3  0x00005555558d55a1 in object_unref (obj=0x555556d2e830) at 
qom/object.c:720
    #4  0x000055555572c907 in qdev_device_add (opts=0x5555563544f0) at 
qdev-monitor.c:566
    #5  0x0000555555744f16 in device_init_func (opts=0x5555563544f0, 
opaque=0x0) at vl.c:2213
    #6  0x00005555559cf5f0 in qemu_opts_foreach (list=0x555555e0f8e0 
<qemu_device_opts>, func=0x555555744efa <device_init_func>, opaque=0x0, 
abort_on_failure=1) at util/qemu-option.c:1057
    #7  0x000055555574a11b in main (argc=16, argv=0x7fffffffdde8, 
envp=0x7fffffffde70) at vl.c:423

Unparent the shpc mmio region as part of shpc cleanup.

Signed-off-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Amos Kong <address@hidden>


  Commit: ad5b88b1f198182642b6cbf3dacb4cade0c80fb9
      
https://github.com/qemu/qemu/commit/ad5b88b1f198182642b6cbf3dacb4cade0c80fb9
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2014-11-24 (Mon, 24 Nov 2014)

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

  Log Message:
  -----------
  acpi-build: mark RAM dirty on table update

acpi build modifies internal FW CFG RAM on first access
but we forgot to mark it dirty.
If this RAM has been migrated already, it won't be
migrated again, returning corrupted tables to guest.

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


  Commit: 4f99ab7a782250847ca33ae23a172501496c604d
      
https://github.com/qemu/qemu/commit/4f99ab7a782250847ca33ae23a172501496c604d
  Author: Paolo Bonzini <address@hidden>
  Date:   2014-11-24 (Mon, 24 Nov 2014)

  Changed paths:
    A hw/i386/acpi-dsdt-mem-hotplug.dsl
    M hw/i386/acpi-dsdt.dsl
    M hw/i386/acpi-dsdt.hex.generated
    M hw/i386/q35-acpi-dsdt.dsl
    M hw/i386/q35-acpi-dsdt.hex.generated
    M hw/i386/ssdt-mem.hex.generated
    M hw/i386/ssdt-misc.dsl
    M hw/i386/ssdt-misc.hex.generated
    M tests/acpi-test-data/pc/DSDT
    M tests/acpi-test-data/pc/SSDT
    M tests/acpi-test-data/q35/DSDT
    M tests/acpi-test-data/q35/SSDT

  Log Message:
  -----------
  target-i386: move generic memory hotplug methods to DSDTs

This makes it simpler to keep the SSDT byte-for-byte identical for a
given machine type, which is a goal we want to have for 2.2 and newer
types.

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


  Commit: 8e815eeefe205155f5561ddd06a29c75819d2ca8
      
https://github.com/qemu/qemu/commit/8e815eeefe205155f5561ddd06a29c75819d2ca8
  Author: Gonglei <address@hidden>
  Date:   2014-11-24 (Mon, 24 Nov 2014)

  Changed paths:
    M hw/pci/pcie.c

  Log Message:
  -----------
  pcie: fix typo in pcie_cap_deverr_init()

Reported-by:
 https://bugs.launchpad.net/qemu/+bug/1393440

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


  Commit: 6c150fbd341ac10b8559abcfd5915cfff17b70c6
      
https://github.com/qemu/qemu/commit/6c150fbd341ac10b8559abcfd5915cfff17b70c6
  Author: Gonglei <address@hidden>
  Date:   2014-11-24 (Mon, 24 Nov 2014)

  Changed paths:
    M hw/pci/pcie.c

  Log Message:
  -----------
  pcie: fix improper use of negative value

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


  Commit: dd0247e09a542d2a7ba6e390c70b5616edb9ec56
      
https://github.com/qemu/qemu/commit/dd0247e09a542d2a7ba6e390c70b5616edb9ec56
  Author: Igor Mammedov <address@hidden>
  Date:   2014-11-24 (Mon, 24 Nov 2014)

  Changed paths:
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  pc: acpi: mark all possible CPUs as enabled in SRAT

If QEMU is started with  -numa ... Windows only notices that
CPU has been hot-added but it will not online such CPUs.

It's caused by the fact that possible CPUs are flagged as
not enabled in SRAT and Windows honoring that information
doesn't use corresponding CPU.

ACPI 5.0 Spec regarding to flag says:
"
Table 5-47 Local APIC Flags
...
Enabled: if zero, this processor is unusable, and the operating system
support will not attempt to use it.
"

Fix QEMU to adhere to spec and mark possible CPUs as enabled
in SRAT.

With that Windows onlines hot-added CPUs as expected.

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: ca6028185d19d3f2bd331c15175c3ef5afc30c77
      
https://github.com/qemu/qemu/commit/ca6028185d19d3f2bd331c15175c3ef5afc30c77
  Author: Peter Maydell <address@hidden>
  Date:   2014-11-24 (Mon, 24 Nov 2014)

  Changed paths:
    M exec.c
    M hw/core/loader.c
    M hw/i386/acpi-build.c
    A hw/i386/acpi-dsdt-mem-hotplug.dsl
    M hw/i386/acpi-dsdt.dsl
    M hw/i386/acpi-dsdt.hex.generated
    M hw/i386/pc.c
    M hw/i386/pc_piix.c
    M hw/i386/pc_q35.c
    M hw/i386/q35-acpi-dsdt.dsl
    M hw/i386/q35-acpi-dsdt.hex.generated
    M hw/i386/ssdt-mem.hex.generated
    M hw/i386/ssdt-misc.dsl
    M hw/i386/ssdt-misc.hex.generated
    M hw/mem/pc-dimm.c
    M hw/pci/pcie.c
    M hw/pci/shpc.c
    M include/exec/exec-all.h
    M include/exec/memory.h
    M include/hw/i386/pc.h
    M include/hw/loader.h
    M include/hw/mem/pc-dimm.h
    M include/qemu/osdep.h
    M include/sysemu/kvm.h
    M kvm-all.c
    M kvm-stub.c
    M memory.c
    M qemu-char.c
    M target-s390x/kvm.c
    M tests/acpi-test-data/pc/DSDT
    M tests/acpi-test-data/pc/SSDT
    M tests/acpi-test-data/q35/DSDT
    M tests/acpi-test-data/q35/SSDT
    M util/oslib-posix.c
    M util/oslib-win32.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

pc, pci, misc bugfixes

A bunch of bugfixes for 2.2.

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

# gpg: Signature made Mon 24 Nov 2014 18:59:47 GMT using RSA key ID D28D5469
# gpg: Good signature from "Michael S. Tsirkin <address@hidden>"
# gpg:                 aka "Michael S. Tsirkin <address@hidden>"

* remotes/mst/tags/for_upstream:
  pc: acpi: mark all possible CPUs as enabled in SRAT
  pcie: fix improper use of negative value
  pcie: fix typo in pcie_cap_deverr_init()
  target-i386: move generic memory hotplug methods to DSDTs
  acpi-build: mark RAM dirty on table update
  hw/pci: fix crash on shpc error flow
  pc: count in 1Gb hugepage alignment when sizing hotplug-memory container
  pc: explicitly check maxmem limit when adding DIMM
  pc: pc-dimm: use backend alignment during address auto allocation
  pc: align DIMM's address/size by backend's alignment value
  memory: expose alignment used for allocating RAM as MemoryRegion API
  pc: limit DIMM address and size to page aligned values
  pc: make pc_dimm_plug() more readble
  pc: kvm: check if KVM has free memory slots to avoid abort()
  qemu-char: fix tcp_get_fds

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


Compare: https://github.com/qemu/qemu/compare/3d4a70f80fea...ca6028185d19

reply via email to

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