All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>
To: Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org>
Cc: Chunming Zhou <David1.Zhou-5C7GfCeVMHo@public.gmane.org>,
	Alvin Huan <Alvin.Huan-5C7GfCeVMHo@public.gmane.org>,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Ken Wang <Qingqing.Wang-5C7GfCeVMHo@public.gmane.org>,
	Borislav Petkov <bp-l3A5Bk7waGM@public.gmane.org>,
	Hawking Zhang <Hawking.Zhang-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH] iommu/amd: fix the left value check of cmd buffer
Date: Wed, 4 Jan 2017 15:24:13 +0100	[thread overview]
Message-ID: <20170104142413.GC16521@suse.de> (raw)
In-Reply-To: <1481545706-1610-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>

On Mon, Dec 12, 2016 at 07:28:26AM -0500, Huang Rui wrote:
> The generic command buffer entry is 128 bits (16 bytes), so the offset
> of tail and head pointer should be 16 bytes aligned and increased with
> 0x10 per command.
> 
> When cmd buf is full, head = (tail + 0x10) % CMD_BUFFER_SIZE.
> 
> So when left space of cmd buf should be able to store only two
> command, we should be issued one COMPLETE_WAIT additionally to wait
> all older commands completed. Then the left space should be increased
> after IOMMU fetching from cmd buf.
> 
> So left check value should be left <= 0x20 (two commands).
> 
> Signed-off-by: Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org>

Applied to the fixes branch, thanks.

      parent reply	other threads:[~2017-01-04 14:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-12 12:28 [PATCH] iommu/amd: fix the left value check of cmd buffer Huang Rui
     [not found] ` <1481545706-1610-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2017-01-04 14:24   ` Joerg Roedel [this message]

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=20170104142413.GC16521@suse.de \
    --to=jroedel-l3a5bk7wagm@public.gmane.org \
    --cc=Alvin.Huan-5C7GfCeVMHo@public.gmane.org \
    --cc=David1.Zhou-5C7GfCeVMHo@public.gmane.org \
    --cc=Hawking.Zhang-5C7GfCeVMHo@public.gmane.org \
    --cc=Qingqing.Wang-5C7GfCeVMHo@public.gmane.org \
    --cc=bp-l3A5Bk7waGM@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=ray.huang-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.