All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Dan Aloni <da-x@monatomic.org>
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: kvm-60: kexec in guest crashes the host
Date: Wed, 27 Feb 2008 16:02:53 +0200	[thread overview]
Message-ID: <47C56D8D.4060803@qumranet.com> (raw)
In-Reply-To: <47C55CC4.9010004@qumranet.com>

[-- Attachment #1: Type: text/plain, Size: 1639 bytes --]

Avi Kivity wrote:
> Dan Aloni wrote:
>   
>> On Wed, Feb 20, 2008 at 11:09:44AM +0200, Avi Kivity wrote:
>>   
>>     
>>> Dan Aloni wrote:
>>>     
>>>       
>>>> It happens at 100% of the times I invoke kexec.
>>>>
>>>>   
>>>>       
>>>>         
>>> Can you provide a commandline which triggers this? I'm completely 
>>> ignorant wrt kexec.
>>>     
>>>       
>> I managed to verify that this problem can be reproduced with the 
>> 2.6.16.60 tree.
>>
>> Also, it's worth to note that with '-no-kvm' the kexec procedure works
>> successfully and the second kernel executes.
>>
>> Please use the .config that that I attached to this mail, and also apply
>> the patch I supplied (it fixes a build problem that 2.6.16 has with the 
>> newer binutils versions and x86_64). I use gcc-4.1.2 to build the kernel.
>>
>> Once you have the bzImage of that guest kernel, use a root filesystem 
>> and boot it straight into /bin/bash.
>>
>> Now, assuming that your guest rootfs has kexec-utils package installed, 
>> do the following:
>>
>>   mount -t proc proc /proc
>>   kexec -l bzImage --command-line='ro root=/dev/hda1 init=/bin/bash'
>>   kexec -e
>>
>> BTW, if you use the serial console with the '-nographic' switch, then
>> you might want to use kexec a little differently:
>>
>>   kexec -l bzImage --command-line='ro root=/dev/hda1 init=/bin/bash console=ttyS0,115200' --serial=ttyS0 --serial-baud=115200           
>>   
>>     
>
> I managed to reproduce it (FC6 kernel kexecing itself).  It is Intel 
> specific.
>
>   

The attached patch fixes the problem for me.

-- 
error compiling committee.c: too many arguments to function


[-- Attachment #2: kexec-host-crash-fix.patch --]
[-- Type: text/x-patch, Size: 280 bytes --]

diff --git a/kernel/vmx.c b/kernel/vmx.c
index 7ce02d2..ccc8174 100644
--- a/kernel/vmx.c
+++ b/kernel/vmx.c
@@ -1356,6 +1356,7 @@ static void vmx_set_efer(struct kvm_vcpu *vcpu, u64 efer)
 
 		msr->data = efer & ~EFER_LME;
 	}
+	vmx_load_host_state(vmx);
 	setup_msrs(vmx);
 }
 

[-- Attachment #3: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #4: Type: text/plain, Size: 158 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

  reply	other threads:[~2008-02-27 14:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-19 10:25 kvm-60: kexec in guest crashes the host Dan Aloni
2008-02-19 16:03 ` Avi Kivity
2008-02-19 16:46   ` Dan Aloni
2008-02-20  9:09     ` Avi Kivity
2008-02-20 10:48       ` Dan Aloni
2008-02-25 19:25         ` Dan Aloni
2008-02-27 12:51         ` Avi Kivity
2008-02-27 14:02           ` Avi Kivity [this message]
2008-02-27 21:32             ` Dan Aloni

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=47C56D8D.4060803@qumranet.com \
    --to=avi@qumranet.com \
    --cc=da-x@monatomic.org \
    --cc=kvm-devel@lists.sourceforge.net \
    /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.