qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] QEMU (no kvm) Win7 (64bit) boot error


From: Aurelien Jarno
Subject: Re: [Qemu-devel] QEMU (no kvm) Win7 (64bit) boot error
Date: Mon, 10 Sep 2012 19:31:27 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Sep 10, 2012 at 06:23:43PM +0200, Stefan Weil wrote:
> Am 10.09.2012 08:19, schrieb Clemens Kolbitsch:
> >On Sat, Sep 8, 2012 at 11:22 AM, Clemens Kolbitsch
> ><address@hidden> wrote:
> >>On Fri, Sep 7, 2012 at 9:26 PM, Stefan Weil <address@hidden> wrote:
> >>>Am 08.09.2012 02:48, schrieb Clemens Kolbitsch:
> >>>>Hi guys,
> >>>>
> >>>>I need to run Win7 64bit in Qemu without KVM support. I found a few
> >>>>messages concerning the "unsupported architecture" problem (Windows
> >>>>shows a BSOD with "STOP 0x0000005D ..." on boot), for example
> >>>>
> >>>>http://lists.gnu.org/archive/html/qemu-devel/2011-03/msg01623.html
> >>>>or
> >>>>http://permalink.gmane.org/gmane.comp.emulators.qemu/92457
> >>>>
> >>>>but I don't think there was ever a solution to the problem - at least
> >>>>what is proposed does not work (I've tried stable and GIT versions).
> >>>>
> >>>>Since I have a decent background of modifying the Qemu internals, I'm
> >>>>more than happy to contribute to solving this issue, but I'm not sure
> >>>>if anyone is currently working on it (i.e., I don't want to start at 0
> >>>>in case someone is about to release a patch).
> >>>>
> >>>>Please let me know if there is already a know solution/workaround or
> >>>>whoever might be working on it, please ping me so we can sync.
> >>>>
> >>>>BTW, in case this is necessary, here are the details of what I
> >>>>need/what is not working:
> >>>>
> >>>>Qemu: current git-trunk,
> >>>>
> >>>>x86_64-softmmu$ ./qemu-system-x86_64 --version
> >>>>QEMU emulator version 1.2.50, Copyright (c) 2003-2008 Fabrice Bellard
> >>>>
> >>>>host: 64bit, Ubuntu LTS12.04
> >>>>
> >>>>guest: 64bit Windows 7, no KVM possible
> >>>>
> >>>>Thanks!
> >>>>-Clemens
> >>>
> >>>Hi Clemens,
> >>>
> >>>AFAIK, nobody is working on this issue which exists for a long time now.
> >>>It would be great if you could find a solution to make QEMU without KVM
> >>>work with Windows guests.
> >>Hi Stefan,
> >>
> >>thanks for the info. I'll work on it then - hopefully I can come back
> >>with a patch soon!
> >>
> >>>PS: It's QEMU, not Qemu. I modified the subject in my reply :-)
> >>hehe, old habbit :) I'll try to remember - but why is the ML then
> >>called "Qemu-devel" ? ;)
> >After a first night of debugging, I have come up with a simple patch.
> >I'm still testing and it seems it's not the ultimate solution yet
> >(there are still bluescreens), but it already gets you much further
> >while booting (using either the install CD or an actual image).
> >
> >This diffs against the current stable-1.1. As you can see, one of the
> >feature bits of the CPUID are removed due to TCG not supporting them
> >(or the TCG bitmask is just missing them). Since Qemu uses CPUID_DE in
> 
> QEMU :-)
> 
> >other locations, I'm assuming the bitmask is just wrong.
> >
> >Can someone confirm that TCG supports CPUID_DE ? If not, I'll need to
> >work on this, otherwise I'll investigate why Win7 still crashes with a
> >BSOD.
> >
> >Thanks!
> >Clemens
> >
> >
> >qemu$ git diff
> >diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> >index 388bc5c..f2af36d 100644
> >--- a/target-i386/cpu.c
> >+++ b/target-i386/cpu.c
> >@@ -259,7 +259,8 @@ typedef struct x86_def_t {
> >            CPUID_PAE | CPUID_MCE | CPUID_CX8 | CPUID_APIC | CPUID_SEP | \
> >            CPUID_MTRR | CPUID_PGE | CPUID_MCA | CPUID_CMOV | CPUID_PAT | \
> >            CPUID_PSE36 | CPUID_CLFLUSH | CPUID_ACPI | CPUID_MMX | \
> >-          CPUID_FXSR | CPUID_SSE | CPUID_SSE2 | CPUID_SS)
> >+          CPUID_FXSR | CPUID_SSE | CPUID_SSE2 | CPUID_SS | \
> >+          CPUID_DE) /* needed by Win7 64bit */
> >            /* partly implemented:
> >            CPUID_MTRR, CPUID_MCA, CPUID_CLFLUSH (needed for Win64)
> >            CPUID_PSE36 (needed for Solaris) */
> 
> Hi Clemens,
> 
> indeed, it looks like CPUID_DE fixes that BSOD with "STOP 0x0000005D ...".
> In my test scenario Windows now reboots instead of showing the BSOD.
> 
> This commit added the TCG feature bit trimming which broke Windows:
> 
>    commit 551a2dec8fa55006a68393b9d6fb63577d2b3f1c
>    Autor:    Andre Przywara <address@hidden> Do Mär 11 14:39:03
>    2010
>    Eintragender:    Aurelien Jarno <address@hidden>  Sa Mär 13
>    16:50:54 2010
> 
>    x86/cpuid: add TCG feature bit trimming
> 
>    In KVM we trim the user provided CPUID bits to match the host CPU's
>    one. Introduce a similar feature to QEMU/TCG. Create a mask of TCG's
>    capabilities and apply it to the user bits.
>    This allows to let the CPU models reflect their native archetypes.
> 
>    Signed-off-by: Andre Przywara <address@hidden>
>    Signed-off-by: Aurelien Jarno <address@hidden>
> 
> 
> Andre, why don't we set the requested feature bits - no matter what
> TCG provides?
> 

Well the CPU flags are supposed to represent what a code can use. If we
announce things that we don't support, some code might enable some
features or instructions that are just causing an illegal instruction.

Now the question is to know if DE is implemented in TCG or not. It
*seems* there are some parts implemented, but not fully.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
address@hidden                 http://www.aurel32.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]