All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: aik@ozlabs.ru, alex.williamson@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion
Date: Tue, 30 Apr 2013 09:30:12 +0200	[thread overview]
Message-ID: <517F7304.1010205@redhat.com> (raw)
In-Reply-To: <20130430022329.GV20202@truffula.fritz.box>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Il 30/04/2013 04:23, David Gibson ha scritto:
>>> I think this is a different problem.  Basically the question is
>>> "what happens if a MemoryRegion 'disappears' while an
>>> AddressSpace is still referring to it", and the answer right
>>> now is "badness".
>> 
>> Well.. no.  The same problem may well exist for AddressSpace
>> objects, but in this case it's for the VFIO private
>> per-address-space object.

Well, once we clarify the lifetime of AddressSpaces, we can clarify
the lifetime of the VFIO private object.

>>> We should look at generic fixes before dropping hooks in the
>>> code.  At the very least an "assert(mr->parent == NULL);" is
>>> missing in memory_region_destroy.
>> 
>> Well, sure that's probably also a good idea.  But the whole point
>> here is you're insisting that the MemoryRegion code doesn't know
>> about the vfio private data, even as an opaque handle, and so
>> there's no possible assert we can put there to check it has been
>> destroyed.
> 
> Oh, yes, forgot to ask.  I'm still unclear on what the conceptual 
> difference is supposed to between a MemoryRegion and an
> AddressSpace. AFAICT AddressSpace seems to be roughly just a
> wrapper on a MemoryRegion that gives it some more features.

Yes, an AddressSpace is a wrapper for a MemoryRegion that has a NULL
- ->parent, with two extra features:

- - QEMU computes the "flat" view of the MemoryRegion and a compressed
radix tree representation of that view

- - MemoryListeners can ask to be called only for some AddressSpaces

Paolo

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRf3MEAAoJEBvWZb6bTYbyRtEQAImxNNRh39bektv28FJ58hre
XrEbck6PZZmJr2xARUrqdri4U8Dw/vXSJOyVWEfQWBvswDBImb6ATO3CcGGYztxS
zxmget+Uobbd6ibtKU88JZP0w1WJV7Cn0oj//ylvp+I1DzCJpLRDZJLYMKMns28F
KLvA9OTLXlExqEx3/qLc38rIPJ/OJmMqMgCmwNT8ba03wmvO9lSNjHsqi4Htg8Ml
AnC29dfiLoNE4Zw+E/N9X7AeNaDvG2GJ52G9suJcd8fgkirEzOfwTqirxeEEGeDw
oX7PX02yUuPMo5p6BeocqKFS5qgU9oMwSwSYSuy+0uMcoeBhLaVYXy1pRZDvIWVz
b6hHSNc3TsgNlmi2hwYjJG/4ARngXvS1llNCvfNpuENAq3H2zH0DjpW5IHOrt9cv
97FPeWKzka2MqLUkdziGKyno2Tlgq10lfqF4TS85PhXgP66A4gtMo1XeZosCIYjX
rGNoQuSnau/938H4Nkt3TAIGQZNypycPeIBXhDNQjFhKXrlLbQjdI5FCjs+3De83
AjEB4OqPEWJ2xeP9HefrEajLQB0T/MSGvoExZKBnFfFyqSv8a7MPZElSnLL6fJ4T
/fj/ow3gBbDz4SnNg80FxxbZI8UOvxz3mUcCK8ogQiRBkYdp8M6lmA1rvO1FTafT
f1eyeutVKUrfyanZfHy8
=yOML
-----END PGP SIGNATURE-----

  reply	other threads:[~2013-04-30  7:30 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-26  6:02 [Qemu-devel] [0/4] RFC: Preparations for VFIO and guest IOMMUs (v2) David Gibson
2013-04-26  6:02 ` [Qemu-devel] [PATCH 1/4] Fix vmw_pvscsi.c for iommu support changes David Gibson
2013-04-26  8:19   ` Paolo Bonzini
2013-04-26 11:04     ` David Gibson
2013-04-26  6:02 ` [Qemu-devel] [PATCH 2/4] vfio: Associate VFIO groups with (guest) IOMMU address spaces David Gibson
2013-04-26  6:02 ` [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion David Gibson
2013-04-26  8:23   ` Paolo Bonzini
2013-04-26 11:31     ` David Gibson
2013-04-26 13:40       ` Paolo Bonzini
2013-04-27  9:49         ` David Gibson
2013-04-27 12:17           ` Paolo Bonzini
2013-04-28  1:58             ` David Gibson
2013-04-29  8:11               ` Paolo Bonzini
2013-04-29 11:00                 ` David Gibson
2013-04-29 11:38                   ` Paolo Bonzini
2013-04-29 11:56                     ` David Gibson
2013-04-29 13:44                       ` Paolo Bonzini
2013-04-30  2:05                         ` David Gibson
2013-04-30  2:23                           ` David Gibson
2013-04-30  7:30                             ` Paolo Bonzini [this message]
2013-04-30  7:54                               ` David Gibson
2013-04-29  2:11             ` [Qemu-trivial] [PATCH] memory: give name every AddressSpace Alexey Kardashevskiy
2013-04-29  2:11               ` [Qemu-devel] " Alexey Kardashevskiy
2013-04-29  8:16               ` [Qemu-trivial] " Paolo Bonzini
2013-04-29  8:16                 ` [Qemu-devel] " Paolo Bonzini
2013-04-29  8:21                 ` [Qemu-trivial] " Alexey Kardashevskiy
2013-04-29  8:21                   ` [Qemu-devel] " Alexey Kardashevskiy
2013-04-29  9:25                   ` [Qemu-trivial] " Paolo Bonzini
2013-04-29  9:25                     ` [Qemu-devel] " Paolo Bonzini
2013-04-29 11:09                     ` [Qemu-trivial] " David Gibson
2013-04-29 11:09                       ` [Qemu-devel] " David Gibson
2013-04-30  2:14                     ` Alexey Kardashevskiy
2013-04-26  6:02 ` [Qemu-devel] [PATCH 4/4] vfio: Only use memory listeners when appropriate David Gibson
2013-04-26 15:42 ` [Qemu-devel] [0/4] RFC: Preparations for VFIO and guest IOMMUs (v2) Alex Williamson
2013-04-27  9:51   ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=517F7304.1010205@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=alex.williamson@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.