All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: Vasant Hegde <vasant.hegde@amd.com>
Cc: iommu@lists.linux.dev, suravee.suthikulpanit@amd.com,
	Tom Lendacky <thomas.lendacky@amd.com>
Subject: Re: [PATCH] iommu/amd: Do not clear event/ppr log buffer when snp is enabled
Date: Fri, 13 Jan 2023 16:53:11 +0100	[thread overview]
Message-ID: <Y8F+Z6EIwkEsAk6P@8bytes.org> (raw)
In-Reply-To: <20230105091804.42506-1-vasant.hegde@amd.com>

On Thu, Jan 05, 2023 at 09:18:04AM +0000, Vasant Hegde wrote:
> -	memset(__evt, 0, 4 * sizeof(u32));
> +	if (!amd_iommu_snp_en) {
> +		/*
> +		 * To detect the hardware errata 732 we need to clear the
> +		 * entry back to zero.
> +		 */
> +		memset(__evt, 0, 4 * sizeof(u32));
> +	}

This needs a comment that the buffers are not writeable with SNP
enabled.

>  }
>  
>  static void iommu_poll_events(struct amd_iommu *iommu)
> @@ -736,10 +742,11 @@ static void iommu_poll_ppr_log(struct amd_iommu *iommu)
>  		entry[1] = raw[1];
>  
>  		/*
> -		 * To detect the hardware bug we need to clear the entry
> -		 * back to zero.
> +		 * To detect the hardware errata 733 we need to clear the
> +		 * entry back to zero.
>  		 */
> -		raw[0] = raw[1] = 0UL;
> +		if (!amd_iommu_snp_en)
> +			raw[0] = raw[1] = 0UL;

Same here.

>  
>  		/* Update head pointer of hardware ring-buffer */
>  		head = (head + PPR_ENTRY_SIZE) % PPR_LOG_SIZE;
> -- 
> 2.31.1
> 

  reply	other threads:[~2023-01-13 15:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-05  9:18 [PATCH] iommu/amd: Do not clear event/ppr log buffer when snp is enabled Vasant Hegde
2023-01-13 15:53 ` Joerg Roedel [this message]
2023-01-17  4:22   ` Vasant Hegde

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=Y8F+Z6EIwkEsAk6P@8bytes.org \
    --to=joro@8bytes.org \
    --cc=iommu@lists.linux.dev \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=thomas.lendacky@amd.com \
    --cc=vasant.hegde@amd.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.