mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
Revert "xen/x86: bzImage parse kernel_alignment"
A new ELF note will specify the alignment for a relocatable PVH kernel.
ELF notes are suitable for vmlinux and other ELF files, so this
Linux-specific bzImage parsing in unnecessary.
This reverts commit c44cac2290.
Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
f6a4139948
commit
8802230bfa
4 files changed
+4
-8
No files matched your search
@@ -105,7 +105,7 @@ unsigned long __init bzimage_headroom(void *image_start,
|
||||
}
|
||||
|
||||
int __init bzimage_parse(void *image_base, void **image_start,
|
||||
unsigned long *image_len, unsigned int *align)
|
||||
unsigned long *image_len)
|
||||
{
|
||||
struct setup_header *hdr = (struct setup_header *)(*image_start);
|
||||
int err = bzimage_check(hdr, *image_len);
|
||||
@@ -118,8 +118,6 @@ int __init bzimage_parse(void *image_base, void **image_start,
|
||||
{
|
||||
*image_start += (hdr->setup_sects + 1) * 512 + hdr->payload_offset;
|
||||
*image_len = hdr->payload_length;
|
||||
if ( align )
|
||||
*align = hdr->kernel_alignment;
|
||||
}
|
||||
|
||||
if ( elf_is_elfbinary(*image_start, *image_len) )
|
||||
|
||||
@@ -548,14 +548,12 @@ static int __init pvh_load_kernel(struct domain *d, const module_t *image,
|
||||
struct elf_binary elf;
|
||||
struct elf_dom_parms parms;
|
||||
paddr_t last_addr;
|
||||
unsigned int align = 0;
|
||||
struct hvm_start_info start_info = { 0 };
|
||||
struct hvm_modlist_entry mod = { 0 };
|
||||
struct vcpu *v = d->vcpu[0];
|
||||
int rc;
|
||||
|
||||
rc = bzimage_parse(image_base, &image_start, &image_len, &align);
|
||||
if ( rc != 0 )
|
||||
if ( (rc = bzimage_parse(image_base, &image_start, &image_len)) != 0 )
|
||||
{
|
||||
printk("Error trying to detect bz compressed kernel\n");
|
||||
return rc;
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
unsigned long bzimage_headroom(void *image_start, unsigned long image_length);
|
||||
|
||||
int bzimage_parse(void *image_base, void **image_start,
|
||||
unsigned long *image_len, unsigned int *align);
|
||||
unsigned long *image_len);
|
||||
|
||||
#endif /* __X86_BZIMAGE_H__ */
|
||||
@@ -416,7 +416,7 @@ int __init dom0_construct_pv(struct domain *d,
|
||||
|
||||
d->max_pages = ~0U;
|
||||
|
||||
if ( (rc = bzimage_parse(image_base, &image_start, &image_len, NULL)) != 0 )
|
||||
if ( (rc = bzimage_parse(image_base, &image_start, &image_len)) != 0 )
|
||||
return rc;
|
||||
|
||||
if ( (rc = elf_init(&elf, image_start, image_len)) != 0 )
|
||||
|
||||