lkml.org 
[lkml]   [2013]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling
    Il 25/05/2013 04:45, David Gibson ha scritto:
    >> >+ case KVM_CREATE_SPAPR_TCE_IOMMU: {
    >> >+ struct kvm_create_spapr_tce_iommu create_tce_iommu;
    >> >+ struct kvm *kvm = filp->private_data;
    >> >+
    >> >+ r = -EFAULT;
    >> >+ if (copy_from_user(&create_tce_iommu, argp,
    >> >+ sizeof(create_tce_iommu)))
    >> >+ goto out;
    >> >+ r = kvm_vm_ioctl_create_spapr_tce_iommu(kvm,
    >> >&create_tce_iommu);
    >> >+ goto out;
    >> >+ }

    Would it make sense to make this the only interface for creating TCEs?
    That is, pass both a window_size and an IOMMU group id (or e.g. -1 for
    no hardware IOMMU usage), and have a single ioctl for both cases?
    There's some duplicated code between kvm_vm_ioctl_create_spapr_tce and
    kvm_vm_ioctl_create_spapr_tce_iommu.

    KVM_CREATE_SPAPR_TCE could stay for backwards-compatibility, or you
    could just use a new capability and drop the old ioctl. I'm not sure
    whether you're already considering the ABI to be stable for kvmppc.

    Paolo


    \
     
     \ /
      Last update: 2013-05-27 13:01    [W:3.121 / U:0.472 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site