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] KEXEC: disable hpet legacy broadcasts earlier

To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] KEXEC: disable hpet legacy broadcasts earlier
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Thu, 18 Aug 2011 14:47:20 +0100
Cc:
Delivery-date: Thu, 18 Aug 2011 06:48:06 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=hLwK3rAALSA4RAmTaCtaeJYWXTBsZ8eba3w4roRwE8w=; b=PURLCQSdTxDcI2e3VPmqJZ8y/PqMurpTw5vSr6pvKjpY6QGJ7xHzrd/FAxHi6mhKT9 GiYq69DrbdL1lqn7RXV+PZf/yZwwUG7u5Gchfk+RSD+KT+bhZA3astDpOsA9r2UWKyUK 2vrQfNRIFct2of1ARdj4FFLTXJfofeOFrLnBw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <dcb3ed7b7dbdf3d3cd4a.1313674271@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcxdrVmMcbqv7VC8MUGiCpCoOLxu3A==
Thread-topic: [Xen-devel] [PATCH] KEXEC: disable hpet legacy broadcasts earlier
User-agent: Microsoft-Entourage/12.30.0.110427
On 18/08/2011 14:31, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx> wrote:

> On x2apic machines which booted in xapic mode,
> hpet_disable_legacy_broadcast() sends an event check IPI to all online
> processors.  This leads to a protection fault as the genapic blindly
> pokes x2apic MSRs while the local apic is in xapic mode.
> 
> One option is to change genapic when we shut down the local apic, but
> there are still problems with trying to IPI processors in the online
> processor map which are actually sitting in NMI loops
> 
> Another option is to have each CPU take itself out of the online CPU
> map during the NMI shootdown.
> 
> Realistically however, disabling hpet legacy broadcasts earlier in the
> kexec path is the easiest fix to the problem.

This for 4.1.2 as well I guess?

> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> 
> diff -r fc2be6cb89ad -r dcb3ed7b7dbd xen/arch/x86/crash.c
> --- a/xen/arch/x86/crash.c Tue Aug 16 15:05:55 2011 +0100
> +++ b/xen/arch/x86/crash.c Thu Aug 18 14:30:32 2011 +0100
> @@ -29,6 +29,7 @@
>  #include <asm/io_apic.h>
>  #include <xen/iommu.h>
>  #include <xen/pci.h>
> +#include <asm/hpet.h>
>  
>  static atomic_t waiting_for_crash_ipi;
>  static unsigned int crashing_cpu;
> @@ -61,6 +62,9 @@ static void nmi_shootdown_cpus(void)
>  
>      local_irq_disable();
>  
> +    if ( hpet_broadcast_is_available() )
> +        hpet_disable_legacy_broadcast();
> +
>      crashing_cpu = smp_processor_id();
>      local_irq_count(crashing_cpu) = 0;
>  
> diff -r fc2be6cb89ad -r dcb3ed7b7dbd xen/arch/x86/machine_kexec.c
> --- a/xen/arch/x86/machine_kexec.c Tue Aug 16 15:05:55 2011 +0100
> +++ b/xen/arch/x86/machine_kexec.c Thu Aug 18 14:30:32 2011 +0100
> @@ -85,9 +85,6 @@ void machine_kexec(xen_kexec_image_t *im
>          .limit = LAST_RESERVED_GDT_BYTE
>      };
>  
> -    if ( hpet_broadcast_is_available() )
> -        hpet_disable_legacy_broadcast();
> -
>      /* We are about to permenantly jump out of the Xen context into the kexec
>       * purgatory code.  We really dont want to be still servicing interupts.
>       */
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



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

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