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 1/5] pci: Simpler implementation of PCI_COMMAND_MASTER bit
Date: Wed, 24 Apr 2013 14:36:46 +0200	[thread overview]
Message-ID: <5177D1DE.10803@redhat.com> (raw)
In-Reply-To: <1366804881-553-2-git-send-email-david@gibson.dropbear.id.au>

Il 24/04/2013 14:01, David Gibson ha scritto:
> In commit 1c380f9460522f32c8dd2577b2a53d518ec91c6d "pci: honor
> PCI_COMMAND_MASTER" the PCI_COMMAND_MASTER bit of the PCI command register
> was implemented by toggling the enable bit on a memory region alias
> interposed between the PCI device's dma address space and the main
> system memory region.
> 
> Introducing an extra alias region for every PCI device just to implement
> that bit seems like serious overkill.  Furthermore, it doesn't work when
> there's a (guest side) iommu present, since that uses a different path for
> constructing the PCI device's dma address space.
> 
> This patch removes the aliased window, instead implementing
> PCI_COMMAND_MASTER with tests in the PCI DMA functions.
> 
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

This doesn't work.

You have no guarantee that PCI devices use the PCI DMA functions.  The
device could just pass the DMAContext to another function, and indeed
the OHCI controller does exactly that.

This will be even simpler after IOMMU/DMAContext are also unified in the
AddressSpace framework.

Paolo

  reply	other threads:[~2013-04-24 12:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-24 12:01 [Qemu-devel] [0/5] RFC: Preparations for supporting VFIO with guest IOMMUs David Gibson
2013-04-24 12:01 ` [Qemu-devel] [PATCH 1/5] pci: Simpler implementation of PCI_COMMAND_MASTER bit David Gibson
2013-04-24 12:36   ` Paolo Bonzini [this message]
2013-04-24 13:06     ` David Gibson
2013-04-24 12:01 ` [Qemu-devel] [PATCH 2/5] pci: Don't create an address space object for every PCI device David Gibson
2013-04-24 12:34   ` Paolo Bonzini
2013-04-24 13:07     ` David Gibson
2013-04-24 12:01 ` [Qemu-devel] [PATCH 3/5] vfio: Associate VFIO groups with DMAContexts David Gibson
2013-04-24 12:01 ` [Qemu-devel] [PATCH 4/5] vfio: Move container list to DMAContext David Gibson
2013-04-24 15:12   ` Alex Williamson
2013-04-24 16:33     ` Paolo Bonzini
2013-04-25  6:36       ` David Gibson
2013-04-26  8:44         ` Paolo Bonzini
2013-04-26  8:46           ` Alexey Kardashevskiy
2013-04-26  8:52             ` Paolo Bonzini
2013-04-26  8:56               ` Alexey Kardashevskiy
2013-04-26  9:08                 ` Paolo Bonzini
2013-04-25  6:35     ` David Gibson
2013-04-24 12:01 ` [Qemu-devel] [PATCH 5/5] vfio: Only use memory listeners when appropriate 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=5177D1DE.10803@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.