lkml.org 
[lkml]   [2017]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/3] KVM: add converters between pfn_t and kvm_pfn_t
    Date
    Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
    ---
    include/linux/kvm_host.h | 3 +++
    1 file changed, 3 insertions(+)

    diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
    index 6882538eda32..759fe498c89e 100644
    --- a/include/linux/kvm_host.h
    +++ b/include/linux/kvm_host.h
    @@ -67,6 +67,9 @@
    #define KVM_PFN_ERR_HWPOISON (KVM_PFN_ERR_MASK + 1)
    #define KVM_PFN_ERR_RO_FAULT (KVM_PFN_ERR_MASK + 2)

    +#define kvm_pfn_to_pfn(x) ((pfn_t){ .val = (x)})
    +#define pfn_to_kvm_pfn(x) ((kvm_pfn_t)((x).val))
    +
    /*
    * error pfns indicate that the gfn is in slot but faild to
    * translate it to pfn on host.
    --
    2.14.1
    \
     
     \ /
      Last update: 2017-10-27 04:26    [W:4.942 / U:0.672 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site