From owner-freebsd-virtualization@freebsd.org Wed Mar 11 09:26:57 2020 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 63DD025A785 for ; Wed, 11 Mar 2020 09:26:57 +0000 (UTC) (envelope-from wanpengqian@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48cmnD61f9z49ZW for ; Wed, 11 Mar 2020 09:26:56 +0000 (UTC) (envelope-from wanpengqian@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id B5B5025A784; Wed, 11 Mar 2020 09:26:56 +0000 (UTC) Delivered-To: virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B549525A783 for ; Wed, 11 Mar 2020 09:26:56 +0000 (UTC) (envelope-from wanpengqian@gmail.com) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48cmnC1Vycz49X6 for ; Wed, 11 Mar 2020 09:26:54 +0000 (UTC) (envelope-from wanpengqian@gmail.com) Received: by mail-qk1-x731.google.com with SMTP id m2so1371734qka.7 for ; Wed, 11 Mar 2020 02:26:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Ov8Ox0EQpFD3jFt8WbyboTicEImw7Y2yhT3WjXRIJa8=; b=nVJFiVuyLty9UsFmzcdgAkyVp0AXN2bjNgQsauHzHxojZkMywiy/hhDkbZjniohERd tGwP/Un02m2W2WJDJtcxzRSrNKcjlMI5Ol1D0W+fpduktRTCKiajfYDs1Xa2ZYUH5UE0 zz8i7Rnx4Xbf9d6gkQsvOZjkVpOp5jxXRSTiAhjSuy7/dUgsk7IJoumJicBBlpDOAASf j982CRrvLqJO2oKHNv/vh2PJFtGQiTQ63dSvddzCo49WeR0WYusOqqW/nECTr/hHvQx4 dkSxmfScOtltFljbvDxxTWP77RDcY/l7Pv+fFx/agnQ5i9+wgNnz7MTuKr4fN3acCJa5 VXPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Ov8Ox0EQpFD3jFt8WbyboTicEImw7Y2yhT3WjXRIJa8=; b=Xty1Ym6D0HChOFG4bTtysYtPUObb7hNnWWQ42G22toiLyBjpFt0KfpoPAD6xqr6XZi EjoS+X0oSCQ9UgLDvy+E07PgdAJFcTUkYzP3ZS+jFd3h8Z5lAQjgVIann+An0dh9DmMU wB+LRez1vl8eyG3H0TpDKD5ct/Z3zDycvQGTCoYCtaMeiuRvgVugbwZNSl2P9FL7aCtj v8rmAhfuebl5aIfCq/tL5WXpW2HKbSc5boLxVzc3f5tw4XS1EUetv5QPQejwc4I4j5HK 6aOOebuRmepjxpKygFAKPMMjOYZik9vmVSXXhGenu0qBK3ANz4P5OzVnlAeAICpXi8tu 3gcQ== X-Gm-Message-State: ANhLgQ0LS7yY9VXdyhPdQMNCqscQE8w0V2kDX4mdoj+zUK7Xy2IlvBVT KMF8NF1LwMD9R/k6d1pzNOsdjaNsXx2tT98I484+On3NPzs= X-Google-Smtp-Source: ADFU+vtg1xcL2L5jo4k/VovyyH5yDpvBY3x5NTgHNLmYOocS4ycBRfZ5Txjaj29VLODDpAiUL/0bnlhP6uM84HTVQ2s= X-Received: by 2002:ae9:f303:: with SMTP id p3mr1870974qkg.454.1583918813467; Wed, 11 Mar 2020 02:26:53 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?B?6Yqt5LiH5qOa?= Date: Wed, 11 Mar 2020 18:26:23 +0900 Message-ID: Subject: Patch for Nominal Media Rotation Rate field of AHCI disk. To: virtualization@freebsd.org Content-Type: multipart/mixed; boundary="0000000000003afb9705a090d69d" X-Rspamd-Queue-Id: 48cmnC1Vycz49X6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=nVJFiVuy; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of wanpengqian@gmail.com designates 2607:f8b0:4864:20::731 as permitted sender) smtp.mailfrom=wanpengqian@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; HAS_ATTACHMENT(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[virtualization@freebsd.org]; TO_DN_NONE(0.00)[]; MIME_GOOD(-0.10)[multipart/mixed,text/plain]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; IP_SCORE(0.00)[ip: (-9.16), ipnet: 2607:f8b0::/32(-1.85), asn: 15169(-1.65), country: US(-0.05)]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[1.3.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2020 09:26:57 -0000 --0000000000003afb9705a090d69d Content-Type: text/plain; charset="UTF-8" Hi all I have a patch for Nominal Media Rotation Rate field. currently bhyve will not report this field. setting nmrr=1 will let ahci controller report disk as Solid State Disk. other valid value will report as RPM of disk. ref document: http://www.t13.org/documents/UploadedDocuments/docs2016/di529r14-ATAATAPI_Command_Set_-_4.pdf 9.11.5.4 NOMINAL MEDIA ROTATION RATE field Best Regards Qian --0000000000003afb9705a090d69d Content-Type: application/octet-stream; name="nmrr.diff" Content-Disposition: attachment; filename="nmrr.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k7n4bqf40 ZGlmZiAtdSAtciAtTiB1c3Iuc2Jpbi9iaHl2ZS9ibG9ja19pZi5jIHVzci5zYmluL2JoeXZlbm1y ci9ibG9ja19pZi5jCi0tLSB1c3Iuc2Jpbi9iaHl2ZS9ibG9ja19pZi5jCTIwMjAtMDMtMTEgMTg6 MDk6MzEuNTU2MDgwMDAwICswOTAwCisrKyB1c3Iuc2Jpbi9iaHl2ZW5tcnIvYmxvY2tfaWYuYwky MDIwLTAzLTExIDE4OjA2OjE4LjY0MTE2NTAwMCArMDkwMApAQCAtMTAyLDYgKzEwMiw3IEBACiAJ aW50CQkJYmNfc2VjdHN6OwogCWludAkJCWJjX3BzZWN0c3o7CiAJaW50CQkJYmNfcHNlY3RvZmY7 CisJaW50CQkJYmNfbm1ycjsgIC8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