qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 05/14] hw/block/nvme: Add support for Namespace Types


From: Keith Busch
Subject: Re: [PATCH v5 05/14] hw/block/nvme: Add support for Namespace Types
Date: Thu, 1 Oct 2020 10:08:01 -0700

On Thu, Oct 01, 2020 at 04:23:56PM +0000, Niklas Cassel wrote:
> But I see your point, all of this code:
> 
>         if (NVME_CC_CSS(data) != NVME_CC_CSS(n->bar.cc)) {
>             if (NVME_CC_EN(n->bar.cc)) {
>                 NVME_GUEST_ERR(pci_nvme_err_change_css_when_enabled,
>                                "changing selected command set when enabled");
>             } else {
>                 switch (NVME_CC_CSS(data)) {
>                 case CSS_NVM_ONLY:
>                     trace_pci_nvme_css_nvm_cset_selected_by_host(data &
>                                                                  0xffffffff);
>                 break;
>                 case CSS_CSI:
>                     NVME_SET_CC_CSS(n->bar.cc, CSS_CSI);
>                     trace_pci_nvme_css_all_csets_sel_by_host(data &
>                                                              0xffffffff);
>                     break;
>                 case CSS_ADMIN_ONLY:
>                     break;
>                 default:
>                     NVME_GUEST_ERR(pci_nvme_ub_unknown_css_value,
>                                    "unknown value in CC.CSS field");
>                 }
>             }
>         }
> 
> should simply be dropped.
> 
> No need to call NVME_SET_CC_CSS() explicitly.
> 
> CC.CSS bit will be set futher down in this function anyway:
> 
>         if (NVME_CC_EN(data) && !NVME_CC_EN(n->bar.cc)) {
>             n->bar.cc = data;

Yep, that's how I saw it too. I folded it all into a rebase here for
this particular patch:

  
http://git.infradead.org/qemu-nvme.git/commitdiff/45157cab2e700155b05f0bd28533f73d7e399ab8?hp=2015774a010011a9e8d2ab5291fd8d747f60471e

It depends on the prep patches I sent yesterday, which seem pretty
straight forward. I'll just wait another day before committing that
stuff and other fixes to the nvme-next branch. But if you want to get a
head start on the ZNS enabling parts, what I have in mind is in the
branch from the above link.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]