xen: Fix inconsistent callers of panic()

Callers are inconsistent with whether they pass a newline to panic(),
including adjacent calls in the same function using different styles.

painc() not expecting a newline is inconsistent with most other printing
functions, which is most likely why we've gained so many inconsistencies.

Switch panic() to expect a newline, and update all callers which currently
lack a newline to include one.

This actually reduces the size of .rodata (0x07e3e8 down to 0x07e3a8) because
a number of strings are passed to both panic() and printk().  As they
previously differed by \n alone, they couldn't be merged.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <julien.grall@arm.com>
This commit is contained in:
Andrew Cooper committed 2018-09-11 10:33:46 +01:00
1 parent 66b245d9ea
commit 25eb5eec79
48 files changed
+141 -143

No files matched your search

+1 -1
View File
@@ -80,7 +80,7 @@ static __init int vfp_init(void)
vfparch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT; vfparch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT;
if ( vfparch < 2 ) if ( vfparch < 2 )
panic("Xen only support VFP 3"); panic("Xen only support VFP 3\n");
return 0; return 0;
} }
+1 -1
View File
@@ -40,7 +40,7 @@ void do_bad_mode(struct cpu_user_regs *regs, int reason)
local_irq_disable(); local_irq_disable();
show_execution_state(regs); show_execution_state(regs);
panic("bad mode"); panic("bad mode\n");
} }
/* /*
+10 -10
View File
@@ -125,7 +125,7 @@ static bool __init insert_11_bank(struct domain *d,
res = guest_physmap_add_page(d, _gfn(mfn_x(smfn)), smfn, order); res = guest_physmap_add_page(d, _gfn(mfn_x(smfn)), smfn, order);
if ( res ) if ( res )
panic("Failed map pages to DOM0: %d", res); panic("Failed map pages to DOM0: %d\n", res);
kinfo->unassigned_mem -= size; kinfo->unassigned_mem -= size;
@@ -289,7 +289,7 @@ static void __init allocate_memory(struct domain *d, struct kernel_info *kinfo)
/* Failed to allocate bank0 under 4GB */ /* Failed to allocate bank0 under 4GB */
if ( is_32bit_domain(d) ) if ( is_32bit_domain(d) )
panic("Unable to allocate first memory bank."); panic("Unable to allocate first memory bank\n");
/* Try to allocate memory from above 4GB */ /* Try to allocate memory from above 4GB */
printk(XENLOG_INFO "No bank has been allocated below 4GB.\n"); printk(XENLOG_INFO "No bank has been allocated below 4GB.\n");
@@ -598,7 +598,7 @@ static int __init make_hypervisor_node(struct domain *d,
*/ */
if ((addrcells != 1 && addrcells != 2) || if ((addrcells != 1 && addrcells != 2) ||
(sizecells != 1 && sizecells != 2)) (sizecells != 1 && sizecells != 2))
panic("Cannot cope with this size"); panic("Cannot cope with this size\n");
/* See linux Documentation/devicetree/bindings/arm/xen.txt */ /* See linux Documentation/devicetree/bindings/arm/xen.txt */
res = fdt_begin_node(fdt, "hypervisor"); res = fdt_begin_node(fdt, "hypervisor");
@@ -1586,7 +1586,7 @@ static void __init acpi_map_other_tables(struct domain *d)
if ( res ) if ( res )
{ {
panic(XENLOG_ERR "Unable to map ACPI region 0x%"PRIx64 panic(XENLOG_ERR "Unable to map ACPI region 0x%"PRIx64
" - 0x%"PRIx64" in domain \n", " - 0x%"PRIx64" in domain\n",
addr & PAGE_MASK, PAGE_ALIGN(addr + size) - 1); addr & PAGE_MASK, PAGE_ALIGN(addr + size) - 1);
} }
} }
@@ -1994,7 +1994,7 @@ static void __init dtb_load(struct kernel_info *kinfo)
fdt_totalsize(kinfo->fdt)); fdt_totalsize(kinfo->fdt));
if ( left != 0 ) if ( left != 0 )
panic("Unable to copy the DTB to dom0 memory (left = %lu bytes)", left); panic("Unable to copy the DTB to dom0 memory (left = %lu bytes)\n", left);
xfree(kinfo->fdt); xfree(kinfo->fdt);
} }
@@ -2021,30 +2021,30 @@ static void __init initrd_load(struct kernel_info *kinfo)
/* Fix up linux,initrd-start and linux,initrd-end in /chosen */ /* Fix up linux,initrd-start and linux,initrd-end in /chosen */
node = fdt_path_offset(kinfo->fdt, "/chosen"); node = fdt_path_offset(kinfo->fdt, "/chosen");
if ( node < 0 ) if ( node < 0 )
panic("Cannot find the /chosen node"); panic("Cannot find the /chosen node\n");
cellp = (__be32 *)val; cellp = (__be32 *)val;
dt_set_cell(&cellp, ARRAY_SIZE(val), load_addr); dt_set_cell(&cellp, ARRAY_SIZE(val), load_addr);
res = fdt_setprop_inplace(kinfo->fdt, node, "linux,initrd-start", res = fdt_setprop_inplace(kinfo->fdt, node, "linux,initrd-start",
val, sizeof(val)); val, sizeof(val));
if ( res ) if ( res )
panic("Cannot fix up \"linux,initrd-start\" property"); panic("Cannot fix up \"linux,initrd-start\" property\n");
cellp = (__be32 *)val; cellp = (__be32 *)val;
dt_set_cell(&cellp, ARRAY_SIZE(val), load_addr + len); dt_set_cell(&cellp, ARRAY_SIZE(val), load_addr + len);
res = fdt_setprop_inplace(kinfo->fdt, node, "linux,initrd-end", res = fdt_setprop_inplace(kinfo->fdt, node, "linux,initrd-end",
val, sizeof(val)); val, sizeof(val));
if ( res ) if ( res )
panic("Cannot fix up \"linux,initrd-end\" property"); panic("Cannot fix up \"linux,initrd-end\" property\n");
initrd = ioremap_wc(paddr, len); initrd = ioremap_wc(paddr, len);
if ( !initrd ) if ( !initrd )
panic("Unable to map the hwdom initrd"); panic("Unable to map the hwdom initrd\n");
res = copy_to_guest_phys_flush_dcache(kinfo->d, load_addr, res = copy_to_guest_phys_flush_dcache(kinfo->d, load_addr,
initrd, len); initrd, len);
if ( res != 0 ) if ( res != 0 )
panic("Unable to copy the initrd in the hwdom memory"); panic("Unable to copy the initrd in the hwdom memory\n");
} }
/* /*
+12 -12
View File
@@ -941,7 +941,7 @@ static void gicv2_add_v2m_frame_to_list(paddr_t addr, paddr_t size,
base = ioremap_nocache(addr, size); base = ioremap_nocache(addr, size);
if ( !base ) if ( !base )
panic("GICv2: Cannot remap v2m register frame"); panic("GICv2: Cannot remap v2m register frame\n");
msi_typer = readl_relaxed(base + V2M_MSI_TYPER); msi_typer = readl_relaxed(base + V2M_MSI_TYPER);
spi_start = V2M_MSI_TYPER_BASE_SPI(msi_typer); spi_start = V2M_MSI_TYPER_BASE_SPI(msi_typer);
@@ -960,7 +960,7 @@ static void gicv2_add_v2m_frame_to_list(paddr_t addr, paddr_t size,
/* Allocate an entry to record new v2m frame information. */ /* Allocate an entry to record new v2m frame information. */
v2m_data = xzalloc_bytes(sizeof(struct v2m_data)); v2m_data = xzalloc_bytes(sizeof(struct v2m_data));
if ( !v2m_data ) if ( !v2m_data )
panic("GICv2: Cannot allocate memory for v2m frame"); panic("GICv2: Cannot allocate memory for v2m frame\n");
INIT_LIST_HEAD(&v2m_data->entry); INIT_LIST_HEAD(&v2m_data->entry);
v2m_data->addr = addr; v2m_data->addr = addr;
@@ -998,7 +998,7 @@ static void gicv2_extension_dt_init(const struct dt_device_node *node)
/* Get register frame resource from DT. */ /* Get register frame resource from DT. */
if ( dt_device_get_address(v2m, 0, &addr, &size) ) if ( dt_device_get_address(v2m, 0, &addr, &size) )
panic("GICv2: Cannot find a valid v2m frame address"); panic("GICv2: Cannot find a valid v2m frame address\n");
/* /*
* Check whether DT uses msi-base-spi and msi-num-spis properties to * Check whether DT uses msi-base-spi and msi-num-spis properties to
@@ -1024,23 +1024,23 @@ static void __init gicv2_dt_init(void)
res = dt_device_get_address(node, 0, &dbase, NULL); res = dt_device_get_address(node, 0, &dbase, NULL);
if ( res ) if ( res )
panic("GICv2: Cannot find a valid address for the distributor"); panic("GICv2: Cannot find a valid address for the distributor\n");
res = dt_device_get_address(node, 1, &cbase, &csize); res = dt_device_get_address(node, 1, &cbase, &csize);
if ( res ) if ( res )
panic("GICv2: Cannot find a valid address for the CPU"); panic("GICv2: Cannot find a valid address for the CPU\n");
res = dt_device_get_address(node, 2, &hbase, NULL); res = dt_device_get_address(node, 2, &hbase, NULL);
if ( res ) if ( res )
panic("GICv2: Cannot find a valid address for the hypervisor"); panic("GICv2: Cannot find a valid address for the hypervisor\n");
res = dt_device_get_address(node, 3, &vbase, &vsize); res = dt_device_get_address(node, 3, &vbase, &vsize);
if ( res ) if ( res )
panic("GICv2: Cannot find a valid address for the virtual CPU"); panic("GICv2: Cannot find a valid address for the virtual CPU\n");
res = platform_get_irq(node, 0); res = platform_get_irq(node, 0);
if ( res < 0 ) if ( res < 0 )
panic("GICv2: Cannot find the maintenance IRQ"); panic("GICv2: Cannot find the maintenance IRQ\n");
gicv2_info.maintenance_irq = res; gicv2_info.maintenance_irq = res;
/* TODO: Add check on distributor */ /* TODO: Add check on distributor */
@@ -1215,7 +1215,7 @@ static void __init gicv2_acpi_init(void)
{ {
const char *msg = acpi_format_exception(status); const char *msg = acpi_format_exception(status);
panic("GICv2: Failed to get MADT table, %s", msg); panic("GICv2: Failed to get MADT table, %s\n", msg);
} }
/* Collect CPU base addresses */ /* Collect CPU base addresses */
@@ -1223,7 +1223,7 @@ static void __init gicv2_acpi_init(void)
gic_acpi_parse_madt_cpu, table, gic_acpi_parse_madt_cpu, table,
ACPI_MADT_TYPE_GENERIC_INTERRUPT, 0); ACPI_MADT_TYPE_GENERIC_INTERRUPT, 0);
if ( count <= 0 ) if ( count <= 0 )
panic("GICv2: No valid GICC entries exists"); panic("GICv2: No valid GICC entries exists\n");
/* /*
* Find distributor base address. We expect one distributor entry since * Find distributor base address. We expect one distributor entry since
@@ -1233,7 +1233,7 @@ static void __init gicv2_acpi_init(void)
gic_acpi_parse_madt_distributor, table, gic_acpi_parse_madt_distributor, table,
ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR, 0); ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR, 0);
if ( count <= 0 ) if ( count <= 0 )
panic("GICv2: No valid GICD entries exists"); panic("GICv2: No valid GICD entries exists\n");
} }
#else #else
static void __init gicv2_acpi_init(void) { } static void __init gicv2_acpi_init(void) { }
@@ -1263,7 +1263,7 @@ static int __init gicv2_init(void)
if ( (dbase & ~PAGE_MASK) || (cbase & ~PAGE_MASK) || if ( (dbase & ~PAGE_MASK) || (cbase & ~PAGE_MASK) ||
(hbase & ~PAGE_MASK) || (vbase & ~PAGE_MASK) ) (hbase & ~PAGE_MASK) || (vbase & ~PAGE_MASK) )
panic("GICv2 interfaces not page aligned"); panic("GICv2 interfaces not page aligned\n");
gicv2.map_dbase = ioremap_nocache(dbase, PAGE_SIZE); gicv2.map_dbase = ioremap_nocache(dbase, PAGE_SIZE);
if ( !gicv2.map_dbase ) if ( !gicv2.map_dbase )
+2 -2
View File
@@ -992,7 +992,7 @@ static void add_to_host_its_list(paddr_t addr, paddr_t size,
its_data = xzalloc(struct host_its); its_data = xzalloc(struct host_its);
if ( !its_data ) if ( !its_data )
panic("GICv3: Cannot allocate memory for ITS frame"); panic("GICv3: Cannot allocate memory for ITS frame\n");
its_data->addr = addr; its_data->addr = addr;
its_data->size = size; its_data->size = size;
@@ -1020,7 +1020,7 @@ static void gicv3_its_dt_init(const struct dt_device_node *node)
continue; continue;
if ( dt_device_get_address(its, 0, &addr, &size) ) if ( dt_device_get_address(its, 0, &addr, &size) )
panic("GICv3: Cannot find a valid ITS frame address"); panic("GICv3: Cannot find a valid ITS frame address\n");
add_to_host_its_list(addr, size, its); add_to_host_its_list(addr, size, its);
} }
+7 -7
View File
@@ -1345,7 +1345,7 @@ static void __init gicv3_init_v2(void)
static void __init gicv3_ioremap_distributor(paddr_t dist_paddr) static void __init gicv3_ioremap_distributor(paddr_t dist_paddr)
{ {
if ( dist_paddr & ~PAGE_MASK ) if ( dist_paddr & ~PAGE_MASK )
panic("GICv3: Found unaligned distributor address %"PRIpaddr"", panic("GICv3: Found unaligned distributor address %"PRIpaddr"\n",
dbase); dbase);
gicv3.map_dbase = ioremap_nocache(dist_paddr, SZ_64K); gicv3.map_dbase = ioremap_nocache(dist_paddr, SZ_64K);
@@ -1361,7 +1361,7 @@ static void __init gicv3_dt_init(void)
res = dt_device_get_address(node, 0, &dbase, NULL); res = dt_device_get_address(node, 0, &dbase, NULL);
if ( res ) if ( res )
panic("GICv3: Cannot find a valid distributor address"); panic("GICv3: Cannot find a valid distributor address\n");
gicv3_ioremap_distributor(dbase); gicv3_ioremap_distributor(dbase);
@@ -1392,7 +1392,7 @@ static void __init gicv3_dt_init(void)
res = platform_get_irq(node, 0); res = platform_get_irq(node, 0);
if ( res < 0 ) if ( res < 0 )
panic("GICv3: Cannot find the maintenance IRQ"); panic("GICv3: Cannot find the maintenance IRQ\n");
gicv3_info.maintenance_irq = res; gicv3_info.maintenance_irq = res;
/* /*
@@ -1652,7 +1652,7 @@ static void __init gicv3_acpi_init(void)
count = acpi_table_parse_madt(ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR, count = acpi_table_parse_madt(ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR,
gic_acpi_parse_madt_distributor, 0); gic_acpi_parse_madt_distributor, 0);
if ( count <= 0 ) if ( count <= 0 )
panic("GICv3: No valid GICD entries exists"); panic("GICv3: No valid GICD entries exists\n");
gicv3_ioremap_distributor(dbase); gicv3_ioremap_distributor(dbase);
@@ -1664,7 +1664,7 @@ static void __init gicv3_acpi_init(void)
count = acpi_table_parse_madt(ACPI_MADT_TYPE_GENERIC_INTERRUPT, count = acpi_table_parse_madt(ACPI_MADT_TYPE_GENERIC_INTERRUPT,
gic_acpi_get_madt_cpu_num, 0); gic_acpi_get_madt_cpu_num, 0);
if (count <= 0) if (count <= 0)
panic("GICv3: No valid GICR entries exists"); panic("GICv3: No valid GICR entries exists\n");
gicr_table = false; gicr_table = false;
} }
@@ -1684,13 +1684,13 @@ static void __init gicv3_acpi_init(void)
count = acpi_table_parse_madt(ACPI_MADT_TYPE_GENERIC_INTERRUPT, count = acpi_table_parse_madt(ACPI_MADT_TYPE_GENERIC_INTERRUPT,
gic_acpi_parse_cpu_redistributor, count); gic_acpi_parse_cpu_redistributor, count);
if ( count <= 0 ) if ( count <= 0 )
panic("GICv3: Can't get Redistributor entry"); panic("GICv3: Can't get Redistributor entry\n");
/* Collect CPU base addresses */ /* Collect CPU base addresses */
count = acpi_table_parse_madt(ACPI_MADT_TYPE_GENERIC_INTERRUPT, count = acpi_table_parse_madt(ACPI_MADT_TYPE_GENERIC_INTERRUPT,
gic_acpi_parse_madt_cpu, 0); gic_acpi_parse_madt_cpu, 0);
if ( count <= 0 ) if ( count <= 0 )
panic("GICv3: No valid GICC entries exists"); panic("GICv3: No valid GICC entries exists\n");
gicv3.rdist_stride = 0; gicv3.rdist_stride = 0;
+5 -5
View File
@@ -246,7 +246,7 @@ static void __init gic_dt_preinit(void)
} }
} }
if ( !num_gics ) if ( !num_gics )
panic("Unable to find compatible GIC in the device tree"); panic("Unable to find compatible GIC in the device tree\n");
/* Set the GIC as the primary interrupt controller */ /* Set the GIC as the primary interrupt controller */
dt_interrupt_controller = node; dt_interrupt_controller = node;
@@ -261,12 +261,12 @@ static void __init gic_acpi_preinit(void)
header = acpi_table_get_entry_madt(ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR, 0); header = acpi_table_get_entry_madt(ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR, 0);
if ( !header ) if ( !header )
panic("No valid GICD entries exists"); panic("No valid GICD entries exists\n");
dist = container_of(header, struct acpi_madt_generic_distributor, header); dist = container_of(header, struct acpi_madt_generic_distributor, header);
if ( acpi_device_init(DEVICE_GIC, NULL, dist->version) ) if ( acpi_device_init(DEVICE_GIC, NULL, dist->version) )
panic("Unable to find compatible GIC in the ACPI table"); panic("Unable to find compatible GIC in the ACPI table\n");
} }
#else #else
static void __init gic_acpi_preinit(void) { } static void __init gic_acpi_preinit(void) { }
@@ -287,7 +287,7 @@ void __init gic_preinit(void)
void __init gic_init(void) void __init gic_init(void)
{ {
if ( gic_hw_ops->init() ) if ( gic_hw_ops->init() )
panic("Failed to initialize the GIC drivers"); panic("Failed to initialize the GIC drivers\n");
/* Clear LR mask for cpu0 */ /* Clear LR mask for cpu0 */
clear_cpu_lr_mask(); clear_cpu_lr_mask();
} }
@@ -364,7 +364,7 @@ static void do_sgi(struct cpu_user_regs *regs, enum gic_sgi sgi)
smp_call_function_interrupt(); smp_call_function_interrupt();
break; break;
default: default:
panic("Unhandled SGI %d on CPU%d", sgi, smp_processor_id()); panic("Unhandled SGI %d on CPU%d\n", sgi, smp_processor_id());
break; break;
} }
+4 -4
View File
@@ -87,7 +87,7 @@ static void __init place_modules(struct kernel_info *info,
paddr_t modbase; paddr_t modbase;
if ( modsize + kernsize > ramsize ) if ( modsize + kernsize > ramsize )
panic("Not enough memory in the first bank for the kernel+dtb+initrd"); panic("Not enough memory in the first bank for the kernel+dtb+initrd\n");
/* /*
* DTB must be loaded such that it does not conflict with the * DTB must be loaded such that it does not conflict with the
@@ -114,7 +114,7 @@ static void __init place_modules(struct kernel_info *info,
modbase = kernbase - modsize; modbase = kernbase - modsize;
else else
{ {
panic("Unable to find suitable location for dtb+initrd"); panic("Unable to find suitable location for dtb+initrd\n");
return; return;
} }
@@ -171,12 +171,12 @@ static void __init kernel_zimage_load(struct kernel_info *info)
kernel = ioremap_wc(paddr, len); kernel = ioremap_wc(paddr, len);
if ( !kernel ) if ( !kernel )
panic("Unable to map the hwdom kernel"); panic("Unable to map the hwdom kernel\n");
rc = copy_to_guest_phys_flush_dcache(info->d, load_addr, rc = copy_to_guest_phys_flush_dcache(info->d, load_addr,
kernel, len); kernel, len);
if ( rc != 0 ) if ( rc != 0 )
panic("Unable to copy the kernel in the hwdom memory"); panic("Unable to copy the kernel in the hwdom memory\n");
iounmap(kernel); iounmap(kernel);
} }
+1 -1
View File
@@ -830,7 +830,7 @@ void __init setup_xenheap_mappings(unsigned long base_mfn,
} }
if ( base_mfn < mfn_x(xenheap_mfn_start) ) if ( base_mfn < mfn_x(xenheap_mfn_start) )
panic("cannot add xenheap mapping at %lx below heap start %lx", panic("cannot add xenheap mapping at %lx below heap start %lx\n",
base_mfn, mfn_x(xenheap_mfn_start)); base_mfn, mfn_x(xenheap_mfn_start));
end_mfn = base_mfn + nr_mfns; end_mfn = base_mfn + nr_mfns;
+1 -1
View File
@@ -1164,7 +1164,7 @@ static void p2m_vmid_allocator_init(void)
vmid_mask = xzalloc_array(unsigned long, BITS_TO_LONGS(MAX_VMID)); vmid_mask = xzalloc_array(unsigned long, BITS_TO_LONGS(MAX_VMID));
if ( !vmid_mask ) if ( !vmid_mask )
panic("Could not allocate VMID bitmap space"); panic("Could not allocate VMID bitmap space\n");
set_bit(INVALID_VMID, vmid_mask); set_bit(INVALID_VMID, vmid_mask);
} }
+1 -1
View File
@@ -71,7 +71,7 @@ void __init platform_init(void)
res = platform->init(); res = platform->init();
if ( res ) if ( res )
panic("Unable to initialize the platform"); panic("Unable to initialize the platform\n");
} }
int __init platform_init_time(void) int __init platform_init_time(void)
+3 -3
View File
@@ -48,11 +48,11 @@ static void __init xgene_check_pirq_eoi(void)
node = dt_find_interrupt_controller(xgene_dt_int_ctrl_match); node = dt_find_interrupt_controller(xgene_dt_int_ctrl_match);
if ( !node ) if ( !node )
panic("%s: Can not find interrupt controller node", __func__); panic("%s: Can not find interrupt controller node\n", __func__);
res = dt_device_get_address(node, 0, &dbase, NULL); res = dt_device_get_address(node, 0, &dbase, NULL);
if ( !dbase ) if ( !dbase )
panic("%s: Cannot find a valid address for the distributor", __func__); panic("%s: Cannot find a valid address for the distributor\n", __func__);
/* /*
* In old X-Gene Storm firmware and DT, secure mode addresses have * In old X-Gene Storm firmware and DT, secure mode addresses have
@@ -62,7 +62,7 @@ static void __init xgene_check_pirq_eoi(void)
*/ */
if ( dbase == XGENE_SEC_GICV2_DIST_ADDR ) if ( dbase == XGENE_SEC_GICV2_DIST_ADDR )
panic("OLD X-Gene Firmware is not supported by Xen.\n" panic("OLD X-Gene Firmware is not supported by Xen.\n"
"Please upgrade your firmware to the latest version"); "Please upgrade your firmware to the latest version\n");
} }
static uint32_t xgene_storm_quirks(void) static uint32_t xgene_storm_quirks(void)
+6 -6
View File
@@ -425,7 +425,7 @@ static paddr_t __init get_xen_paddr(void)
} }
if ( !paddr ) if ( !paddr )
panic("Not enough memory to relocate Xen"); panic("Not enough memory to relocate Xen\n");
printk("Placing Xen at 0x%"PRIpaddr"-0x%"PRIpaddr"\n", printk("Placing Xen at 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
paddr, paddr + min_size); paddr, paddr + min_size);
@@ -483,7 +483,7 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)
void *fdt; void *fdt;
if ( !bootinfo.mem.nr_banks ) if ( !bootinfo.mem.nr_banks )
panic("No memory bank"); panic("No memory bank\n");
init_pdx(); init_pdx();
@@ -538,7 +538,7 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)
} while ( !opt_xenheap_megabytes && xenheap_pages > 32<<(20-PAGE_SHIFT) ); } while ( !opt_xenheap_megabytes && xenheap_pages > 32<<(20-PAGE_SHIFT) );
if ( ! e ) if ( ! e )
panic("Not not enough space for xenheap"); panic("Not not enough space for xenheap\n");
domheap_pages = heap_pages - xenheap_pages; domheap_pages = heap_pages - xenheap_pages;
@@ -716,7 +716,7 @@ void __init start_xen(unsigned long boot_phys_offset,
if ( !device_tree_flattened ) if ( !device_tree_flattened )
panic("Invalid device tree blob at physical address %#lx.\n" panic("Invalid device tree blob at physical address %#lx.\n"
"The DTB must be 8-byte aligned and must not exceed 2 MB in size.\n\n" "The DTB must be 8-byte aligned and must not exceed 2 MB in size.\n\n"
"Please check your bootloader.", "Please check your bootloader.\n",
fdt_paddr); fdt_paddr);
fdt_size = boot_fdt_info(device_tree_flattened, fdt_paddr); fdt_size = boot_fdt_info(device_tree_flattened, fdt_paddr);
@@ -855,10 +855,10 @@ void __init start_xen(unsigned long boot_phys_offset,
dom0 = domain_create(0, &dom0_cfg, true); dom0 = domain_create(0, &dom0_cfg, true);
if ( IS_ERR(dom0) || (alloc_dom0_vcpu0(dom0) == NULL) ) if ( IS_ERR(dom0) || (alloc_dom0_vcpu0(dom0) == NULL) )
panic("Error creating domain 0"); panic("Error creating domain 0\n");
if ( construct_dom0(dom0) != 0) if ( construct_dom0(dom0) != 0)
panic("Could not set up DOM0 guest OS"); panic("Could not set up DOM0 guest OS\n");
heap_init_late(); heap_init_late();
+1 -1
View File
@@ -82,7 +82,7 @@ static void setup_cpu_sibling_map(int cpu)
{ {
if ( !zalloc_cpumask_var(&per_cpu(cpu_sibling_mask, cpu)) || if ( !zalloc_cpumask_var(&per_cpu(cpu_sibling_mask, cpu)) ||
!zalloc_cpumask_var(&per_cpu(cpu_core_mask, cpu)) ) !zalloc_cpumask_var(&per_cpu(cpu_core_mask, cpu)) )
panic("No memory for CPU sibling/core maps"); panic("No memory for CPU sibling/core maps\n");
/* A CPU is a sibling with itself and is always on its own core. */ /* A CPU is a sibling with itself and is always on its own core. */
cpumask_set_cpu(cpu, per_cpu(cpu_sibling_mask, cpu)); cpumask_set_cpu(cpu, per_cpu(cpu_sibling_mask, cpu));
+4 -4
View File
@@ -122,7 +122,7 @@ static void __init preinit_dt_xen_time(void)
timer = dt_find_matching_node(NULL, timer_ids); timer = dt_find_matching_node(NULL, timer_ids);
if ( !timer ) if ( !timer )
panic("Unable to find a compatible timer in the device tree"); panic("Unable to find a compatible timer in the device tree\n");
dt_device_set_used_by(timer, DOMID_XEN); dt_device_set_used_by(timer, DOMID_XEN);
@@ -149,7 +149,7 @@ void __init preinit_xen_time(void)
res = platform_init_time(); res = platform_init_time();
if ( res ) if ( res )
panic("Timer: Cannot initialize platform timer"); panic("Timer: Cannot initialize platform timer\n");
boot_count = READ_SYSREG64(CNTPCT_EL0); boot_count = READ_SYSREG64(CNTPCT_EL0);
} }
@@ -165,7 +165,7 @@ static void __init init_dt_xen_time(void)
res = platform_get_irq(timer, i); res = platform_get_irq(timer, i);
if ( res < 0 ) if ( res < 0 )
panic("Timer: Unable to retrieve IRQ %u from the device tree", i); panic("Timer: Unable to retrieve IRQ %u from the device tree\n", i);
timer_irq[i] = res; timer_irq[i] = res;
} }
} }
@@ -178,7 +178,7 @@ int __init init_xen_time(void)
/* Check that this CPU supports the Generic Timer interface */ /* Check that this CPU supports the Generic Timer interface */
if ( !cpu_has_gentimer ) if ( !cpu_has_gentimer )
panic("CPU does not support the Generic Timer v1 interface"); panic("CPU does not support the Generic Timer v1 interface\n");
printk("Generic Timer IRQ: phys=%u hyp=%u virt=%u Freq: %lu KHz\n", printk("Generic Timer IRQ: phys=%u hyp=%u virt=%u Freq: %lu KHz\n",
timer_irq[TIMER_PHYS_NONSECURE_PPI], timer_irq[TIMER_PHYS_NONSECURE_PPI],
+4 -4
View File
@@ -399,7 +399,7 @@ void panic_PAR(uint64_t par)
second_in_first ? " during second stage lookup" : "", second_in_first ? " during second stage lookup" : "",
fsc_level_str(level)); fsc_level_str(level));
panic("Error during Hypervisor-to-physical address translation"); panic("Error during Hypervisor-to-physical address translation\n");
} }
static void cpsr_switch_mode(struct cpu_user_regs *regs, int mode) static void cpsr_switch_mode(struct cpu_user_regs *regs, int mode)
@@ -1312,7 +1312,7 @@ int do_bug_frame(struct cpu_user_regs *regs, vaddr_t pc)
return 0; return 0;
show_execution_state(regs); show_execution_state(regs);
panic("Xen BUG at %s%s:%d", prefix, filename, lineno); panic("Xen BUG at %s%s:%d\n", prefix, filename, lineno);
case BUGFRAME_assert: case BUGFRAME_assert:
/* ASSERT: decode the predicate string pointer. */ /* ASSERT: decode the predicate string pointer. */
@@ -1325,7 +1325,7 @@ int do_bug_frame(struct cpu_user_regs *regs, vaddr_t pc)
if ( debugger_trap_fatal(TRAP_invalid_op, regs) ) if ( debugger_trap_fatal(TRAP_invalid_op, regs) )
return 0; return 0;
show_execution_state(regs); show_execution_state(regs);
panic("Assertion '%s' failed at %s%s:%d", panic("Assertion '%s' failed at %s%s:%d\n",
predicate, prefix, filename, lineno); predicate, prefix, filename, lineno);
} }
@@ -1446,7 +1446,7 @@ static void do_debug_trap(struct cpu_user_regs *regs, unsigned int code)
show_execution_state(regs); show_execution_state(regs);
break; break;
default: default:
panic("DOM%d: Unhandled debug trap %#x", domid, code); panic("DOM%d: Unhandled debug trap %#x\n", domid, code);
break; break;
} }
} }
+1 -1
View File
@@ -972,7 +972,7 @@ void vgic_v3_setup_hw(paddr_t dbase,
const struct rdist_region *regions, const struct rdist_region *regions,
unsigned int intid_bits) unsigned int intid_bits)
{ {
panic("New VGIC implementation does not yet support GICv3."); panic("New VGIC implementation does not yet support GICv3\n");
} }
#endif #endif
+1 -1
View File
@@ -256,7 +256,7 @@ static int enter_state(u32 state)
microcode_resume_cpu(0); microcode_resume_cpu(0);
if ( !recheck_cpu_features(0) ) if ( !recheck_cpu_features(0) )
panic("Missing previously available feature(s)."); panic("Missing previously available feature(s)\n");
/* Re-enabled default NMI/#MC use of MSR_SPEC_CTRL. */ /* Re-enabled default NMI/#MC use of MSR_SPEC_CTRL. */
ci->spec_ctrl_flags |= (default_spec_ctrl_flags & SCF_ist_wrmsr); ci->spec_ctrl_flags |= (default_spec_ctrl_flags & SCF_ist_wrmsr);
+1 -1
View File
@@ -325,7 +325,7 @@ void __init alternative_instructions(void)
mdelay(1); mdelay(1);
if ( !ACCESS_ONCE(alt_done) ) if ( !ACCESS_ONCE(alt_done) )
panic("Timed out waiting for alternatives self-NMI to hit"); panic("Timed out waiting for alternatives self-NMI to hit\n");
set_nmi_callback(saved_nmi_callback); set_nmi_callback(saved_nmi_callback);
} }
+2 -3
View File
@@ -902,8 +902,7 @@ void __init x2apic_bsp_setup(void)
printk("Not enabling x2APIC: depends on iommu_supports_eim.\n"); printk("Not enabling x2APIC: depends on iommu_supports_eim.\n");
return; return;
} }
panic("x2APIC: already enabled by BIOS, but " panic("x2APIC: already enabled by BIOS, but iommu_supports_eim failed\n");
"iommu_supports_eim failed");
} }
if ( (ioapic_entries = alloc_ioapic_entries()) == NULL ) if ( (ioapic_entries = alloc_ioapic_entries()) == NULL )
@@ -935,7 +934,7 @@ void __init x2apic_bsp_setup(void)
default: default:
if ( x2apic_enabled ) if ( x2apic_enabled )
panic("Interrupt remapping could not be enabled while " panic("Interrupt remapping could not be enabled while "
"x2APIC is already enabled by BIOS"); "x2APIC is already enabled by BIOS\n");
printk(XENLOG_ERR printk(XENLOG_ERR
"Failed to enable Interrupt Remapping: Will not enable x2APIC.\n"); "Failed to enable Interrupt Remapping: Will not enable x2APIC.\n");
+2 -2
View File
@@ -1660,7 +1660,7 @@ void mc_panic(char *s)
" The processor has reported a hardware error which cannot\n" " The processor has reported a hardware error which cannot\n"
" be recovered from. Xen will now reboot the machine.\n"); " be recovered from. Xen will now reboot the machine.\n");
mc_panic_dump(); mc_panic_dump();
panic("HARDWARE ERROR"); panic("HARDWARE ERROR\n");
} }
/* /*
@@ -1756,7 +1756,7 @@ static int mce_delayed_action(mctelem_cookie_t mctc)
dprintk(XENLOG_ERR, "MCE delayed action failed\n"); dprintk(XENLOG_ERR, "MCE delayed action failed\n");
is_mc_panic = true; is_mc_panic = true;
x86_mcinfo_dump(mctelem_dataptr(mctc)); x86_mcinfo_dump(mctelem_dataptr(mctc));
panic("MCE: Software recovery failed for the UCR"); panic("MCE: Software recovery failed for the UCR\n");
break; break;
case MCER_RECOVERED: case MCER_RECOVERED:
+9 -9
View File
@@ -99,12 +99,12 @@ static void map_shared_info(void)
unsigned long rc; unsigned long rc;
if ( hypervisor_alloc_unused_page(&mfn) ) if ( hypervisor_alloc_unused_page(&mfn) )
panic("unable to reserve shared info memory page"); panic("unable to reserve shared info memory page\n");
xatp.gpfn = mfn_x(mfn); xatp.gpfn = mfn_x(mfn);
rc = xen_hypercall_memory_op(XENMEM_add_to_physmap, &xatp); rc = xen_hypercall_memory_op(XENMEM_add_to_physmap, &xatp);
if ( rc ) if ( rc )
panic("failed to map shared_info page: %ld", rc); panic("failed to map shared_info page: %ld\n", rc);
set_fixmap(FIX_XEN_SHARED_INFO, mfn_x(mfn) << PAGE_SHIFT); set_fixmap(FIX_XEN_SHARED_INFO, mfn_x(mfn) << PAGE_SHIFT);
@@ -168,7 +168,7 @@ static void __init init_memmap(void)
mem = rangeset_new(NULL, "host memory map", 0); mem = rangeset_new(NULL, "host memory map", 0);
if ( !mem ) if ( !mem )
panic("failed to allocate PFN usage rangeset"); panic("failed to allocate PFN usage rangeset\n");
/* /*
* Mark up to the last memory page (or 4GiB) as RAM. This is done because * Mark up to the last memory page (or 4GiB) as RAM. This is done because
@@ -178,7 +178,7 @@ static void __init init_memmap(void)
*/ */
if ( rangeset_add_range(mem, 0, max_t(unsigned long, max_page - 1, if ( rangeset_add_range(mem, 0, max_t(unsigned long, max_page - 1,
PFN_DOWN(GB(4) - 1))) ) PFN_DOWN(GB(4) - 1))) )
panic("unable to add RAM to in-use PFN rangeset"); panic("unable to add RAM to in-use PFN rangeset\n");
for ( i = 0; i < e820.nr_map; i++ ) for ( i = 0; i < e820.nr_map; i++ )
{ {
@@ -186,7 +186,7 @@ static void __init init_memmap(void)
if ( rangeset_add_range(mem, PFN_DOWN(e->addr), if ( rangeset_add_range(mem, PFN_DOWN(e->addr),
PFN_UP(e->addr + e->size - 1)) ) PFN_UP(e->addr + e->size - 1)) )
panic("unable to add range [%#lx, %#lx] to in-use PFN rangeset", panic("unable to add range [%#lx, %#lx] to in-use PFN rangeset\n",
PFN_DOWN(e->addr), PFN_UP(e->addr + e->size - 1)); PFN_DOWN(e->addr), PFN_UP(e->addr + e->size - 1));
} }
} }
@@ -236,7 +236,7 @@ static void init_evtchn(void)
rc = xen_hypercall_set_evtchn_upcall_vector(this_cpu(vcpu_id), rc = xen_hypercall_set_evtchn_upcall_vector(this_cpu(vcpu_id),
evtchn_upcall_vector); evtchn_upcall_vector);
if ( rc ) if ( rc )
panic("Unable to set evtchn upcall vector: %d", rc); panic("Unable to set evtchn upcall vector: %d\n", rc);
/* Trick toolstack to think we are enlightened */ /* Trick toolstack to think we are enlightened */
{ {
@@ -309,7 +309,7 @@ static void __init mark_pfn_as_ram(struct e820map *e820, uint64_t pfn)
if ( !e820_change_range_type(e820, pfn << PAGE_SHIFT, if ( !e820_change_range_type(e820, pfn << PAGE_SHIFT,
(pfn << PAGE_SHIFT) + PAGE_SIZE, (pfn << PAGE_SHIFT) + PAGE_SIZE,
E820_RESERVED, E820_RAM) ) E820_RESERVED, E820_RAM) )
panic("Unable to add/change memory type of pfn %#lx to RAM", pfn); panic("Unable to add/change memory type of pfn %#lx to RAM\n", pfn);
} }
void __init hypervisor_fixup_e820(struct e820map *e820) void __init hypervisor_fixup_e820(struct e820map *e820)
@@ -323,7 +323,7 @@ void __init hypervisor_fixup_e820(struct e820map *e820)
#define MARK_PARAM_RAM(p) ({ \ #define MARK_PARAM_RAM(p) ({ \
rc = xen_hypercall_hvm_get_param(p, &pfn); \ rc = xen_hypercall_hvm_get_param(p, &pfn); \
if ( rc ) \ if ( rc ) \
panic("Unable to get " #p); \ panic("Unable to get " #p "\n"); \
mark_pfn_as_ram(e820, pfn); \ mark_pfn_as_ram(e820, pfn); \
ASSERT(i < ARRAY_SIZE(reserved_pages)); \ ASSERT(i < ARRAY_SIZE(reserved_pages)); \
reserved_pages[i++] = pfn << PAGE_SHIFT; \ reserved_pages[i++] = pfn << PAGE_SHIFT; \
@@ -367,7 +367,7 @@ void hypervisor_resume(void)
*/ */
bitmap_zero(vcpu_info_mapped, NR_CPUS); bitmap_zero(vcpu_info_mapped, NR_CPUS);
if ( map_vcpuinfo() && nr_cpu_ids > XEN_LEGACY_MAX_VCPUS ) if ( map_vcpuinfo() && nr_cpu_ids > XEN_LEGACY_MAX_VCPUS )
panic("unable to remap vCPU info and vCPUs > legacy limit"); panic("unable to remap vCPU info and vCPUs > legacy limit\n");
/* Setup event channel upcall vector. */ /* Setup event channel upcall vector. */
init_evtchn(); init_evtchn();
+1 -1
View File
@@ -319,7 +319,7 @@ static __init void pvh_setup_e820(struct domain *d, unsigned long nr_pages)
*/ */
d->arch.e820 = xzalloc_array(struct e820entry, e820.nr_map + 1); d->arch.e820 = xzalloc_array(struct e820entry, e820.nr_map + 1);
if ( !d->arch.e820 ) if ( !d->arch.e820 )
panic("Unable to allocate memory for Dom0 e820 map"); panic("Unable to allocate memory for Dom0 e820 map\n");
entry_guest = d->arch.e820; entry_guest = d->arch.e820;
/* Clamp e820 memory map to match the memory assigned to Dom0 */ /* Clamp e820 memory map to match the memory assigned to Dom0 */
+1 -1
View File
@@ -173,7 +173,7 @@ void svm_intr_assist(void)
/* Guest already enabled an interrupt window. */ /* Guest already enabled an interrupt window. */
return; return;
default: default:
panic("%s: nestedsvm_vcpu_interrupt can't handle value %#x", panic("%s: nestedsvm_vcpu_interrupt can't handle value %#x\n",
__func__, rc); __func__, rc);
} }
} }
+4 -4
View File
@@ -123,7 +123,7 @@ static void add_pin_to_irq(unsigned int irq, int apic, int pin)
if (entry->pin != -1) { if (entry->pin != -1) {
if (irq_2_pin_free_entry >= PIN_MAP_SIZE) if (irq_2_pin_free_entry >= PIN_MAP_SIZE)
panic("io_apic.c: whoops"); panic("io_apic.c: whoops\n");
entry->next = irq_2_pin_free_entry; entry->next = irq_2_pin_free_entry;
entry = irq_2_pin + entry->next; entry = irq_2_pin + entry->next;
irq_2_pin_free_entry = entry->next; irq_2_pin_free_entry = entry->next;
@@ -1425,7 +1425,7 @@ static void __init setup_ioapic_ids_from_mpc(void)
if (!physid_isset(i, phys_id_present_map)) if (!physid_isset(i, phys_id_present_map))
break; break;
if (i >= get_physical_broadcast()) if (i >= get_physical_broadcast())
panic("Max APIC ID exceeded"); panic("Max APIC ID exceeded\n");
printk(KERN_ERR "... fixing up to %d. (tell your hw vendor)\n", printk(KERN_ERR "... fixing up to %d. (tell your hw vendor)\n",
i); i);
mp_ioapics[apic].mpc_apicid = i; mp_ioapics[apic].mpc_apicid = i;
@@ -1993,7 +1993,7 @@ static void __init check_timer(void)
} }
printk(" failed :(.\n"); printk(" failed :(.\n");
panic("IO-APIC + timer doesn't work! Boot with apic_verbosity=debug " panic("IO-APIC + timer doesn't work! Boot with apic_verbosity=debug "
"and send a report. Then try booting with the 'noapic' option"); "and send a report. Then try booting with the 'noapic' option\n");
} }
/* /*
@@ -2137,7 +2137,7 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id)
} }
if (i == get_physical_broadcast()) if (i == get_physical_broadcast())
panic("Max apic_id exceeded"); panic("Max apic_id exceeded\n");
printk(KERN_WARNING "IOAPIC[%d]: apic_id %d already used, " printk(KERN_WARNING "IOAPIC[%d]: apic_id %d already used, "
"trying %d\n", ioapic, apic_id, i); "trying %d\n", ioapic, apic_id, i);
+1 -1
View File
@@ -76,7 +76,7 @@ static inline void _mm_lock(mm_lock_t *l, const char *func, int level, int rec)
l->unlock_level = __get_lock_level(); l->unlock_level = __get_lock_level();
} }
else if ( (unlikely(!rec)) ) else if ( (unlikely(!rec)) )
panic("mm lock already held by %s", l->locker_function); panic("mm lock already held by %s\n", l->locker_function);
__set_lock_level(level); __set_lock_level(level);
} }
+5 -5
View File
@@ -237,7 +237,7 @@ static void __init MP_ioapic_info (struct mpc_config_ioapic *m)
if (nr_ioapics >= MAX_IO_APICS) { if (nr_ioapics >= MAX_IO_APICS) {
printk(KERN_CRIT "Max # of I/O APICs (%d) exceeded (found %d).\n", printk(KERN_CRIT "Max # of I/O APICs (%d) exceeded (found %d).\n",
MAX_IO_APICS, nr_ioapics); MAX_IO_APICS, nr_ioapics);
panic("Recompile kernel with bigger MAX_IO_APICS"); panic("Recompile kernel with bigger MAX_IO_APICS\n");
} }
if (!m->mpc_apicaddr) { if (!m->mpc_apicaddr) {
printk(KERN_ERR "WARNING: bogus zero I/O APIC address" printk(KERN_ERR "WARNING: bogus zero I/O APIC address"
@@ -257,7 +257,7 @@ static void __init MP_intsrc_info (struct mpc_config_intsrc *m)
(m->mpc_irqflag >> 2) & 3, m->mpc_srcbus, (m->mpc_irqflag >> 2) & 3, m->mpc_srcbus,
m->mpc_srcbusirq, m->mpc_dstapic, m->mpc_dstirq); m->mpc_srcbusirq, m->mpc_dstapic, m->mpc_dstirq);
if (++mp_irq_entries == MAX_IRQ_SOURCES) if (++mp_irq_entries == MAX_IRQ_SOURCES)
panic("Max # of irq sources exceeded"); panic("Max # of irq sources exceeded\n");
} }
static void __init MP_lintsrc_info (struct mpc_config_lintsrc *m) static void __init MP_lintsrc_info (struct mpc_config_lintsrc *m)
@@ -862,7 +862,7 @@ void __init mp_register_ioapic (
if (nr_ioapics >= MAX_IO_APICS) { if (nr_ioapics >= MAX_IO_APICS) {
printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded "
"(found %d)\n", MAX_IO_APICS, nr_ioapics); "(found %d)\n", MAX_IO_APICS, nr_ioapics);
panic("Recompile kernel with bigger MAX_IO_APICS"); panic("Recompile kernel with bigger MAX_IO_APICS\n");
} }
if (!address) { if (!address) {
printk(KERN_ERR "WARNING: Bogus (zero) I/O APIC address" printk(KERN_ERR "WARNING: Bogus (zero) I/O APIC address"
@@ -961,7 +961,7 @@ void __init mp_override_legacy_irq (
mp_irqs[mp_irq_entries] = intsrc; mp_irqs[mp_irq_entries] = intsrc;
if (++mp_irq_entries == MAX_IRQ_SOURCES) if (++mp_irq_entries == MAX_IRQ_SOURCES)
panic("Max # of irq sources exceeded"); panic("Max # of irq sources exceeded\n");
return; return;
} }
@@ -1027,7 +1027,7 @@ void __init mp_config_acpi_legacy_irqs (void)
mp_irqs[mp_irq_entries] = intsrc; mp_irqs[mp_irq_entries] = intsrc;
if (++mp_irq_entries == MAX_IRQ_SOURCES) if (++mp_irq_entries == MAX_IRQ_SOURCES)
panic("Max # of irq sources exceeded"); panic("Max # of irq sources exceeded\n");
} }
} }
+1 -1
View File
@@ -357,7 +357,7 @@ unsigned int __init arch_get_dma_bitsize(void)
!(node_start_pfn(node) >> (32 - PAGE_SHIFT)) ) !(node_start_pfn(node) >> (32 - PAGE_SHIFT)) )
break; break;
if ( node >= MAX_NUMNODES ) if ( node >= MAX_NUMNODES )
panic("No node with memory below 4Gb"); panic("No node with memory below 4Gb\n");
/* /*
* Try to not reserve the whole node's memory for DMA, but dividing * Try to not reserve the whole node's memory for DMA, but dividing
+10 -10
View File
@@ -106,13 +106,13 @@ static __init void setup_pv_physmap(struct domain *d, unsigned long pgtbl_pfn,
l1_pgentry_t *pl1e = NULL; l1_pgentry_t *pl1e = NULL;
if ( v_start <= vphysmap_end && vphysmap_start <= v_end ) if ( v_start <= vphysmap_end && vphysmap_start <= v_end )
panic("DOM0 P->M table overlaps initial mapping"); panic("DOM0 P->M table overlaps initial mapping\n");
while ( vphysmap_start < vphysmap_end ) while ( vphysmap_start < vphysmap_end )
{ {
if ( d->tot_pages + ((round_pgup(vphysmap_end) - vphysmap_start) if ( d->tot_pages + ((round_pgup(vphysmap_end) - vphysmap_start)
>> PAGE_SHIFT) + 3 > nr_pages ) >> PAGE_SHIFT) + 3 > nr_pages )
panic("Dom0 allocation too small for initial P->M table"); panic("Dom0 allocation too small for initial P->M table\n");
if ( pl1e ) if ( pl1e )
{ {
@@ -209,7 +209,7 @@ static __init void setup_pv_physmap(struct domain *d, unsigned long pgtbl_pfn,
vphysmap_start &= PAGE_MASK; vphysmap_start &= PAGE_MASK;
} }
if ( !page ) if ( !page )
panic("Not enough RAM for DOM0 P->M table"); panic("Not enough RAM for DOM0 P->M table\n");
if ( pl1e ) if ( pl1e )
unmap_domain_page(pl1e); unmap_domain_page(pl1e);
@@ -406,7 +406,7 @@ int __init dom0_construct_pv(struct domain *d,
value = (parms.virt_hv_start_low + mask) & ~mask; value = (parms.virt_hv_start_low + mask) & ~mask;
BUG_ON(!is_pv_32bit_domain(d)); BUG_ON(!is_pv_32bit_domain(d));
if ( value > __HYPERVISOR_COMPAT_VIRT_START ) if ( value > __HYPERVISOR_COMPAT_VIRT_START )
panic("Domain 0 expects too high a hypervisor start address"); panic("Domain 0 expects too high a hypervisor start address\n");
HYPERVISOR_COMPAT_VIRT_START(d) = HYPERVISOR_COMPAT_VIRT_START(d) =
max_t(unsigned int, m2p_compat_vstart, value); max_t(unsigned int, m2p_compat_vstart, value);
} }
@@ -488,7 +488,7 @@ int __init dom0_construct_pv(struct domain *d,
count -= PAGE_ALIGN(initrd_len); count -= PAGE_ALIGN(initrd_len);
order = get_order_from_bytes(count); order = get_order_from_bytes(count);
if ( (1UL << order) + PFN_UP(initrd_len) > nr_pages ) if ( (1UL << order) + PFN_UP(initrd_len) > nr_pages )
panic("Domain 0 allocation is too small for kernel image"); panic("Domain 0 allocation is too small for kernel image\n");
if ( parms.p2m_base != UNSET_ADDR ) if ( parms.p2m_base != UNSET_ADDR )
{ {
@@ -497,7 +497,7 @@ int __init dom0_construct_pv(struct domain *d,
} }
page = alloc_domheap_pages(d, order, 0); page = alloc_domheap_pages(d, order, 0);
if ( page == NULL ) if ( page == NULL )
panic("Not enough RAM for domain 0 allocation"); panic("Not enough RAM for domain 0 allocation\n");
alloc_spfn = mfn_x(page_to_mfn(page)); alloc_spfn = mfn_x(page_to_mfn(page));
alloc_epfn = alloc_spfn + d->tot_pages; alloc_epfn = alloc_spfn + d->tot_pages;
@@ -514,7 +514,7 @@ int __init dom0_construct_pv(struct domain *d,
order = get_order_from_pages(count); order = get_order_from_pages(count);
page = alloc_domheap_pages(d, order, 0); page = alloc_domheap_pages(d, order, 0);
if ( !page ) if ( !page )
panic("Not enough RAM for domain 0 initrd"); panic("Not enough RAM for domain 0 initrd\n");
for ( count = -count; order--; ) for ( count = -count; order--; )
if ( count & (1UL << order) ) if ( count & (1UL << order) )
{ {
@@ -603,7 +603,7 @@ int __init dom0_construct_pv(struct domain *d,
{ {
page = alloc_domheap_page(d, MEMF_no_owner); page = alloc_domheap_page(d, MEMF_no_owner);
if ( !page ) if ( !page )
panic("Not enough RAM for domain 0 PML4"); panic("Not enough RAM for domain 0 PML4\n");
page->u.inuse.type_info = PGT_l4_page_table|PGT_validated|1; page->u.inuse.type_info = PGT_l4_page_table|PGT_validated|1;
l4start = l4tab = page_to_virt(page); l4start = l4tab = page_to_virt(page);
maddr_to_page(mpt_alloc)->u.inuse.type_info = PGT_l3_page_table; maddr_to_page(mpt_alloc)->u.inuse.type_info = PGT_l3_page_table;
@@ -825,7 +825,7 @@ int __init dom0_construct_pv(struct domain *d,
while ( pfn < nr_pages ) while ( pfn < nr_pages )
{ {
if ( (page = alloc_chunk(d, nr_pages - d->tot_pages)) == NULL ) if ( (page = alloc_chunk(d, nr_pages - d->tot_pages)) == NULL )
panic("Not enough RAM for DOM0 reservation"); panic("Not enough RAM for DOM0 reservation\n");
while ( pfn < d->tot_pages ) while ( pfn < d->tot_pages )
{ {
mfn = mfn_x(page_to_mfn(page)); mfn = mfn_x(page_to_mfn(page));
@@ -904,7 +904,7 @@ int __init dom0_construct_pv(struct domain *d,
pv_destroy_gdt(v); pv_destroy_gdt(v);
if ( test_bit(XENFEAT_supervisor_mode_kernel, parms.f_required) ) if ( test_bit(XENFEAT_supervisor_mode_kernel, parms.f_required) )
panic("Dom0 requires supervisor-mode execution"); panic("Dom0 requires supervisor-mode execution\n");
rc = dom0_setup_permissions(d); rc = dom0_setup_permissions(d);
BUG_ON(rc != 0); BUG_ON(rc != 0);
+1 -1
View File
@@ -102,7 +102,7 @@ uint64_t pv_shim_mem(uint64_t avail)
} }
if ( total_pages - avail > shim_nrpages ) if ( total_pages - avail > shim_nrpages )
panic("pages used by shim > shim_nrpages (%#lx > %#lx)", panic("pages used by shim > shim_nrpages (%#lx > %#lx)\n",
total_pages - avail, shim_nrpages); total_pages - avail, shim_nrpages);
shim_nrpages -= total_pages - avail; shim_nrpages -= total_pages - avail;
+8 -8
View File
@@ -820,7 +820,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
/* Check that we have at least one Multiboot module. */ /* Check that we have at least one Multiboot module. */
if ( !(mbi->flags & MBI_MODULES) || (mbi->mods_count == 0) ) if ( !(mbi->flags & MBI_MODULES) || (mbi->mods_count == 0) )
panic("dom0 kernel not specified. Check bootloader configuration."); panic("dom0 kernel not specified. Check bootloader configuration\n");
if ( pvh_boot ) if ( pvh_boot )
{ {
@@ -911,7 +911,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
e820_raw.nr_map = 2; e820_raw.nr_map = 2;
} }
else else
panic("Bootloader provided no memory information."); panic("Bootloader provided no memory information\n");
/* Sanitise the raw E820 map to produce a final clean version. */ /* Sanitise the raw E820 map to produce a final clean version. */
max_page = raw_max_page = init_e820(memmap_type, &e820_raw); max_page = raw_max_page = init_e820(memmap_type, &e820_raw);
@@ -958,7 +958,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
for ( i = 0; !efi_enabled(EFI_LOADER) && i < mbi->mods_count; i++ ) for ( i = 0; !efi_enabled(EFI_LOADER) && i < mbi->mods_count; i++ )
{ {
if ( mod[i].mod_start & (PAGE_SIZE - 1) ) if ( mod[i].mod_start & (PAGE_SIZE - 1) )
panic("Bootloader didn't honor module alignment request."); panic("Bootloader didn't honor module alignment request\n");
mod[i].mod_end -= mod[i].mod_start; mod[i].mod_end -= mod[i].mod_start;
mod[i].mod_start >>= PAGE_SHIFT; mod[i].mod_start >>= PAGE_SHIFT;
mod[i].reserved = 0; mod[i].reserved = 0;
@@ -1215,7 +1215,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
} }
if ( modules_headroom && !mod->reserved ) if ( modules_headroom && !mod->reserved )
panic("Not enough memory to relocate the dom0 kernel image."); panic("Not enough memory to relocate the dom0 kernel image\n");
for ( i = 0; i < mbi->mods_count; ++i ) for ( i = 0; i < mbi->mods_count; ++i )
{ {
uint64_t s = (uint64_t)mod[i].mod_start << PAGE_SHIFT; uint64_t s = (uint64_t)mod[i].mod_start << PAGE_SHIFT;
@@ -1224,7 +1224,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
} }
if ( !xen_phys_start ) if ( !xen_phys_start )
panic("Not enough memory to relocate Xen."); panic("Not enough memory to relocate Xen\n");
/* This needs to remain in sync with xen_in_range(). */ /* This needs to remain in sync with xen_in_range(). */
reserve_e820_ram(&boot_e820, __pa(_stext), __pa(__2M_rwdata_end)); reserve_e820_ram(&boot_e820, __pa(_stext), __pa(__2M_rwdata_end));
@@ -1683,7 +1683,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
watchdog_setup(); watchdog_setup();
if ( !tboot_protect_mem_regions() ) if ( !tboot_protect_mem_regions() )
panic("Could not protect TXT memory regions"); panic("Could not protect TXT memory regions\n");
init_guest_cpuid(); init_guest_cpuid();
init_guest_msr_policy(); init_guest_msr_policy();
@@ -1702,7 +1702,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
/* Create initial domain 0. */ /* Create initial domain 0. */
dom0 = domain_create(get_initial_domain_id(), &dom0_cfg, !pv_shim); dom0 = domain_create(get_initial_domain_id(), &dom0_cfg, !pv_shim);
if ( IS_ERR(dom0) || (alloc_dom0_vcpu0(dom0) == NULL) ) if ( IS_ERR(dom0) || (alloc_dom0_vcpu0(dom0) == NULL) )
panic("Error creating domain 0"); panic("Error creating domain 0\n");
/* Grab the DOM0 command line. */ /* Grab the DOM0 command line. */
cmdline = (char *)(mod[0].string ? __va(mod[0].string) : NULL); cmdline = (char *)(mod[0].string ? __va(mod[0].string) : NULL);
@@ -1765,7 +1765,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
if ( construct_dom0(dom0, mod, modules_headroom, if ( construct_dom0(dom0, mod, modules_headroom,
(initrdidx > 0) && (initrdidx < mbi->mods_count) (initrdidx > 0) && (initrdidx < mbi->mods_count)
? mod + initrdidx : NULL, cmdline) != 0) ? mod + initrdidx : NULL, cmdline) != 0)
panic("Could not set up DOM0 guest OS"); panic("Could not set up DOM0 guest OS\n");
if ( cpu_has_smap ) if ( cpu_has_smap )
{ {
+2 -2
View File
@@ -1107,11 +1107,11 @@ void __init smp_prepare_cpus(void)
socket_cpumask = xzalloc_array(cpumask_t *, nr_sockets); socket_cpumask = xzalloc_array(cpumask_t *, nr_sockets);
if ( socket_cpumask == NULL || if ( socket_cpumask == NULL ||
(socket_cpumask[cpu_to_socket(0)] = xzalloc(cpumask_t)) == NULL ) (socket_cpumask[cpu_to_socket(0)] = xzalloc(cpumask_t)) == NULL )
panic("No memory for socket CPU siblings map"); panic("No memory for socket CPU siblings map\n");
if ( !zalloc_cpumask_var(&per_cpu(cpu_sibling_mask, 0)) || if ( !zalloc_cpumask_var(&per_cpu(cpu_sibling_mask, 0)) ||
!zalloc_cpumask_var(&per_cpu(cpu_core_mask, 0)) ) !zalloc_cpumask_var(&per_cpu(cpu_core_mask, 0)) )
panic("No memory for boot CPU sibling/core maps"); panic("No memory for boot CPU sibling/core maps\n");
set_cpu_sibling_map(0); set_cpu_sibling_map(0);
+1 -1
View File
@@ -532,7 +532,7 @@ void tboot_s3_error(int error)
printk("MAC for %s before S3 is: 0x%08"PRIx64"\n", what, orig_mac); printk("MAC for %s before S3 is: 0x%08"PRIx64"\n", what, orig_mac);
printk("MAC for %s after S3 is: 0x%08"PRIx64"\n", what, resume_mac); printk("MAC for %s after S3 is: 0x%08"PRIx64"\n", what, resume_mac);
panic("Memory integrity was lost on resume (%d)", error); panic("Memory integrity was lost on resume (%d)\n", error);
} }
int tboot_wake_ap(int apicid, unsigned long sipi_vec) int tboot_wake_ap(int apicid, unsigned long sipi_vec)
+3 -3
View File
@@ -798,7 +798,7 @@ static u64 __init init_platform_timer(void)
} }
if ( rc <= 0 ) if ( rc <= 0 )
panic("Unable to find usable platform timer"); panic("Unable to find usable platform timer\n");
printk("Platform timer is %s %s\n", printk("Platform timer is %s %s\n",
freq_string(pts->frequency), pts->name); freq_string(pts->frequency), pts->name);
@@ -914,7 +914,7 @@ static unsigned long get_cmos_time(void)
cmos_rtc_probe = false; cmos_rtc_probe = false;
else if ( system_state < SYS_STATE_smp_boot && !cmos_rtc_probe ) else if ( system_state < SYS_STATE_smp_boot && !cmos_rtc_probe )
panic("System with no CMOS RTC advertised must be booted from EFI" panic("System with no CMOS RTC advertised must be booted from EFI"
" (or with command line option \"cmos-rtc-probe\")"); " (or with command line option \"cmos-rtc-probe\")\n");
for ( ; ; ) for ( ; ; )
{ {
@@ -959,7 +959,7 @@ static unsigned long get_cmos_time(void)
} }
if ( unlikely(cmos_rtc_probe) ) if ( unlikely(cmos_rtc_probe) )
panic("No CMOS RTC found - system must be booted from EFI"); panic("No CMOS RTC found - system must be booted from EFI\n");
return mktime(rtc.year, rtc.mon, rtc.day, rtc.hour, rtc.min, rtc.sec); return mktime(rtc.year, rtc.mon, rtc.day, rtc.hour, rtc.min, rtc.sec);
} }
+8 -8
View File
@@ -712,7 +712,7 @@ void fatal_trap(const struct cpu_user_regs *regs, bool show_remote)
} }
panic("FATAL TRAP: vector = %d (%s)\n" panic("FATAL TRAP: vector = %d (%s)\n"
"[error_code=%04x] %s", "[error_code=%04x] %s\n",
trapnr, trapstr(trapnr), regs->error_code, trapnr, trapstr(trapnr), regs->error_code,
(regs->eflags & X86_EFLAGS_IF) ? "" : ", IN INTERRUPT CONTEXT"); (regs->eflags & X86_EFLAGS_IF) ? "" : ", IN INTERRUPT CONTEXT");
} }
@@ -725,7 +725,7 @@ static void do_reserved_trap(struct cpu_user_regs *regs)
return; return;
show_execution_state(regs); show_execution_state(regs);
panic("FATAL RESERVED TRAP %#x: %s", trapnr, trapstr(trapnr)); panic("FATAL RESERVED TRAP %#x: %s\n", trapnr, trapstr(trapnr));
} }
static void do_trap(struct cpu_user_regs *regs) static void do_trap(struct cpu_user_regs *regs)
@@ -764,7 +764,7 @@ static void do_trap(struct cpu_user_regs *regs)
show_execution_state(regs); show_execution_state(regs);
panic("FATAL TRAP: vector = %d (%s)\n" panic("FATAL TRAP: vector = %d (%s)\n"
"[error_code=%04x]", "[error_code=%04x]\n",
trapnr, trapstr(trapnr), regs->error_code); trapnr, trapstr(trapnr), regs->error_code);
} }
@@ -1047,7 +1047,7 @@ void do_invalid_op(struct cpu_user_regs *regs)
return; return;
show_execution_state(regs); show_execution_state(regs);
panic("Xen BUG at %s%s:%d", prefix, filename, lineno); panic("Xen BUG at %s%s:%d\n", prefix, filename, lineno);
case BUGFRAME_assert: case BUGFRAME_assert:
/* ASSERT: decode the predicate string pointer. */ /* ASSERT: decode the predicate string pointer. */
@@ -1062,7 +1062,7 @@ void do_invalid_op(struct cpu_user_regs *regs)
return; return;
show_execution_state(regs); show_execution_state(regs);
panic("Assertion '%s' failed at %s%s:%d", panic("Assertion '%s' failed at %s%s:%d\n",
predicate, prefix, filename, lineno); predicate, prefix, filename, lineno);
} }
@@ -1078,7 +1078,7 @@ void do_invalid_op(struct cpu_user_regs *regs)
return; return;
show_execution_state(regs); show_execution_state(regs);
panic("FATAL TRAP: vector = %d (invalid opcode)", TRAP_invalid_op); panic("FATAL TRAP: vector = %d (invalid opcode)\n", TRAP_invalid_op);
} }
void do_int3(struct cpu_user_regs *regs) void do_int3(struct cpu_user_regs *regs)
@@ -1439,7 +1439,7 @@ void do_page_fault(struct cpu_user_regs *regs)
show_page_walk(addr); show_page_walk(addr);
panic("FATAL PAGE FAULT\n" panic("FATAL PAGE FAULT\n"
"[error_code=%04x]\n" "[error_code=%04x]\n"
"Faulting linear address: %p", "Faulting linear address: %p\n",
error_code, _p(addr)); error_code, _p(addr));
} }
@@ -1577,7 +1577,7 @@ void do_general_protection(struct cpu_user_regs *regs)
return; return;
show_execution_state(regs); show_execution_state(regs);
panic("GENERAL PROTECTION FAULT\n[error_code=%04x]", regs->error_code); panic("GENERAL PROTECTION FAULT\n[error_code=%04x]\n", regs->error_code);
} }
static void pci_serr_softirq(void) static void pci_serr_softirq(void)
+1 -1
View File
@@ -684,7 +684,7 @@ void __init paging_init(void)
return; return;
nomem: nomem:
panic("Not enough memory for m2p table"); panic("Not enough memory for m2p table\n");
} }
void __init zap_low_mappings(void) void __init zap_low_mappings(void)
+1 -1
View File
@@ -264,7 +264,7 @@ void do_double_fault(struct cpu_user_regs *regs)
show_code(regs); show_code(regs);
show_stack_overflow(cpu, regs); show_stack_overflow(cpu, regs);
panic("DOUBLE FAULT -- system shutdown"); panic("DOUBLE FAULT -- system shutdown\n");
} }
static unsigned int write_stub_trampoline( static unsigned int write_stub_trampoline(
+1 -1
View File
@@ -308,7 +308,7 @@ struct domain *domain_create(domid_t domid,
if ( domid == 0 || domid == hardware_domid ) if ( domid == 0 || domid == hardware_domid )
{ {
if ( hardware_domid < 0 || hardware_domid >= DOMID_FIRST_RESERVED ) if ( hardware_domid < 0 || hardware_domid >= DOMID_FIRST_RESERVED )
panic("The value of hardware_dom must be a valid domain ID"); panic("The value of hardware_dom must be a valid domain ID\n");
d->is_pinned = opt_dom0_vcpus_pin; d->is_pinned = opt_dom0_vcpus_pin;
d->disable_migrate = 1; d->disable_migrate = 1;
+1 -1
View File
@@ -57,7 +57,7 @@ static void flush_window(void);
static __init void error(char *x) static __init void error(char *x)
{ {
panic("%s", x); panic("%s\n", x);
} }
static __init int fill_inbuf(void) static __init int fill_inbuf(void)
+1 -1
View File
@@ -1799,7 +1799,7 @@ void __init scheduler_init(void)
printk("Using scheduler: %s (%s)\n", ops.name, ops.opt_name); printk("Using scheduler: %s (%s)\n", ops.name, ops.opt_name);
if ( SCHED_OP(&ops, init) ) if ( SCHED_OP(&ops, init) )
panic("scheduler returned error on init"); panic("scheduler returned error on init\n");
if ( sched_ratelimit_us && if ( sched_ratelimit_us &&
(sched_ratelimit_us > XEN_SYSCTL_SCHED_RATELIMIT_MAX (sched_ratelimit_us > XEN_SYSCTL_SCHED_RATELIMIT_MAX
+1 -1
View File
@@ -478,7 +478,7 @@ __ubsan_handle_builtin_unreachable(struct unreachable_data *data)
ubsan_prologue(&data->location, &flags); ubsan_prologue(&data->location, &flags);
pr_err("calling __builtin_unreachable()\n"); pr_err("calling __builtin_unreachable()\n");
ubsan_epilogue(&flags); ubsan_epilogue(&flags);
panic("can't return from __builtin_unreachable()"); panic("can't return from __builtin_unreachable()\n");
} }
EXPORT_SYMBOL(__ubsan_handle_builtin_unreachable); EXPORT_SYMBOL(__ubsan_handle_builtin_unreachable);
+1 -1
View File
@@ -11,7 +11,7 @@ static const char *__initdata warnings[WARNING_ARRAY_SIZE];
void __init warning_add(const char *warning) void __init warning_add(const char *warning)
{ {
if ( nr_warnings >= WARNING_ARRAY_SIZE ) if ( nr_warnings >= WARNING_ARRAY_SIZE )
panic("Too many pieces of warning text."); panic("Too many pieces of warning text\n");
warnings[nr_warnings] = warning; warnings[nr_warnings] = warning;
nr_warnings++; nr_warnings++;
+1 -1
View File
@@ -1254,7 +1254,7 @@ void panic(const char *fmt, ...)
console_start_sync(); console_start_sync();
printk("\n****************************************\n"); printk("\n****************************************\n");
printk("Panic on CPU %d:\n", smp_processor_id()); printk("Panic on CPU %d:\n", smp_processor_id());
printk("%s\n", buf); printk("%s", buf);
printk("****************************************\n\n"); printk("****************************************\n\n");
if ( opt_noreboot ) if ( opt_noreboot )
printk("Manual reset required ('noreboot' specified)\n"); printk("Manual reset required ('noreboot' specified)\n");
+2 -3
View File
@@ -159,8 +159,7 @@ static void __hwdom_init check_hwdom_reqs(struct domain *d)
arch_iommu_check_autotranslated_hwdom(d); arch_iommu_check_autotranslated_hwdom(d);
if ( iommu_passthrough ) if ( iommu_passthrough )
panic("Dom0 uses paging translated mode, dom0-passthrough must not be " panic("Dom0 uses paging translated mode, dom0-passthrough must not be enabled\n");
"enabled\n");
iommu_dom0_strict = 1; iommu_dom0_strict = 1;
} }
@@ -384,7 +383,7 @@ int __init iommu_setup(void)
if ( (force_iommu && !iommu_enabled) || if ( (force_iommu && !iommu_enabled) ||
(force_intremap && !iommu_intremap) ) (force_intremap && !iommu_intremap) )
panic("Couldn't enable %s and iommu=required/force", panic("Couldn't enable %s and iommu=required/force\n",
!iommu_enabled ? "IOMMU" : "Interrupt Remapping"); !iommu_enabled ? "IOMMU" : "Interrupt Remapping");
if ( !iommu_intremap ) if ( !iommu_intremap )
+1 -1
View File
@@ -130,7 +130,7 @@ void __init pci_segments_init(void)
{ {
radix_tree_init(&pci_segments); radix_tree_init(&pci_segments);
if ( !alloc_pseg(0) ) if ( !alloc_pseg(0) )
panic("Could not initialize PCI segment 0"); panic("Could not initialize PCI segment 0\n");
} }
int __init pci_add_segment(u16 seg) int __init pci_add_segment(u16 seg)
+1 -1
View File
@@ -119,7 +119,7 @@ do { \
if ( !kexecing ) \ if ( !kexecing ) \
{ \ { \
dump_execution_state(); \ dump_execution_state(); \
panic("DMAR hardware malfunction"); \ panic("DMAR hardware malfunction\n"); \
} \ } \
break; \ break; \
} \ } \
+2 -2
View File
@@ -759,7 +759,7 @@ static void iommu_enable_translation(struct acpi_drhd_unit *drhd)
if ( !is_igd_vt_enabled_quirk() ) if ( !is_igd_vt_enabled_quirk() )
{ {
if ( force_iommu ) if ( force_iommu )
panic("BIOS did not enable IGD for VT properly, crash Xen for security purpose"); panic("BIOS did not enable IGD for VT properly, crash Xen for security purpose\n");
printk(XENLOG_WARNING VTDPREFIX printk(XENLOG_WARNING VTDPREFIX
"BIOS did not enable IGD for VT properly. Disabling IGD VT-d engine.\n"); "BIOS did not enable IGD for VT properly. Disabling IGD VT-d engine.\n");
@@ -2571,7 +2571,7 @@ static void vtd_resume(void)
return; return;
if ( init_vtd_hw() != 0 && force_iommu ) if ( init_vtd_hw() != 0 && force_iommu )
panic("IOMMU setup failed, crash Xen for security purpose"); panic("IOMMU setup failed, crash Xen for security purpose\n");
for_each_drhd_unit ( drhd ) for_each_drhd_unit ( drhd )
{ {
+2 -2
View File
@@ -1875,13 +1875,13 @@ void __init flask_init(const void *policy_buffer, size_t policy_size)
avc_init(); avc_init();
if ( register_xsm(&flask_ops) ) if ( register_xsm(&flask_ops) )
panic("Flask: Unable to register with XSM"); panic("Flask: Unable to register with XSM\n");
if ( policy_size && flask_bootparam != FLASK_BOOTPARAM_LATELOAD ) if ( policy_size && flask_bootparam != FLASK_BOOTPARAM_LATELOAD )
ret = security_load_policy(policy_buffer, policy_size); ret = security_load_policy(policy_buffer, policy_size);
if ( ret && flask_bootparam == FLASK_BOOTPARAM_ENFORCING ) if ( ret && flask_bootparam == FLASK_BOOTPARAM_ENFORCING )
panic("Unable to load FLASK policy"); panic("Unable to load FLASK policy\n");
if ( ret ) if ( ret )
printk(XENLOG_INFO "Flask: Access controls disabled until policy is loaded.\n"); printk(XENLOG_INFO "Flask: Access controls disabled until policy is loaded.\n");
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.