mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/domain: revisit logging in arch_domain_create()
Use %pd in all logs issued from arch_domain_create() and reword some of the messages. Also, expand error message in arch_domain_create() under !emulation_flags_ok() case to help debugging. Signed-off-by: Denis Mukhin <dmukhin@ford.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
fc46a36b1e
commit
b806f5fddc
1 file changed
+14
-9
+14
-9
@@ -798,13 +798,14 @@ int arch_domain_create(struct domain *d,
|
||||
{
|
||||
if ( !opt_allow_unsafe )
|
||||
{
|
||||
printk(XENLOG_G_ERR "Xen does not allow DomU creation on this CPU"
|
||||
" for security reasons.\n");
|
||||
printk(XENLOG_G_ERR
|
||||
"%pd: will not create domU on this CPU for security reasons\n",
|
||||
d);
|
||||
return -EPERM;
|
||||
}
|
||||
printk(XENLOG_G_WARNING
|
||||
"Dom%d may compromise security on this CPU.\n",
|
||||
d->domain_id);
|
||||
"%pd: may compromise security on this CPU\n",
|
||||
d);
|
||||
}
|
||||
|
||||
emflags = config->arch.emulation_flags;
|
||||
@@ -814,16 +815,20 @@ int arch_domain_create(struct domain *d,
|
||||
|
||||
if ( emflags & ~XEN_X86_EMU_ALL )
|
||||
{
|
||||
printk(XENLOG_G_ERR "d%d: Invalid emulation bitmap: %#x\n",
|
||||
d->domain_id, emflags);
|
||||
printk(XENLOG_G_ERR
|
||||
"%pd: invalid emulation bitmap: %#x\n",
|
||||
d, emflags);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ( !emulation_flags_ok(d, emflags) )
|
||||
{
|
||||
printk(XENLOG_G_ERR "d%d: Xen does not allow %s domain creation "
|
||||
"with the current selection of emulators: %#x\n",
|
||||
d->domain_id, is_hvm_domain(d) ? "HVM" : "PV", emflags);
|
||||
printk(XENLOG_G_ERR
|
||||
"%pd: will not create %s %sdomain with emulators: %#x\n",
|
||||
d,
|
||||
is_hvm_domain(d) ? "HVM" : "PV",
|
||||
is_hardware_domain(d) ? "hardware " : "",
|
||||
emflags);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
d->arch.emulation_flags = emflags;
|
||||
|
||||