Date: Mon, 24 Aug 2020 01:51:17 +0000 (UTC) From: Chuck Tuffli <chuck@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364602 - head/usr.sbin/bhyve Message-ID: <202008240151.07O1pHrW025685@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: chuck Date: Mon Aug 24 01:51:17 2020 New Revision: 364602 URL: https://svnweb.freebsd.org/changeset/base/364602 Log: bhyve: NVMe set nominal health values Some operating systems believe bhyve's emulated NVMe drive is failing based on certain values in the SMART / Health Information log page being zero. Fix is to set the reported temperature and available spare values to reasonable defaults. Submitted by: wanpengqian@gmail.com Reviewed by: grehan MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24202 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Aug 24 01:11:29 2020 (r364601) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Aug 24 01:51:17 2020 (r364602) @@ -604,6 +604,11 @@ pci_nvme_init_logpages(struct pci_nvme_softc *sc) /* Set read/write remainder to round up according to spec */ sc->read_dunits_remainder = 999; sc->write_dunits_remainder = 999; + + /* Set nominal Health values checked by implementations */ + sc->health_log.temperature = 310; + sc->health_log.available_spare = 100; + sc->health_log.available_spare_threshold = 10; } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008240151.07O1pHrW025685>