) MSR_IA32_SYSENTER_ESP
3) MSR_IA32_SYSENTER_EIP
4) MSR_STAR
5) MSR_IA32_TSC
6) MSR_VM_HSAVE_PA
7) MSR_CSTAR (x86_64 only)
8) MSR_KERNELGSBASE (x86_64 only)
9) MSR_FMASK (x86_64 only)
10) MSR_LSTAR (x86_64 only)
Signed-off-by: Eduardo Habkost ehabk...@redhat.com
---
qemu-kvm-x86.c |6 --
1 files
The svm_set_cr0() call will initialize save-cr0 properly even when npt is
enabled, clearing the NW and CD bits as expected, so we don't need to
initialize it manually for npt_enabled anymore.
Signed-off-by: Eduardo Habkost ehabk...@redhat.com
---
arch/x86/kvm/svm.c |2 --
1 files changed, 0
svm_set_cr0() directly to make sure
kvm_mmu_reset_context() is called to reset the mmu to nonpaging mode.
Signed-off-by: Eduardo Habkost ehabk...@redhat.com
---
arch/x86/kvm/svm.c |9 +
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
Hi,
The following patches fix a bug on the SIPI reset code for SVM. cr0 was not
being reset properly, making KVM keep the vcpu on paging mode, thus not
being able to run the real-mode boostrap code. This bug was reported at:
https://bugzilla.redhat.com/show_bug.cgi?id=525699
The first patch is
This should have no effect, it is just to make the code clearer.
Signed-off-by: Eduardo Habkost ehabk...@redhat.com
---
arch/x86/kvm/vmx.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 364263a..42409cc 100644
--- a/arch
.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
include/asm-x86/kvm_host.h |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h
index 1e28880..982b6b2 100644
--- a/include/asm-x86/kvm_host.h
+++ b/include/asm-x86
On Fri, Sep 12, 2008 at 05:14:06PM -0300, Eduardo Habkost wrote:
On Fri, Sep 12, 2008 at 02:50:33PM -0500, Anthony Liguori wrote:
Eduardo Habkost wrote:
On some cases, such as under KVM, tb_invalidate_phys_page_range()
may be called for large addresses, when qemu is configured to more than
On Fri, Sep 12, 2008 at 04:27:30PM -0500, Anthony Liguori wrote:
Eduardo Habkost wrote:
On Fri, Sep 12, 2008 at 05:14:06PM -0300, Eduardo Habkost wrote:
On Fri, Sep 12, 2008 at 02:50:33PM -0500, Anthony Liguori wrote:
Eduardo Habkost wrote:
On some cases, such as under KVM
On Mon, Sep 15, 2008 at 10:29:14AM -0500, Anthony Liguori wrote:
Eduardo Habkost wrote:
snip
New patch, reusing the range check from page_find_alloc() on
page_find(). Untested.
Have you tested this patch yet? I like to avoid being the first one to
test something when it's not my code
./configure --with-kvm-trace will set a CONFIG_KVM_TRACE option on a
kernel/config.kbuild file. This file can be included from the Kbuild
files to get kvm-specific CONFIG_* definitions.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
.gitignore|1 +
configure | 11
On 2.6.21 a new parameter was added to relay_open(). Handle this parameter
on kvm_relay_open() if needed.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
kernel/external-module-compat-comm.h | 19 +++
kernel/external-module-compat.c | 22
This series adds compat code to allow enabling kvm_trace when building
KVM as an external module on older kernels.
The most hackish part is the last patch, that adds --with-kvm-trace to
configure and adds an include to a generated file on kernel/x86/Kbuild. It
doesn't look pretty, so suggestions
Change the DEFINE_SIMPLE_ATTRIBUTE pattern to match the lost_records_get()
definition also, so kvm_trace can compile on older kernels.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
kernel/x86/hack-module.awk |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git
On Wed, Sep 24, 2008 at 04:48:35PM +0300, Avi Kivity wrote:
Eduardo Habkost wrote:
This series adds compat code to allow enabling kvm_trace when building
KVM as an external module on older kernels.
The most hackish part is the last patch, that adds --with-kvm-trace to
configure and adds
Use the emergency_halt_notifier interface to disable virtualization
on all the CPUs on machine_crash_shutdown().
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/kvm/x86.c | 22 +-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/x86
If kvmtrace crashes or gets killed while collecting trace data, stale
trace setup information may be enabled on the kernel, and currently
there is no way to force the previous trace setup to be overwritten
or disabled.
The following two patches against kvm-userspace will add a new
command-line
Extract the KVM_TRACE_DISABLE ioctl() call from cleanup_trace(), as
other parts of the code will use it.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
user/kvmtrace.c |9 +++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/user/kvmtrace.c b/user/kvmtrace.c
index
On Wed, Oct 22, 2008 at 03:42:27PM -0200, Glauber Costa wrote:
On Wed, Oct 22, 2008 at 3:35 PM, Eduardo Habkost [EMAIL PROTECTED] wrote:
If kvmtrace crashes or gets killed while collecting trace data, stale
trace setup information may be enabled on the kernel, and currently
there is no way
enabling trace, on those cases.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
user/kvmtrace.c | 10 +-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/user/kvmtrace.c b/user/kvmtrace.c
index 5d154c1..f06574f 100644
--- a/user/kvmtrace.c
+++ b/user/kvmtrace.c
@@ -54,7
On Thu, Oct 23, 2008 at 10:28:24AM +1100, Simon Horman wrote:
On Mon, Oct 20, 2008 at 01:01:32PM -0200, Eduardo Habkost wrote:
The following two patches should make kdump work when the kvm-intel module
is loaded. We need to disable vmx mode before booting the kdump kernel,
so I've
was not changed to the new name, making the build system
try to compile kvm_trace.c without -DEXT_CONFIG_KVM_TRACE=y, if
building using --with-kvm-trace.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
kernel/Makefile |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/Makefile
On Sun, Oct 26, 2008 at 05:07:45PM +0200, Avi Kivity wrote:
Eric W. Biederman wrote:
snip
Is it possible to disable vmx mode before we enable interrrupts in the
kdump kernel?
You need IPIs to disable vmx on smp.
Thank you. Reading your description and taking a quick look at
On Mon, Oct 27, 2008 at 11:13:41AM +0200, Avi Kivity wrote:
Eric W. Biederman wrote:
NMI IPIs are already used on x86 native_machine_crash_shutdown(), so
it wouldn't get more messy that it is currently. We just need to add
another bit of code to the code that already runs on an NMI handler.
On Mon, Oct 27, 2008 at 08:02:31AM -0700, Eric W. Biederman wrote:
Avi Kivity [EMAIL PROTECTED] writes:
Eric W. Biederman wrote:
We've observed on some machines that keyboard controller reset didn't work,
and
that the fallback to triple-fault asserted INIT and not RESET (and that
On Mon, Oct 27, 2008 at 10:32:43AM -0700, Eric W. Biederman wrote:
Avi Kivity [EMAIL PROTECTED] writes:
snip
I wouldn't mind notifiers (with a nice comment explaining that you must know
what you're doing, though that's the case with most kernel APIs). I'm fine
with
either approach.
On Mon, Oct 27, 2008 at 09:09:37AM -0400, Vivek Goyal wrote:
On Mon, Oct 27, 2008 at 10:54:01AM +0200, Avi Kivity wrote:
snip
The hang was likely caused by vmx blocking INIT. Sigh.
Avi,
We boot kdump kernel with maxcpus=1. IIUC, in that code path we will not
be using INIT. So did you
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.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/kvm/vmx.c | 16 ++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git
The vmx hardware_disable() function does too much for the virt_disable
crash handler, so we will have a new operation for the crash-time
virt_disable case.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/include/asm/kvm_host.h |1 +
1 files changed, 1 insertions(+), 0 deletions
Hi,
After some discussion, this is my second try to fix properly the kdump
hang when the kvm-intel module is loaded. I've kept the virtualization
code inside the KVM, and just used a function pointer that can be
registered by KVM to be called at crash time.
This series is for one of the
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]
---
arch/x86/kvm/x86.c | 19 ++-
1 files
. 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.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/include/asm/virtext.h | 24 +
arch/x86/kernel
Small change that will be needed when we use set_virt_disable_func()
on kvm_arch_init().
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/kvm/x86.c |7 +--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 38f79b6
On Thu, Oct 30, 2008 at 03:50:31PM +0200, Avi Kivity wrote:
snip
+static void (*virt_disable_fn)(unsigned int cpu);
Since you never use the cpu argument, I suggest dropping it.
It is a leftover from when I was using cpus_hardware_enabled to check
if vmx was enabled, before I've noticed I
The vmx hardware_disable() function does too much for the virt_disable
crash handler, so we will have a new operation for the crash-time
virt_disable case.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/include/asm/kvm_host.h |1 +
1 files changed, 1 insertions(+), 0 deletions
-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/kernel/reboot.c | 48 -
1 files changed, 46 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 80d5e9c..932763f 100644
--- a/arch/x86/kernel
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
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
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 0e77fe9
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
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..87780ba 100644
--- a/arch/x86/kernel/crash.c
+++ b/arch/x86/kernel/crash.c
]
[v3: make emergency_virt_disable() non-static]
[v4: add a config option for it: CPU_VIRT_EXTENSIONS]
[v5: add has_virt_extensions() function]
[v6: don't define the registering functions if CPU_VIRT_EXTENSIONS is
not enabled]
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/include/asm
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]
---
arch/x86/kvm/x86.c | 19 ++-
1 files
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
We can use it as is, as it is a simple function.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/kvm/svm.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index f0ad4d4..6b3a660 100644
--- a/arch/x86/kvm/svm.c
+++ b
Small change that will be needed when we use set_virt_disable_func()
on kvm_arch_init().
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/kvm/x86.c |7 +--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 9a4a39c
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
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
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 e8c58aa..0e77fe9 100644
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.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/kvm/vmx.c | 16 ++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git
On Tue, Nov 04, 2008 at 12:52:35PM -0200, Eduardo Habkost wrote:
The X86_LOCAL_APIC #ifdef was for kdump. For !SMP, the function simply
does nothing.
The bit below is also needed. It can be added to the series right before
patch 07/16.
After getting some review, I will resubmit the series
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_restart
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 --git a/arch
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
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_pointer(virt_disable_fn
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
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
]
[v3: make emergency_virt_disable() non-static]
[v4: add a config option for it: CPU_VIRT_EXTENSIONS]
[v5: add has_virt_extensions() function]
[v6: don't define the registering functions if CPU_VIRT_EXTENSIONS is
not enabled]
[v7: use EXPORT_SYMBOL_GPL]
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED
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
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
: additional source code comments explaining why we do that]
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/kernel/reboot.c | 55 -
1 files changed, 53 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel
[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
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
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
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
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
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
Hi,
This is an updated version of the reboot/kdump virtualization disable
series that I've sent previously.
In short, the x86 and kdump changes are the same as before, except for
EXPORT_SYMBOL_GPL, and the KVM parts are completely different.
Details of changes since the previous series:
-
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
On Wed, Nov 05, 2008 at 11:41:04AM +0100, Alexander Graf wrote:
X86 CPUs need to have some magic happening to enable the virtualization
extensions on them. This magic can result in unpleasant results for
users, like blocking other VMMs from working (vmx) or using invalid TLB
entries (svm).
On Thu, Nov 06, 2008 at 11:49:57AM +0200, Avi Kivity wrote:
Ingo Molnar wrote:
general ack for the x86 bits, but i'm not sure whether we should be
pushing this upstream so late in the cycle. If we do it in the next
cycle then it's best we do it in the x86 tree, the KVM impact seems
much
On Thu, Nov 06, 2008 at 08:14:45AM +0100, Ingo Molnar wrote:
* 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
On Wed, Nov 05, 2008 at 11:27:32PM +0100, Pavel Machek wrote:
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
On Thu, Nov 06, 2008 at 12:30:51PM +0200, Avi Kivity wrote:
Eric W. Biederman wrote:
If you want to be extra simple and safe, remove kvm from the equation.
Make the
disabling code part of kdump/emergency_restart and only rely on the
convention
that cr3.vmxe == vmxon.
Convention?
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 6047542..ed2f0f9 100644
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
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 ed2f0f9
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
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
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 | 76 --
arch/x86/kernel/reboot.c | 83
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
Hi, Ingo,
As tip/master is a moving target, I am splitting the previous kdump/reboot
virtualization-disable code series[1] into smaller series so the simpler
parts can be included sooner. This first series is just for making
nmi_shootdown_cpus() usable by non-kdump code, by moving their generic
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
Hi,
This is a new spin of the series to disable vmx on kdump and on
emergency_restart. Now we avoid doing the function pointer stuff by
moving 4 small KVM functions to a header, as inline functions. The code
looks much simpler now, but we have to be more careful because some
additional code will
Use a trick to keep the printk()s on has_svm() working as before. gcc
will take care of not generating code for the 'msg' stuff when the
function is called with a NULL msg argument.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/include/asm/virtext.h | 33
It will be used by core code on kdump and reboot, to disable
vmx if needed.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/include/asm/virtext.h | 31 +++
arch/x86/kvm/vmx.c |4 ++--
2 files changed, 33 insertions(+), 2 deletions
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/include/asm/virtext.h | 14 ++
arch/x86/kvm/svm.h | 12 +++-
2 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/arch/x86/include/asm/virtext.h b/arch/x86/include/asm/virtext.h
index
) uses machine_emergency_restart() directly.
The solution to make this work without adding a new function or argument
to machine_ops was setting a 'reboot_emergency' flag that tells if
native_machine_emergency_restart() needs to do the virt cleanup or not.
Signed-off-by: Eduardo Habkost [EMAIL
Create cpu_svm_disable() function.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/include/asm/virtext.h | 14 ++
arch/x86/kvm/svm.c |6 +-
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/arch/x86/include/asm/virtext.h b/arch/x86
Along with some comments on why it is different from the core cpu_vmxoff()
function.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/kvm/vmx.c | 13 +++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 5cde1e3
Move the definitions so they can be used by non-kvm code.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/include/asm/kvm_host.h | 14 ++
arch/x86/include/asm/virtext.h | 17 +
2 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/arch
This function can be used by the reboot or kdump code to forcibly
disable SVM on the CPU.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/include/asm/virtext.h |8
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/x86/include/asm/virtext.h b/arch/x86
, because those functions check if the CPUs
support SVM or VMX before doing their tasks.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/kernel/crash.c | 18 ++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel
Unfortunately we can't use exactly the same code from vmx
hardware_disable(), because the KVM function uses the
__kvm_handle_fault_on_reboot() tricks.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/include/asm/virtext.h | 13 +
1 files changed, 13 insertions(+), 0
On Sun, Nov 16, 2008 at 09:57:55AM +0200, Avi Kivity wrote:
Eduardo Habkost wrote:
Hi,
This is a new spin of the series to disable vmx on kdump and on
emergency_restart. Now we avoid doing the function pointer stuff by
moving 4 small KVM functions to a header, as inline functions. The code
This function can be used by the reboot or kdump code to forcibly
disable SVM on the CPU.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/include/asm/virtext.h |8
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/x86/include/asm/virtext.h b/arch/x86
Unfortunately we can't use exactly the same code from vmx
hardware_disable(), because the KVM function uses the
__kvm_handle_fault_on_reboot() tricks.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/include/asm/virtext.h | 15 +++
1 files changed, 15 insertions(+), 0
svm.h will be used by core code that is independent of KVM, so I am
moving it outside the arch/x86/kvm directory.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/include/asm/svm.h | 328
arch/x86/kvm/kvm_svm.h |2 +-
arch/x86
a 'reboot_emergency' flag that tells if
native_machine_emergency_restart() needs to do the virt cleanup or not.
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/kernel/reboot.c | 63 -
1 files changed, 61 insertions(+), 2 deletions(-)
diff --git
Hi, Ingo,
This is yet another spin of the series to disable vmx on kdump and on
emergency_restart, after some feedback from Avi.
The only change from v3 is that vmx.h and svm.h were moved from
arch/x86/kvm to arch/x86/include/asm, instead of moving code
from those headers to asm/virtext.h.
I
Add cpu_emergency_vmxoff() and its friends: cpu_vmx_enabled() and
__cpu_emergency_vmxoff().
Signed-off-by: Eduardo Habkost [EMAIL PROTECTED]
---
arch/x86/include/asm/virtext.h | 23 +++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/arch/x86/include/asm
1 - 100 of 610 matches
Mail list logo