qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 388a86: vhost: check region type before casti


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 388a86: vhost: check region type before casting
Date: Mon, 06 Aug 2018 02:47:16 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 388a86df9c59334e94ede099526509d8f466b0c8
      
https://github.com/qemu/qemu/commit/388a86df9c59334e94ede099526509d8f466b0c8
  Author: Tiwei Bie <address@hidden>
  Date:   2018-08-03 (Fri, 03 Aug 2018)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: check region type before casting

Check region type first before casting the memory region
to IOMMUMemoryRegion. Otherwise QEMU will abort with below
error message when casting non-IOMMU memory region:

vhost_iommu_region_add: Object 0x561f28bce4f0 is not an
instance of type qemu:iommu-memory-region

Fixes: cb1efcf462a2 ("iommu: Add IOMMU index argument to notifier APIs")
Cc: Peter Maydell <address@hidden>

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


  Commit: 16b4226363aad6f0bb4589ed8a744df019cd2b1d
      
https://github.com/qemu/qemu/commit/16b4226363aad6f0bb4589ed8a744df019cd2b1d
  Author: Dou Liyang <address@hidden>
  Date:   2018-08-03 (Fri, 03 Aug 2018)

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

  Log Message:
  -----------
  hw/acpi-build: Add a check for memory-less NUMA nodes

Currently, Qemu ACPI builder doesn't consider the memory-less NUMA nodes, eg:

  -m 4G,slots=4,maxmem=8G \
  -numa node,nodeid=0 \
  -numa node,nodeid=1,mem=2G \
  -numa node,nodeid=2,mem=2G \
  -numa node,nodeid=3\

Guest Linux will report

  [    0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x00000000-0xffffffffffffffff]
  [    0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0x00000000-0x0009ffff]
  [    0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0x00100000-0x7fffffff]
  [    0.000000] ACPI: SRAT: Node 2 PXM 2 [mem 0x80000000-0xbfffffff]
  [    0.000000] ACPI: SRAT: Node 2 PXM 2 [mem 0x100000000-0x13fffffff]
  [    0.000000] ACPI: SRAT: Node 3 PXM 3 [mem 0x140000000-0x13fffffff]
  [    0.000000] ACPI: SRAT: Node 3 PXM 3 [mem 0x140000000-0x33fffffff] hotplug

[mem 0x00000000-0xffffffffffffffff] and [mem 0x140000000-0x13fffffff] are bogus.

Add a check to avoid building srat memory for memory-less NUMA nodes, also 
update
the test file. Now the info in guest linux will be

  [    0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0x00000000-0x0009ffff]
  [    0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0x00100000-0x7fffffff]
  [    0.000000] ACPI: SRAT: Node 2 PXM 2 [mem 0x80000000-0xbfffffff]
  [    0.000000] ACPI: SRAT: Node 2 PXM 2 [mem 0x100000000-0x13fffffff]
  [    0.000000] ACPI: SRAT: Node 3 PXM 3 [mem 0x140000000-0x33fffffff] hotplug

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


  Commit: 16e2841d2032347b9d22e5b37ac852771da9cc3b
      
https://github.com/qemu/qemu/commit/16e2841d2032347b9d22e5b37ac852771da9cc3b
  Author: Dou Liyang <address@hidden>
  Date:   2018-08-03 (Fri, 03 Aug 2018)

  Changed paths:
    M tests/acpi-test-data/pc/SRAT.numamem
    M tests/acpi-test-data/q35/SRAT.numamem

  Log Message:
  -----------
  tests/acpi-test: update ACPI tables test blobs

Now, QEmu adds a new check for memory-less NUMA nodes in build_srat().

It effects the ACPI test.

So, Update ACPI tables test blobs.

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


  Commit: 10efd7e1088855dc019e6a248ac7f9b24af8dd26
      
https://github.com/qemu/qemu/commit/10efd7e1088855dc019e6a248ac7f9b24af8dd26
  Author: Igor Mammedov <address@hidden>
  Date:   2018-08-03 (Fri, 03 Aug 2018)

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

  Log Message:
  -----------
  pc: acpi: fix memory hotplug regression by reducing stub SRAT entry size

Commit 848a1cc1e (hw/acpi-build: build SRAT memory affinity structures for DIMM 
devices)
broke the first dimm hotplug in following cases:

 1: there is no coldplugged dimm in the last numa node
    but there is a coldplugged dimm in another node

  -m 4096,slots=4,maxmem=32G               \
  -object memory-backend-ram,id=m0,size=2G \
  -device pc-dimm,memdev=m0,node=0         \
  -numa node,nodeid=0                      \
  -numa node,nodeid=1

 2: if order of dimms on CLI is:
       1st plugged dimm in node1
       2nd plugged dimm in node0

  -m 4096,slots=4,maxmem=32G               \
  -object memory-backend-ram,size=2G,id=m0 \
  -device pc-dimm,memdev=m0,node=1         \
  -object memory-backend-ram,id=m1,size=2G \
  -device pc-dimm,memdev=m1,node=0         \
  -numa node,nodeid=0                      \
  -numa node,nodeid=1

(qemu) object_add memory-backend-ram,id=m2,size=1G
(qemu) device_add pc-dimm,memdev=m2,node=0

the first DIMM hotplug to any node except the last one
fails (Windows is unable to online it).

Length reduction of stub hotplug memory SRAT entry,
fixes issue for some reason.

RHBZ: 1609234

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


  Commit: 1c707d6990eaf3db0c9dc4557bba5458977e9f8d
      
https://github.com/qemu/qemu/commit/1c707d6990eaf3db0c9dc4557bba5458977e9f8d
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2018-08-03 (Fri, 03 Aug 2018)

  Changed paths:
    M tests/acpi-test-data/pc/SRAT.dimmpxm
    M tests/acpi-test-data/pc/SRAT.memhp
    M tests/acpi-test-data/q35/SRAT.dimmpxm
    M tests/acpi-test-data/q35/SRAT.memhp

  Log Message:
  -----------
  tests/acpi: update tables after memory hotplug changes

Previous patch changes acpi tables, update expected
files accordingly.

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


  Commit: e3a4129abdccfc2fcc2fb9305339af41b07e8215
      
https://github.com/qemu/qemu/commit/e3a4129abdccfc2fcc2fb9305339af41b07e8215
  Author: Peter Maydell <address@hidden>
  Date:   2018-08-06 (Mon, 06 Aug 2018)

  Changed paths:
    M hw/i386/acpi-build.c
    M hw/virtio/vhost.c
    M tests/acpi-test-data/pc/SRAT.dimmpxm
    M tests/acpi-test-data/pc/SRAT.memhp
    M tests/acpi-test-data/pc/SRAT.numamem
    M tests/acpi-test-data/q35/SRAT.dimmpxm
    M tests/acpi-test-data/q35/SRAT.memhp
    M tests/acpi-test-data/q35/SRAT.numamem

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

pc, virtio: fixes

A couple of last minute fixes.

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

# gpg: Signature made Fri 03 Aug 2018 09:35:54 BST
# gpg:                using RSA key 281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <address@hidden>"
# gpg:                 aka "Michael S. Tsirkin <address@hidden>"
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* remotes/mst/tags/for_upstream:
  tests/acpi: update tables after memory hotplug changes
  pc: acpi: fix memory hotplug regression by reducing stub SRAT entry size
  tests/acpi-test: update ACPI tables test blobs
  hw/acpi-build: Add a check for memory-less NUMA nodes
  vhost: check region type before casting

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


Compare: https://github.com/qemu/qemu/compare/f7502360397d...e3a4129abdcc
      **NOTE:** This service has been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

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