xen has a option "--enable-ovmf", if enabled, could enable UEFI boot support in guest VM. I checked the EBUILD file, such option is not mentioned in the file, nor any USE flag related to it.
by default ovmf is not enabled[1], but I think it would be fine to introduce a USE="ovmf" to control this. also we need to patch the build script to avoid downloading code during compile stage (using git clone) [1] http://wiki.xen.org/wiki/OVMF [2] GIT=git /var/tmp/portage/app-emulation/xen-tools-4.4.1-r1/work/xen-4.4.1/tools/firmware/../../scripts/git-checkout.sh git://xenbits.xen.org/ovmf.git 447d264115c476142f884af0be287622cd244423 ovmf-dir Cloning into 'ovmf-dir-remote.tmp'... I may revisit this in a few days, thanks for reporting
Created attachment 388502 [details, diff] xen-tools's ovmf support (patch against xen-tools-4.4.1-r2) here is what I've got so far, ovmf support was added, but I've only done a compiling test. ovmf itself need a few patches to apply, which can be download from my dev space[1]. [1] http://dev.gentoo.org/~dlan/distfiles/{ovmf-20131208.tar.bz2,xen-ovmf-patches-0.tar.xz,xen-gentoo-patches-2.tar.xz,ovmf-20131208.tar.bz2} I'm less motivated to play with ovmf, so wish you can report back here. (to build this version, you only need to apply the patch to ${PORTDIR}/app-emulation/xen-tools, then "repoman manifest && emerge xen-tools")
Created attachment 388592 [details, diff] patch to gentoo-patches.conf Slightly edited patch to dlan's initial one for gentoo-patches.conf
Created attachment 388594 [details, diff] diff between a xen-tools-4.4.1-r2.ebuild and a soon will be xen-tools-4.4.1-r3.ebuild This works for me. dlan has refined his attempt to another version which also works, making 2 working solutions. We will likely decide on the following 24 hours on a final form to add to portage. Xi you can try one or both of the 2 present here for a test run. Note The new ovmf flag will be set in REQUIRED_USE needing the hvm flag which in turn needs the qemu flag. Note also the built ovmf.bin is built into the final hvmloader
+*xen-tools-4.4.1-r3 (06 Nov 2014) + + 06 Nov 2014; Yixun Lan <dlan@gentoo.org> +xen-tools-4.4.1-r3.ebuild, + files/gentoo-patches.conf, files/xenqemudev.initd, metadata.xml: + enable ovmf bios support, bug 526080