Re: [PATCH] KVM: PPC: fix couple of memory leaks in MPIC/XICS devices

2013-09-04 Thread Alexander Graf

On 01.09.2013, at 14:53, Gleb Natapov wrote:

 XICS failed to free xics structure on error path. MPIC destroy handler
 forgot to delete kvm_device structure.
 
 Signed-off-by: Gleb Natapov g...@redhat.com

Paul, please ack :).


Alex

--
To unsubscribe from this list: send the line unsubscribe kvm-ppc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] KVM: PPC: fix couple of memory leaks in MPIC/XICS devices

2013-09-04 Thread Paul Mackerras
On Sun, Sep 01, 2013 at 03:53:46PM +0300, Gleb Natapov wrote:
 XICS failed to free xics structure on error path. MPIC destroy handler
 forgot to delete kvm_device structure.
 
 Signed-off-by: Gleb Natapov g...@redhat.com

Acked-by: Paul Mackerras pau...@samba.org
--
To unsubscribe from this list: send the line unsubscribe kvm-ppc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v9 12/13] KVM: PPC: Add support for IOMMU in-kernel handling

2013-09-04 Thread Benjamin Herrenschmidt
On Tue, 2013-09-03 at 13:53 +0300, Gleb Natapov wrote:
  Or supporting all IOMMU links (and leaving emulated stuff as is) in on
  device is the last thing I have to do and then you'll ack the patch?
  
 I am concerned more about API here. Internal implementation details I
 leave to powerpc experts :)

So Gleb, I want to step in for a bit here.

While I understand that the new KVM device API is all nice and shiny and that 
this
whole thing should probably have been KVM devices in the first place (had they
existed or had we been told back then), the point is, the API for handling
HW IOMMUs that Alexey is trying to add is an extension of an existing mechanism
used for emulated IOMMUs.

The internal data structure is shared, and fundamentally, by forcing him to
use that new KVM device for the new stuff, we create a oddball API with
an ioctl for one type of iommu and a KVM device for the other, which makes
the implementation a complete mess in the kernel (and you should care :-)

So for something completely new, I would tend to agree with you. However, I
still think that for this specific case, we should just plonk-in the original
ioctl proposed by Alexey and be done with it.

Cheers,
Ben.


--
To unsubscribe from this list: send the line unsubscribe kvm-ppc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html