From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Joerg Roedel <joerg.roedel-5C7GfCeVMHo@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH try #2] kvm-12 userland guest reboot fix
Date: Thu, 01 Feb 2007 10:25:21 +0200 [thread overview]
Message-ID: <45C1A3F1.1070803@qumranet.com> (raw)
In-Reply-To: <20070131165830.GB8491-5C7GfCeVMHo@public.gmane.org>
Joerg Roedel wrote:
> From: Markus Rechberger <markus.rechberger-5C7GfCeVMHo@public.gmane.org>
> From: Joerg Roedel <joerg.roedel-5C7GfCeVMHo@public.gmane.org>
>
> This patch fixes the initialization of the segment registers which
> solves the triple fault and keyboard controller reset problems in
> kvm/qemu guests as well as the slow grub menu interaction. The patch
> should also work on Intel VMX now.
>
> diff -upr kvm-12/qemu/target-i386/helper2.c kvm-12-reboot-fixed/qemu/target-i386/helper2.c
> --- kvm-12/qemu/target-i386/helper2.c 2006-12-31 14:31:38.000000000 +0100
> +++ kvm-12-reboot-fixed/qemu/target-i386/helper2.c 2007-01-23 20:24:42.265987000 +0100
> @@ -151,6 +151,9 @@ CPUX86State *cpu_x86_init(void)
> void cpu_reset(CPUX86State *env)
> {
> int i;
> + unsigned int flags = DESC_P_MASK |
> + DESC_S_MASK |
> + (2 << DESC_TYPE_SHIFT);
>
> memset(env, 0, offsetof(CPUX86State, breakpoints));
>
> @@ -173,9 +176,9 @@ void cpu_reset(CPUX86State *env)
> env->tr.flags = DESC_P_MASK;
>
> cpu_x86_load_seg_cache(env, R_CS, 0xf000, 0xffff0000, 0xffff, 0);
> - cpu_x86_load_seg_cache(env, R_DS, 0, 0, 0xffff, 0);
> - cpu_x86_load_seg_cache(env, R_ES, 0, 0, 0xffff, 0);
> - cpu_x86_load_seg_cache(env, R_SS, 0, 0, 0xffff, 0);
> + cpu_x86_load_seg_cache(env, R_DS, 0, 0, 0xffff, flags);
> + cpu_x86_load_seg_cache(env, R_ES, 0, 0, 0xffff, flags);
> + cpu_x86_load_seg_cache(env, R_SS, 0, 0, 0xffff, flags);
> cpu_x86_load_seg_cache(env, R_FS, 0, 0, 0xffff, 0);
> cpu_x86_load_seg_cache(env, R_GS, 0, 0, 0xffff, 0);
>
This changes core qemu code, which may make merging our code back to
qemu more difficult. It also means we need to test with -no-kvm.
Can you try making load_regs() in qemu-kvm.c detect the case of flags ==
0 (perhaps only if cr0.pg == 0) and changing it only then? It should
have the same effect.
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
next prev parent reply other threads:[~2007-02-01 8:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-31 16:58 [PATCH try #2] kvm-12 userland guest reboot fix Joerg Roedel
[not found] ` <20070131165830.GB8491-5C7GfCeVMHo@public.gmane.org>
2007-02-01 8:25 ` Avi Kivity [this message]
[not found] ` <45C1A3F1.1070803-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-01 9:07 ` Daniel Hecken
2007-02-01 9:37 ` Avi Kivity
2007-02-01 16:39 ` Joerg Roedel
[not found] ` <20070201163943.GB7115-5C7GfCeVMHo@public.gmane.org>
2007-02-04 8:40 ` 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=45C1A3F1.1070803@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=joerg.roedel-5C7GfCeVMHo@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox