All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: Andrew Morton <akpm@osdl.org>,
	kvm@vger.kernel.org, kexec@lists.infradead.org,
	Haren Myneni <hbabu@us.ibm.com>,
	Simon Horman <horms@verge.net.au>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [PATCH 1/6] kdump: crash-time virt disable function
Date: Thu, 30 Oct 2008 15:50:31 +0200	[thread overview]
Message-ID: <4909BBA7.1020307@redhat.com> (raw)
In-Reply-To: <1225373687-6960-2-git-send-email-ehabkost@redhat.com>

Eduardo Habkost wrote:
> This patch adds an interface to set a function to be called on crash time,
> on each CPU. The function will be set by code that enables virtualization
> extensions on the CPUs (i.e. KVM).  It will be called once on each CPU
> by machine_crash_shutdown(), and should do the very least to disable
> virt extensions on the CPU where it is being called.
>
> The function will be used by KVM to disable virtualization before halting
> the CPUs, otherwise the booting of the kdump kernel may hang. It does
> hang, when vmx is enabled, and I wouldn't be surprised if having svm
> enabled also causes problems.
>
> The functions that set the function pointer uses RCU synchronization,
> just in case the crash NMI is triggered while KVM is unloading.
>
> We can't just use the same notifiers used at reboot time (that are used
> by non-crash-dump kexec), because at crash time some CPUs may have IRQs
> disabled, so we can't use IPIs. The crash shutdown code use NMIs to
> tell the other CPUs to be halted, so the notifier call is hooked into
> the CPU halting code that is on the crash shutdown NMI handler.
>
> +static void (*virt_disable_fn)(unsigned int cpu);
>   

Since you never use the cpu argument, I suggest dropping it.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Eduardo Habkost <ehabkost-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Andrew Morton <akpm-3NddpPZAyC0@public.gmane.org>,
	kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Haren Myneni <hbabu-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>,
	Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>,
	"Eric W. Biederman"
	<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>,
	Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 1/6] kdump: crash-time virt disable function
Date: Thu, 30 Oct 2008 15:50:31 +0200	[thread overview]
Message-ID: <4909BBA7.1020307@redhat.com> (raw)
In-Reply-To: <1225373687-6960-2-git-send-email-ehabkost-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Eduardo Habkost wrote:
> This patch adds an interface to set a function to be called on crash time,
> on each CPU. The function will be set by code that enables virtualization
> extensions on the CPUs (i.e. KVM).  It will be called once on each CPU
> by machine_crash_shutdown(), and should do the very least to disable
> virt extensions on the CPU where it is being called.
>
> The function will be used by KVM to disable virtualization before halting
> the CPUs, otherwise the booting of the kdump kernel may hang. It does
> hang, when vmx is enabled, and I wouldn't be surprised if having svm
> enabled also causes problems.
>
> The functions that set the function pointer uses RCU synchronization,
> just in case the crash NMI is triggered while KVM is unloading.
>
> We can't just use the same notifiers used at reboot time (that are used
> by non-crash-dump kexec), because at crash time some CPUs may have IRQs
> disabled, so we can't use IPIs. The crash shutdown code use NMIs to
> tell the other CPUs to be halted, so the notifier call is hooked into
> the CPU halting code that is on the crash shutdown NMI handler.
>
> +static void (*virt_disable_fn)(unsigned int cpu);
>   

Since you never use the cpu argument, I suggest dropping it.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

  reply	other threads:[~2008-10-30 13:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30 13:34 [PATCH 0/6] kdump: disable virtualization extensions on crash (v2) Eduardo Habkost
2008-10-30 13:34 ` Eduardo Habkost
2008-10-30 13:34 ` [PATCH 1/6] kdump: crash-time virt disable function Eduardo Habkost
2008-10-30 13:34   ` Eduardo Habkost
2008-10-30 13:50   ` Avi Kivity [this message]
2008-10-30 13:50     ` Avi Kivity
2008-10-30 16:24     ` Eduardo Habkost
2008-10-30 16:24       ` Eduardo Habkost
2008-10-30 13:34 ` [PATCH 2/6] kvm_x86_ops: crash_hardware_disable() operation Eduardo Habkost
2008-10-30 13:34   ` Eduardo Habkost
2008-10-30 13:34 ` [PATCH 3/6] kvm: svm: set crash_hardware_disable to svm_hardware_disable Eduardo Habkost
2008-10-30 13:34   ` Eduardo Habkost
2008-10-30 13:34 ` [PATCH 4/6] kvm: vmx: crash_hardware_disable function Eduardo Habkost
2008-10-30 13:34   ` Eduardo Habkost
2008-10-30 13:34 ` [PATCH 5/6] kvmx: x86: set kvm_x86_ops earlier on kvm_arch_init() Eduardo Habkost
2008-10-30 13:34   ` Eduardo Habkost
2008-10-30 13:34 ` [PATCH 6/6] kvm: x86: set kdump virt_disable function on initialization Eduardo Habkost
2008-10-30 13:34   ` Eduardo Habkost
2008-10-30 13:52 ` [PATCH 0/6] kdump: disable virtualization extensions on crash (v2) Avi Kivity
2008-10-30 13:52   ` Avi Kivity

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=4909BBA7.1020307@redhat.com \
    --to=avi@redhat.com \
    --cc=akpm@osdl.org \
    --cc=ebiederm@xmission.com \
    --cc=ehabkost@redhat.com \
    --cc=hbabu@us.ibm.com \
    --cc=horms@verge.net.au \
    --cc=kexec@lists.infradead.org \
    --cc=kvm@vger.kernel.org \
    --cc=vgoyal@redhat.com \
    /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.