From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Daniel P. Berrange" Subject: Re: HVM direct boot broken in xen-unstable Date: Tue, 22 Jul 2008 12:00:57 +0100 Message-ID: <20080722110057.GF5192@redhat.com> References: <469F2699A483D44BA6D2B311B1089D3A39A8FE2696@GVW1096EXB.americas.hpqcorp.net> <20080719083549.GA32411@redhat.com> <18564.44873.954643.912561@mariner.uk.xensource.com> Reply-To: "Daniel P. Berrange" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <18564.44873.954643.912561@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "xen-devel@lists.xensource.com" , "Byrne, John (HP Labs)" List-Id: xen-devel@lists.xenproject.org On Mon, Jul 21, 2008 at 04:46:17PM +0100, Ian Jackson wrote: > Daniel P. Berrange writes ("Re: [Xen-devel] HVM direct boot broken in xen-unstable"): > > On Sat, Jul 19, 2008 at 12:52:07AM +0000, Byrne, John (HP Labs) wrote: > > > Hi! > > > > > > On x86_64, changeset 18081, running/building on rhel5, trying to use > > > the HVM direct boot causes the domain to reboot immediately and then > > > the log says the domain is restarting too rapidly. No obvious hints > > > as to where the problem is. If I build the in-tree ioemu code, things > > > work. Any clues as to where to look or how to get some useful debugging > > > output? > > Byrne, could you send me a copy of your config file so I can reproduce > this ? Also, some idea of how you made (or how you obtained) the > kernel image and initramfs. I don't think I've ever done a direct > kernel boot using this code (which is in patches supplied by Daniel) > and offhand I can't seem to find the documentation. > > > It appears the code is missing from the external ioemu code. The original > > changesets for HVM kernel boot were > > I've looked at the code and these changes are ones I did attempt to > port across to the new qemu. You'll see for example that the `evil > helper' is still there, just slightly further down the file in pc.c. > > I haven't ever executed the resulting codepaths and evidently I broke > something, which is not all that surprising. I think I've identified the problem. In the load_linux() method, the line where we copy the header into guest memory: /* store the finalized header and load the rest of the kernel */ cpu_physical_memory_write(real_addr, header, 1024); Is done before the Xen hook runs: xen_relocator_hook(prot_addr, protocol, header, kernel_size, real_addr, setup_size-1024); The xen_relocator_hook modifies byte 0x214 in the header to point to its hook, and so this change isn't getting written into memory. The cpu_physical_memory_write(real_addr, header, 1024) call just needs to be moved down to be immediately after the call to the xen hook. Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|