linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Gavin Shan <shangw@linux.vnet.ibm.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: aik@ozlabs.ru, linuxppc-dev@lists.ozlabs.org,
	Gavin Shan <shangw@linux.vnet.ibm.com>,
	kvm@vger.kernel.org
Subject: Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command
Date: Thu, 21 Mar 2013 10:09:03 +0800	[thread overview]
Message-ID: <20130321020903.GA13178@shangw.(null)> (raw)
In-Reply-To: <1363808782.24132.534.camel@bling.home>

On Wed, Mar 20, 2013 at 01:46:22PM -0600, Alex Williamson wrote:
>On Wed, 2013-03-20 at 20:31 +0100, Benjamin Herrenschmidt wrote:
>> On Wed, 2013-03-20 at 12:48 -0600, Alex Williamson wrote:

.../...

>> As for EEH, I will let Gavin describe in more details what he is doing,
>> though I wouldn't be surprised if so far he doesn't have a
>> non-accelerated path :-) Which indeed makes things oddball, granted ...
>> at least for now. I *think* what Gavin's doing right now is a
>> pass-through to the host EEH directly in the kernel, so without a slow
>> path...
>> 

Yes, I don't have non-accelerated path. I'm trying to describe what I'm
doing: On the host side, the interrupt will be triggered while detecting
frozen PE, which has been passed to guest. We won't send EEH event to
EEH core on host side and we're waiting for guest to be involved to handle
the EEH error. In guest, any access to config or MMIO of the frozen PE will
trigger EEH event and in turn, the guest utilizes existing (exactly same
to pSeries on phyp case) RTAS calls to recover the error. The RTAS calls is
being emulated in host kernel.

Part of the RTAS call arguments is PCI domain/bus/slot/function viewed from
guest perspective. That's different from that for same physical PCI device
in host side. So I used VFIO-PCI to do the mapping and maintain the information
in host kernel.

>> Gavin, it really boils down to that. In-kernel EEH for guests is a
>> KVMism that ends up not involving VFIO in any other way than
>> establishing the mapping, then arguably it could be done via a VM ioctl.
>> 
>> If there's more going through VFIO and shared state, then it should
>> probably go through VFIO-PCI.
>

Ben, you're right. I use VFIO for nothing other than doing address mapping.
So I will do the address mapping in VM IOCTL instead of in VFIO-PCI.

Thanks,
Gavin

  reply	other threads:[~2013-03-21  2:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15  7:26 [PATCH 0/3] VFIO change for EEH support Gavin Shan
2013-03-15  7:26 ` [PATCH 1/3] VFIO: Architecture dependent VFIO device operations Gavin Shan
2013-03-15  7:26 ` [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command Gavin Shan
2013-03-15 19:29   ` Alex Williamson
2013-03-16  1:34     ` Gavin Shan
2013-03-16  5:37       ` Benjamin Herrenschmidt
2013-03-18 21:01         ` Alex Williamson
2013-03-19  3:24           ` Gavin Shan
2013-03-19  4:18             ` Alex Williamson
2013-03-19  4:45               ` Benjamin Herrenschmidt
2013-03-20 18:48                 ` Alex Williamson
2013-03-20 19:31                   ` Benjamin Herrenschmidt
2013-03-20 19:46                     ` Alex Williamson
2013-03-21  2:09                       ` Gavin Shan [this message]
2013-03-15  7:26 ` [PATCH 3/3] VFIO: Direct access config reg without capability Gavin Shan
2013-03-15 19:41   ` Alex Williamson
2013-03-16  3:34     ` Gavin Shan
2013-03-16  5:30     ` Benjamin Herrenschmidt
2013-03-18 21:15       ` Alex Williamson
2013-03-21  0:58   ` Alex Williamson

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='20130321020903.GA13178@shangw.(null)' \
    --to=shangw@linux.vnet.ibm.com \
    --cc=aik@ozlabs.ru \
    --cc=alex.williamson@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).