All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Micah Morton <mortonm@chromium.org>,
	kvm@vger.kernel.org, jmattson@google.com
Subject: Re: [RFC PATCH] KVM: Add module for IRQ forwarding
Date: Wed, 13 May 2020 08:34:01 -0600	[thread overview]
Message-ID: <20200513083401.11e761a7@x1.home> (raw)
In-Reply-To: <92fd66eb-68e7-596f-7dd1-f1c190833be4@redhat.com>

On Wed, 13 May 2020 09:02:16 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:

> On 12/05/20 19:14, Alex Williamson wrote:
> > But why not assign the individual platform devices via vfio-platform
> > rather than assign the i2c controller via vfio-pci and then assembling
> > the interrupts from those sub-devices with this ad-hoc interface?  An
> > emulated i2c controller in the guest could provide the same discovery
> > mechanism as is available in the host.  
> 
> I agree.  I read the whole discussion, but I still don't understand why
> this is not using vfio-platform.
> 
> Alternatively, if you assign the i2c controller, I don't understand why
> the guest doesn't discover interrupts on its own.  Of course you need to
> tell the guest about the devices in the ACPI tables, but why is this new
> concept necessary?

The i2c controller is a PCI device, it can be assigned with vfio-pci
and we can use it to probe the i2c bus and find the sub-devices.
However the interrupt for this sub-device is unrelated to the PCI
controller device, it's an entirely arbitrary (from our perspective)
relationship described via ACPI.  So the guest needs an ACPI blob to
describe the interrupt and then access to the interrupt.  This is
what's new here.

We could potentially use device specific interrupts to expose this via
the controller device, but then vfio-pci needs to learn how to
essentially become an i2c controller to enumerate the sub-devices and
collect external dependencies.  This is not an approach I've embraced
versus the alternative of the host i2c driver claiming the PCI
controller, enumerating the sub-devices, and binding the resulting
device, complete with built-in interrupt support via vfio-platform.
Thanks,

Alex


  reply	other threads:[~2020-05-13 14:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 22:00 [RFC PATCH] KVM: Add module for IRQ forwarding Micah Morton
2020-05-12  1:45 ` kbuild test robot
2020-05-12 17:14 ` Alex Williamson
2020-05-13  7:02   ` Paolo Bonzini
2020-05-13 14:34     ` Alex Williamson [this message]
2020-05-13 15:23       ` Paolo Bonzini
2020-05-13 19:10         ` Micah Morton
2020-05-13 22:05           ` Paolo Bonzini
2020-05-14 17:44             ` Micah Morton
2020-05-14 21:17               ` Paolo Bonzini
2020-05-14 22:43                 ` Alex Williamson
2020-05-15 20:30                   ` Micah Morton
2020-06-03 18:23                     ` [PATCH] vfio: PoC patch for printing IRQs used by i2c devices Micah Morton
2020-06-09 20:19                       ` Micah Morton
2020-06-19 18:51                         ` Alex Williamson
2020-06-19 20:00                           ` Micah Morton
2020-06-22 21:59                             ` Micah Morton
2020-05-15 10:11               ` [RFC PATCH] KVM: Add module for IRQ forwarding Auger Eric
2020-05-15 16:39                 ` Micah Morton
2020-05-13 21:52     ` Micah Morton

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=20200513083401.11e761a7@x1.home \
    --to=alex.williamson@redhat.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=mortonm@chromium.org \
    --cc=pbonzini@redhat.com \
    /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.