Re: [XenAccess-devel] Towards HVM support
Status: Beta
Brought to you by:
bdpayne
From: Steve B. <st...@at...> - 2006-08-09 21:13:59
|
> The error that you are getting is (most likely) because XenAccess > cannot find the System map file. Looking at the xml output that you > provided, it looks as if libvirt doesn't have guest kernel > information for an HVM domain. Normally, XenAccess would use this > information to guess the location of the System map file. However, > without this information, it won't find the System map file. > > One question, for HVM domains do you still boot off a kernel stored > in dom0? If so, I wonder why the kernel info isn't included in > libvirt's output. If not, then we may have to manually install the > System map file into dom0 and find some way to point XenAccess to the > appropriate file. This seems to be the crux. HVM domains do NOT boot off a kernel stored in dom0. This is why you can run a Windows guest for example. It acts more like VMware: all the files are in the guest's image, including the /boot directory. The image is partitioned as if it were a separate hard drive, with separate /boot and / partitions and file systems. I now see that XenAccess opens the System map file on the host, and I have no idea how to have it grab a file from inside the guest. So I copied the guest's System.map onto the host and with some hacking of your code and some extra printf's I've gotten this far: # ./run ./module_list 16 dom!=NULL kernel_name=hvm sysmap=/boot/System.map-2.6.17 swapper_pg_dir=e000 XA_PAGE_OFFSET=0 memory=NULL failed to init XenAccess library: Bad address These the last few debug statements are from helper_init() inside of xa_core.c. I looked up swapper_pg_dir in the System.map and it's at 0xc044e000. What fails is the call to linux_access_physical_address(). > Once we have the System map file, we can see where we are at :-) > But, I'm hopeful that the critical functions that I use from Xen will > behave the same in HVM domains. If that turns out to be the case, > then we are very close to getting this working. As you say, where are we at now? I don't know if swapper_pg_dir=e000 is correct of if it should have been c044e000. I also don't know if the XA_PAGE_OFFSET should be 0 or not. It seems that either: (1) these values are correct and the method you/libvirt use to get memory from a guest only works for paravirtualized VMs, or (2) these values are incorrect, and the memory access method may or may not work for HVMs. Either way, where do you think I should go from here? Thanks, - Steve |