All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiang Liu <jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: "Li, ZhenHua" <zhen-hual-VXdhtT5mjnY@public.gmane.org>,
	Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/1] x86/iommu: use bit structures for context_entry
Date: Fri, 10 Jan 2014 15:32:58 +0800	[thread overview]
Message-ID: <52CFA22A.9060609@linux.intel.com> (raw)
In-Reply-To: <52CFA140.5060700-VXdhtT5mjnY@public.gmane.org>

I have noticed the same issue too. But after second check, seems
it's safe with current implementation, but obviously it's not
future safe.

On 2014/1/10 15:29, Li, ZhenHua wrote:
> I have not seen such a bug yet . but obviously a '=' should be used when
> you want to set a value.
> 
> for example, if x != 0,
>     x=10
> and
>     x|=10
> will cause different result.
> 
> ZhenHua
> 
> On 01/07/2014 10:41 PM, Joerg Roedel wrote:
>> On Fri, Dec 20, 2013 at 04:45:01PM +0800, Li, Zhen-Hua wrote:
>>> There is a structure named context_entry used by intel iommu, and there
>>> are some bit operations on it. Use bit structure may make these
>>> operations
>>> easy.
>>> Also the function context_set_address_root may cause problem because
>>> it uses
>>>   |= operation, not set the new value. And this patch can fix it.
>>
>> What is the problem you are trying to fix here? Is it an actual bug?
>>
>>
>>     Joerg
>>
>>
> 
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

WARNING: multiple messages have this Message-ID (diff)
From: Jiang Liu <jiang.liu@linux.intel.com>
To: "Li, ZhenHua" <zhen-hual@hp.com>, Joerg Roedel <joro@8bytes.org>
Cc: David Woodhouse <dwmw2@infradead.org>,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] x86/iommu: use bit structures for context_entry
Date: Fri, 10 Jan 2014 15:32:58 +0800	[thread overview]
Message-ID: <52CFA22A.9060609@linux.intel.com> (raw)
In-Reply-To: <52CFA140.5060700@hp.com>

I have noticed the same issue too. But after second check, seems
it's safe with current implementation, but obviously it's not
future safe.

On 2014/1/10 15:29, Li, ZhenHua wrote:
> I have not seen such a bug yet . but obviously a '=' should be used when
> you want to set a value.
> 
> for example, if x != 0,
>     x=10
> and
>     x|=10
> will cause different result.
> 
> ZhenHua
> 
> On 01/07/2014 10:41 PM, Joerg Roedel wrote:
>> On Fri, Dec 20, 2013 at 04:45:01PM +0800, Li, Zhen-Hua wrote:
>>> There is a structure named context_entry used by intel iommu, and there
>>> are some bit operations on it. Use bit structure may make these
>>> operations
>>> easy.
>>> Also the function context_set_address_root may cause problem because
>>> it uses
>>>   |= operation, not set the new value. And this patch can fix it.
>>
>> What is the problem you are trying to fix here? Is it an actual bug?
>>
>>
>>     Joerg
>>
>>
> 
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  parent reply	other threads:[~2014-01-10  7:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20  8:45 [PATCH 1/1] x86/iommu: use bit structures for context_entry Li, Zhen-Hua
2013-12-20  8:45 ` Li, Zhen-Hua
     [not found] ` <1387529101-29769-1-git-send-email-zhen-hual-VXdhtT5mjnY@public.gmane.org>
2013-12-26  1:55   ` Kai Huang
     [not found]     ` <CAOtp4KqUgSnwadP0T=aWYX7rRzDBn3qkuqMzceDBO0c_bhpFwQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-26  5:12       ` Wu, Feng
     [not found]         ` <E959C4978C3B6342920538CF579893F001D3C26D-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-01-06  1:41           ` Li, ZhenHua
2014-01-06  1:41             ` Li, ZhenHua
2014-01-07 14:41   ` Joerg Roedel
2014-01-07 14:41     ` Joerg Roedel
     [not found]     ` <20140107144108.GF2742-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-01-10  7:29       ` Li, ZhenHua
2014-01-10  7:29         ` Li, ZhenHua
     [not found]         ` <52CFA140.5060700-VXdhtT5mjnY@public.gmane.org>
2014-01-10  7:32           ` Jiang Liu [this message]
2014-01-10  7:32             ` Jiang Liu
  -- strict thread matches above, loose matches on Subject: below --
2014-01-10  8:27 Li, Zhen-Hua
2014-01-10  8:27 ` Li, Zhen-Hua
     [not found] ` <1389342475-8540-1-git-send-email-zhen-hual-VXdhtT5mjnY@public.gmane.org>
2014-01-10  8:31   ` Li, ZhenHua
2014-01-10  8:31     ` Li, ZhenHua
2013-05-24  0:22 Li, Zhen-Hua
2013-05-24  0:22 ` Li, Zhen-Hua
     [not found] ` <1369354931-19373-1-git-send-email-zhen-hual-VXdhtT5mjnY@public.gmane.org>
2013-05-24  0:36   ` Joe Perches
2013-05-24  0:36     ` Joe Perches
2013-05-24  0:43     ` ZhenHua
2013-05-24  0:43       ` ZhenHua

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=52CFA22A.9060609@linux.intel.com \
    --to=jiang.liu-vuqaysv1563yd54fqh9/ca@public.gmane.org \
    --cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=zhen-hual-VXdhtT5mjnY@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.