qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] b0e5de: memory, exec: Expose all memory block


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] b0e5de: memory, exec: Expose all memory block related flag...
Date: Tue, 21 Aug 2018 03:35:45 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: b0e5de93811077254a536c23b713b49e12efb742
      
https://github.com/qemu/qemu/commit/b0e5de93811077254a536c23b713b49e12efb742
  Author: Junyan He <address@hidden>
  Date:   2018-08-10 (Fri, 10 Aug 2018)

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

  Log Message:
  -----------
  memory, exec: Expose all memory block related flags.

We need to use these flags in other files rather than just in exec.c,
For example, RAM_SHARED should be used when create a ram block from file.
We expose them the exec/memory.h

Signed-off-by: Junyan He <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: cbfc01710362f3de6fca3010a17b0e1c866fc181
      
https://github.com/qemu/qemu/commit/cbfc01710362f3de6fca3010a17b0e1c866fc181
  Author: Junyan He <address@hidden>
  Date:   2018-08-10 (Fri, 10 Aug 2018)

  Changed paths:
    M backends/hostmem-file.c
    M exec.c
    M include/exec/memory.h
    M include/exec/ram_addr.h
    M memory.c
    M numa.c

  Log Message:
  -----------
  memory, exec: switch file ram allocation functions to 'flags' parameters

As more flag parameters besides the existing 'share' are going to be
added to following functions
memory_region_init_ram_from_file
qemu_ram_alloc_from_fd
qemu_ram_alloc_from_file
let's switch them to use the 'flags' parameters so as to ease future
flag additions.

The existing 'share' flag is converted to the RAM_SHARED bit in ram_flags,
and other flag bits are ignored by above functions right now.

Signed-off-by: Junyan He <address@hidden>
Signed-off-by: Haozhong Zhang <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>


  Commit: 17824406fa55b303379f2e4af715c1e876c3535f
      
https://github.com/qemu/qemu/commit/17824406fa55b303379f2e4af715c1e876c3535f
  Author: Junyan He <address@hidden>
  Date:   2018-08-10 (Fri, 10 Aug 2018)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: add libpmem support

Add a pair of configure options --{enable,disable}-libpmem to control
whether QEMU is compiled with PMDK libpmem [1].

QEMU may write to the host persistent memory (e.g. in vNVDIMM label
emulation and live migration), so it must take the proper operations
to ensure the persistence of its own writes. Depending on the CPU
models and available instructions, the optimal operation can vary [2].
PMDK libpmem have already implemented those operations on multiple CPU
models (x86 and ARM) and the logic to select the optimal ones, so QEMU
can just use libpmem rather than re-implement them.

Libpem is a part of PMDK project(formerly known as NMVL).
The project's home page is: http://pmem.io/pmdk/
And the project's repository is: https://github.com/pmem/pmdk/

For more information about libpmem APIs, you can refer to the comments
in source code of: pmdk/src/libpmem/pmem.c, begin at line 33.

Signed-off-by: Junyan He <address@hidden>
Signed-off-by: Haozhong Zhang <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: a4de8552b2580adf6fa4874439217b65d3bdd88b
      
https://github.com/qemu/qemu/commit/a4de8552b2580adf6fa4874439217b65d3bdd88b
  Author: Junyan He <address@hidden>
  Date:   2018-08-10 (Fri, 10 Aug 2018)

  Changed paths:
    M backends/hostmem-file.c
    M docs/nvdimm.txt
    M exec.c
    M include/exec/memory.h
    M include/exec/ram_addr.h
    M qemu-options.hx

  Log Message:
  -----------
  hostmem-file: add the 'pmem' option

When QEMU emulates vNVDIMM labels and migrates vNVDIMM devices, it
needs to know whether the backend storage is a real persistent memory,
in order to decide whether special operations should be performed to
ensure the data persistence.

This boolean option 'pmem' allows users to specify whether the backend
storage of memory-backend-file is a real persistent memory. If
'pmem=on', QEMU will set the flag RAM_PMEM in the RAM block of the
corresponding memory region. If 'pmem' is set while lack of libpmem
support, a error is generated.

Signed-off-by: Junyan He <address@hidden>
Signed-off-by: Haozhong Zhang <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: faf8a13d80de98b43342a7ec9878b4fd76b18327
      
https://github.com/qemu/qemu/commit/faf8a13d80de98b43342a7ec9878b4fd76b18327
  Author: Junyan He <address@hidden>
  Date:   2018-08-10 (Fri, 10 Aug 2018)

  Changed paths:
    M hw/mem/nvdimm.c
    A include/qemu/pmem.h

  Log Message:
  -----------
  mem/nvdimm: ensure write persistence to PMEM in label emulation

Guest writes to vNVDIMM labels are intercepted and performed on the
backend by QEMU. When the backend is a real persistent memort, QEMU
needs to take proper operations to ensure its write persistence on the
persistent memory. Otherwise, a host power failure may result in the
loss of guest label configurations.

Signed-off-by: Haozhong Zhang <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>


  Commit: 469dd51bc664979f159d47885997d482991394b8
      
https://github.com/qemu/qemu/commit/469dd51bc664979f159d47885997d482991394b8
  Author: Junyan He <address@hidden>
  Date:   2018-08-10 (Fri, 10 Aug 2018)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration/ram: Add check and info message to nvdimm post copy.

The nvdimm kind memory does not support post copy now.
We disable post copy if we have nvdimm memory and print some
log hint to user.

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


  Commit: 56eb90af39abf66c0e80588a9f50c31e7df7320b
      
https://github.com/qemu/qemu/commit/56eb90af39abf66c0e80588a9f50c31e7df7320b
  Author: Junyan He <address@hidden>
  Date:   2018-08-10 (Fri, 10 Aug 2018)

  Changed paths:
    M include/qemu/pmem.h
    M migration/ram.c

  Log Message:
  -----------
  migration/ram: ensure write persistence on loading all data to PMEM.

Because we need to make sure the pmem kind memory data is synced
after migration, we choose to call pmem_persist() when the migration
finish. This will make sure the data of pmem is safe and will not
lose if power is off.

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


  Commit: 55f4e79d794d94b2ab22b0dc99c6b05abc628656
      
https://github.com/qemu/qemu/commit/55f4e79d794d94b2ab22b0dc99c6b05abc628656
  Author: Peter Maydell <address@hidden>
  Date:   2018-08-21 (Tue, 21 Aug 2018)

  Changed paths:
    M backends/hostmem-file.c
    M configure
    M docs/nvdimm.txt
    M exec.c
    M hw/mem/nvdimm.c
    M include/exec/memory.h
    M include/exec/ram_addr.h
    A include/qemu/pmem.h
    M memory.c
    M migration/ram.c
    M numa.c
    M qemu-options.hx

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

pc: fixes

This includes nvdimm persistence fixes queued before the release.

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

# gpg: Signature made Mon 20 Aug 2018 11:38:11 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:
  migration/ram: ensure write persistence on loading all data to PMEM.
  migration/ram: Add check and info message to nvdimm post copy.
  mem/nvdimm: ensure write persistence to PMEM in label emulation
  hostmem-file: add the 'pmem' option
  configure: add libpmem support
  memory, exec: switch file ram allocation functions to 'flags' parameters
  memory, exec: Expose all memory block related flags.

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


Compare: https://github.com/qemu/qemu/compare/90b9508e2113...55f4e79d794d
      **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]