lkml.org 
[lkml]   [2013]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling
    On 06/27/2013 12:02:36 AM, Alexey Kardashevskiy wrote:
    > +/*
    > + * The KVM guest can be backed with 16MB pages.
    > + * In this case, we cannot do page counting from the real mode
    > + * as the compound pages are used - they are linked in a list
    > + * with pointers as virtual addresses which are inaccessible
    > + * in real mode.
    > + *
    > + * The code below keeps a 16MB pages list and uses page struct
    > + * in real mode if it is already locked in RAM and inserted into
    > + * the list or switches to the virtual mode where it can be
    > + * handled in a usual manner.
    > + */
    > +#define KVMPPC_HUGEPAGE_HASH(gpa) hash_32(gpa >> 24, 32)
    > +
    > +struct kvmppc_iommu_hugepage {
    > + struct hlist_node hash_node;
    > + unsigned long gpa; /* Guest physical address */
    > + unsigned long hpa; /* Host physical address */
    > + struct page *page; /* page struct of the very first
    > subpage */
    > + unsigned long size; /* Huge page size (always 16MB at the
    > moment) */
    > +};

    Shouldn't this be namespaced to something like "book3s" or "spapr"?

    -Scott


    \
     
     \ /
      Last update: 2013-06-27 21:21    [W:3.303 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site