Page MenuHomeFreeBSD
Feed Advanced Search

Nov 9 2022

chuck accepted D32767: bhyve: abort and return FEATURE_NOT_SAVEABLE while set feature with a save flag for NVMe controller..
Nov 9 2022, 3:59 PM

Oct 19 2022

chuck added inline comments to D36921: nvme: Timeout expired transactions.
Oct 19 2022, 4:35 PM

Aug 31 2022

chuck added a comment to D32936: bsdinstall: use gpt label instead of swap partition name when updating fstab..

The code changes do not match the title or summary. Did you update the wrong review?

Aug 31 2022, 1:39 PM
chuck accepted D32558: bhyve: initial PowerCycles value.
Aug 31 2022, 12:57 AM
chuck added inline comments to D36345: bhyve: nvme set Abort Command Limit (ACL) and Asynchronous Event Request Limit (AERL) values as specfication suggested.
Aug 31 2022, 12:55 AM
chuck accepted D33856: nvmecontrol: Fix IEEE OUI Identifier output..
Aug 31 2022, 12:24 AM

Aug 17 2022

chuck committed rG6391be308944: bhyve nvme: Switch to POSIX standard functions (authored by chuck).
bhyve nvme: Switch to POSIX standard functions
Aug 17 2022, 12:29 AM
chuck closed D36215: bhyve nvme: Switch to POSIX standard functions.
Aug 17 2022, 12:29 AM

Aug 16 2022

chuck committed rG715f82e4f5c5: bhyve nvme: Support minimal Controller list (authored by chuck).
bhyve nvme: Support minimal Controller list
Aug 16 2022, 4:18 PM
chuck closed D36193: bhyve nvme: Support minimal Controller list.
Aug 16 2022, 4:18 PM
chuck committed rGec0efe34dd48: bhyve nvme: Fix reported SANICAP value (authored by chuck).
bhyve nvme: Fix reported SANICAP value
Aug 16 2022, 4:18 PM
chuck closed D36192: bhyve nvme: Fix reported SANICAP value.
Aug 16 2022, 4:18 PM
chuck requested review of D36215: bhyve nvme: Switch to POSIX standard functions.
Aug 16 2022, 3:53 PM
chuck updated the diff for D36193: bhyve nvme: Support minimal Controller list.

Switch bzero to memset

Aug 16 2022, 3:34 PM

Aug 14 2022

chuck committed rG9f678cfcb42d: bhyve nvme: Fix firmware read only initialization (authored by wanpengqian_gmail.com).
bhyve nvme: Fix firmware read only initialization
Aug 14 2022, 6:20 PM
chuck closed D32659: bhyve: fix incorrect Slot1 Read Only setting in NVMe controller..
Aug 14 2022, 6:20 PM
chuck committed rG3cae10048d27: bhyve nvme: Fix Active Firmware Info (authored by wanpengqian_gmail.com).
bhyve nvme: Fix Active Firmware Info
Aug 14 2022, 6:19 PM
chuck closed D32658: bhyve: initial Active Firmware Info for NVMe controller.
Aug 14 2022, 6:19 PM
chuck committed rGeae0210cdd2e: bhyve: Fix Number of Power States Supported value (authored by wanpengqian_gmail.com).
bhyve: Fix Number of Power States Supported value
Aug 14 2022, 6:19 PM
chuck closed D32657: bhyve: Fix the wrong Number of Power States Support value also set a reasonable Max Power for NVMe controller.
Aug 14 2022, 6:19 PM
chuck accepted D32657: bhyve: Fix the wrong Number of Power States Support value also set a reasonable Max Power for NVMe controller.

I will commit the change to npss but drop the power_state[] changes

Aug 14 2022, 3:51 PM
chuck committed rG7376c08cc67e: bhyve nvme: Fix uninitialized pointer (authored by chuck).
bhyve nvme: Fix uninitialized pointer
Aug 14 2022, 3:05 PM
chuck committed rGd7d1becad4b6: bhyve nvme: Fix Controller init error cases (authored by chuck).
bhyve nvme: Fix Controller init error cases
Aug 14 2022, 3:04 PM
chuck committed rG3d3678627c31: bhyve nvme: Check return value of mapped memory (authored by chuck).
bhyve nvme: Check return value of mapped memory
Aug 14 2022, 3:04 PM
chuck closed D35453: bhyve nvme: Fix Controller init error cases.
Aug 14 2022, 3:04 PM
chuck closed D35452: bhyve nvme: Check return value of mapped memory.
Aug 14 2022, 3:04 PM

