From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Weidong Han <weidong.han@intel.com>
Cc: "M. Nunberg" <mnunberg@haskalah.org>,
Xen-devel <xen-devel@lists.xensource.com>
Subject: Re: iommuu/vt-d issues with LSI MegaSAS (PERC5i)
Date: Wed, 2 Jun 2010 10:49:06 -0400 [thread overview]
Message-ID: <20100602144906.GC13344@phenom.dumpdata.com> (raw)
In-Reply-To: <4C0602AF.5040806@intel.com>
On Wed, Jun 02, 2010 at 03:05:19PM +0800, Weidong Han wrote:
> Pasi Kärkkäinen wrote:
>> On Wed, Jun 02, 2010 at 09:23:37AM +0800, Weidong Han wrote:
>>
>>> This PCI-x card is not suitable for assignment. It contains an invisible
>>> device 05:08.0 (lspci cannot show it), but this invisible device won't
>>> be mapped by VT-d because VT-d engine doesn't know this device, so you
>>> can see the DMAR faults on it. One workaround is to hard code to map
>>> 05:08.0 when assign 05:0e.0. BTW, PCIe LSI card don't have this problem.
>>>
>>>
>>
>> Note that this problem happens when booting up dom0..
>>
> I see. all devices are assigned to dom0 in booting. It just needs to map
> 05:08.0 as well when map 05:0e.0 in domain_context_mapping.
Hey Weidong,
Thank you the explanation. I am not that familiar with the VT-D chipset,
but it seems that this issue also appears with CardBus controllers:
http://lkml.org/lkml/2010/5/22/69 ?
For this device, the problem should also appear with the newer kernels
without using the Hypervisor and with CONFIG_DMAR enabled, right?
Am I to understand that the workaround you are proposing is doing
something akin to this:
/*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License v2.0 as published by
* the Free Software Foundation
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/module.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/stat.h>
#include <linux/err.h>
#include <linux/ctype.h>
#include <linux/slab.h>
#include <linux/limits.h>
#include <linux/device.h>
#include <linux/pci.h>
#include <linux/device.h>
#include <linux/pci.h>
#include <xen/interface/xen.h>
#include <xen/interface/physdev.h>
#include <asm/xen/hypervisor.h>
#include <asm/xen/hypercall.h>
#define LSI_HACK "0.1"
MODULE_AUTHOR("Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>");
MODULE_DESCRIPTION("lsi hack");
MODULE_LICENSE("GPL");
MODULE_VERSION(LSI_HACK);
static int __init lsi_hack_init(void)
{
int r = 0;
struct physdev_manage_pci manage_pci = {
.bus = 0x5,
.devfn = PCI_DEVFN(8,0),
};
r = HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_add,
&manage_pci);
return r;
}
static void __exit lsi_hack_exit(void)
{
int r = 0;
struct physdev_manage_pci manage_pci;
manage_pci.bus = 0x5;
manage_pci.devfn = PCI_DEVFN(8,0);
r = HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_remove,
&manage_pci);
if (r)
printk(KERN_ERR "%s: %d\n", __FUNCTION__, r);
}
module_init(lsi_hack_init);
module_exit(lsi_hack_exit);
next prev parent reply other threads:[~2010-06-02 14:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-29 14:31 iommuu/vt-d issues with LSI MegaSAS (PERC5i) M. Nunberg
2010-05-29 15:20 ` Pasi Kärkkäinen
2010-05-30 18:33 ` M. Nunberg
2010-05-30 18:38 ` iommuu/vt-d issues with LSI MegaSAS (PERC5i) [Full log Xen + dom0 kernel] Pasi Kärkkäinen
2010-06-01 15:25 ` iommuu/vt-d issues with LSI MegaSAS (PERC5i) Konrad Rzeszutek Wilk
2010-06-01 18:46 ` Kay, Allen M
2010-06-02 1:23 ` Weidong Han
2010-06-02 1:40 ` M. Nunberg
2010-06-02 1:56 ` Han, Weidong
2010-06-02 6:26 ` Pasi Kärkkäinen
2010-06-02 7:05 ` Weidong Han
2010-06-02 14:49 ` Konrad Rzeszutek Wilk [this message]
2010-06-03 1:14 ` Weidong Han
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=20100602144906.GC13344@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=mnunberg@haskalah.org \
--cc=weidong.han@intel.com \
--cc=xen-devel@lists.xensource.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.