From: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
To: suravee.suthikulpanit-5C7GfCeVMHo@public.gmane.org
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
Jay Cornwall <jay.cornwall-5C7GfCeVMHo@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kim.naru-5C7GfCeVMHo@public.gmane.org,
sherry.hurwitz-5C7GfCeVMHo@public.gmane.org
Subject: Re: [PATCH] iommu/amd: Fix for L2 race with VM invalidation
Date: Wed, 14 May 2014 11:29:21 +0200 [thread overview]
Message-ID: <20140514092920.GB6026@8bytes.org> (raw)
In-Reply-To: <1400049252-4213-1-git-send-email-suravee.suthikulpanit-5C7GfCeVMHo@public.gmane.org>
On Wed, May 14, 2014 at 01:34:12AM -0500, suravee.suthikulpanit-5C7GfCeVMHo@public.gmane.org wrote:
> A low probability race exists with this fix. Translations received
> within the critical section to PTEs which are concurrently being
> invalidated may resolve to stale mappings.
Sorry, no. This patch can cause silent data corruption when the pages in
these stale mappings get reused. I understand that the current way does
not work either and can cause failures in the GPU, but silent data
corruption is worse than that.
How about putting the page-fault requests on hold between
invalidate_range_start/end()? The GPU will not see the failures, just a
longer delay until the page faults are handled.
Joerg
WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <joro@8bytes.org>
To: suravee.suthikulpanit@amd.com
Cc: iommu@lists.linux-foundation.org, sherry.hurwitz@amd.com,
kim.naru@amd.com, linux-kernel@vger.kernel.org,
Jay Cornwall <jay.cornwall@amd.com>
Subject: Re: [PATCH] iommu/amd: Fix for L2 race with VM invalidation
Date: Wed, 14 May 2014 11:29:21 +0200 [thread overview]
Message-ID: <20140514092920.GB6026@8bytes.org> (raw)
In-Reply-To: <1400049252-4213-1-git-send-email-suravee.suthikulpanit@amd.com>
On Wed, May 14, 2014 at 01:34:12AM -0500, suravee.suthikulpanit@amd.com wrote:
> A low probability race exists with this fix. Translations received
> within the critical section to PTEs which are concurrently being
> invalidated may resolve to stale mappings.
Sorry, no. This patch can cause silent data corruption when the pages in
these stale mappings get reused. I understand that the current way does
not work either and can cause failures in the GPU, but silent data
corruption is worse than that.
How about putting the page-fault requests on hold between
invalidate_range_start/end()? The GPU will not see the failures, just a
longer delay until the page faults are handled.
Joerg
next prev parent reply other threads:[~2014-05-14 9:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-14 6:34 [PATCH] iommu/amd: Fix for L2 race with VM invalidation suravee.suthikulpanit-5C7GfCeVMHo
2014-05-14 6:34 ` suravee.suthikulpanit
[not found] ` <1400049252-4213-1-git-send-email-suravee.suthikulpanit-5C7GfCeVMHo@public.gmane.org>
2014-05-14 9:29 ` Joerg Roedel [this message]
2014-05-14 9:29 ` Joerg Roedel
[not found] ` <20140514092920.GB6026-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-05-14 11:38 ` Cornwall, Jay
2014-05-14 11:38 ` Cornwall, Jay
[not found] ` <99CB3FADB756624A867BE9481439561C334C9045-XjPeyzlH3nQYUXYKxDj4HkEOCMrvLtNR@public.gmane.org>
2014-05-20 13:32 ` Joerg Roedel
2014-05-20 13:32 ` Joerg Roedel
2014-05-20 13:53 ` Cornwall, Jay
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=20140514092920.GB6026@8bytes.org \
--to=joro-zlv9swrftaidnm+yrofe0a@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=jay.cornwall-5C7GfCeVMHo@public.gmane.org \
--cc=kim.naru-5C7GfCeVMHo@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sherry.hurwitz-5C7GfCeVMHo@public.gmane.org \
--cc=suravee.suthikulpanit-5C7GfCeVMHo@public.gmane.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.