* Eduardo Habkost <[EMAIL PROTECTED]> wrote:
> This reverts commit c7ffa6c26277b403920e2255d10df849bd613380.
>
> Now that we have the hooks to disable virtualization on
> emergency_restart(), we can get back to the BOOT_KBD reboot_type default.
>
> Signed-off-by: Eduardo Habkost <[EMAIL PROTECT
On Wed 2008-11-05 17:56:52, Eduardo Habkost wrote:
> This patch adds an interface to set a function that can be used to
> disable virtualization extensions on the CPU on emergency cases, such
> as on kdump or emergency reboot.
>
> The function will be set by code that enables virtualization extens
Now nmi_shootdown_cpus() is ready to be used by non-kdump code also.
Move it to reboot.c.
Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]>
---
arch/x86/kernel/crash.c | 73 --
arch/x86/kernel/reboot.c | 79
The X86_LOCAL_APIC #ifdef was for kdump. For !SMP, the function simply
does nothing.
Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]>
---
arch/x86/kernel/reboot.c | 13 -
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reb
This patch adds an interface to set a function that can be used to
disable virtualization extensions on the CPU on emergency cases, such
as on kdump or emergency reboot.
The function will be set by code that enables virtualization extensions
on the CPUs (i.e. KVM), and should do the very least to
This reverts commit c7ffa6c26277b403920e2255d10df849bd613380.
Now that we have the hooks to disable virtualization on
emergency_restart(), we can get back to the BOOT_KBD reboot_type default.
Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]>
---
arch/x86/kernel/reboot.c |6 +-
1 files c
The NMI CPU-halting code will be used on non-kdump cases, also
(e.g. emergency_reboot when virtualization is enabled).
Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]>
---
arch/x86/kernel/crash.c | 31 ---
1 files changed, 20 insertions(+), 11 deletions(-)
diff --
This variable will be moved to non-kdump-specific code.
Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]>
---
arch/x86/kernel/crash.c |8 +---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
index d82ac72..a70c1c6 100644
--
[v2: add comments on source code, explaining why it is needed]
Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]>
---
arch/x86/kernel/crash.c | 13 +
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
index d84a852..040f
Call set_virt_disable_func() on hardware_setup, and clear it on
hardware_unsetup.
This way kdump and reboot code will be able to disable svm when needed.
Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]>
---
arch/x86/kvm/svm.c | 19 +++
1 files changed, 15 insertions(+), 4 del
We need to first check if virtualization was enabled. We do this by
checking CR4.VMXE. If it is set, run vmxoff and clear CR4.VMXE.
Register it using set_virt_disable_func() on hardware_setup, and
unregister it on hardware_unsetup.
Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]>
---
arch/x86/
Move the set_virt_disable_func() call to vmx.c and svm.c.
This made the patch series shorter and removing one level
of abstraction.
This series is against linux-next-20081105.
Patches 01-07 simply move the non-kdump-specific parts
of nmi_shootdown_cpus() to reboot.c, so it can be used by
emergenc
For the kdump-specific code that was living on nmi_shootdown_cpus().
Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]>
---
arch/x86/kernel/crash.c | 11 +--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
index a70c1c6..d
On emergency_restart, we may need to use an NMI to disable virtualization
on all CPUs. We do that by using nmi_shootdown_cpus(), but only if a
virt_disable function was set by KVM.
Finding a proper point to hook the nmi_shootdown_cpus() call isn't
trivial, as the non-emergency machine_restart() (t
The reboot code will use a different function on crash_nmi_callback().
Adding a function pointer parameter to nmi_shootdown_cpus() for that.
Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]>
---
arch/x86/kernel/crash.c | 11 ---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --
Create __svm_hardware_disable(), a function we can use for
set_virt_disable_func().
Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]>
---
arch/x86/kvm/svm.c |7 ++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index f0ad4d4..3d330
We need to know on which CPU we are running on, and we don't want to be
preempted while doing this.
Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]>
---
arch/x86/kernel/reboot.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/r
Add prototype to asm/reboot.h.
Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]>
---
arch/x86/include/asm/reboot.h |5 +
arch/x86/kernel/crash.c |3 +--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/reboot.h b/arch/x86/include/asm/reboot.h
On Wed, Nov 05, 2008 at 09:33:06AM -0800, Eric W. Biederman wrote:
> Eduardo Habkost <[EMAIL PROTECTED]> writes:
>
> > +int set_virt_disable_func(void (*fn)(void))
> > +{
> > + int r = 0;
> > +
> > + spin_lock(&virt_disable_lock);
> > + if (!virt_disable_fn)
> > + rcu_assign_pointe
On Wed, Nov 05, 2008 at 09:26:53AM -0800, Eric W. Biederman wrote:
> Eduardo Habkost <[EMAIL PROTECTED]> writes:
>
> > Finally implement the virt_disable function for kdump. It will call
> > kvm_x86_ops->crash_hardware_disable(), that will disable virtualization
> > extensions on the CPU if it is
Eduardo Habkost <[EMAIL PROTECTED]> writes:
> +int set_virt_disable_func(void (*fn)(void))
> +{
> + int r = 0;
> +
> + spin_lock(&virt_disable_lock);
> + if (!virt_disable_fn)
> + rcu_assign_pointer(virt_disable_fn, fn);
> + else
> + r = -EEXIST;
> + spi
Eduardo Habkost <[EMAIL PROTECTED]> writes:
> Finally implement the virt_disable function for kdump. It will call
> kvm_x86_ops->crash_hardware_disable(), that will disable virtualization
> extensions on the CPU if it is not disabled yet.
>
> Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]>
> --
* Avi Kivity <[EMAIL PROTECTED]> wrote:
> Eduardo Habkost wrote:
>> Hi,
>>
>> This is a new version of the series to disabling virtualization on kdump,
>> now extended to do the same tricks on emergency_restart() if needed.
>>
>
> Looks good. If you me to push it upstream, I'll need kexec/kdu
On Wed, Nov 05, 2008 at 09:41:44AM -0500, Vivek Goyal wrote:
> On Tue, Nov 04, 2008 at 12:52:37PM -0200, Eduardo Habkost wrote:
> > Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]>
> > ---
> > arch/x86/kernel/crash.c |3 +++
> > 1 files changed, 3 insertions(+), 0 deletions(-)
> >
> > diff
On Wed, Nov 05, 2008 at 09:44:12AM -0500, Vivek Goyal wrote:
> On Tue, Nov 04, 2008 at 06:54:04PM +0200, Avi Kivity wrote:
> > Eduardo Habkost wrote:
> >> Hi,
> >>
> >> This is a new version of the series to disabling virtualization on kdump,
> >> now extended to do the same tricks on emergency_res
On Tue, Nov 04, 2008 at 06:54:04PM +0200, Avi Kivity wrote:
> Eduardo Habkost wrote:
>> Hi,
>>
>> This is a new version of the series to disabling virtualization on kdump,
>> now extended to do the same tricks on emergency_restart() if needed.
>>
>
> Looks good. If you me to push it upstream, I
On Tue, Nov 04, 2008 at 12:52:37PM -0200, Eduardo Habkost wrote:
> Signed-off-by: Eduardo Habkost <[EMAIL PROTECTED]>
> ---
> arch/x86/kernel/crash.c |3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
> index d84a852..
kexec/arch/i386/kexec-elf-x86.c and kexec/arch/x86_64/kexec-elf-x86_64.c
both use the macro offsetof() which according to the man page requires
#include .
The include is not present at the moment and this patch adds it. This is
necessary for compatibility with i.e. uClibc.
Signed-off-by: Stefan As
28 matches
Mail list logo