[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51A36D28.7090202@ozlabs.ru>
Date: Tue, 28 May 2013 00:26:48 +1000
From: Alexey Kardashevskiy <aik@...abs.ru>
To: Paolo Bonzini <pbonzini@...hat.com>
CC: David Gibson <david@...son.dropbear.id.au>,
Scott Wood <scottwood@...escale.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, kvm-ppc@...r.kernel.org,
Alexander Graf <agraf@...e.de>,
Paul Mackerras <paulus@...ba.org>,
linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling
On 05/27/2013 08:23 PM, Paolo Bonzini wrote:
> 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.
Just few bits. Is there really much sense in making one function from those
two? I tried, looked a bit messy.
> KVM_CREATE_SPAPR_TCE could stay for backwards-compatibility, or you
> could just use a new capability and drop the old ioctl.
The old capability+ioctl already exist for quite a while and few QEMU
versions supporting it were released so we do not want just drop it. So
then what is the benefit of having a new interface with support of both types?
> I'm not sure
> whether you're already considering the ABI to be stable for kvmppc.
Is any bit of KVM using it? Cannot see from Documentation/ABI.
--
Alexey
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists