Skip to content

Commit 9d6802e

Browse files
ppennaCopilot
andcommitted
openvmm: pin microVM restores of handles opened with O_DIRECT
A microVM guest that holds a file on a virtio-fs share open with O_DIRECT could save the VM's state, but not restore it: the restore refused the saved handle with "saved handle has unsupported open flags 0x4002" for O_RDWR | O_DIRECT, from FUSE_OPEN, and with 0x4041 for O_WRONLY | O_CREAT | O_DIRECT, from FUSE_CREATE (#2128). OpenVMM's reopen_flags, which checks a saved handle's flags and gives those with which a restore reopens it, refused every flag outside a list that lacked O_DIRECT, although FUSE_OPEN and FUSE_CREATE accept it, keep it in the handle's flags, and open the host file with it. Pin microsoft/openvmm 5af753b17035f548039cab531027a3cc635ac4fa, the head of microsoft/openvmm#5285, one commit on e61fa5326, the head of microsoft/openvmm#5284, which NVX pins below this commit: - virtiofs: reopen a microVM handle with O_DIRECT on restore. reopen_flags keeps O_DIRECT, so a restore reopens the handle as the guest opened it, with the host's O_DIRECT semantics. Its test fails without the fix on Windows and Linux and passes with it, and the virtiofs tests pass at the pin on both. On KVM, a filesystem-snapshot run whose guest held files open with O_DIRECT across the capture failed its restore before the fix and restored after it. No saved-state, protocol, or ABI format, and no version of any of them, changes; a snapshot that an earlier release saved with such a handle now restores. The protocol vectors and CPU profiles that nvx copies are unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 751cdf0 commit 9d6802e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

0 commit comments

Comments
 (0)