WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 6 of 7] IOMMU: add crash_shutdown iommu_op

To: "Kay, Allen M" <allen.m.kay@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 6 of 7] IOMMU: add crash_shutdown iommu_op
From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Date: Wed, 15 Jun 2011 14:06:31 +0100
Cc: Jan, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.xen@xxxxxxxxx>, Beulich <JBeulich@xxxxxxxxxx>
Delivery-date: Wed, 15 Jun 2011 06:08:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <987664A83D2D224EAE907B061CE93D5301E728131A@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1307984567@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <3ad737eb0a8ded1b8306.1307984573@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <987664A83D2D224EAE907B061CE93D5301E728131A@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10

On 14/06/11 23:15, Kay, Allen M wrote:
> +static void vtd_crash_shutdown(void)
> +{
> +    struct acpi_drhd_unit *drhd;
> +    struct iommu *iommu;
> +
> +    if ( !iommu_enabled )
> +        return;
> +
> +    iommu_flush_all();
> +
> +    for_each_drhd_unit ( drhd )
> +    {
> +        iommu = drhd->iommu;
> +        iommu_disable_translation(iommu);
> +    }
> +
> +    iommu_disable_x2apic_IR();
> +}
> +
>
> Iommu_disable_x2apic_IR() check for iommu_supports_eim() before entering.  
> What happens when x2apic is not enabled but interrupt remapping is enabled?
>
> Maybe you should just create disable_intremap() and disable_qi() functions 
> and call from vtd_crash_shutdown() and iommu_disable_x2apic_IR().
>
> Allen 
Well spotted - I missed that.  My suggestion would be to remove the
check for eim and deal with it in the relevant disable_intremap and
disable_qi functions.  My feeling is that a call to "iommu_disable_IR"
should be able to deal whether or not you have eim.

If there are no objections, I will go ahead and try this and integrate
it into the patch 5 of the series which is already dealing with eim, and
needs some refactoring following my chat with Ian Campbell this morning.

-- 
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>