From: "Jens Krehbiel-Gräther" <xen@jkg-it-services.de>
To: "Huang2, Wei" <Wei.Huang2@amd.com>
Cc: "Przywara, Andre" <Andre.Przywara@amd.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Leonardo Prosperi <leo.prosperi@gmail.com>,
Joerg Roedel <joro@8bytes.org>,
Eikelenboom <linux@eikelenboom.it>,
Andrew Oakley <andrew@ado.is-a-geek.net>,
Joop Boonen <joop_boonen@web.de>
Subject: Re: IOMMU and AMD 890fx
Date: Thu, 17 Jun 2010 00:09:31 +0200 [thread overview]
Message-ID: <4C194B9B.10500@jkg-it-services.de> (raw)
In-Reply-To: <3399D2269986104B959D31B7E919313C3D10B465@SAUSEXMBP01.amd.com>
Hi!
I now have a Asus Crosshair IV for testing and this board (as I postet
earlier) supports iommu. Now I have installed Debian lenny (5.0) and
compiled xen 4.0.0.
Xen is running now and I have installed a hvm debian lenny to which I
would like to bind a pci device but that doesn't work.
Perhaps I am doing something wrong and you could help me?
xen-01:~# xm dmesg |grep -i -e iommu -e amd-vi -e ivrs
(XEN) ACPI: IVRS CFD9FA00, 00C8 (r1 AMD RD890S 202031 AMD 0)
(XEN) AMD-Vi: IOMMU 0 Enabled.
xen-01:~#
So as xm dmesg reports IOMMU is enabled. I passed the "iommu=1"
parameter to kernel.
xen-01:~# uname -a
Linux xen-01 2.6.32-bpo.5-xen-amd64 #1 SMP Fri Jun 11 12:21:09 UTC 2010
x86_64 GNU/Linux
xen-01:/boot# grep -i iommu config-2.6.32-bpo.5-xen-amd64
CONFIG_GART_IOMMU=y
CONFIG_CALGARY_IOMMU=y
CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y
CONFIG_AMD_IOMMU=y
# CONFIG_AMD_IOMMU_STATS is not set
CONFIG_IOMMU_HELPER=y
CONFIG_IOMMU_API=y
# CONFIG_IOMMU_DEBUG is not set
# CONFIG_IOMMU_STRESS is not set
xen-01:/boot# grep -i backend config-2.6.32-bpo.5-xen-amd64
CONFIG_XEN_BACKEND=y
CONFIG_XEN_NETDEV_BACKEND=y
CONFIG_XEN_BLKDEV_BACKEND=y
CONFIG_XEN_PCIDEV_BACKEND=y
CONFIG_XEN_PCIDEV_BACKEND_VPCI=y
# CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
# CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
# CONFIG_XEN_PCIDEV_BACKEND_CONTROLLER is not set
So I think the needed kernel options are enabled.
I can hide the pci device from dom0:
lspci:
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA) (rev 40)
echo -n "0000:00:14.2" > "/sys/bus/pci/drivers/HDA Intel/unbind"
echo -n "0000:00:14.2" > /sys/bus/pci/drivers/pciback/new_slot
echo -n "0000:00:14.2" > /sys/bus/pci/drivers/pciback/bind
xen-01:~# xm pci-list-assignable-devices
0000:00:14.2
Now when I try to pass through the device to the guest I get (at first
try) this message:
xen-01:~# xm pci-attach test 0000:00:14.2 8
Error: Timed out waiting for device model action
Usage: xm pci-attach [-o|--options=<opt>] <Domain>
<domain:bus:slot.func> [virtual slot]
Insert a new pass-through pci device.
When I try it again, I will always get this message:
xen-01:~# xm pci-attach test 0000:00:14.2 8
Error: Failed to assign device to IOMMU
(0000:00:14.2@40,msitranslate=1,power_mgmt=0)
Usage: xm pci-attach [-o|--options=<opt>] <Domain>
<domain:bus:slot.func> [virtual slot]
Insert a new pass-through pci device.
In /var/log/xen/xend.log there are this messages:
[2010-06-17 00:06:18 2407] DEBUG (XendDomainInfo:903)
XendDomainInfo.pci_device_configure: ['pci', ['dev', ['slot', '0x14'],
['domain', '0x0000'], ['key', '0000:00:14.2@8'], ['bus', '0x00'],
['vdevfn', '0x40'], ['func', '0x2']], ['state', 'Initialising']]
[2010-06-17 00:06:18 2407] DEBUG (XendDomainInfo:675)
XendDomainInfo.hvm_pci_device_create: {'devs': [{'slot': '0x14',
'domain': '0x0000', 'key': '0000:00:14.2@8', 'bus': '0x00', 'vdevfn':
'0x40', 'func': '0x2', 'uuid': 'f9a78b41-aad2-8c31-73a3-2b2162c8ebb4'}],
'states': ['Initialising']}
[2010-06-17 00:06:18 2407] DEBUG (XendDomainInfo:801)
XendDomainInfo.hvm_pci_device_insert_dev: {'slot': '0x14', 'domain':
'0x0000', 'key': '0000:00:14.2@8', 'bus': '0x00', 'vdevfn': '0x40',
'func': '0x2', 'uuid': 'f9a78b41-aad2-8c31-73a3-2b2162c8ebb4'}
[2010-06-17 00:06:18 2407] DEBUG (XendDomainInfo:822)
XendDomainInfo.hvm_pci_device_insert_dev:
0000:00:14.2@40,msitranslate=1,power_mgmt=0
dmesg gives this log:
[ 2177.373375] pciback 0000:00:14.2: seizing device
[ 2177.373488] xen: registering gsi 16 triggering 0 polarity 1
[ 2177.373497] xen_allocate_pirq: returning irq 16 for gsi 16
[ 2177.373519] xen: --> irq=16
[ 2177.373528] Already setup the GSI :16
[ 2177.373551] pciback 0000:00:14.2: PCI INT A -> GSI 16 (level, low) ->
IRQ 16
[ 2177.373582] pciback 0000:00:14.2: PCI INT A disabled
and xm dmesg this:
(XEN) domctl.c:853:d0 XEN_DOMCTL_assign_device: assign device (0:14.2)
failed
So can anyone tell me what I am doing wrong??
Hope someone could help me!
Jens
next prev parent reply other threads:[~2010-06-16 22:09 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <z2n56ae3d9b1005081631sf3c31fafsb24b018c70b11b1a@mail.gmail.com>
2010-05-09 18:01 ` IOMMU and AMD 890fx Leonardo Prosperi
2010-05-10 4:43 ` Huang2, Wei
2010-05-10 6:16 ` Pasi Kärkkäinen
2010-05-10 6:38 ` Sander Eikelenboom
2010-06-03 4:07 ` Leonardo Prosperi
2010-06-03 8:19 ` Sander Eikelenboom
2010-06-03 8:53 ` Joop Boonen
2010-06-03 9:23 ` Sander Eikelenboom
2010-06-03 10:51 ` Jens Krehbiel-Gräther
2010-06-03 11:11 ` Sander Eikelenboom
2010-06-04 6:14 ` Huang2, Wei
2010-06-06 9:08 ` Jens Krehbiel-Gräther
[not found] ` <4C0FF901.6090708@amd.com>
2010-06-10 7:12 ` Jens Krehbiel-Gräther
2010-06-10 7:23 ` Sander Eikelenboom
2010-06-10 10:21 ` Jens Krehbiel-Gräther
2010-06-10 18:01 ` Jens Krehbiel-Gräther
2010-06-03 11:26 ` Joerg Roedel
2010-06-03 11:50 ` Sander Eikelenboom
2010-06-03 11:51 ` Andre Przywara
2010-06-03 13:41 ` Jens Krehbiel-Gräther
2010-06-03 15:05 ` Joerg Roedel
2010-06-10 18:49 ` Andrew Oakley
2010-06-10 19:12 ` Wei Huang
2010-06-10 19:15 ` Andrew Oakley
2010-06-14 11:08 ` Jens Krehbiel-Gräther
2010-06-14 11:30 ` Joerg Roedel
2010-06-14 13:49 ` Andre Przywara
2010-06-15 21:37 ` Joop Boonen
2010-06-15 22:40 ` Huang2, Wei
2010-06-16 22:09 ` Jens Krehbiel-Gräther [this message]
2010-06-17 13:14 ` Konrad Rzeszutek Wilk
2010-06-17 17:16 ` Wei Huang
2010-06-17 23:35 ` Jens Krehbiel-Gräther
2010-06-18 14:24 ` Sander Eikelenboom
2010-06-19 7:48 ` Jens Krehbiel-Gräther
2010-06-21 15:00 ` Jens Krehbiel-Gräther
2010-06-21 15:39 ` Joerg Roedel
2010-06-18 17:36 ` Huang2, Wei
2010-06-19 7:46 ` Jens Krehbiel-Gräther
[not found] ` <4C1A5882 <4C20E51D.1000406@jkg-it-services.de>
[not found] ` <EE335F95F28A664DB4A21289D2AA053B42F7C382@SAUSEXMBP01.amd.com>
2010-06-23 12:45 ` Jens Krehbiel-Gräther
2010-06-17 8:20 ` Jens Krehbiel-Gräther
2010-06-26 20:49 ` Joop Boonen
2010-07-06 14:54 ` Andrew Oakley
2010-07-06 15:03 ` Sander Eikelenboom
2010-07-07 7:47 ` Sander Eikelenboom
2010-07-07 10:37 ` Jens Krehbiel-Gräther
2010-07-07 13:53 ` Sander Eikelenboom
2010-07-07 18:28 ` Sander Eikelenboom
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=4C194B9B.10500@jkg-it-services.de \
--to=xen@jkg-it-services.de \
--cc=Andre.Przywara@amd.com \
--cc=Wei.Huang2@amd.com \
--cc=andrew@ado.is-a-geek.net \
--cc=joop_boonen@web.de \
--cc=joro@8bytes.org \
--cc=leo.prosperi@gmail.com \
--cc=linux@eikelenboom.it \
--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.