- 论坛徽章:
- 0
|
我打算在xen dom0中运行vmware, 可以编译通过, 启动虚拟机时提示如下错误:
- Vmx86_RunVM start: /root/vmmon/vmmon-only/vmcore/moduleloop.c:59
- Vmx86_RunVM running: /root/vmmon/vmmon-only/vmcore/moduleloop.c:62
- Vmx86_RunVM running: /root/vmmon/vmmon-only/vmcore/moduleloop.c:72
- Vmx86_RunVM running: /root/vmmon/vmmon-only/vmcore/moduleloop.c:75
- Vmx86_RunVM running: /root/vmmon/vmmon-only/vmcore/moduleloop.c:82
- Vmx86_RunVM running: /root/vmmon/vmmon-only/vmcore/moduleloop.c:84
- Task_Switch start: /root/vmmon/vmmon-only/common/task.c:522
- Task_Switch running: /root/vmmon/vmmon-only/common/task.c:524
- Task_Switch running: /root/vmmon/vmmon-only/common/task.c:528
- Task_Switch running: /root/vmmon/vmmon-only/common/task.c:532
- Task_Switch running: /root/vmmon/vmmon-only/common/task.c:535
- Task_Switch running: /root/vmmon/vmmon-only/common/task.c:542
- Task_Switch running: /root/vmmon/vmmon-only/common/task.c:548
- Task_Switch running: /root/vmmon/vmmon-only/common/task.c:577
- Task_Switch running: /root/vmmon/vmmon-only/common/task.c:590
- Task_Switch running: /root/vmmon/vmmon-only/common/task.c:603
- Task_Switch running: /root/vmmon/vmmon-only/common/task.c:613
- Task_Switch running: /root/vmmon/vmmon-only/common/task.c:622
- SetupTemporaryGDT is running : /root/vmmon/vmmon-only/common/task.c:165
- SetupTemporaryGDT is running : /root/vmmon/vmmon-only/common/task.c:167
- SetupTemporaryGDT is running : /root/vmmon/vmmon-only/common/task.c:201
- SetupTemporaryGDT is running : /root/vmmon/vmmon-only/common/task.c:204
- SetupTemporaryGDT is running : /root/vmmon/vmmon-only/common/task.c:206
- Task_Switch running: /root/vmmon/vmmon-only/common/task.c:624
- Task_Switch running: /root/vmmon/vmmon-only/common/task.c:626
- Task_Switch running: /root/vmmon/vmmon-only/common/task.c:630
- Task_Switch running: /root/vmmon/vmmon-only/common/task.c:632
- Task_Switch desc: fe80e040
- general protection fault: 0000 [#1]
- SMP
- Modules linked in: vmnet vmmon crc32c libcrc32c iscsi_tcp scsi_transport_iscsi scsi_mod ipv6 ide_cd cdrom mousedev tsdev psmouse shpchp pci_hotplug serio_raw amd_k7_agp agpgart amd76x_edac via686a edac_mc i2c_isa i2c_viapro i2c_core rtc pcspkr evdev serial_core parport_pc parport ext3 jbd mbcache dm_mirror dm_snapshot dm_mod ide_generic ide_disk uhci_hcd via82cxxx generic ide_core usbcore tulip thermal processor fan
- CPU: 0
- EIP: 0061:[<ce21656b>] Tainted: P VLI
- EFLAGS: 00010296 (2.6.17-2-xen-k7 #1)
- EIP is at Task_Switch+0x37d/0xcf2 [vmmon]
- eax: 0000001e ebx: fe80e040 ecx: b02bb934 edx: fffff8bb
- esi: 0000efff edi: fe800000 ebp: ce121000 esp: c55e9dec
- ds: 007b es: 007b ss: 0069
- Process vmware-vmx (pid: 4152, threadinfo=c55e8000 task=b0d78a50)
- Stack: <0>ce21a7c0 fe80e040 00000000 c5f08000 00000246 8005003b a3d8fdf0 00000640
- 0000e040 00000000 00000033 efff0054 fe800000 ce121000 0000006b c5f08000
- 00000000 ce219329 b01136d9 cd1700c0 ca68f260 000007d8 000007d8 ce21084f
- Call Trace:
- <ce219329> Vmx86_RunVM+0xb2/0x42b [vmmon] <b01136d9> try_to_wake_up+0x2dd/0x2e7
- <ce21084f> LinuxDriver_Ioctl+0x14c/0x91a [vmmon] <b01127d2> __wake_up_common+0x2f/0x53
- <b011450a> __wake_up+0x2a/0x3d <b012c6a8> wake_futex+0x3a/0x44
- <b012c966> futex_wake+0x77/0xad <b012cc15> do_futex+0x1f2/0x771
- <b011c87b> do_setitimer+0x3e3/0x51e <b015f21f> do_ioctl+0x47/0x5d
- <b015f487> vfs_ioctl+0x252/0x264 <b011ca2a> sys_setitimer+0x74/0x7f
- <b015f4e1> sys_ioctl+0x48/0x5f <b010480b> syscall_call+0x7/0xb
- Code: 5c 24 30 03 9d 02 04 00 00 68 78 02 00 00 68 3f a7 21 ce 68 7e a7 21 ce e8 ca 31 f0 e1 83 c4 24 53 68 c0 a7 21 ce e8 bc 31 f0 e1 <8a> 43 05 83 e0 0f 0f b6 c0 50 68 d6 a7 21 ce e8 a8 31 f0 e1 68
- EIP: [<ce21656b>] Task_Switch+0x37d/0xcf2 [vmmon] SS:ESP 0069:c55e9dec
复制代码
我修改了vmmon的代码,增加printk进行调试, 发现是在/root/vmmon/vmmon-only/common/task.c的634行中出现了错误.
错误周围的代码如下
- if (trReg) {
- printk("Task_Switch running: %s:%d\n", __FILE__, __LINE__);
- /* To return to the task, mark it as unused. */
- Descriptor *desc;
- DTR *hostContextGDT = GetHostContextGDT(crosspage);
- printk("Task_Switch running: %s:%d\n", __FILE__, __LINE__);
- desc = (Descriptor *)(HOST_KERNEL_LA_2_VA(hostContextGDT->offset) + trReg);
- printk("Task_Switch running: %s:%d\n", __FILE__, __LINE__);
- printk("Task_Switch desc: %x\n", desc);
- printk("Task_Switch Desc_Type: %d\n", Desc_Type(desc));
- printk("Task_Switch running: %s:%d\n", __FILE__, __LINE__);
- if (Desc_Type(desc) == TASK_DESC_BUSY) {
- Desc_SetType(desc, TASK_DESC);
- printk("Task_Switch running: %s:%d\n", __FILE__, __LINE__);
- }
- }
-
复制代码
634行为printk("Task_Switch desc: %x\n", desc), Desc_SetType(desc, TASK_DESC)为未修改的代码中包含的行.
HOST_KERNEL_LA_2_VA在common/hostKernel.h中定义, common/hostKernel.h内容如下
- root@guoliang:~/vmmon/vmmon-only# more common/hostKernel.h
- /* ****************************************************************************
- * Copyright 1998 VMware, Inc. All rights reserved. -- VMware Confidential
- * ***************************************************************************/
- /*
- * hostKernel.h --
- *
- * Definition of HOST_KERNEL_* --hpreg
- */
- #ifndef __HOST_KERNEL_H__
- # define __HOST_KERNEL_H__
- # ifdef linux
- /*
- * In some cases, this files needs to include Linux kernel header file
- * asm/page.h.
- *
- * However, asm/page.h defines PAGE_SHIFT, PAGE_SIZE, PAGE_MASK, PAGE_OFFSET
- * and VMware header file vm_basic_types.h defines PAGE_SHIFT, PAGE_SIZE,
- * PAGE_MASK, PAGE_OFFSET. PAGE_MASK and PAGE_OFFSET are defined differently
- * (XXX we should really prefix the VMware version with VM_ to prevent any
- * further confusion), but fortunately the driver does not use them.
- *
- * So in this file, we must solve the definition conflict for files that
- * include both this file and vm_basic_types.h. 2 cases can occur:
- *
- * 1) this file is included before vm_basic_types.h is included. This is fine,
- * because vm_basic_types.h only defines PAGE_* if they don't exist yet.
- *
- * 2) vm_basic_types.h is included before this file is included.
- * We must undefine
- * PAGE_* in between. But this only works if asm/page.h is not included
- * before this file is included.
- *
- * In summary: if you make sure you do not include asm/page.h before you
- * include this file, then we guarantee that:
- * . This file and vm_basic_types.h can be included in any order
- * . asm/page.h will be included
- * . The PAGE_* definitions will come from asm/page.h
- *
- * --hpreg
- */
- /* Must come before any kernel header file --hpreg */
- # include "driver-config.h"
- # undef PAGE_SHIFT
- # undef PAGE_SIZE
- # undef PAGE_MASK
- # undef PAGE_OFFSET
- /* For __PAGE_OFFSET --hpreg */
- # include <asm/page.h>
- # define HOST_KERNEL_VA_2_LA(_x) (_x)
- # define HOST_KERNEL_LA_2_VA(_x) (_x)
- # endif
- # ifdef WINNT_DDK
- /* For VA and LA --hpreg */
- # include "vm_basic_types.h"
- # define HOST_KERNEL_VA_2_LA(_addr) ((LA)(_addr))
- # define HOST_KERNEL_LA_2_VA(_addr) ((VA)(_addr))
- # endif
- #endif /* __HOST_KERNEL_H__ */
复制代码
附件是我修改过的vmmon的内容.
请问为什么会出现这样的问题? HOST_KERNEL_VA_2_LA是用来做什么的?
我使用的xen版本为debian中的3.0-unstable+hg11292-2, dom0 kernel版本为linux-image-2.6.17-2-xen-k7 2.6.17-8
vmware版本为VMware Server 1.0.0 build-28343, 使用最新的vmware server和vmware player也遇到了类似的问题.
[ 本帖最后由 blue_stone 于 2006-9-15 13:21 编辑 ] |
|