Aug 13 2022

chuck closed D35328: bhyve nvme: Fix out-of-bound IOV array access.
Aug 13 2022, 7:20 PM
chuck committed rG88951aaaee73: bhyve nvme: Fix out-of-bound IOV array access (authored by chuck).
bhyve nvme: Fix out-of-bound IOV array access
Aug 13 2022, 7:19 PM
chuck requested review of D36193: bhyve nvme: Support minimal Controller list.
Aug 13 2022, 3:39 PM
chuck requested review of D36192: bhyve nvme: Fix reported SANICAP value.
Aug 13 2022, 3:39 PM
chuck added a comment to D36119: bhyve: Fix uses of uninitialized variables in pci_nvme.c.

The 16.0c test pass with these changes.

Aug 13 2022, 1:30 AM
chuck accepted D36118: bhyve: Fix -Wunused warnings in pci_nvme.c.

The 16.0c test pass with these changes.

Aug 13 2022, 1:30 AM

Aug 12 2022

chuck added inline comments to D36119: bhyve: Fix uses of uninitialized variables in pci_nvme.c.
Aug 12 2022, 4:04 PM
chuck added a reviewer for D36118: bhyve: Fix -Wunused warnings in pci_nvme.c: chuck.
Aug 12 2022, 4:02 PM
chuck accepted D36119: bhyve: Fix uses of uninitialized variables in pci_nvme.c.
Aug 12 2022, 3:55 PM
chuck added a comment to D36119: bhyve: Fix uses of uninitialized variables in pci_nvme.c.

Part of the longer-term solution will be to enable stricter compiler warnings in the bhyve build, but for that, existing warnings have to be addressed first. PR 265749 mentions an NVMe compliance test suite, but we don't currently run it in our regression test suite; would it be possible to do so? Finally, we really need some stubs that would let us compile and fuzz device models in userspace.

Aug 12 2022, 3:55 PM

Aug 11 2022

chuck added a comment to D36119: bhyve: Fix uses of uninitialized variables in pci_nvme.c.

All of these changes are fine, but the fact that they are necessary has me worried. Does what I've coded wander into undefined behavior territory?

Aug 11 2022, 2:46 PM
chuck added a reviewer for D36119: bhyve: Fix uses of uninitialized variables in pci_nvme.c: chuck.
Aug 11 2022, 2:29 PM

Jul 12 2022

chuck added a comment to D35328: bhyve nvme: Fix out-of-bound IOV array access.

! In D35328#811978, @gusev.vitaliy_gmail.com wrote:

I would remove "range_is_contiguous" usage and unite all in one condition as "contiguous" case is only if both conditions are true:

(req->prev_size != 0 && (req->prev_gpaddr + req->prev_size) == gpaddr)
Jul 12 2022, 3:51 PM
chuck added a comment to D35328: bhyve nvme: Fix out-of-bound IOV array access.

This change looks good to me. Is there anything stopping this being merged?
(I'm doing another sync to illumos at the end of the month and I'd like to include this if possible)

Jul 12 2022, 3:33 PM

Jun 10 2022

chuck updated the summary of D35453: bhyve nvme: Fix Controller init error cases.
Jun 10 2022, 9:23 PM
chuck updated the diff for D35453: bhyve nvme: Fix Controller init error cases.

Update PR list

Jun 10 2022, 9:23 PM
chuck requested review of D35453: bhyve nvme: Fix Controller init error cases.
Jun 10 2022, 9:11 PM
chuck requested review of D35452: bhyve nvme: Check return value of mapped memory.
Jun 10 2022, 8:58 PM

Jun 9 2022

chuck added a comment to D35328: bhyve nvme: Fix out-of-bound IOV array access.
In D35328#801068, @jhb wrote:

I had read 'initial address of zero' as meaning that the first iovec had iov_base of 0. Saying something like "the first vector" probably is a bit less ambiguous.

