As an aside we will also need to handle the case where the guest is not PV aware and hence uses the emulated devices and never triggers any of the above activities. So we need to ensure that the backends are sync'd even if none of the above takes place. The PV devices will remain open but that needn't be a problem if the guest never uses them.
Possibly this means making sure all writes via this PV interface go straight to disk (using the appropriate barriers) or by having qemu do
From an userspace perspective that is funneled via fdatasync. On
2.6.39 that becomes REQ_FLUSH|REQ_FUA which is correct-ish.
the necessary flush when the emulated device is first used.
Hm, what is the HVM backend for 'phy' in QEMU mode? I've been using 'file' which translates to qdisk (which does the proper fdatasync on flush, thought not the proper flush on barrier as the 2.6.39 fdatasync does not do the old-style barrier flush).