lkml.org 
[lkml]   [2013]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems
    On 10/01/2013 11:23 AM, Paul Mackerras wrote:
    > On Tue, Oct 01, 2013 at 11:39:08AM +0300, Gleb Natapov wrote:
    >> On Tue, Oct 01, 2013 at 06:34:26PM +1000, Michael Ellerman wrote:
    >>> On Thu, Sep 26, 2013 at 11:06:59AM +0200, Paolo Bonzini wrote:
    >>>> Il 26/09/2013 08:31, Michael Ellerman ha scritto:
    >>>>> Some powernv systems include a hwrng. Guests can access it via the
    >>>>> H_RANDOM hcall.
    >>>> Is there any reason to do this in the kernel?
    >>> It's less code, and it's faster :)
    >>>
    >>>> It does not have to be a particularly fast path;
    >>> Sure, but do we have to make it slow on purpose?
    >>>
    >> We do not put non performance critical devices into the kernel.
    > It's not a device, it's a single hypercall, specified by PAPR, which
    > is the moral equivalent of x86's RDRAND.

    Yes, and hypercalls should be handled in user space unless impossible
    otherwise (like MMU hypercalls which modify state that user space has no
    priviledge to access).

    I think the most reasonable way forward would be to implement the path
    that jumps through hoops and goes through user space, then add a new
    device in kvm that registers on this hcall inside of kvm.

    That way we ensure consistency (user space knows what to put into device
    tree, can disable it if it wants to, can run with TCG, etc) and you can
    prove that your user space interface works along the way.


    Alex



    \
     
     \ /
      Last update: 2013-10-01 12:21    [W:2.663 / U:0.188 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site