Jun 9 2022, 6:18 PM

May 27 2022

chuck updated the diff for D35328: bhyve nvme: Fix out-of-bound IOV array access.

Implement suggested rename of variable

May 27 2022, 3:37 PM

May 26 2022

chuck added a comment to D35328: bhyve nvme: Fix out-of-bound IOV array access.
  1. I think patch is good, however I have questions (not directly related to the patch) for lba naming. LBA - logical block address - it should be enumerated with blocks, i.e. 1,.... However pci_nvme_append_iov_req() is called from nvme_write_read_blockif() and offset is passed as lba.

Do you think it is worth renaming lba to offset?

Agreed, that is a change worth making

  1. And one more suggestion, what if code will be:
	if (req->io_req.br_iovcnt > 0 && (req->prev_gpaddr + req->prev_size) == gpaddr) {

What you posted is very close to the original change I made. My hope was the intent of this version was clearer and compiled down to roughly the same assembly code.

  1. Question related to description.
 The test for contiguous regions has a bug such that it
mistakenly treats an initial address of zero as a contiguous range and
concatenates it with the previous. But because there is no previous IOV,
the concatenation code corrupts the IO request structure and leads to a
segmentation fault when the blockif request completes.

As I understood the first call of pci_nvme_append_iov_req() is always with req->io_req.br_iovcnt == 0, so this concatenation should be involved only for the subsequent calls of pci_nvme_append_iov_req() and it would good to point to it.

I had hoped the last sentence covered this, but it sounds like it missed. Is

May 26 2022, 10:00 PM
chuck updated the summary of D35328: bhyve nvme: Fix out-of-bound IOV array access.
May 26 2022, 5:59 PM
chuck requested review of D35328: bhyve nvme: Fix out-of-bound IOV array access.
May 26 2022, 5:57 PM

Apr 14 2022

chuck accepted D34870: nvme: Remove NVME_MAX_XFER_SIZE, replace inline calculation.
Apr 14 2022, 4:03 PM
chuck accepted D34869: nvme: Use saved mps when initializing drive.
Apr 14 2022, 3:50 PM
chuck accepted D34868: nvme: Rename min_page_size to page_size and save mps.
Apr 14 2022, 3:18 PM
chuck accepted D34866: nvme: Fix old intel alignment size.
Apr 14 2022, 3:08 PM
chuck accepted D34867: nvme: Base maximum data transfer size directly on MPSMIN in cap_hi.
Apr 14 2022, 3:06 PM
chuck accepted D34865: nvme: Define NVME_MPS_SHIFT.
Apr 14 2022, 2:43 PM

Apr 5 2022

chuck added inline comments to D32802: bhyve: return FEATURE_NOT_CHANGEABLE for unimplemented feature of NVMe controller.
Apr 5 2022, 12:11 AM
chuck added a comment to D32831: bhyve: implement SELF-TEST feature for NVMe controller.

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?

Apr 5 2022, 12:07 AM

Apr 4 2022

chuck added a comment to D32903: bhyve: implement Timestamp get/set feature for NVMe controller.

From NVMe spec(1.4c), here is the quota:
https://nvmexpress.org/wp-content/uploads/NVM-Express-1_4c-2021.06.28-Ratified.pdf

Timestamp values should not be used for security applications. Other application use of the Timestamp is outside the scope of this specification.

The specification didn't say it relates to Persistent Logs and/or Events. so I just implement it as spec documents.

Apr 4 2022, 11:56 PM
chuck added a comment to D32558: bhyve: initial PowerCycles value.

D24202 is not a good example as the compliance tests check some of those values. To the best of my knowledge, the tests do not check power on hours.

Apr 4 2022, 11:48 PM
chuck accepted D32659: bhyve: fix incorrect Slot1 Read Only setting in NVMe controller..
Apr 4 2022, 11:44 PM
chuck added a comment to D32657: bhyve: Fix the wrong Number of Power States Support value also set a reasonable Max Power for NVMe controller.

After getting some clarification on the wording in the specification (which generated an ECN ...), my preference would be to set NPSS to zero but not report any power state information. I.e. all fields of power_state[0] would be zero. Since pci_nvme_init() uses calloc to allocate the softc (which includes the struct nvme_controller_data), I believe all initialization of cd->power_state can be removed from pci_nvme_init_ctrldata().

Apr 4 2022, 11:41 PM

Mar 29 2022

chuck accepted D34707: nvme: MPS is a power of two.
Mar 29 2022, 8:43 PM

Mar 28 2022

chuck added a comment to D32903: bhyve: implement Timestamp get/set feature for NVMe controller.

This does not appear to implement either Set or Get correctly. For example, it does not use the Timestamp Origin field on Get's.

Mar 28 2022, 5:48 PM
chuck added a comment to D32657: bhyve: Fix the wrong Number of Power States Support value also set a reasonable Max Power for NVMe controller.

Give me a few days to check on some wording in the specification.

Mar 28 2022, 5:28 PM
chuck added a comment to D32798: bhyve: implement get-feature of LBA range type of NVMe controller.

What is the long term plan for this functionality? Applications can use LBA Range Type to provide usage hints to the Controller such that it can optimize its performance characteristics. Are there kernels / applications out there that use this functionality? If so, is the goal to use these hints to modify the emulation's behavior?

Mar 28 2022, 4:21 PM

Mar 27 2022

chuck added a comment to D32831: bhyve: implement SELF-TEST feature for NVMe controller.

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.

Mar 27 2022, 2:14 PM
chuck accepted D32658: bhyve: initial Active Firmware Info for NVMe controller.
Mar 27 2022, 1:59 PM
chuck requested changes to D32659: bhyve: fix incorrect Slot1 Read Only setting in NVMe controller..
Mar 27 2022, 1:57 PM
chuck requested changes to D32558: bhyve: initial PowerCycles value.

After some further thought, I've changed my mind and don't believe it makes sense to include the "power on hours" calculation. The goal of this value in actual hardware is to provide a (weak) heuristic to predict when to replace the drive. But this doesn't make sense for an emulated drive. Correcting the initialization of power on count seems like a good change, but the addition of a synthetic hours doesn't.

Mar 27 2022, 1:51 PM

Mar 17 2022

chuck committed R9:ce683fa53c74: Add my (chuck@) updated PGP key. (authored by chuck).
Add my (chuck@) updated PGP key.
Mar 17 2022, 4:53 PM

Feb 28 2022

chuck added a comment to D34372: bhyve: missing mutex initialisations.
In D34372#778858, @rew wrote:

I didn't realize that these mutex's get initialized on FreeBSD, even without your patch.

I didn't either, but it seems that the rest of bhyve is not relying on that behaviour and it's not defined by POSIX nor in the pthread_mutex_lock.3 man page.

Feb 28 2022, 4:20 PM

Feb 27 2022

chuck committed rG0f26e9f2e26e: bhyve nvme: Advertise Namespace changed AEN (authored by chuck).
bhyve nvme: Advertise Namespace changed AEN
Feb 27 2022, 6:17 PM
chuck committed rGc55ba19b7029: nvme: Add OAES bit-field definitions (authored by chuck).
nvme: Add OAES bit-field definitions
Feb 27 2022, 6:17 PM
chuck committed rG7de3a3e919ec: nvme: fix spelling of Namespace (authored by chuck).
nvme: fix spelling of Namespace
Feb 27 2022, 6:17 PM
chuck committed rG9300a0eb6b4d: RELNOTES: Add entry for bhyve NVMe 1.4 support (authored by chuck).
RELNOTES: Add entry for bhyve NVMe 1.4 support
Feb 27 2022, 6:17 PM

Feb 26 2022

chuck accepted D34372: bhyve: missing mutex initialisations.

LGTM

Feb 26 2022, 6:28 PM

Feb 23 2022

chuck closed D34331: bhyve nvme: Advertise Namespace changed AEN.
Feb 23 2022, 5:23 PM
chuck committed rGe0ac9dc2b069: bhyve nvme: Advertise Namespace changed AEN (authored by chuck).
bhyve nvme: Advertise Namespace changed AEN
Feb 23 2022, 5:23 PM

Feb 21 2022

chuck committed rGeae02d959363: bhyve nvme: Fix Identify Namespace, NSID=ffffffff (authored by chuck).
bhyve nvme: Fix Identify Namespace, NSID=ffffffff
Feb 21 2022, 9:59 PM
chuck committed rG3286533a1cee: bhyve nvme: Fix reported VWC value (authored by chuck).
bhyve nvme: Fix reported VWC value
Feb 21 2022, 9:59 PM
chuck committed rGd9685b5787b3: bhyve nvme: Fix Set Features, AEN (authored by chuck).
bhyve nvme: Fix Set Features, AEN
Feb 21 2022, 9:59 PM
chuck committed rG541ff74584e1: bhyve nvme: Fix LBA out-of-range calculation (authored by chuck).
bhyve nvme: Fix LBA out-of-range calculation
Feb 21 2022, 9:59 PM
chuck committed rG3444d620b2a4: bhyve nvme: Add Select support to Get Features (authored by chuck).
bhyve nvme: Add Select support to Get Features
Feb 21 2022, 9:59 PM
chuck committed rG06ec065bede0: bhyve nvme: Update v1.4 Identify Controller data (authored by chuck).
bhyve nvme: Update v1.4 Identify Controller data
Feb 21 2022, 9:59 PM
chuck committed rG0bb86659cbca: bhyve nvme: Add Temperature Threshold support (authored by chuck).
bhyve nvme: Add Temperature Threshold support
Feb 21 2022, 9:58 PM
chuck committed rG6e5e38c241e6: bhyve nvme: Fix Set Features (authored by chuck).
bhyve nvme: Fix Set Features
Feb 21 2022, 9:58 PM
chuck committed rGd4941306264f: bhyve nvme: Remove redundant AER Limit checks (authored by chuck).
bhyve nvme: Remove redundant AER Limit checks
Feb 21 2022, 9:58 PM
chuck committed rG8f65e94045f4: bhyve nvme: Implement Log Page Offset (authored by chuck).
bhyve nvme: Implement Log Page Offset
Feb 21 2022, 9:58 PM
chuck committed rGae60b4cfe14b: bhyve nvme: Add missing Admin opcodes (authored by chuck).
bhyve nvme: Add missing Admin opcodes
Feb 21 2022, 9:58 PM
chuck committed rG29f50a83cc52: bhyve nvme: Fix Namespace Specific Set Features (authored by chuck).
bhyve nvme: Fix Namespace Specific Set Features
Feb 21 2022, 9:58 PM
chuck committed rG3d681a9a8009: bhyve nvme: Fix NVM Format completion status (authored by chuck).
bhyve nvme: Fix NVM Format completion status
Feb 21 2022, 9:58 PM
chuck committed rGbed94664db02: bhyve nvme: Advertise v1.4 support (authored by chuck).
bhyve nvme: Advertise v1.4 support
Feb 21 2022, 9:58 PM
chuck committed rG67fa95bf0c0b: bhyve nvme: Inform guests of namespace resize (authored by chuck).
bhyve nvme: Inform guests of namespace resize
Feb 21 2022, 9:58 PM
chuck committed rGc7c490ddef9f: bhyve nvme: Add AEN support to NVMe emulation (authored by chuck).
bhyve nvme: Add AEN support to NVMe emulation
Feb 21 2022, 9:58 PM
chuck committed rG1685d8368c2f: bhyve blockif: fix blockif_candelete with Capsicum (authored by chuck).
bhyve blockif: fix blockif_candelete with Capsicum
Feb 21 2022, 9:58 PM
chuck committed rGb7a2cf0d9102: bhyve: fix NVMe MDTS comment (authored by chuck).
bhyve: fix NVMe MDTS comment
Feb 21 2022, 9:58 PM
chuck closed D34330: nvme: fix spelling of Namespace.
Feb 21 2022, 6:55 PM
chuck committed rGc2318cf80a9e: nvme: fix spelling of Namespace (authored by chuck).
nvme: fix spelling of Namespace
Feb 21 2022, 6:55 PM
chuck closed D34300: nvme: Add OAES bit-field definitions.
Feb 21 2022, 6:54 PM
chuck committed rGe71afa120275: nvme: Add OAES bit-field definitions (authored by chuck).
nvme: Add OAES bit-field definitions
Feb 21 2022, 6:54 PM