From nobody Tue Feb 28 12:48:07 2023 X-Original-To: virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PQxx35gXkz3vQfs for ; Tue, 28 Feb 2023 12:48:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PQxx34dTjz46DV for ; Tue, 28 Feb 2023 12:48:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677588487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GtEULNum8cfxEEPWNQRNXoPljkLCxlXEdiif1fV8gRs=; b=SFZaFUQQ+eQfGENoE177raXRx8Kf8ZYVJhY5c2CSUIMOQstBsY1pIdxuzv7KuQ43ACA1DD q00804L0AAaUBRs+brh+O4b/NPysJTxbedV10zyvgV0kOncKdqpXzlmmJLeDYueuBFJayO vb9Rfa54cjI1iX/H67Ds0GIllDbdtxsk5IIWPd6TdhInSGJAcOCZ97kKW5qeklGybXSoMv Zib3weGKnQ7rI0aYc2QhY6ei5Cba9m8Cl55d2h11N4AeQT5+HiJjQso/klpc0ZUlaCcXGL 0PqandVhPwb04uOVc9jIx8gEabU6Tf2PBX5BDXywvTY4tVVcmQ+NnCdjTBswLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677588487; a=rsa-sha256; cv=none; b=q3u0S8QdxNEq2nBLqNnb+UKq8k1qKA8Z2ZWhID94n6Sex+Bed4MAv7JPZlQkHLN5VlJTTr eG9YBm5tLkol8p4KToHrQgjfGXLgEaXrtzvCKTQG5W5l+axCaIIZqu1b0W4IoarK9Pdcdd Yobvk9H5HtfNMHvR2GO0jrVGP8nykyTnf7+8XzlhGYJysNpBzr0sIP6he2gLajbAulGTHO IdFhRJiiT7svoFthtlr5j8iTxsFcmjEMUTLLkiFcfCN3CBV7llSeyAgxhei+pimYsO4JpI 22LIZYSgFgvztCJLgHuJ5wvrZ9hneWbmNok47nJ55jseI7vGTrFotKGpWy/ugQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PQxx33ZdSz176y for ; Tue, 28 Feb 2023 12:48:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 31SCm7D0062165 for ; Tue, 28 Feb 2023 12:48:07 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 31SCm76S062164 for virtualization@FreeBSD.org; Tue, 28 Feb 2023 12:48:07 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 269823] rand_harvest produces 100%CPU on 1 CPU with virtio_random.ko loaded Date: Tue, 28 Feb 2023 12:48:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: freebsd@igalic.co X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269823 --- Comment #3 from Mina Gali=C4=87 --- more info on the hardware, before i try to dive into what's actually going wrong with the code: works: # devinfo -p vtrnd0 -v vtrnd0 pnpinfo vendor=3D0x00001af4 device=3D0x1005 subvendor=3D0x1af4 device_type=3D0x00000004 virtio_pci0 pnpinfo vendor=3D0x1af4 device=3D0x1005 subvendor=3D0x1af4 subdevice=3D0x0004 class=3D0x00ff00 at slot=3D2 function=3D0 dbsf=3Dpci0:0:= 2:0 handle=3D\_SB_.PCI0.S10_ pci0 pcib0 pnpinfo _HID=3DPNP0A03 _UID=3D1 _CID=3Dnone at handle=3D\_SB_.PCI0 acpi0 nexus0 # pciconf -lv | grep -B2 -A1 RNG virtio_pci0@pci0:0:2:0: class=3D0x00ff00 rev=3D0x00 hdr=3D0x00 vendor=3D0x1= af4 device=3D0x1005 subvendor=3D0x1af4 subdevice=3D0x0004 vendor =3D 'Red Hat, Inc.' device =3D 'Virtio RNG' class =3D old # sysctl kern.random kern.random.fortuna.concurrent_read: 1 kern.random.fortuna.minpoolsize: 64 kern.random.rdrand.rdrand_independent_seed: 0 kern.random.use_chacha20_cipher: 1 kern.random.block_seeded_status: 0 kern.random.random_sources: 'VirtIO Entropy Adapter','Intel Secure Key RNG' kern.random.harvest.mask_symbolic: PURE_VIRTIO,PURE_RDRAND,[CALLOUT],[UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,[NE= T_ETHER],NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED kern.random.harvest.mask_bin: 00000010010000000111011111 kern.random.harvest.mask: 590303 kern.random.initial_seeding.disable_bypass_warnings: 0 kern.random.initial_seeding.arc4random_bypassed_before_seeding: 0 kern.random.initial_seeding.read_random_bypassed_before_seeding: 0 kern.random.initial_seeding.bypass_before_seeding: 1 Misbehaves: # devinfo -p vtrnd0 -v vtrnd0 pnpinfo vendor=3D0x00001af4 device=3D0x1044 subvendor=3D0x1af4 device_type=3D0x00000004 virtio_pci1 pnpinfo vendor=3D0x1af4 device=3D0x1044 subvendor=3D0x1af4 subdevice=3D0x1100 class=3D0x00ff00 at slot=3D0 function=3D1 dbsf=3Dpci0:1:= 0:1 pci1 pcib1 pnpinfo vendor=3D0x1b36 device=3D0x000c subvendor=3D0x1b36 subdevice= =3D0x0000 class=3D0x060400 at slot=3D1 function=3D0 dbsf=3Dpci0:0:1:0 handle=3D\_SB_.= PCI0.S08_ pci0 pcib0 pnpinfo _HID=3DPNP0A08 _UID=3D0 _CID=3DPNP0A03 at handle=3D\_SB_.PCI0 acpi0 nexus0 # pciconf -lv | grep -B2 -A1 RNG virtio_pci1@pci0:1:0:1: class=3D0x00ff00 rev=3D0x01 hdr=3D0x00 vendor=3D0x1= af4 device=3D0x1044 subvendor=3D0x1af4 subdevice=3D0x1100 vendor =3D 'Red Hat, Inc.' device =3D 'Virtio RNG' class =3D old # sysctl kern.random kern.random.fortuna.concurrent_read: 1 kern.random.fortuna.minpoolsize: 64 kern.random.rdrand.rdrand_independent_seed: 0 kern.random.use_chacha20_cipher: 1 kern.random.block_seeded_status: 0 kern.random.random_sources: 'VirtIO Entropy Adapter','Intel Secure Key RNG' kern.random.harvest.mask_symbolic: PURE_VIRTIO,PURE_RDRAND,[CALLOUT],[UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,[NE= T_ETHER],NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED kern.random.harvest.mask_bin: 00000010010000000111011111 kern.random.harvest.mask: 590303 kern.random.initial_seeding.disable_bypass_warnings: 0 kern.random.initial_seeding.arc4random_bypassed_before_seeding: 0 kern.random.initial_seeding.read_random_bypassed_before_seeding: 0 kern.random.initial_seeding.bypass_before_seeding: 1 The only difference i can see is in the devinfo output. --=20 You are receiving this mail because: You are on the CC list for the bug.=