diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/block/nvme.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 1e07166..ad988d7 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -615,6 +615,13 @@ static void nvme_write_bar(NvmeCtrl *n, hwaddr offset, uint64_t data, n->bar.intmc = n->bar.intms; break; case 0x14: + /* Windows first sends data, then sends enable bit */ + if (!NVME_CC_EN(data) && !NVME_CC_EN(n->bar.cc) && + !NVME_CC_SHN(data) && !NVME_CC_SHN(n->bar.cc)) + { + n->bar.cc = data; + } + if (NVME_CC_EN(data) && !NVME_CC_EN(n->bar.cc)) { n->bar.cc = data; if (nvme_start_ctrl(n)) { |