Re: [Xen-devel] [BUG] win2008 guest cannot get ip through sriov

2016-06-02 Thread Xu, Quan
On May 27, 2016 10:06 PM, Jan Beulich wrote: > >>> On 27.05.16 at 15:34, wrote: > > On Fri, May 27, 2016 at 06:16:30AM -0600, Jan Beulich wrote: > >> >>> On 27.05.16 at 12:39, wrote: > >> > Is this a regression? Does it work on

Re: [Xen-devel] [Patch v6 04/11] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU mapping (top level ones)

2016-06-02 Thread Xu, Quan
On June 01, 2016 6:24 PM, Jan Beulich wrote: > >>> On 31.05.16 at 15:57, wrote: > > --- a/xen/drivers/passthrough/amd/pci_amd_iommu.c > > +++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c > > @@ -295,12 +297,22 @@ static void __hwdom_init >

Re: [Xen-devel] [Patch v6 02/11] IOMMU/MMU: enhance the call trees of IOMMU unmapping and mapping

2016-06-02 Thread Xu, Quan
On June 01, 2016 6:05 PM, Jan Beulich wrote: > >>> On 31.05.16 at 15:57, wrote: > > --- a/xen/arch/x86/mm/p2m-pt.c > > +++ b/xen/arch/x86/mm/p2m-pt.c > > @@ -673,6 +673,8 @@ p2m_pt_set_entry(struct p2m_domain *p2m, > unsigned long gfn, mfn_t mfn, > > if

Re: [Xen-devel] [Patch v6 07/11] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU suspending (top level ones)

2016-06-01 Thread Xu, Quan
On June 01, 2016 6:39 PM, Jan Beulich wrote: > >>> On 31.05.16 at 15:57, wrote: > > static int device_power_down(void) > > { > > -console_suspend(); > > +if ( console_suspend() ) > > +return SAVED_NONE; > > > > -time_suspend(); > > +

Re: [Xen-devel] [Patch v6 09/11] vt-d: fix the IOMMU flush issue

2016-06-01 Thread Xu, Quan
On June 01, 2016 11:37 PM, Jan Beulich wrote: > >>> On 31.05.16 at 15:57, wrote: > > @@ -1542,14 +1600,36 @@ int domain_context_unmap_one( > > return -EINVAL; > > } > > > > -if ( iommu_flush_context_device(iommu, iommu_domid, > > -

[Xen-devel] [Patch v11 2/3] vt-d: synchronize for Device-TLB flush one by one

2016-06-01 Thread Xu, Quan
From: Quan Xu <quan...@intel.com> Today we do Device-TLB flush synchronization after issuing flush requests for all ATS devices belonging to a VM. Doing so however imposes a limitation, i.e. that we can not figure out which flush request is blocked in the flush queue list, based on VT-

[Xen-devel] [Patch v11 1/3] IOMMU: add a timeout parameter for device IOTLB invalidation

2016-06-01 Thread Xu, Quan
From: Quan Xu <quan...@intel.com> The parameter 'iommu_dev_iotlb_timeout' specifies the timeout of the device IOTLB invalidation in milliseconds. By default, the timeout is 1ms, which can be boot-time changed. Add a __must_check annotation. The followup patch titled 'VT-d IOTLB/Context/IEC

[Xen-devel] [Patch v11 3/3] vt-d: fix vt-d Device-TLB flush timeout issue

2016-06-01 Thread Xu, Quan
From: Quan Xu <quan...@intel.com> If Device-TLB flush timed out, we hide the target ATS device immediately and crash the domain owning this ATS device. If impacted domain is hardware domain, just throw out a warning. By hiding the device, we make sure it can't be assigned to any doma

[Xen-devel] [Patch v11 0/3] VT-d Device-TLB flush issue

2016-06-01 Thread Xu, Quan
From: Quan Xu <quan...@intel.com> This patches fix current timeout concern and also allow limited ATS support: 1. add a timeout parameter for device IOTLB invalidation The parameter 'iommu_dev_iotlb_timeout' specifies the timeout of the device IOTLB invalidation in milliseconds. By d

[Xen-devel] [Patch v6 03/11] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU unmapping (top level ones)

2016-05-31 Thread Xu, Quan
From: Quan Xu <quan...@intel.com> Signed-off-by: Quan Xu <quan...@intel.com> Acked-by: Kevin Tian <kevin.t...@intel.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> CC: Stefano Stabellini <sstabell...@kernel.org> CC: Julien Grall <julien.gr...@arm.com> CC:

[Xen-devel] [Patch v6 01/11] IOMMU: handle IOMMU mapping and unmapping failures

2016-05-31 Thread Xu, Quan
From: Quan Xu <quan...@intel.com> Treat IOMMU mapping and unmapping failures as a fatal to the DomU If IOMMU mapping and unmapping failed, crash the DomU and propagate the error up to the call trees. No spamming of the log can occur. For DomU, we avoid logging any message for already

[Xen-devel] [Patch v6 04/11] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU mapping (top level ones)

2016-05-31 Thread Xu, Quan
From: Quan Xu <quan...@intel.com> Signed-off-by: Quan Xu <quan...@intel.com> Acked-by: Kevin Tian <kevin.t...@intel.com> CC: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com> CC: Stefano Stabellini <sstabell...@kernel.org> CC: Julien Grall <julien.gr...

[Xen-devel] [Patch v6 02/11] IOMMU/MMU: enhance the call trees of IOMMU unmapping and mapping

2016-05-31 Thread Xu, Quan
From: Quan Xu <quan...@intel.com> When IOMMU mapping is failed, we issue a best effort rollback, stopping IOMMU mapping, unmapping the previous IOMMU maps and then reporting the error up to the call trees. When rollback is not feasible (in early initialization phase or trade-off of comp

[Xen-devel] [Patch v6 08/11] IOMMU: propagate IOMMU Device-TLB flush error (leaf ones).

2016-05-31 Thread Xu, Quan
From: Quan Xu <quan...@intel.com> Signed-off-by: Quan Xu <quan...@intel.com> Acked-by: Kevin Tian <kevin.t...@intel.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> CC: Stefano Stabellini <sstabell...@kernel.org> CC: Julien Grall <julien.gr...@arm.com> CC

[Xen-devel] [Patch v6 11/11] vt-d: add __must_check annotation to IOMMU flush pointers and handlers

2016-05-31 Thread Xu, Quan
From: Quan Xu <quan...@intel.com> Signed-off-by: Quan Xu <quan...@intel.com> CC: Jan Beulich <jbeul...@suse.com> CC: Kevin Tian <kevin.t...@intel.com> CC: Feng Wu <feng...@intel.com> --- xen/drivers/passthrough/vtd/iommu.c | 40 ++-

[Xen-devel] [Patch v6 00/11] Check VT-d Device-TLB flush error

2016-05-31 Thread Xu, Quan
From: Quan Xu <quan...@intel.com> This patch set is a prereq patch set for Patch:'VT-d Device-TLB flush issue'. While IOMMU Device-TLB flush timed out, xen calls panic() at present. However the existing panic() is going to be eliminated, so we must propagate the IOMMU Device-TLB flush er

[Xen-devel] [Patch v6 07/11] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU suspending (top level ones)

2016-05-31 Thread Xu, Quan
From: Quan Xu <quan...@intel.com> Signed-off-by: Quan Xu <quan...@intel.com> CC: Jan Beulich <jbeul...@suse.com> CC: Liu Jinsong <jinsong@alibaba-inc.com> CC: Keir Fraser <k...@xen.org> CC: Andrew Cooper <andrew.coop...@citrix.com> CC: Suravee Suthikulpani

[Xen-devel] [Patch v6 05/11] IOMMU/MMU: propagate IOMMU Device-TLB flush error up to iommu_iotlb_flush{, _all} (top level ones)

2016-05-31 Thread Xu, Quan
From: Quan Xu <quan...@intel.com> Signed-off-by: Quan Xu <quan...@intel.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> CC: Stefano Stabellini <sstabell...@kernel.org> CC: Julien Grall <julien.gr...@arm.com> CC: Jan Beulich <jbeul...@suse.com> CC: Kevin Tia

[Xen-devel] [Patch v6 06/11] propagate IOMMU Device-TLB flush error up to EPT update (top level ones)

2016-05-31 Thread Xu, Quan
From: Quan Xu <quan...@intel.com> Propagate the IOMMU Device-TLB flush error up to the ept_set_entry(), when VT-d shares EPT page table. Signed-off-by: Quan Xu <quan...@intel.com> Acked-by: Kevin Tian <kevin.t...@intel.com> Reviewed-by: Jan Beulich <jbeul...@suse.c

[Xen-devel] [Patch v6 10/11] vt-d: propagate the IOMMU Device-TLB flush error up to ME phantom functions

2016-05-31 Thread Xu, Quan
From: Quan Xu <quan...@intel.com> Signed-off-by: Quan Xu <quan...@intel.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> CC: Jan Beulich <jbeul...@suse.com> CC: Kevin Tian <kevin.t...@intel.com> CC: Feng Wu <feng...@intel.com> v6: Don't needlessly spli

[Xen-devel] [Patch v6 09/11] vt-d: fix the IOMMU flush issue

2016-05-31 Thread Xu, Quan
From: Quan Xu <quan...@intel.com> The propagation value from IOMMU flush interfaces may be positive, which indicates callers need to flush cache, not one of faliures. when the propagation value is positive, this patch fixes this flush issue as follows: - call iommu_flush_write_

Re: [Xen-devel] [PATCH v5 01/10] vt-d: fix the IOMMU flush issue

2016-05-26 Thread Xu, Quan
On Thursday, May 26, 2016 11:57 PM, Jan Beulich <jbeul...@suse.com> wrote: > >>> "Xu, Quan" <quan...@intel.com> 05/26/16 12:38 PM >>> > >On May 25, 2016 4:30 PM, Jan Beulich <jbeul...@suse.com> wrote: > >> The patch getting too la

Re: [Xen-devel] [PATCH v5 01/10] vt-d: fix the IOMMU flush issue

2016-05-26 Thread Xu, Quan
On May 26, 2016 6:38 PM, Xu, Quan <quan...@intel.com> wrote: > On May 25, 2016 4:30 PM, Jan Beulich <jbeul...@suse.com> wrote: > > The patch getting too large is easy to deal with: Split it at a > > reasonable boundary. > > Jan, > If I follow the below r

Re: [Xen-devel] Question about the usage of spinlock

2016-05-26 Thread Xu, Quan
On May 26, 2016 9:31 AM, 조현권 wrote: > I am studying xen 4.6.0 version now and wonder the usage of spinlock which is > located in free_heap_pages(xen/common/page_alloc. c) > As its memory setup is ahead of multicore initialization, spinlock seems to > be unnecessary during

Re: [Xen-devel] [PATCH v5 01/10] vt-d: fix the IOMMU flush issue

2016-05-26 Thread Xu, Quan
On May 25, 2016 4:30 PM, Jan Beulich wrote: > The patch getting too large is easy to deal with: Split it at a reasonable > boundary. Jan, If I follow the below rule, I need to merge most of patches into this one. I can't find a reasonable boundary. I recall your suggestion:

Re: [Xen-devel] [PATCH v5 01/10] vt-d: fix the IOMMU flush issue

2016-05-26 Thread Xu, Quan
On May 23, 2016 9:31 PM, Jan Beulich wrote: > >>> On 18.05.16 at 10:08, wrote: > > --- a/xen/drivers/passthrough/vtd/iommu.c > > +++ b/xen/drivers/passthrough/vtd/iommu.c > > @@ -1391,13 +1399,26 @@ int domain_context_mapping_one( > >

Re: [Xen-devel] [PATCH v5 03/10] IOMMU/MMU: enhance the call trees of IOMMU unmapping and mapping

2016-05-25 Thread Xu, Quan
On May 26, 2016 12:02 AM, Jan Beulich wrote: > >>> On 25.05.16 at 17:34, wrote: > > On May 23, 2016 10:19 PM, Jan Beulich wrote: > >> >>> On 18.05.16 at 10:08, wrote: > >> > +

Re: [Xen-devel] [PATCH v5 03/10] IOMMU/MMU: enhance the call trees of IOMMU unmapping and mapping

2016-05-25 Thread Xu, Quan
On May 23, 2016 10:19 PM, Jan Beulich wrote: > >>> On 18.05.16 at 10:08, wrote: > > > --- a/xen/arch/x86/mm.c > > +++ b/xen/arch/x86/mm.c > > @@ -2463,11 +2463,12 @@ static int __put_page_type(struct page_info > > *page, } > > > > > > -static int

Re: [Xen-devel] [PATCH v5 09/10] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU suspending

2016-05-25 Thread Xu, Quan
On May 25, 2016 4:07 PM, Jan Beulich wrote: > >>> On 25.05.16 at 08:41, wrote: > > On May 24, 2016 4:22 PM, Jan Beulich wrote: > >> >>> On 18.05.16 at 10:08, wrote: > >> > static int device_power_down(void) { > >> >

Re: [Xen-devel] [PATCH v5 01/10] vt-d: fix the IOMMU flush issue

2016-05-25 Thread Xu, Quan
On May 25, 2016 4:30 PM, Jan Beulich wrote: > >>> On 25.05.16 at 10:04, wrote: > > On May 23, 2016 11:43 PM, Jan Beulich wrote: > >> >>> On 23.05.16 at 17:22, wrote: > >> > On May 23, 2016 9:31 PM, Jan Beulich

Re: [Xen-devel] [PATCH v5 01/10] vt-d: fix the IOMMU flush issue

2016-05-25 Thread Xu, Quan
On May 23, 2016 11:43 PM, Jan Beulich wrote: > >>> On 23.05.16 at 17:22, wrote: > > On May 23, 2016 9:31 PM, Jan Beulich wrote: > >> >>> On 18.05.16 at 10:08, wrote: > >> > --- a/xen/drivers/passthrough/vtd/iommu.c >

Re: [Xen-devel] [PATCH v5 09/10] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU suspending

2016-05-25 Thread Xu, Quan
On May 24, 2016 4:22 PM, Jan Beulich wrote: > >>> On 18.05.16 at 10:08, wrote: > > --- a/xen/arch/x86/acpi/power.c > > +++ b/xen/arch/x86/acpi/power.c > > @@ -43,36 +43,68 @@ struct acpi_sleep_info acpi_sinfo; > > > > void do_suspend_lowlevel(void); > > > >

Re: [Xen-devel] [PATCH v5 05/10] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU mapping.

2016-05-24 Thread Xu, Quan
On May 24, 2016 5:09 PM, Jan Beulich wrote: > >>> On 24.05.16 at 11:01, wrote: > > On May 23, 2016 11:53 PM, Jan Beulich wrote: > >> >>> On 18.05.16 at 10:08, wrote: > >> > Propagate the IOMMU Device-TLB flush error up

Re: [Xen-devel] [PATCH v5 02/10] IOMMU: handle IOMMU mapping and unmapping failures

2016-05-24 Thread Xu, Quan
On May 23, 2016 9:41 PM, Jan Beulich wrote: > >>> On 18.05.16 at 10:08, wrote: > > No spamming can occur. > > May I suggest "No spamming of the log can occur", to set some context for > what follows? > Make sense. > > ---

Re: [Xen-devel] [PATCH v5 05/10] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU mapping.

2016-05-24 Thread Xu, Quan
On May 23, 2016 11:53 PM, Jan Beulich wrote: > >>> On 18.05.16 at 10:08, wrote: > > Propagate the IOMMU Device-TLB flush error up to IOMMU mapping. > > Btw - there's little reason to repeat the title here. > I'll drop it. Can I apply it to other

Re: [Xen-devel] [PATCH v5 06/10] IOMMU/MMU: propagate IOMMU Device-TLB flush error up to iommu_iotlb_flush{, _all} (top level ones).

2016-05-24 Thread Xu, Quan
On May 24, 2016 4:34 PM, Jan Beulich wrote: > but indeed if you > drop the annotations from non-IOMMU functions (unless, as said, you mean > to also add them further up the call trees), then I think things should be > coming close. > I'll drop the annotations from non-IOMMU

Re: [Xen-devel] [PATCH v5 06/10] IOMMU/MMU: propagate IOMMU Device-TLB flush error up to iommu_iotlb_flush{, _all} (top level ones).

2016-05-24 Thread Xu, Quan
On May 24, 2016 3:09 PM, Tian, Kevin wrote: > > From: Jan Beulich [mailto:jbeul...@suse.com] > > Sent: Tuesday, May 24, 2016 3:02 PM > > > > >>> On 24.05.16 at 03:16, wrote: > > > On May 24, 2016 12:06 AM, Jan Beulich wrote: > > >> >>>

Re: [Xen-devel] [PATCH v5 07/10] IOMMU: propagate IOMMU Device-TLB flush error up to iommu_iotlb_flush{, _all} (leaf ones).

2016-05-23 Thread Xu, Quan
On May 18, 2016 4:08 PM, Quan Xu <quan...@intel.com> wrote: > Propagate the IOMMU Device-TLB flush error up to the > iommu_iotlb_flush{,_all}. > > This patch fixes the leaf ones. > --- a/xen/drivers/passthrough/vtd/iommu.c > +++ b/xen/drivers/passthrough/vt

Re: [Xen-devel] [PATCH v5 06/10] IOMMU/MMU: propagate IOMMU Device-TLB flush error up to iommu_iotlb_flush{, _all} (top level ones).

2016-05-23 Thread Xu, Quan
On May 24, 2016 12:06 AM, Jan Beulich wrote: > >>> On 18.05.16 at 10:08, wrote: > > --- a/xen/common/memory.c > > +++ b/xen/common/memory.c > > @@ -633,9 +633,9 @@ static long > memory_exchange(XEN_GUEST_HANDLE_PARAM(xen_memory_exchange_t) > arg) > >

Re: [Xen-devel] [PATCH v5 01/10] vt-d: fix the IOMMU flush issue

2016-05-23 Thread Xu, Quan
On May 23, 2016 9:31 PM, Jan Beulich wrote: > >>> On 18.05.16 at 10:08, wrote: > > --- a/xen/drivers/passthrough/vtd/iommu.c > > +++ b/xen/drivers/passthrough/vtd/iommu.c > > @@ -557,14 +557,16 @@ static void iommu_flush_all(void) > > } > > } > > > >

Re: [Xen-devel] [PATCH v10 3/3] vt-d: fix vt-d Device-TLB flush timeout issue

2016-05-23 Thread Xu, Quan
On May 20, 2016 5:59 PM, Jan Beulich wrote: > >>> On 20.05.16 at 09:15, wrote: > > On May 17, 2016 10:00 PM, Jan Beulich wrote: > >> >>> On 22.04.16 at 12:54, wrote: > >> > --- a/xen/drivers/passthrough/vtd/qinval.c >

Re: [Xen-devel] [PATCH v10 3/3] vt-d: fix vt-d Device-TLB flush timeout issue

2016-05-20 Thread Xu, Quan
On May 17, 2016 10:00 PM, Jan Beulich wrote: > >>> On 22.04.16 at 12:54, wrote: > > --- a/xen/drivers/passthrough/vtd/qinval.c > > +++ b/xen/drivers/passthrough/vtd/qinval.c > > @@ -206,10 +206,71 @@ static int invalidate_sync(struct iommu *iommu) > >

Re: [Xen-devel] [PATCH v10 1/3] vt-d: add a timeout parameter for Queued Invalidation

2016-05-19 Thread Xu, Quan
On May 19, 2016 7:36 PM, Jan Beulich <jbeul...@suse.com> wrote: > >>> On 19.05.16 at 13:26, <quan...@intel.com> wrote: > > On May 19, 2016 2:13 PM, Jan Beulich <jbeul...@suse.com> wrote: > >> >>> "Xu, Quan" <quan...@intel.c

Re: [Xen-devel] [PATCH v2] x86/HVM: fix forwarding of internally cached requests

2016-05-19 Thread Xu, Quan
On May 19, 2016 5:15 PM, Jan Beulich wrote: > >>> On 19.05.16 at 10:30, wrote: > > On April 28, 2016 11:13 PM, Jan Beulich wrote: > >> >>> On 25.04.16 at 10:40, wrote: > >> > With other patches also in place, still

Re: [Xen-devel] [PATCH v10 1/3] vt-d: add a timeout parameter for Queued Invalidation

2016-05-19 Thread Xu, Quan
On May 19, 2016 2:13 PM, Jan Beulich <jbeul...@suse.com> wrote: > >>> "Xu, Quan" <quan...@intel.com> 05/19/16 3:35 AM >>> > >On May 19, 2016 8:33 AM, Tian, Kevin <kevin.t...@intel.com> wrote: > >> A single default value for both I

Re: [Xen-devel] [PATCH v2] x86/HVM: fix forwarding of internally cached requests

2016-05-19 Thread Xu, Quan
On April 28, 2016 11:13 PM, Jan Beulich wrote: > >>> On 25.04.16 at 10:40, wrote: > > With other patches also in place, still not work. > > Jianzhong has been left and Quan will take over the task. > > May I ask for another try, with current tip of

Re: [Xen-devel] [PATCH v10 1/3] vt-d: add a timeout parameter for Queued Invalidation

2016-05-18 Thread Xu, Quan
7, 2016 3:48 PM, Jan Beulich <jbeul...@suse.com> wrote: > > >> >>> On 17.05.16 at 05:19, <kevin.t...@intel.com> wrote: > > >> >> From: Xu, Quan > > >> >> Sent: Monday, May 16, 2016 11:26 PM > > >> >&g

Re: [Xen-devel] [PATCH v10 3/3] vt-d: fix vt-d Device-TLB flush timeout issue

2016-05-18 Thread Xu, Quan
On May 17, 2016 10:00 PM, Jan Beulich wrote: > >>> On 22.04.16 at 12:54, wrote: > > --- a/xen/drivers/passthrough/vtd/qinval.c > > +++ b/xen/drivers/passthrough/vtd/qinval.c > > @@ -206,10 +206,71 @@ static int invalidate_sync(struct iommu *iommu) > >

Re: [Xen-devel] [PATCH v10 1/3] vt-d: add a timeout parameter for Queued Invalidation

2016-05-18 Thread Xu, Quan
On May 17, 2016 3:48 PM, Jan Beulich <jbeul...@suse.com> wrote: > >>> On 17.05.16 at 05:19, <kevin.t...@intel.com> wrote: > >> From: Xu, Quan > >> Sent: Monday, May 16, 2016 11:26 PM > >> > >> On May 13, 2016 11:28 PM, Jan Beulich <j

Re: [Xen-devel] [PATCH v5 00/10] Check VT-d Device-TLB flush error

2016-05-18 Thread Xu, Quan
On May 18, 2016 6:21 PM, Jan Beulich wrote: > >>> On 18.05.16 at 10:08, wrote: > > --Changes in v5: > > > > patch 1: > > * add the missing blank line. > > * add comments. > > * if iommu_flush_context_device failed, continue to flush IOMMU IOTLB on > a

Re: [Xen-devel] [PATCH v10 2/3] vt-d: synchronize for Device-TLB flush one by one

2016-05-18 Thread Xu, Quan
On May 18, 2016 5:29 PM, Jan Beulich wrote: > >>> On 18.05.16 at 10:53, wrote: > > On May 17, 2016 8:37 PM, Jan Beulich wrote: > >> >>> On 22.04.16 at 12:54, wrote: > >> > -static void queue_invalidate_iotlb(struct

Re: [Xen-devel] [PATCH v10 2/3] vt-d: synchronize for Device-TLB flush one by one

2016-05-18 Thread Xu, Quan
On May 17, 2016 8:37 PM, Jan Beulich wrote: > >>> On 22.04.16 at 12:54, wrote: > > --- a/xen/drivers/passthrough/vtd/qinval.c > > +++ b/xen/drivers/passthrough/vtd/qinval.c > > @@ -33,6 +33,8 @@ integer_param("vtd_qi_timeout", vtd_qi_timeout); > > > >

Re: [Xen-devel] [PATCH v10 1/3] vt-d: add a timeout parameter for Queued Invalidation

2016-05-16 Thread Xu, Quan
On May 13, 2016 11:28 PM, Jan Beulich wrote: > >>> On 22.04.16 at 12:54, wrote: > > --- a/docs/misc/xen-command-line.markdown > > +++ b/docs/misc/xen-command-line.markdown > > @@ -1532,6 +1532,16 @@ Note that if **watchdog** option is also > specified vpmu

Re: [Xen-devel] [PATCH v4 02/10] IOMMU: handle IOMMU mapping and unmapping failures

2016-05-13 Thread Xu, Quan
On May 13, 2016 5:09 PM, Jan Beulich wrote: > >>> On 13.05.16 at 10:04, wrote: > > On May 12, 2016 11:06 PM, Jan Beulich wrote: > >> >>> On 12.05.16 at 16:28, wrote: > >> > On May 10, 2016 2:54 PM, Jan Beulich

Re: [Xen-devel] [PATCH v4 02/10] IOMMU: handle IOMMU mapping and unmapping failures

2016-05-13 Thread Xu, Quan
On May 12, 2016 11:06 PM, Jan Beulich wrote: > >>> On 12.05.16 at 16:28, wrote: > > On May 10, 2016 2:54 PM, Jan Beulich wrote: > >> >>> On 10.05.16 at 05:41, wrote: > >> > On May 10, 2016 12:14 AM, Jan Beulich

Re: [Xen-devel] [PATCH v4 09/10] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU suspending

2016-05-13 Thread Xu, Quan
On May 13, 2016 2:17 PM, Jan Beulich wrote: > >>> On 13.05.16 at 05:39, wrote: > > On May 10, 2016 5:25 PM, Jan Beulich wrote: > >> >>> On 06.05.16 at 10:54, wrote: > >> > --- a/xen/arch/x86/acpi/power.c > >> > +++

Re: [Xen-devel] [PATCH v4 09/10] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU suspending

2016-05-12 Thread Xu, Quan
On May 10, 2016 5:25 PM, Jan Beulich wrote: > >>> On 06.05.16 at 10:54, wrote: > > --- a/xen/arch/x86/acpi/power.c > > +++ b/xen/arch/x86/acpi/power.c > > static int device_power_down(void) > > { > > -console_suspend(); > > +if ( console_suspend()

Re: [Xen-devel] [PATCH v4 02/10] IOMMU: handle IOMMU mapping and unmapping failures

2016-05-12 Thread Xu, Quan
On May 10, 2016 2:54 PM, Jan Beulich wrote: > >>> On 10.05.16 at 05:41, wrote: > > On May 10, 2016 12:14 AM, Jan Beulich wrote: > >> >>> On 06.05.16 at 10:54, wrote: > For DomU the solution seems quite obvious: Only

Re: [Xen-devel] [PATCH v4 01/10] vt-d: fix the IOMMU flush issue

2016-05-12 Thread Xu, Quan
On May 12, 2016 9:38 PM, Jan Beulich wrote: > >>> On 12.05.16 at 15:29, wrote: > > On May 12, 2016 4:53 PM, Jan Beulich wrote: > >> >>> On 12.05.16 at 09:50, wrote: > >> > On May 10, 2016 12:10 AM, Jan Beulich

Re: [Xen-devel] [PATCH v4 01/10] vt-d: fix the IOMMU flush issue

2016-05-12 Thread Xu, Quan
On May 12, 2016 4:53 PM, Jan Beulich wrote: > >>> On 12.05.16 at 09:50, wrote: > > On May 10, 2016 12:10 AM, Jan Beulich wrote: > >> >>> On 06.05.16 at 10:54, wrote: > >> > -static void intel_iommu_iotlb_flush(struct

Re: [Xen-devel] [PATCH v4 10/10] vt-d: propagate error up to ME phantom function mapping and unmapping

2016-05-12 Thread Xu, Quan
On May 12, 2016 4:45 PM, Jan Beulich wrote: > >>> On 12.05.16 at 07:16, wrote: > > Taken together, there are 3 call trees to me_wifi_quirk(): > > > > 1). > > ...--me_wifi_quirk()--domain_context_mapping_one()-- > domain_context_map > > ping()--se > >

Re: [Xen-devel] [PATCH v4 01/10] vt-d: fix the IOMMU flush issue

2016-05-12 Thread Xu, Quan
On May 10, 2016 12:10 AM, Jan Beulich wrote: > >>> On 06.05.16 at 10:54, wrote: > > -static void intel_iommu_iotlb_flush(struct domain *d, unsigned long > > gfn, unsigned int page_count) > > +static void iommu_flush_iotlb_page(struct domain *d, unsigned long

Re: [Xen-devel] [PATCH v4 10/10] vt-d: propagate error up to ME phantom function mapping and unmapping

2016-05-11 Thread Xu, Quan
On May 11, 2016 5:07 PM, Jan Beulich wrote: > >>> On 11.05.16 at 10:35, wrote: > > On May 10, 2016 5:29 PM, Jan Beulich wrote: > >> >>> On 06.05.16 at 10:54, wrote: > >> > @@ -1430,7 +1430,12 @@ int

Re: [Xen-devel] [PATCH v4 03/10] IOMMU/MMU: enhance the call trees of IOMMU unmapping and mapping

2016-05-11 Thread Xu, Quan
On May 11, 2016 4:46 PM, George Dunlap <george.dun...@eu.citrix.com> wrote: > On Wed, May 11, 2016 at 3:26 AM, Xu, Quan <quan...@intel.com> wrote: > > Agreed. Thanks for your careful checking. > > > > Check it again -- > > 1. then I am no need to check 'r

Re: [Xen-devel] [PATCH v4 10/10] vt-d: propagate error up to ME phantom function mapping and unmapping

2016-05-11 Thread Xu, Quan
On May 10, 2016 5:29 PM, Jan Beulich wrote: > >>> On 06.05.16 at 10:54, wrote: > > @@ -1430,7 +1430,12 @@ int domain_context_mapping_one( > > unmap_vtd_domain_page(context_entries); > > > > if ( !seg ) > > -me_wifi_quirk(domain, bus, devfn,

Re: [Xen-devel] [PATCH v4 08/10] vt-d/ept: propagate IOMMU Device-TLB flush error up to EPT update.

2016-05-11 Thread Xu, Quan
On Tuesday, May 10, 2016 5:10 PM, Jan Beulich wrote: > >>> On 06.05.16 at 10:54, wrote: > > --- a/xen/arch/x86/mm/p2m-ept.c > > +++ b/xen/arch/x86/mm/p2m-ept.c > > @@ -832,7 +832,8 @@ out: > > need_modify_vtd_table ) > > { > > if (

Re: [Xen-devel] [PATCH v4 07/10] IOMMU: propagate IOMMU Device-TLB flush error up to iommu_iotlb_flush{, _all} (leaf ones).

2016-05-11 Thread Xu, Quan
On May 11, 2016 3:17 PM, Jan Beulich wrote: > >>> On 11.05.16 at 09:12, wrote: > > On May 11, 2016 3:06 PM, Jan Beulich wrote: > >> >>> On 11.05.16 at 08:47, wrote: > >> > On May 10, 2016 5:07 PM, Jan Beulich

Re: [Xen-devel] [PATCH v4 07/10] IOMMU: propagate IOMMU Device-TLB flush error up to iommu_iotlb_flush{, _all} (leaf ones).

2016-05-11 Thread Xu, Quan
On May 11, 2016 3:06 PM, Jan Beulich wrote: > >>> On 11.05.16 at 08:47, wrote: > > On May 10, 2016 5:07 PM, Jan Beulich wrote: > >> >>> On 06.05.16 at 10:54, wrote: > >> > --- a/xen/drivers/passthrough/vtd/iommu.c > >>

Re: [Xen-devel] [PATCH v4 07/10] IOMMU: propagate IOMMU Device-TLB flush error up to iommu_iotlb_flush{, _all} (leaf ones).

2016-05-11 Thread Xu, Quan
On May 10, 2016 5:07 PM, Jan Beulich wrote: > >>> On 06.05.16 at 10:54, wrote: > > --- a/xen/drivers/passthrough/vtd/iommu.c > > +++ b/xen/drivers/passthrough/vtd/iommu.c > > @@ -604,15 +604,15 @@ static int iommu_flush_iotlb(struct domain *d, > unsigned

Re: [Xen-devel] [PATCH v4 06/10] IOMMU/MMU: propagate IOMMU Device-TLB flush error up to iommu_iotlb_flush{, _all} (top level ones).

2016-05-10 Thread Xu, Quan
On May 10, 2016 5:04 PM, Jan Beulich wrote: > >>> On 06.05.16 at 10:54, wrote: > > --- a/xen/common/memory.c > > +++ b/xen/common/memory.c > > @@ -677,9 +677,19 @@ static int xenmem_add_to_physmap(struct > domain > > *d, #ifdef CONFIG_HAS_PASSTHROUGH > >

Re: [Xen-devel] [PATCH v4 04/10] vt-d: propagate IOMMU Device-TLB flush error up to IOMMU unmapping.

2016-05-10 Thread Xu, Quan
On May 10, 2016 4:51 PM, Jan Beulich <jbeul...@suse.com> wrote: > >>> On 06.05.16 at 10:54, <quan...@intel.com> wrote: > > Propagate the IOMMU Device-TLB flush error up to IOMMU unmapping. > > > > Signed-off-by: Quan Xu <quan...@intel.com>

Re: [Xen-devel] [PATCH v4 03/10] IOMMU/MMU: enhance the call trees of IOMMU unmapping and mapping

2016-05-10 Thread Xu, Quan
On May 10, 2016 4:44 PM, Jan Beulich wrote: > >>> On 06.05.16 at 10:54, wrote: > > --- a/xen/arch/x86/mm/p2m.c > > +++ b/xen/arch/x86/mm/p2m.c > > @@ -638,13 +638,20 @@ p2m_remove_page(struct p2m_domain *p2m, > unsigned long gfn, unsigned long mfn, > >

Re: [Xen-devel] [PATCH v4 03/10] IOMMU/MMU: enhance the call trees of IOMMU unmapping and mapping

2016-05-10 Thread Xu, Quan
On May 10, 2016 10:45 PM, George Dunlap wrote: > On Tue, May 10, 2016 at 9:44 AM, Jan Beulich wrote: > On 06.05.16 at 10:54, wrote: > >> When IOMMU mapping is failed, we issue a best effort rollback, > >> stopping IOMMU

Re: [Xen-devel] [PATCH v4 03/10] IOMMU/MMU: enhance the call trees of IOMMU unmapping and mapping

2016-05-10 Thread Xu, Quan
When rollback is not > >>> feasible (in early initialization phase or trade-off of complexity) > >>> for the hardware domain, we do things on a best effort basis, only > throwing out an error message. > >>> > >>> IOMMU unmapping should perhaps continue despit

Re: [Xen-devel] [PATCH v4 02/10] IOMMU: handle IOMMU mapping and unmapping failures

2016-05-10 Thread Xu, Quan
On May 10, 2016 4:03 PM, Jan Beulich wrote: > >>> On 10.05.16 at 09:53, wrote: > > +rc = hd->platform_ops->unmap_page(d, gfn); > > + > > +if ( unlikely(rc) ) > > +{ > > +if ( printk_ratelimit() ) > > +printk(XENLOG_ERR > > +

Re: [Xen-devel] [PATCH v4 02/10] IOMMU: handle IOMMU mapping and unmapping failures

2016-05-10 Thread Xu, Quan
On May 10, 2016 2:54 PM, Jan Beulich wrote: > >>> On 10.05.16 at 05:41, wrote: > > On May 10, 2016 12:14 AM, Jan Beulich wrote: > >> >>> On 06.05.16 at 10:54, wrote: > >> > --- a/xen/drivers/passthrough/iommu.c > >> >

Re: [Xen-devel] [PATCH v4 02/10] IOMMU: handle IOMMU mapping and unmapping failures

2016-05-09 Thread Xu, Quan
On May 10, 2016 12:14 AM, Jan Beulich wrote: > >>> On 06.05.16 at 10:54, wrote: > > --- a/xen/drivers/passthrough/iommu.c > > +++ b/xen/drivers/passthrough/iommu.c > > @@ -240,21 +240,47 @@ int iommu_map_page(struct domain *d, > unsigned long gfn, unsigned

Re: [Xen-devel] [PATCH] IOMMU: don't BUG() on exotic hardware

2016-05-09 Thread Xu, Quan
On May 09, 2016 4:24 PM, Jan Beulich wrote: > >>> On 09.05.16 at 09:55, wrote: > > On May 06, 2016 10:24 PM, Jan Beulich wrote: > >> On x86, iommu_get_ops() BUG()s when running on non-Intel, non-AMD > >> hardware. While, with our current

Re: [Xen-devel] [PATCH] IOMMU: don't BUG() on exotic hardware

2016-05-09 Thread Xu, Quan
On May 06, 2016 10:24 PM, Jan Beulich wrote: > On x86, iommu_get_ops() BUG()s when running on non-Intel, non-AMD > hardware. While, with our current code, that's a correct prerequisite > assumption for IOMMU presence, this is wrong on systems without IOMMU. > Hence

Re: [Xen-devel] [PATCH v10 0/3] Re: VT-d Device-TLB flush issue

2016-05-06 Thread Xu, Quan
On May 06, 2016 9:36 PM, Jan Beulich wrote: > >>> On 06.05.16 at 14:21, wrote: > > If i didn't miss something, there is still no comment for this patch set. > > I think this patch set is close to being ready. I hope this patch set > > is still in your

Re: [Xen-devel] [PATCH v3 09/10] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU suspending

2016-05-06 Thread Xu, Quan
On May 06, 2016 3:03 PM, Jan Beulich wrote: > >>> On 05.05.16 at 12:18, wrote: > > What about this one as below: > > If done properly (coding style, comments to silence Coverity, consistency > throughout not just your change, but its effects on the rest of

Re: [Xen-devel] [PATCH v3 03/10] IOMMU/MMU: enhance the call trees of IOMMU unmapping and mapping

2016-05-05 Thread Xu, Quan
On May 05, 2016 7:03 PM, George Dunlap <george.dun...@citrix.com> wrote: > On 05/05/16 07:53, Xu, Quan wrote: > > On May 04, 2016 9:49 PM, George Dunlap <george.dun...@eu.citrix.com> > wrote: > >> On Fri, Apr 29, 2016 at 10:25 AM, Quan Xu <quan...@intel.

Re: [Xen-devel] [PATCH v3 09/10] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU suspending

2016-05-05 Thread Xu, Quan
On May 04, 2016 4:43 PM, Jan Beulich <jbeul...@suse.com> wrote: > >>> On 04.05.16 at 04:14, <quan...@intel.com> wrote: > > On May 04, 2016 10:00 AM, Tian, Kevin <kevin.t...@intel.com> wrote: > >> > From: Xu, Quan > >> > Sent: Friday,

Re: [Xen-devel] [PATCH v3 03/10] IOMMU/MMU: enhance the call trees of IOMMU unmapping and mapping

2016-05-05 Thread Xu, Quan
On May 04, 2016 9:49 PM, George Dunlap <george.dun...@eu.citrix.com> wrote: > On Fri, Apr 29, 2016 at 10:25 AM, Quan Xu <quan...@intel.com> wrote: > > When IOMMU mapping is failed, we issue a best effort rollback, > > stopping IOMMU mapping, unmapp

Re: [Xen-devel] [PATCH v3 02/10] IOMMU: handle IOMMU mapping and unmapping failures

2016-05-04 Thread Xu, Quan
t;> > exception of the hardware domain) and propagate the error up to the > >> > call trees. > >> > > >> > Signed-off-by: Quan Xu <quan...@intel.com> > >> > Reviewed-by: Kevin Tian <kevin.t...@intel.com> > >> > > >

Re: [Xen-devel] [PATCH v3 01/10] vt-d: fix the IOMMU flush issue

2016-05-04 Thread Xu, Quan
On May 04, 2016 9:52 PM, Jan Beulich <jbeul...@suse.com> wrote: > >>> On 04.05.16 at 14:09, <quan...@intel.com> wrote: > > On May 04, 2016 9:26 AM, Tian, Kevin <kevin.t...@intel.com> wrote: > >> > From: Xu, Quan > >

Re: [Xen-devel] [PATCH v3 02/10] IOMMU: handle IOMMU mapping and unmapping failures

2016-05-04 Thread Xu, Quan
> > If IOMMU mapping and unmapping failed, crash the domain (with the > > exception of the hardware domain) and propagate the error up to the > > call trees. > > > > Signed-off-by: Quan Xu <quan...@intel.com> > > Reviewed-by: Kevin Tian <kevin.t...@inte

Re: [Xen-devel] [PATCH v3 01/10] vt-d: fix the IOMMU flush issue

2016-05-04 Thread Xu, Quan
On May 04, 2016 9:26 AM, Tian, Kevin <kevin.t...@intel.com> wrote: > > From: Xu, Quan > > Sent: Friday, April 29, 2016 5:25 PM > > > > The propagation value from IOMMU flush interfaces may be positive, > > which indicates callers need to flush cach

Re: [Xen-devel] [PATCH v3 03/10] IOMMU/MMU: enhance the call trees of IOMMU unmapping and mapping

2016-05-04 Thread Xu, Quan
On May 04, 2016 4:41 PM, Jan Beulich <jbeul...@suse.com> wrote: > >>> On 04.05.16 at 03:45, <kevin.t...@intel.com> wrote: > >> From: Xu, Quan > >> Sent: Friday, April 29, 2016 5:25 PM > >> --- a/xen/arch/x86/mm.c > >> +++ b/xen/arch/x8

Re: [Xen-devel] [PATCH v3 09/10] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU suspending

2016-05-04 Thread Xu, Quan
On May 04, 2016 4:43 PM, Jan Beulich <jbeul...@suse.com> wrote: > >>> On 04.05.16 at 04:14, <quan...@intel.com> wrote: > > On May 04, 2016 10:00 AM, Tian, Kevin <kevin.t...@intel.com> wrote: > >> > From: Xu, Quan > >> > Sent: Friday,

Re: [Xen-devel] [PATCH v2] x86/HVM: fix forwarding of internally cached requests

2016-05-04 Thread Xu, Quan
On May 03, 2016 9:39 PM, Jan Beulich wrote: > >>> On 03.05.16 at 14:50, wrote: > > On April 29, 2016 12:11 AM, wrote: > >> On April 28, 2016 11:13 PM, Jan Beulich wrote: > >> > >>> On 25.04.16 at 10:40,

Re: [Xen-devel] [PATCH v3 10/10] vt-d: propagate error up to ME phantom function mapping and unmapping

2016-05-03 Thread Xu, Quan
On May 04, 2016 10:02 AM, Tian, Kevin <kevin.t...@intel.com> wrote: > > From: Xu, Quan > > Sent: Friday, April 29, 2016 5:25 PM > > diff --git a/xen/drivers/passthrough/vtd/iommu.c > > b/xen/drivers/passthrough/vtd/iommu.c > > index cf847ec..bfee299 100644 &

Re: [Xen-devel] [PATCH v3 09/10] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU suspending

2016-05-03 Thread Xu, Quan
On May 04, 2016 10:00 AM, Tian, Kevin <kevin.t...@intel.com> wrote: > > From: Xu, Quan > > Sent: Friday, April 29, 2016 5:25 PM > > diff --git a/xen/arch/x86/acpi/power.c b/xen/arch/x86/acpi/power.c > > index 2885e31..9097333 100644 > > --- a/xen/arch/x86/acpi

Re: [Xen-devel] [PATCH v2] x86/HVM: fix forwarding of internally cached requests

2016-05-03 Thread Xu, Quan
On April 29, 2016 12:11 AM, wrote: > On April 28, 2016 11:13 PM, Jan Beulich wrote: > > >>> On 25.04.16 at 10:40, wrote: > > > With other patches also in place, still not work. > > > Jianzhong has been left and Quan will take over the

Re: [Xen-devel] question about ept_set_entry

2016-04-29 Thread Xu, Quan
On April 29, 2016 5:24 PM, Jan Beulich wrote: > >>> On 29.04.16 at 11:14, wrote: > > hi all > > > > in > > - p2m-ept.c > > - ept_set_entry > > > > i see code about iommu, > > those code for what? Maybe Chunyu's question is -- why EPT update is

Re: [Xen-devel] [PATCH v2 09/11] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU suspending

2016-04-29 Thread Xu, Quan
On April 29, 2016 3:14 PM, Jan Beulich wrote: > >>> On 29.04.16 at 04:41, wrote: > > Now I check the status in caller to make the print include caller > > which is failed, instead print in iommu_flush_all(). > > i.e., > > vtd_crash_shutdown() > > { > > .. >

Re: [Xen-devel] [PATCH v2 09/11] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU suspending

2016-04-28 Thread Xu, Quan
On April 29, 2016 10:21 AM, Tian, Kevin <kevin.t...@intel.com> wrote: > > From: Xu, Quan > > Sent: Friday, April 29, 2016 12:09 AM > > On April 28, 2016 11:12 PM, Jan Beulich <jbeul...@suse.com> wrote: > > > >>> On 28.04.16 at 17:03, <quan...@i

Re: [Xen-devel] [PATCH v2] x86/HVM: fix forwarding of internally cached requests

2016-04-28 Thread Xu, Quan
On April 28, 2016 11:13 PM, Jan Beulich wrote: > >>> On 25.04.16 at 10:40, wrote: > > With other patches also in place, still not work. > > Jianzhong has been left and Quan will take over the task. > > May I ask for another try, with current tip of

Re: [Xen-devel] [PATCH v2 09/11] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU suspending

2016-04-28 Thread Xu, Quan
On April 28, 2016 11:12 PM, Jan Beulich wrote: > >>> On 28.04.16 at 17:03, wrote: > > On April 28, 2016 10:36 PM, Jan Beulich wrote: > >> >>> On 28.04.16 at 16:14, wrote: > >> > On April 25, 2016 7:53 PM, Jan Beulich

Re: [Xen-devel] [PATCH v2 09/11] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU suspending

2016-04-28 Thread Xu, Quan
On April 28, 2016 10:36 PM, Jan Beulich wrote: > >>> On 28.04.16 at 16:14, wrote: > > On April 25, 2016 7:53 PM, Jan Beulich wrote: > >> >>> On 18.04.16 at 16:00, wrote: > >> > --- a/xen/drivers/passthrough/vtd/iommu.c

<    1   2   3   4   5   6   >