Re: [Xen-devel] [PATCH v11 5/6] VT-d: introduce update_irte to update irte safely

2017-04-05 Thread Jan Beulich
>>> On 04.04.17 at 21:12, wrote: > On Fri, Mar 31, 2017 at 04:01:31AM -0600, Jan Beulich wrote: > On 29.03.17 at 07:11, wrote: >>> +static void update_irte(struct iremap_entry *entry, >>> +const struct iremap_entry *new_ire, >>> +bool atomic) >>

Re: [Xen-devel] [PATCH v11 5/6] VT-d: introduce update_irte to update irte safely

2017-04-04 Thread Chao Gao
On Fri, Mar 31, 2017 at 04:01:31AM -0600, Jan Beulich wrote: On 29.03.17 at 07:11, wrote: >> +static void update_irte(struct iremap_entry *entry, >> +const struct iremap_entry *new_ire, >> +bool atomic) >> +{ >> +if ( cpu_has_cx16 ) >> +

Re: [Xen-devel] [PATCH v11 5/6] VT-d: introduce update_irte to update irte safely

2017-03-31 Thread Jan Beulich
>>> On 29.03.17 at 07:11, wrote: > We used structure assignment to update irte which was non-atomic when the > whole IRTE was to be updated. It is unsafe when a interrupt happened during > update. Furthermore, no bug or warning would be reported when this happened. > > This patch introduces two v

Re: [Xen-devel] [PATCH v11 5/6] VT-d: introduce update_irte to update irte safely

2017-03-30 Thread Tian, Kevin
> From: Gao, Chao > Sent: Wednesday, March 29, 2017 1:12 PM > > We used structure assignment to update irte which was non-atomic when > the > whole IRTE was to be updated. It is unsafe when a interrupt happened > during > update. Furthermore, no bug or warning would be reported when this > happene

[Xen-devel] [PATCH v11 5/6] VT-d: introduce update_irte to update irte safely

2017-03-29 Thread Chao Gao
We used structure assignment to update irte which was non-atomic when the whole IRTE was to be updated. It is unsafe when a interrupt happened during update. Furthermore, no bug or warning would be reported when this happened. This patch introduces two variants, atomic and non-atomic, to update ir