From owner-freebsd-virtualization@FreeBSD.ORG Tue Sep 16 21:26:28 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 326C045C; Tue, 16 Sep 2014 21:26:28 +0000 (UTC) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB9E9E45; Tue, 16 Sep 2014 21:26:27 +0000 (UTC) Received: by mail-ig0-f182.google.com with SMTP id h18so157278igc.9 for ; Tue, 16 Sep 2014 14:26:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=BlBwKE3LSNIppPjUk7P8+HrnHSnqN4v/xmsnJKp9g5Q=; b=I3dTHs8N/+eNzgKGiCJV/xxRUt/DbOOJt/0fMVJ4rhctzxzrxQOHsO6lvITCl6wwRQ QVHRGETw6vFnHbjMkYuzewejGvO6JoAFF/sVcvpBUhrc6Z3HtI+6tVmhzL0MMxphVP1F 43QsmadgL+QzqmpFCZwNllx/i8yPhn13m1JWBlSzRtqye8jtFzFv7IHlF9OoGVlcWdqd oDal10ve1SwJ6zt7+whQOzky3RnPmma8vdw3OPofhTOvyD7TCw0OBI6o+GsBQ492+9pm /D3G2S0FZkzjKUALa1sRHfrGmvG6GU/uaJXXNQyoE/hByoFQw9DTXGsd9iVeNbtWzhTU cwnQ== X-Received: by 10.43.96.65 with SMTP id cf1mr1354754icc.26.1410902786862; Tue, 16 Sep 2014 14:26:26 -0700 (PDT) MIME-Version: 1.0 Sender: mr.kodiak@gmail.com Received: by 10.64.20.130 with HTTP; Tue, 16 Sep 2014 14:25:56 -0700 (PDT) In-Reply-To: <3A1313AD-5B06-4F17-9C17-B91AA32FEE88@jnielsen.net> References: <3A1313AD-5B06-4F17-9C17-B91AA32FEE88@jnielsen.net> From: Bryan Venteicher Date: Tue, 16 Sep 2014 16:25:56 -0500 X-Google-Sender-Auth: rch-26LXEEl11QZSd0mfrt6jLaE Message-ID: Subject: Re: Using virtio_random To: John Nielsen Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Bryan Venteicher , freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 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: Tue, 16 Sep 2014 21:26:28 -0000 On Mon, Sep 15, 2014 at 6:17 PM, John Nielsen wrote: > Hi all- > > I am happy to see that virtio_random(4) will be included in FreeBSD 10.1. > To try it out, I loaded up BETA1 in a virtual machine with entropy > passthrough enabled. After booting it with the virtio_random module loaded > I see this in dmesg: > > virtio_pci3: port 0xc0a0-0xc0bf irq 10 at > device 6.0 on pci0 > vtrnd0: on virtio_pci3 > virtio_pci3: host features: 0x71000000 > > virtio_pci3: negotiated features: 0 > > So far, so good. (I think? The 'negotiated features: 0' gives me pause..) > > The VirtIO random device is simple enough that's there is no benefit of the offered features. > Now how do I use the driver as an entropy source (or verify that it's > being used)? I don't see any difference in the output of "sysctl > kern.random" with or without the driver loaded. Is something missing? > > The driver periodically (IIRC every 5 seconds) feeds random_harvest(9) with random data from the host. > Thanks, > > JN > >