From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Juergen Gross <jgross@suse.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] [PATCH 2/2] AMD/IOMMU: Render IO_PAGE_FAULT errors in a more useful manner
Date: Wed, 27 Nov 2019 17:03:56 +0000 [thread overview]
Message-ID: <dddca1ca-db53-e879-0b1f-7594d5cb294f@citrix.com> (raw)
In-Reply-To: <30056ba9-bbe0-39f5-ecf5-1174ebedc664@suse.com>
On 27/11/2019 17:02, Jan Beulich wrote:
> On 26.11.2019 16:01, Andrew Cooper wrote:
>> @@ -560,18 +557,26 @@ static void parse_event_log_entry(struct amd_iommu *iommu, u32 entry[])
>>
>> if ( code == IOMMU_EVENT_IO_PAGE_FAULT )
>> {
>> - device_id = iommu_get_devid_from_event(entry[0]);
>> - domain_id = get_field_from_reg_u32(entry[1],
>> - IOMMU_EVENT_DOMAIN_ID_MASK,
>> - IOMMU_EVENT_DOMAIN_ID_SHIFT);
>> - flags = get_field_from_reg_u32(entry[1],
>> - IOMMU_EVENT_FLAGS_MASK,
>> - IOMMU_EVENT_FLAGS_SHIFT);
>> - addr= (u64*) (entry + 2);
>> - printk(XENLOG_ERR "AMD-Vi: "
>> - "%s: domain = %d, device id = %#x, "
>> - "fault address = %#"PRIx64", flags = %#x\n",
>> - code_str, domain_id, device_id, *addr, flags);
>> + unsigned int bdf;
>> + uint16_t device_id = MASK_EXTR(entry[0], IOMMU_CMD_DEVICE_ID_MASK);
> s/CMD/EVENT/ and then
> Acked-by: Jan Beulich <jbeulich@suse.com>
Oops yes. That was a consequence of following
#define iommu_get_devid_from_event iommu_get_devid_from_cmd
to get the mask to use.
These really need turning into structs, but that is a job for a
different day.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-11-27 17:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-26 15:01 [Xen-devel] [PATCH for-4.13 0/2] Fixes to AMD IOMMU logging Andrew Cooper
2019-11-26 15:01 ` [Xen-devel] [PATCH 1/2] AMD/IOMMU: Always print IOMMU errors Andrew Cooper
2019-11-27 9:19 ` Roger Pau Monné
2019-11-27 16:58 ` Jan Beulich
2019-11-26 15:01 ` [Xen-devel] [PATCH 2/2] AMD/IOMMU: Render IO_PAGE_FAULT errors in a more useful manner Andrew Cooper
2019-11-27 9:40 ` Roger Pau Monné
2019-11-27 17:38 ` Andrew Cooper
2019-11-27 17:02 ` Jan Beulich
2019-11-27 17:03 ` Andrew Cooper [this message]
2019-11-26 15:36 ` [Xen-devel] [PATCH for-4.13 0/2] Fixes to AMD IOMMU logging Jürgen Groß
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=dddca1ca-db53-e879-0b1f-7594d5cb294f@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=xen-devel@lists.xenproject.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 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.