From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, xiantao.zhang@intel.com
Subject: Re: [PATCH 1/1] x86/AMD: Fix setup ssss:bb:dd:f for d0 failed
Date: Thu, 29 Aug 2013 20:25:28 -0500 [thread overview]
Message-ID: <521FF488.2030708@amd.com> (raw)
In-Reply-To: <520358F502000078000EA1AA@nat28.tlf.novell.com>
On 8/8/2013 1:38 AM, Jan Beulich wrote:
>>>> On 07.08.13 at 21:20, Suravee Suthikulanit <suravee.suthikulpanit@amd.com> wrote:
>> On 8/7/2013 10:42 AM, Jan Beulich wrote:
>>>>>> On 07.08.13 at 17:31, Suravee Suthikulanit <suravee.suthikulpanit@amd.com> wrote:
>>>> I am using the same logic here as in Intel's version in the
>>>> driver/passthrough/vtd/iommu/domain_context_map.
>>> No, not really: That code establishes a mapping for the upstream
>>> bridge of a legacy PCI device when handling that device. Your
>>> proposed code doesn't afaics. (This I understand is because
>>> bridges aren't expected to get assigned to guests, and hence
>>> otherwise the mapping for the bridge would never get established
>>> for a device behind it for other than Dom0.)
>> AFAICT from the domain_context_mapping() below, which get called when
>> the devices are assigned to domains
>>
>> static int domain_context_mapping(
>> struct domain *domain, u8 devfn, const struct pci_dev *pdev)
>> {
>> struct acpi_drhd_unit *drhd;
>> int ret = 0;
>> u8 seg = pdev->seg, bus = pdev->bus, secbus;
>>
>> drhd = acpi_find_matched_drhd_unit(pdev);
>> if ( !drhd )
>> return -ENODEV;
>>
>> ASSERT(spin_is_locked(&pcidevs_lock));
>>
>> switch ( pdev->type )
>> {
>> case DEV_TYPE_PCIe_BRIDGE:
>> case DEV_TYPE_PCIe2PCI_BRIDGE:
>> case DEV_TYPE_LEGACY_PCI_BRIDGE:
>> break;
>>
>> These bridges are actually not mapped(i.e. skipped). That is why I
>> think the logic above is supposed to be doing the same thing.
> Just look a few lines down: There the bridges will get mappings
> established when a device behind them gets mapped.
>
> But since devices can't be behind host bridges, excluding those
> _may_ still be appropriate/desirable. Still waiting for Xiantao to
> voice his opinion...
>
> Jan
Sorry for didn't get a chance to follow up with this sooner. Ok, I see
the code you mentioned.
However, if I understand this correctly, it is also mapping the bridge
to the domU
along with the end-device. This is not the same as what you mentioned
that the bridge should
be mapped to only Dom0.
Suravee
next prev parent reply other threads:[~2013-08-30 1:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-07 2:40 [PATCH 1/1] x86/AMD: Fix setup ssss:bb:dd:f for d0 failed suravee.suthikulpanit
2013-08-07 2:42 ` Suravee Suthikulanit
2013-08-07 8:33 ` Stefan Bader
2013-08-08 11:12 ` Stefan Bader
2013-08-08 11:49 ` Jan Beulich
2013-08-08 12:07 ` Stefan Bader
2013-08-08 12:29 ` Jan Beulich
2013-08-08 12:35 ` Stefan Bader
2013-08-07 7:33 ` Jan Beulich
2013-08-07 15:31 ` Suravee Suthikulanit
2013-08-07 15:42 ` Jan Beulich
2013-08-07 19:20 ` Suravee Suthikulanit
2013-08-08 6:38 ` Jan Beulich
2013-08-30 1:25 ` Suravee Suthikulpanit [this message]
2013-08-30 8:09 ` Jan Beulich
2013-08-31 0:03 ` Suravee Suthikulpanit
2013-08-07 9:34 ` Andrew Cooper
2013-08-07 9:57 ` Jan Beulich
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=521FF488.2030708@amd.com \
--to=suravee.suthikulpanit@amd.com \
--cc=JBeulich@suse.com \
--cc=xen-devel@lists.xenproject.org \
--cc=xiantao.zhang@intel.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.