3c2f525a91
libxl.pvscsi.patch - bnc#875668 - VUL-0: CVE-2014-3124: xen: XSA-92: HVMOP_set_mem_type allows invalid P2M entries to be created 535fa503-x86-HVM-restrict-HVMOP_set_mem_type.patch (replaces xsa92.patch) - bnc#826717 - VUL-0: CVE-2013-3495: XSA-59: xen: Intel VT-d Interrupt Remapping engines can be evaded by native NMI interrupts 535a34eb-VT-d-suppress-UR-signaling-for-server-chipsets.patch 535a3516-VT-d-suppress-UR-signaling-for-desktop-chipsets.patch - Upstream patches from Jan 535a354b-passthrough-allow-to-suppress-SERR-and-PERR-signaling.patch 535e31bc-x86-HVM-correct-the-SMEP-logic-for-HVM_CR0_GUEST_RESERVED_BITS.patch 53636978-hvm_set_ioreq_page-releases-wrong-page-in-error-path.patch 53636ebf-x86-fix-guest-CPUID-handling.patch - Fix pygrub to handle VM with no grub/menu.lst file. - Don't use /var/run/xend/boot for temporary boot directory pygrub-boot-legacy-sles.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=314
59 lines
2.2 KiB
Diff
59 lines
2.2 KiB
Diff
Index: xen-4.4.0-testing/tools/pygrub/src/pygrub
|
|
===================================================================
|
|
--- xen-4.4.0-testing.orig/tools/pygrub/src/pygrub
|
|
+++ xen-4.4.0-testing/tools/pygrub/src/pygrub
|
|
@@ -452,7 +452,7 @@ class Grub:
|
|
self.cf.filename = f
|
|
break
|
|
if self.__dict__.get('cf', None) is None:
|
|
- raise RuntimeError, "couldn't find bootloader config file in the image provided."
|
|
+ return
|
|
f = fs.open_file(self.cf.filename)
|
|
# limit read size to avoid pathological cases
|
|
buf = f.read(FS_READ_MAX)
|
|
@@ -598,6 +598,20 @@ def run_grub(file, entry, fs, cfg_args):
|
|
|
|
g = Grub(file, fs)
|
|
|
|
+ # If missing config or grub has no menu entries to select, look for
|
|
+ # vmlinuz-xen and initrd-xen in /boot
|
|
+ if g.__dict__.get('cf', None) is None or len(g.cf.images) == 0:
|
|
+ if not list_entries:
|
|
+ chosencfg = { "kernel": None, "ramdisk": None, "args": "" }
|
|
+ chosencfg = sniff_xen_kernel(fs, incfg)
|
|
+ if chosencfg["kernel"] and chosencfg["ramdisk"]:
|
|
+ chosencfg["args"] = cfg_args
|
|
+ return chosencfg
|
|
+ if g.__dict__.get('cf', None) is None:
|
|
+ raise RuntimeError, "couldn't find bootloader config file in the image provided."
|
|
+ else:
|
|
+ return
|
|
+
|
|
if list_entries:
|
|
for i in range(len(g.cf.images)):
|
|
img = g.cf.images[i]
|
|
@@ -693,6 +707,14 @@ def sniff_netware(fs, cfg):
|
|
|
|
return cfg
|
|
|
|
+def sniff_xen_kernel(fs, cfg):
|
|
+ if not cfg["kernel"] and fs.file_exists('/boot/vmlinuz-xen'):
|
|
+ cfg["kernel"] = '/boot/vmlinuz-xen'
|
|
+ if cfg["kernel"] and not cfg["ramdisk"]:
|
|
+ if fs.file_exists('/boot/initrd-xen'):
|
|
+ cfg["ramdisk"] = '/boot/initrd-xen'
|
|
+ return cfg
|
|
+
|
|
def format_sxp(kernel, ramdisk, args):
|
|
s = "linux (kernel %s)" % kernel
|
|
if ramdisk:
|
|
@@ -773,7 +795,7 @@ if __name__ == "__main__":
|
|
debug = False
|
|
not_really = False
|
|
output_format = "sxp"
|
|
- output_directory = "/var/run/xend/boot"
|
|
+ output_directory = "/var/run/xen"
|
|
|
|
# what was passed in
|
|
incfg = { "kernel": None, "ramdisk": None, "args": "" }
|