[Bug][KVM][Crystal Ridge] Lack of data persistence guarantee of QEMU writes to host PMEM

Bug #1745900 reported by quanxian
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
intel
Fix Released
Medium
Unassigned
qemu (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Description:
When the host persistent memory is used as the backend of vNVDIMM, QEMU itself may write to the host pmem, e.g., in vNVDIMM label emulation and live migration. In those cases, QEMU needs to take necessary operations (e.g., flush&fence after writes, or store with non-temporal hint) to ensure the data persistence of its own writes to PMEM. Therefore, data on vNVDIMM can be in a consistent status on abnormal termination of QEMU (e.g., QEMU/host kernel crash, host power failure, etc.). Unfortunately, such operations are missed in current QEMU implementation.

Target QEMU Release:3.0.0
Target Release: 19.04

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
there is not even a release plan for Qemu 2.12 yet - if following the ususal schedule it might be April - but given the industry effort around recent major security issues it might slightly postpone. That said 2.13 is even after that maybe around August as usual?

With that in mind, I fail to see how to integrate that in time for 18.04.
Are there patches already in a -next tree or do I miss something else that would make that more reasonable for 18.04?

Otherwise I'd think we pick it up for 18.04 via the Ubuntu Cloud Archive that gets released with Qemu 2.13 and made available for 18.04 then - but I didn't plan which release that might be - gut feeling "R" might even be that release if 2.13 makes an August release.

Changed in intel:
status: New → Incomplete
Revision history for this message
quanxian (quanxian-wang) wrote :

It is a KVM feature.

description: updated
tags: added: intel-kernel-18.10
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Can we move this bug to the "Linux" package and make it public?

Changed in intel:
importance: Undecided → Medium
status: Incomplete → Triaged
tags: added: kernel-da-key
Revision history for this message
quanxian (quanxian-wang) wrote :

it is a bug. We can make it public. Thanks

quanxian (quanxian-wang)
information type: Proprietary → Public
Revision history for this message
quanxian (quanxian-wang) wrote :

All patches merged in qemu v3.0.0:

56eb90a migration/ram: ensure write persistence on loading all data to PMEM.
469dd51 migration/ram: Add check and info message to nvdimm post copy.
faf8a13 mem/nvdimm: ensure write persistence to PMEM in label emulation
a4de855 hostmem-file: add the 'pmem' option
1782440 configure: add libpmem support
cbfc017 memory, exec: switch file ram allocation functions to 'flags' parameters
b0e5de9 memory, exec: Expose all memory block related flags.

tags: added: intel-virt-18.10
removed: intel-kernel-18.10
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qemu (Ubuntu):
status: New → Confirmed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

FYI: I dupped the other bug that came up by Paul onto this.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I evaluated the changes here and must postpone them to Ubuntu 19.04
To some extend it is that the changes are actually noisy to backport, but that would appear to be doable.
To some other that the info on the actual changes was made available 1 day after feature freeze and this clearly is a feature to me.
But the biggest reason is that this will make it qemu rely on libpmem which is rather new and not in main.

I must beg your pardon, but we can't shove all of that in right now due to the reasons above.
We plan for >=qemu 3.0 in Ubuntu 19.04 anyway.
Lets use this opportunity to start driving a MIR request for pmdk to be able to do that in the 19.04 cycle.

tags: added: qemu-19.04
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

FYI - filed bug 1790856 for the MIR of the pmem library.

quanxian (quanxian-wang)
tags: added: intel-virt-19.04
removed: intel-virt-18.10
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

MIR still blocked, so not including it on the current merge

Revision history for this message
quanxian (quanxian-wang) wrote :

1782440 469dd51 56eb90a a4de855 b0e5de9 cbfc017 faf8a13

description: updated
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
The qemu code is in Ubuntu 19.04 as we are on qemu 3.1 (in proposed atm, but soon in proper 19.04.
What is missing is to pass the MIR for the pmem library in bug 1790856 that I referenced in comment #9.

If you want/need this feature for qemu you'd want to track and help driving that MIR bug.
Once that is aaccepteble to be in Main [1]. Last time I checked there it still ahd a lot of churn for the upstream project still having a lot of experimental bits and huge changes each release, as well as some differences between Debian/Ubuntu that made it loose some packaging improvements we have.

TL;DR - Qemu is ok in terms of code, to enable it the MIR for libpmem must pass.

[1]: https://help.ubuntu.com/community/Repositories/Ubuntu

tags: added: server-triage-discuss
tags: removed: server-triage-discuss
tags: added: qemu-19.10
removed: qemu-19.04
Revision history for this message
quanxian (quanxian-wang) wrote :

3.1 is used in 19.04

Changed in intel:
status: Triaged → Fix Released
Changed in qemu (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
quanxian (quanxian-wang) wrote :

close this, and track the bug separately. bug 1790856

Revision history for this message
guo xuelian (belindaguo) wrote :

not reproduced on Ubuntu19.04 Beta

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.