Currently, NVMe controller only presents the SMART data I/O statistics.
for some OSs, they will check the health logpage to decide whether the
NVMe device is healthy or not.
This patch will passthrough the host NVMe device health logpage
to the vm.
Within the guest, nvmecontrol logpage -p2 nvme0 will output
a copy value of host's NVMe device(configable in command line).
For example, here is the output within guest.
root@smart:~ # nvmecontrol logpage -p 2 nvme0
SMART/Health Information Log
============================
Critical Warning State: 0x00
Available spare: 0
Temperature: 0
Device reliability: 0
Read only: 0
Volatile memory backup: 0
Temperature: 324 K, 50.85 C, 123.53 F
Available spare: 100
Available spare threshold: 10
Percentage used: 2
Data units (512,000 byte) read: 359129
Data units written: 14856403
Host read commands: 12535684
Host write commands: 326035273
Controller busy time (minutes): 1484
Power cycles: 36
Power on hours: 3667
Unsafe shutdowns: 22
Media errors: 0
No. error info log entries: 2
Warning Temp Composite Time: 72
Error Temp Composite Time: 67
Temperature 1 Transition Count: 0
Temperature 2 Transition Count: 0
Total Time For Temperature 1: 0
Total Time For Temperature 2: 0