Hi, Nadolski,
If you use resent Xen 3.4-unstable, you don't need applying the patch.
Because the patch has already been applied in Xen 3.4-unstable on Sep 05th.
If not, e.g.Xen 3.3-stable, we can apply the patch to assign MegaRaid SAS.
Please get the patch from following URL:
ioemu : c/s 18430: 1a785d213573
http://xenbits.xensource.com/xen-unstable.hg?rev/1a785d213573
ioemu-remote: c/s 4761: 5f415e92f4e5
http://xenbits.xensource.com/ext/qemu-xen-unstable.hg?rev/5f415e92f4e5
Thanks,
--
Yuji Shimada
Here is my patch that I mention.
ioemu:
--- a/tools/ioemu/hw/pt-msi.c Thu Sep 04 16:29:38 2008 +0100
+++ b/tools/ioemu/hw/pt-msi.c Fri Sep 05 11:18:20 2008 +0100
@@ -313,7 +313,7 @@ int pt_msix_init(struct pt_dev *dev, int
table_off = pci_read_long(pd, pos + PCI_MSIX_TABLE);
bar_index = dev->msix->bar_index = table_off & PCI_MSIX_BIR;
- table_off &= table_off & ~PCI_MSIX_BIR;
+ table_off = dev->msix->table_off = table_off & ~PCI_MSIX_BIR;
dev->msix->table_base = dev->pci_dev->base_addr[bar_index];
PT_LOG("get MSI-X table bar base %llx\n",
(unsigned long long)dev->msix->table_base);
ioemu-remote:
--- a/hw/pt-msi.c Wed Sep 03 11:26:06 2008 +0100
+++ b/hw/pt-msi.c Fri Sep 05 10:32:49 2008 +0100
@@ -313,7 +313,7 @@ int pt_msix_init(struct pt_dev *dev, int
table_off = pci_read_long(pd, pos + PCI_MSIX_TABLE);
bar_index = dev->msix->bar_index = table_off & PCI_MSIX_BIR;
- table_off &= table_off & ~PCI_MSIX_BIR;
+ table_off = dev->msix->table_off = table_off & ~PCI_MSIX_BIR;
dev->msix->table_base = dev->pci_dev->base_addr[bar_index];
PT_LOG("get MSI-X table bar base %llx\n",
(unsigned long long)dev->msix->table_base);
On Wed, 1 Oct 2008 12:52:25 -0600
"Nadolski, Ed" <Ed.Nadolski@xxxxxxx> wrote:
> Is this the patch that you mean (pls. see below)? I added this patch onto a
> recent Xen 3.4-unstable and with CentOS 5.2 for dom0, and the VT-d passthru
> is working. I am able to access SATA drives attached to the onboard 1068
> controller on the Dell T7400. Access works for HVMs running either CentOS
> and Windows.
>
> I haven’t tried the MR SAS card tho. I do also have the onboard Broadcom NIC
> working with the VT-d passthru.
>
> HTH,
> Ed
>
> Here is the patch I used:
>
> diff -r 694b7daa353c xen/drivers/passthrough/vtd/iommu.c
> --- a/xen/drivers/passthrough/vtd/iommu.c Wed Sep 17 14:16:02 2008 +0100
> +++ b/xen/drivers/passthrough/vtd/iommu.c Thu Sep 18 14:11:09 2008 +0800
> @@ -1265,6 +1265,7 @@ static int domain_context_mapping(struct
> bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
>
> ob = bus; odf = devfn;
> + ret = domain_context_mapping_one(domain, drhd->iommu, bus, devfn);
> if ( !find_pcie_endpoint(&bus, &devfn, &secbus) )
> {
> gdprintk(XENLOG_WARNING VTDPREFIX,
>
>
> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Yuji Shimada
> Sent: Wednesday, October 01, 2008 12:08 AM
> To: Jayaraman, Bhaskar; weidong.han@xxxxxxxxx; espen.skoglund@xxxxxxxxxxxxx;
> xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-devel] RE: Megaraid SAS driver failing in Xen-3.3.0 but was
> working in Xen-3.2.2-rc3
>
> Hi, Bhanskar.
>
> Could you try my patch?
> My MegaRAID SAS card works well with this patch.
>
> If you are using ioemu, please try c/s 18430.
> http://xenbits.xensource.com/xen-unstable.hg?rev/1a785d213573
>
> If you are using ioemu-romote, please try c/s 4761.
> http://xenbits.xensource.com/ext/qemu-xen-unstable.hg?rev/5f415e92f4e5
>
> Thanks,
>
> --
> Yuji Shimada
>
> On Tue, 30 Sep 2008 20:54:04 +0800
> "Jayaraman, Bhaskar" <Bhaskar.Jayaraman@xxxxxxx> wrote:
>
> > Hi the patch works and we are able to insert the module in the kernel.
> > Subsequently we’re dedicating the MgaRAID SAS card to an HVM guest as well
> > but once that is done we’re unable to see the volumes i.e. the disk is not
> > showing up through fdisk -l in the HVM guest. The error received on the
> > dmesg of HVM is that the firmware doesn’t initialize: -
> >
> > megasas: 00.00.03.01 Sun May 14 22:49:52 PDT 2006
> > megasas: 0x1000:0x0411:0x1000:0x1008: bus 0:slot 6:func 0
> > PCI: Enabling device 0000:00:06.0 (0080 -> 0082)
> > ACPI: PCI Interrupt 0000:00:06.0[A] -> GSI 40 (level, low) -> IRQ 169
> > megasas: Waiting for FW to come to ready state
> > megasas: Failed to init firmware
> > ACPI: PCI interrupt for device 0000:00:06.0 disabled
> >
> > This Megasas card however worked fine on an HVM on a dell dq35 machine.
> > Does anyone face the same issue?
> > Bhaskar.
> > ________________________________
> > From: Han, Weidong [mailto:weidong.han@xxxxxxxxx]
> > Sent: Thursday, September 18, 2008 12:02 PM
> > To: Kumar, Venkat
> > Cc: Cui, Dexuan; xen-devel@xxxxxxxxxxxxxxxxxxx; espen.skoglund@xxxxxxxxxxxxx
> > Subject: RE: Megaraid SAS driver failing in Xen-3.3.0 but was working in
> > Xen-3.2.2-rc3
> >
> > per this log, we can see the context mapping is not created for 02:0e.0.
> >
> > I checked the code, I suspect context mapping() for PCI device is incorrect
> > (see case DEV_TYPE_PCI block code in domain_context_mapping()). Obviously
> > the PCI device is not mapped. Espen changed this code in c/s 17972. Espen,
> > can you give some explanation?
> >
> > Venkat, pls try attached patch. and pls post your "lspci -v" output.
> >
> > Randy (Weidong)
> >
> > ________________________________
> > From: Kumar, Venkat [mailto:Venkat.Kumar@xxxxxxx]
> > Sent: 2008年9月18日 12:45
> > To: Han, Weidong
> > Cc: Cui, Dexuan; xen-devel@xxxxxxxxxxxxxxxxxxx
> > Subject: RE: Megaraid SAS driver failing in Xen-3.3.0 but was working in
> > Xen-3.2.2-rc3
> >
> > Hi Randy,
> >
> > I am attaching the complete output in a file.
> >
> > But for your reference, a part of it I am pasting in the body.
> > ==================================================================================
> > (XEN) PCI add device 02:0e.0
> > (XEN) [VT-D]iommu.c:775: iommu_page_fault: iommu->reg = ffff828bfff55000
> > (XEN) [VT-D]iommu.c:744: iommu_fault_status: Fault Overflow
> > (XEN) [VT-D]iommu.c:729: iommu_fault:DMA Write: 2:e.0 addr cddf2000 REASON
> > 2 iommu->reg = ffff828bfff55000
> > (XEN) print_vtd_entries: iommu = ffff8300cde0db00 bdf = 2:e:0 gmfn = cddf2
> > (XEN) root_entry = ffff83012bfe5000
> > (XEN) root_entry[2] = 12779e001
> > (XEN) context = ffff83012779e000
> > (XEN) context[70] = 0_0
> > (XEN) ctxt_entry[70] not present
> > (XEN) PCI add device 00:1b.0
> > (XEN) PCI remove device 02:0e.0
> > ==================================================================================
> >
> > 02:0e.0 is the pci id of Megaraid SAS controller.
> > For some reason you can see that the device is removed.
> > I guess this output would give you some idea.
> >
> >
> > Thx,
> > Venkat
> > ________________________________
> > From: Han, Weidong [mailto:weidong.han@xxxxxxxxx]
> > Sent: Thursday, September 18, 2008 8:01 AM
> > To: Kumar, Venkat; xen-devel@xxxxxxxxxxxxxxxxxxx
> > Cc: Cui, Dexuan
> > Subject: RE: Megaraid SAS driver failing in Xen-3.3.0 but was working in
> > Xen-3.2.2-rc3
> >
> > Venkat,
> >
> > Can you post the serial console output?
> >
> > Randy (Weidong)
> >
> > ________________________________
> > From: Kumar, Venkat [mailto:Venkat.Kumar@xxxxxxx]
> > Sent: 2008年9月17日 20:38
> > To: xen-devel@xxxxxxxxxxxxxxxxxxx
> > Cc: Han, Weidong; Cui, Dexuan
> > Subject: Megaraid SAS driver failing in Xen-3.3.0 but was working in
> > Xen-3.2.2-rc3
> > On Xen-3.3.0, domain0 Megaraid SAS (SAS 1068 controller) driver is not
> > loading correctly if vtd support in Xen is enabled.
> > It fails at the point of initializing firmware.
> >
> > I wasn’t seeing this error with Xen-3.2.2-rc3 (Unstable version), though
> > with vtd disabled in Xen-3.3.0, it is working.
> >
> > Looks like a degrade problem.
> >
> > Any clues?
> > Thx,
> > Venkat
> >
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|