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

Re: [Xen-users] Windows 7 on Xen 3.2.1 on Debian 5.0 fails to install


  • To: Hubert ÅÄpicki <hubert.lepicki@xxxxxxxxx>
  • From: Andrew Lyon <andrew.lyon@xxxxxxxxx>
  • Date: Sat, 18 Jul 2009 14:07:26 +0100
  • Cc: xen-users@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Sat, 18 Jul 2009 06:08:13 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=opWZn7J1Kk7vnsrVpEba0U4o9WxVZDanruc7pEU1azgxdwlmFZ6zAU8+fFiNkl3Vqd 7zhOkEzq1ap743P+vrL7ggPr4GJMqmaDb23vgWGYFV3hmXt0WFEluavxfryEdBz1LjS1 /+zf7bBiG7h+ZZ7F4rdFdBBlq2waqaltlpdHM=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

On Sat, Jul 18, 2009 at 12:39 PM, Hubert
ÅÄpicki<hubert.lepicki@xxxxxxxxx> wrote:
> Hi guys,
>
> I am having problem with installing Windows 7 RC on Xen. My config file is:
>
> WIndows is starting, which i can see in VNC terminal, and it hangs on
> "Starting windows" screen...
>
> I get error in logs which says:
> ...
> Done register platform.
> I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0
>
> And I/O request error repeats as many times as many cores virtual cpus
> I set in config file.
>
> I tried changing memory size, number of cpus but this doesn't help. I
> also tried using phy:/dev/loopX config with virtual devices created at
> dom0 but this also doesn't help.
>
> Do you know the solution?
>
> #
> # Configuration file for the Xen instance staging.amberbit.com, created
> # by xen-tools 3.9 on Wed Jul Â8 14:44:12 2009.
> #
>
> #
> # ÂKernel + memory size
> #
>
> kernel = '/usr/lib/xen-3.2-1/boot/hvmloader'
> builder = 'hvm'
> memory = '1024'
> device_model='/usr/lib/xen-3.2-1/bin/qemu-dm'
> acpi = 1
> apic = 1
> stdvga=0
> pae=1
> vncconsole=1
> vncpasswd=''
> vcpus=4
> serial='pty'
> usbdevice='tablet'
> shadow_memory = 8
> #
> # ÂDisk device(s).
> #
> disk = [ 'phy:/dev/loop2,ioemu:hda:ide,w'
> 'phy:/dev/loop2,ioemu:hdc:cdrom,r' ]
>
>
> # Behaviour
> boot='d'
> vnc=1
> vncviewer=1
> sdl=0
>
> #
> # ÂHostname
> #
> name    Â= 'win.amberbit.com'
>
> #
> # ÂNetworking
> #
> vif     = [ 'type=ioemu,ip=XXX.XXX.XXX.XXX,mac=00:13:3E:XX:XX:XX'
> ] # x-es added to hide ip
>
> #
> # ÂBehaviour
> #
> on_poweroff = 'destroy'
> on_reboot  = 'restart'
> on_crash  Â= 'restart'
>
>
> --
> Pozdrawiam,
> Hubert ÅÄpicki
> Â-----------------------------------------------
> [ http://hubertlepicki.com ]
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users
>

I am not aware of any solution for running Windows 7 on Xen 3.x, you
would need to upgrade to 3.4 as it supports Viridian which improves
performance when running enlightened (Viridian aware) versions of
Windows (e.g. Vista, Server 2008), and also prevents Windows from
crashing with Bug Check 0x101: CLOCK_WATCHDOG_TIMEOUT when using SMP,
however there is a bug in Windows 7 Viridian support which requires a
patch to Xen:

diff -r 9fdcd3ab84b7 xen/arch/x86/hvm/viridian.c
--- a/xen/arch/x86/hvm/viridian.c       Mon Apr 27 15:40:09 2009 +0100
+++ b/xen/arch/x86/hvm/viridian.c       Mon Apr 27 19:59:05 2009 -0700
@@ -22,6 +22,7 @@
 #define VIRIDIAN_MSR_EOI         0x40000070
 #define VIRIDIAN_MSR_ICR         0x40000071
 #define VIRIDIAN_MSR_TPR         0x40000072
+#define VIRIDIAN_MSR_APIC_ASSIST 0x40000073

 /* Viridian Hypercall Status Codes. */
 #define HV_STATUS_SUCCESS                       0x0000
@@ -49,14 +50,14 @@ int cpuid_viridian_leaves(unsigned int l
         return 0;

     leaf -= 0x40000000;
-    if ( leaf > 5 )
+    if ( leaf > 6 )
         return 0;

     *eax = *ebx = *ecx = *edx = 0;
     switch ( leaf )
     {
     case 0:
-        *eax = 0x40000005; /* Maximum leaf */
+        *eax = 0x40000006; /* Maximum leaf */
         *ebx = 0x7263694d; /* Magic numbers  */
         *ecx = 0x666F736F;
         *edx = 0x76482074;
@@ -192,6 +193,36 @@ int wrmsr_viridian_regs(uint32_t idx, ui
         vlapic_set_reg(vcpu_vlapic(current), APIC_TASKPRI, eax & 0xff);
         break;

+    case VIRIDIAN_MSR_APIC_ASSIST: {
+        /* We don't support the APIC assist page, and that fact is
+           reflected in our CPUID flags.  However, Windows 7 build
+           7000 has a bug which means that it doesn't recognise that,
+           and tries to use the page anyway.  We therefore have to
+           fake up just enough to keep win7 happy.  Fortunately,
+           that's really easy: just setting the first four bytes in
+           the page to zero effectively disables the page again, so
+           that's what we do. */
+        /* Semantically, the first four bytes are supposed to be a
+           flag saying whether the guest really needs to issue an EOI.
+           Setting that flag to zero means that it must always issue
+           one, which is what we want.  Once a page has been
+           repurposed as an APIC assist page the guest isn't allowed
+           to set anything in it, so the flag remains zero and all is
+           fine.  The guest is allowed to clear flags in the page, but
+           that doesn't cause us any problems. */
+        uint32_t first_word;
+        paddr_t page_start;
+
+        if (!(val & 1)) {
+            /* APIC assist page is being disabled -> nothing to do */
+            return 1;
+        }
+        page_start = val & ~1ul;
+        first_word = 0;
+        hvm_copy_to_guest_phys(page_start, &first_word, sizeof(first_word));
+        break;
+    }
+
     default:
         return 0;
     }


With the patch applied Windows 7 runs very nicely on Xen 3.4.

Andy

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.