From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPTsg-000191-KN for qemu-devel@nongnu.org; Fri, 27 Sep 2013 04:58:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPTsY-0008LE-7f for qemu-devel@nongnu.org; Fri, 27 Sep 2013 04:58:34 -0400 Received: from mail-qc0-x231.google.com ([2607:f8b0:400d:c01::231]:40931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPTsY-0008L4-3P for qemu-devel@nongnu.org; Fri, 27 Sep 2013 04:58:26 -0400 Received: by mail-qc0-f177.google.com with SMTP id x12so1507423qcv.8 for ; Fri, 27 Sep 2013 01:58:25 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <524548C0.6070602@redhat.com> Date: Fri, 27 Sep 2013 10:58:40 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1380177444-4961-1-git-send-email-michael@ellerman.id.au> <1380270997.20440.6.camel@concordia> In-Reply-To: <1380270997.20440.6.camel@concordia> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] spapr: Add support for hwrng when available List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Ellerman Cc: Paul Mackerras , Alexander Graf , qemu-devel@nongnu.org Il 27/09/2013 10:36, Michael Ellerman ha scritto: > So have the host kernel read from the hwrng, export it to userspace via > a char device, which is then read by qemu, which then copies it back > into the host kernel, which can then give it to the guest. > > Or from the guest perspective, instead of a cheap switch to host real > mode and back - a full switch to kernel virtual, then to user, back to > kernel, back to user, back to kernel, back to guest. > > Frankly I can't see why that is a superior option? Because this is not a fast path at all. Doing things in QEMU lets people test and configure the paravirtualized hwrng even if they do not have a hwrng in the host, and even if they are running with emulation (TCG) instead of KVM. But as I mentioned in the kernel thread, perhaps you do not need the hypercall at all if virtio-rng is enough (it should be for Linux guests). Paolo