David Wolfskill
2024-01-28 11:50:44 UTC
Context for this is in-place source-based updates using META_MODE, amd64
arch.
In the specific case that catalyzed this note, the systems are running:
freebeast(14.0-S)[4] uname -aUK
FreeBSD freebeast.catwhisker.org 14.0-STABLE FreeBSD 14.0-STABLE #40 stable/14-n266551-63a7e799b32c: Sat Jan 27 11:33:52 UTC 2024 ***@freebeast.catwhisker.org:/common/S1/obj/usr/src/amd64.amd64/sys/GENERIC amd64 1400506 1400506
freebeast(14.0-S)[5]
and sources were updated to stable/14-n266554-2ee407b6068a this morning.
The difference between the two in the stable/14 branch is:
| freebeast(14.0-S)[8] git -C /usr/src show 63a7e799b32c..2ee407b6068a | cat
| commit 2ee407b6068a994bba45597c995c5ea76eec9cf3
| Author: Peter Grehan <***@FreeBSD.org>
| Date: Sun Jan 14 21:27:12 2024 +1000
|
| Fix issue with Linux guest XHCI tablet probing.
|
| The USB3 spec mandates that the device-descriptor max packet size
| be 512 bytes, which requires a field size of 9 since it is a
| power-of-2.
|
| Linux kernels recently started validating this field, resulting in
| the table not being probed and the cursor not working in bhyve VNC.
|
| PR: 275760
|
| (cherry picked from commit 0c243cd4a3671bf728f33378ac593c08d8367bc2)
|
| diff --git a/usr.sbin/bhyve/usb_mouse.c b/usr.sbin/bhyve/usb_mouse.c
| index 80f79980a98e..a37941c0cd9d 100644
| --- a/usr.sbin/bhyve/usb_mouse.c
| +++ b/usr.sbin/bhyve/usb_mouse.c
| @@ -154,7 +154,7 @@ static struct usb_device_descriptor umouse_dev_desc = {
| .bLength = sizeof(umouse_dev_desc),
| .bDescriptorType = UDESC_DEVICE,
| MSETW(.bcdUSB, UD_USB_3_0),
| - .bMaxPacketSize = 8, /* max packet size */
| + .bMaxPacketSize = 9, /* max pkt size, 2^9 = 512 */
| MSETW(.idVendor, 0xFB5D), /* vendor */
| MSETW(.idProduct, 0x0001), /* product */
| MSETW(.bcdDevice, 0), /* device version */
|
| commit 55210b704a056dfb2ea115edb3894efe16b7411b
| Author: Chuck Tuffli <***@FreeBSD.org>
| Date: Sat Jan 27 17:33:37 2024 -0800
|
| Revert "bhyve nvme: Add NQN value"
|
| This reverts commit 4bd4942ea70becc583246597b658f3dcdbffafde.
|
| diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c
| index 2fd49a84c768..d1b15d6f3a3c 100644
| --- a/usr.sbin/bhyve/pci_nvme.c
| +++ b/usr.sbin/bhyve/pci_nvme.c
| @@ -514,7 +514,6 @@ static void
| pci_nvme_init_ctrldata(struct pci_nvme_softc *sc)
| {
| struct nvme_controller_data *cd = &sc->ctrldata;
| - int ret;
|
| cd->vid = 0xFB5D;
| cd->ssvid = 0x0000;
| @@ -584,13 +583,6 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc)
| NVME_CTRLR_DATA_FNA_FORMAT_ALL_SHIFT;
|
| cd->vwc = NVME_CTRLR_DATA_VWC_ALL_NO << NVME_CTRLR_DATA_VWC_ALL_SHIFT;
| -
| - ret = snprintf(cd->subnqn, sizeof(cd->subnqn),
| - "nqn.2013-12.org.freebsd:bhyve-%s-%u-%u-%u",
| - get_config_value("name"), sc->nsc_pi->pi_bus,
| - sc->nsc_pi->pi_slot, sc->nsc_pi->pi_func);
| - if ((ret < 0) || ((unsigned)ret > sizeof(cd->subnqn)))
| - EPRINTLN("%s: error setting subnqn (%d)", __func__, ret);
| }
|
| static void
| @@ -3317,6 +3309,7 @@ pci_nvme_init(struct pci_devinst *pi, nvlist_t *nvl)
| pci_nvme_aen_init(sc);
|
| pci_nvme_reset(sc);
| +
| done:
| return (error);
| }
|
| commit 4bd4942ea70becc583246597b658f3dcdbffafde
| Author: Chuck Tuffli <***@FreeBSD.org>
| Date: Thu Oct 12 15:04:17 2023 -0700
|
| bhyve nvme: Add NQN value
|
| Add a NVMe Qualified Name (NQN) to the Controller Data structure using
| the "first format" (i.e., "... used by any organization that owns a
| domain name" Section 7.9 NVM-Express 1.4c 2021.06.28 Ratified).
|
| This avoids a Linux kernel warning about a missing or invalid NQN.
|
| (cherry picked from commit 32557d16e2c3c24c04eccfafd895e1514dc65b35)
|
| diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c
| index d1b15d6f3a3c..2fd49a84c768 100644
| --- a/usr.sbin/bhyve/pci_nvme.c
| +++ b/usr.sbin/bhyve/pci_nvme.c
| @@ -514,6 +514,7 @@ static void
| pci_nvme_init_ctrldata(struct pci_nvme_softc *sc)
| {
| struct nvme_controller_data *cd = &sc->ctrldata;
| + int ret;
|
| cd->vid = 0xFB5D;
| cd->ssvid = 0x0000;
| @@ -583,6 +584,13 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc)
| NVME_CTRLR_DATA_FNA_FORMAT_ALL_SHIFT;
|
| cd->vwc = NVME_CTRLR_DATA_VWC_ALL_NO << NVME_CTRLR_DATA_VWC_ALL_SHIFT;
| +
| + ret = snprintf(cd->subnqn, sizeof(cd->subnqn),
| + "nqn.2013-12.org.freebsd:bhyve-%s-%u-%u-%u",
| + get_config_value("name"), sc->nsc_pi->pi_bus,
| + sc->nsc_pi->pi_slot, sc->nsc_pi->pi_func);
| + if ((ret < 0) || ((unsigned)ret > sizeof(cd->subnqn)))
| + EPRINTLN("%s: error setting subnqn (%d)", __func__, ret);
| }
|
| static void
| @@ -3309,7 +3317,6 @@ pci_nvme_init(struct pci_devinst *pi, nvlist_t *nvl)
| pci_nvme_aen_init(sc);
|
| pci_nvme_reset(sc);
| -
| done:
| return (error);
| }
| freebeast(14.0-S)[9]
And to the best of my knowledge, I do not use Bhyve at all.
But llvm is now being rebuilt.
Why?
Thanks.
Peace,
david
arch.
In the specific case that catalyzed this note, the systems are running:
freebeast(14.0-S)[4] uname -aUK
FreeBSD freebeast.catwhisker.org 14.0-STABLE FreeBSD 14.0-STABLE #40 stable/14-n266551-63a7e799b32c: Sat Jan 27 11:33:52 UTC 2024 ***@freebeast.catwhisker.org:/common/S1/obj/usr/src/amd64.amd64/sys/GENERIC amd64 1400506 1400506
freebeast(14.0-S)[5]
and sources were updated to stable/14-n266554-2ee407b6068a this morning.
The difference between the two in the stable/14 branch is:
| freebeast(14.0-S)[8] git -C /usr/src show 63a7e799b32c..2ee407b6068a | cat
| commit 2ee407b6068a994bba45597c995c5ea76eec9cf3
| Author: Peter Grehan <***@FreeBSD.org>
| Date: Sun Jan 14 21:27:12 2024 +1000
|
| Fix issue with Linux guest XHCI tablet probing.
|
| The USB3 spec mandates that the device-descriptor max packet size
| be 512 bytes, which requires a field size of 9 since it is a
| power-of-2.
|
| Linux kernels recently started validating this field, resulting in
| the table not being probed and the cursor not working in bhyve VNC.
|
| PR: 275760
|
| (cherry picked from commit 0c243cd4a3671bf728f33378ac593c08d8367bc2)
|
| diff --git a/usr.sbin/bhyve/usb_mouse.c b/usr.sbin/bhyve/usb_mouse.c
| index 80f79980a98e..a37941c0cd9d 100644
| --- a/usr.sbin/bhyve/usb_mouse.c
| +++ b/usr.sbin/bhyve/usb_mouse.c
| @@ -154,7 +154,7 @@ static struct usb_device_descriptor umouse_dev_desc = {
| .bLength = sizeof(umouse_dev_desc),
| .bDescriptorType = UDESC_DEVICE,
| MSETW(.bcdUSB, UD_USB_3_0),
| - .bMaxPacketSize = 8, /* max packet size */
| + .bMaxPacketSize = 9, /* max pkt size, 2^9 = 512 */
| MSETW(.idVendor, 0xFB5D), /* vendor */
| MSETW(.idProduct, 0x0001), /* product */
| MSETW(.bcdDevice, 0), /* device version */
|
| commit 55210b704a056dfb2ea115edb3894efe16b7411b
| Author: Chuck Tuffli <***@FreeBSD.org>
| Date: Sat Jan 27 17:33:37 2024 -0800
|
| Revert "bhyve nvme: Add NQN value"
|
| This reverts commit 4bd4942ea70becc583246597b658f3dcdbffafde.
|
| diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c
| index 2fd49a84c768..d1b15d6f3a3c 100644
| --- a/usr.sbin/bhyve/pci_nvme.c
| +++ b/usr.sbin/bhyve/pci_nvme.c
| @@ -514,7 +514,6 @@ static void
| pci_nvme_init_ctrldata(struct pci_nvme_softc *sc)
| {
| struct nvme_controller_data *cd = &sc->ctrldata;
| - int ret;
|
| cd->vid = 0xFB5D;
| cd->ssvid = 0x0000;
| @@ -584,13 +583,6 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc)
| NVME_CTRLR_DATA_FNA_FORMAT_ALL_SHIFT;
|
| cd->vwc = NVME_CTRLR_DATA_VWC_ALL_NO << NVME_CTRLR_DATA_VWC_ALL_SHIFT;
| -
| - ret = snprintf(cd->subnqn, sizeof(cd->subnqn),
| - "nqn.2013-12.org.freebsd:bhyve-%s-%u-%u-%u",
| - get_config_value("name"), sc->nsc_pi->pi_bus,
| - sc->nsc_pi->pi_slot, sc->nsc_pi->pi_func);
| - if ((ret < 0) || ((unsigned)ret > sizeof(cd->subnqn)))
| - EPRINTLN("%s: error setting subnqn (%d)", __func__, ret);
| }
|
| static void
| @@ -3317,6 +3309,7 @@ pci_nvme_init(struct pci_devinst *pi, nvlist_t *nvl)
| pci_nvme_aen_init(sc);
|
| pci_nvme_reset(sc);
| +
| done:
| return (error);
| }
|
| commit 4bd4942ea70becc583246597b658f3dcdbffafde
| Author: Chuck Tuffli <***@FreeBSD.org>
| Date: Thu Oct 12 15:04:17 2023 -0700
|
| bhyve nvme: Add NQN value
|
| Add a NVMe Qualified Name (NQN) to the Controller Data structure using
| the "first format" (i.e., "... used by any organization that owns a
| domain name" Section 7.9 NVM-Express 1.4c 2021.06.28 Ratified).
|
| This avoids a Linux kernel warning about a missing or invalid NQN.
|
| (cherry picked from commit 32557d16e2c3c24c04eccfafd895e1514dc65b35)
|
| diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c
| index d1b15d6f3a3c..2fd49a84c768 100644
| --- a/usr.sbin/bhyve/pci_nvme.c
| +++ b/usr.sbin/bhyve/pci_nvme.c
| @@ -514,6 +514,7 @@ static void
| pci_nvme_init_ctrldata(struct pci_nvme_softc *sc)
| {
| struct nvme_controller_data *cd = &sc->ctrldata;
| + int ret;
|
| cd->vid = 0xFB5D;
| cd->ssvid = 0x0000;
| @@ -583,6 +584,13 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc)
| NVME_CTRLR_DATA_FNA_FORMAT_ALL_SHIFT;
|
| cd->vwc = NVME_CTRLR_DATA_VWC_ALL_NO << NVME_CTRLR_DATA_VWC_ALL_SHIFT;
| +
| + ret = snprintf(cd->subnqn, sizeof(cd->subnqn),
| + "nqn.2013-12.org.freebsd:bhyve-%s-%u-%u-%u",
| + get_config_value("name"), sc->nsc_pi->pi_bus,
| + sc->nsc_pi->pi_slot, sc->nsc_pi->pi_func);
| + if ((ret < 0) || ((unsigned)ret > sizeof(cd->subnqn)))
| + EPRINTLN("%s: error setting subnqn (%d)", __func__, ret);
| }
|
| static void
| @@ -3309,7 +3317,6 @@ pci_nvme_init(struct pci_devinst *pi, nvlist_t *nvl)
| pci_nvme_aen_init(sc);
|
| pci_nvme_reset(sc);
| -
| done:
| return (error);
| }
| freebeast(14.0-S)[9]
And to the best of my knowledge, I do not use Bhyve at all.
But llvm is now being rebuilt.
Why?
Thanks.
Peace,
david
--
David H. Wolfskill ***@catwhisker.org
Do these ends really justify those means?
See https://www.catwhisker.org/~david/publickey.gpg for my public key.
David H. Wolfskill ***@catwhisker.org
Do these ends really justify those means?
See https://www.catwhisker.org/~david/publickey.gpg for my public key.