Page MenuHomeFreeBSD

bhyve: implement SELF-TEST feature for NVMe controller
AbandonedPublic

Authored by wanpengqian_gmail.com on Nov 4 2021, 11:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 29 2024, 4:36 AM
Unknown Object (File)
Jan 28 2024, 12:53 AM
Unknown Object (File)
Dec 20 2023, 3:58 AM
Unknown Object (File)
Dec 10 2023, 8:17 PM
Unknown Object (File)
Nov 12 2023, 9:25 AM
Unknown Object (File)
Nov 10 2023, 8:13 AM
Unknown Object (File)
Oct 16 2023, 5:03 PM
Unknown Object (File)
Oct 13 2023, 9:40 AM
Subscribers

Details

Reviewers
jhb
imp
corvink
Group Reviewers
bhyve
Summary

SELF-TEST is a optional feature for NVMe controller.
this patch will implement this feature.

for Short test, it will last 1 minute.
for Extended test, it will last 5 minutes.

SELF-TEST do nothing internal.

Test Plan

within FreeBSD/Linux guest,
fire short/extended self-test and try to complete/abort these tests.
check the behaver of each results.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 42578
Build 39466: arc lint + arc unit

Event Timeline

Use more properly function name, update sytle.

After D32558 D32844 landed, this patch will update.

add/correct comments and output DPRINTF log more detail.

usr.sbin/bhyve/pci_nvme.c
556
1572

Wouldn't it make sense to move it in front of the switch statement?

1573

Don't know if it's a better solution but you could reuse now instead of calling gettimeofday a second time.

1589

Couldn't be reached due to earlier return.

wanpengqian_gmail.com added inline comments.
usr.sbin/bhyve/pci_nvme.c
1573

You are right, use memcpy to reuse now.

Can you help me understand the value to a guest operating system for supporting self-test? Is any of that value negated because the implementation does not perform any testing or checks?

Can you help me understand the value to a guest operating system for supporting self-test? Is any of that value negated because the implementation does not perform any testing or checks?

When I implement self-test enhancement for /sbin/nvmecontrol D32832 , I don't want to use my real hardware for testing since such tests will probably harm my hardware. so a virtual NVMe controller which supports self-test is a good choice.
We add functions to bhyve not only essential, but also provide a good choice for developers.

While I agree that using emulated hardware to test drivers and system tools is useful, I'm concerned about adding synthetic functionality to the core code.

While I agree that using emulated hardware to test drivers and system tools is useful, I'm concerned about adding synthetic functionality to the core code.

For hypervisors, performance and functionality are two important goals. In the virtual machines view, there is no synthetic functionality or real functionality. it's all virtual. If we want to support more functionalities, it must be synthetic other than real.
The real question is, Do we consider functionality as important as performance? as bhyve is part of the core. if we don't allow synthetic functionality to go into bhyve, it should be clear this situation first.

I apologize if my word choice was poor. By "synthetic", I meant the emulation would appear to perform a self-test, but in fact would not perform any tests at all. How would this benefit a guest?

I don't quite understand the comments about performance vs. functionality. The goal for the NVMe emulation is to provide good performance and the functionality guests require. If you can point to guests that require the self-test functionality, I'd be interested in understanding their requirements.