iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: iommu@lists.linux-foundation.org
Subject: Re: [PATCH,RFC] iommu/amd: Recover from event log overflow
Date: Tue, 28 Sep 2021 10:45:30 +0200	[thread overview]
Message-ID: <YVLWKtc3ZaL5fvq9@8bytes.org> (raw)
In-Reply-To: <YSEaIloMR1VAMXLo@wantstofly.org>

Hi Lennert,

On Sat, Aug 21, 2021 at 06:22:10PM +0300, Lennert Buytenhek wrote:
> +/*
> + * This function restarts event logging in case the IOMMU experienced
> + * an event log buffer overflow.
> + */
> +void amd_iommu_restart_event_logging(struct amd_iommu *iommu)
> +{
> +	iommu_feature_disable(iommu, CONTROL_EVT_LOG_EN);
> +	iommu_feature_enable(iommu, CONTROL_EVT_LOG_EN);
> +}

A few more things need to happen here. First of all head and tail are
likely equal when the event buffer overflows, so the events will not be
polled and reported.

And next it is also a good idea to reset the head and tail pointers of
the event log to 0 after the events have been polled.

Regards,

	Joerg
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2021-09-28  8:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-21 15:22 [PATCH,RFC] iommu/amd: Recover from event log overflow Lennert Buytenhek
2021-09-28  8:45 ` Joerg Roedel [this message]
2021-09-30 13:45   ` Lennert Buytenhek

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=YVLWKtc3ZaL5fvq9@8bytes.org \
    --to=joro@8bytes.org \
    --cc=buytenh@wantstofly.org \
    --cc=iommu@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).