HV: trusty: log printing cleanup
Replace some pr_err() with dev_dbg(). Signed-off-by: Qi Yadong <yadong.qi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
9ba14dac31
commit
3225b16e5f
|
@ -7,6 +7,8 @@
|
||||||
#include <hypervisor.h>
|
#include <hypervisor.h>
|
||||||
#include <hkdf.h>
|
#include <hkdf.h>
|
||||||
|
|
||||||
|
#define ACRN_DBG_TRUSTY 6U
|
||||||
|
|
||||||
#define TRUSTY_VERSION 1U
|
#define TRUSTY_VERSION 1U
|
||||||
#define TRUSTY_VERSION_2 2U
|
#define TRUSTY_VERSION_2 2U
|
||||||
|
|
||||||
|
@ -430,7 +432,7 @@ bool initialize_trusty(struct vcpu *vcpu, uint64_t param)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (boot_param.version > TRUSTY_VERSION_2) {
|
if (boot_param.version > TRUSTY_VERSION_2) {
|
||||||
pr_err("%s: Version(%u) not supported!\n",
|
dev_dbg(ACRN_DBG_TRUSTY, "%s: Version(%u) not supported!\n",
|
||||||
__func__, boot_param.version);
|
__func__, boot_param.version);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
#include <hypervisor.h>
|
#include <hypervisor.h>
|
||||||
#include <hypercall.h>
|
#include <hypercall.h>
|
||||||
|
|
||||||
|
#define ACRN_DBG_TRUSTY_HYCALL 6U
|
||||||
|
|
||||||
/* this hcall is only come from trusty enabled vcpu itself, and cannot be
|
/* this hcall is only come from trusty enabled vcpu itself, and cannot be
|
||||||
* called from other vcpus
|
* called from other vcpus
|
||||||
*/
|
*/
|
||||||
|
@ -15,18 +17,21 @@ int32_t hcall_world_switch(struct vcpu *vcpu)
|
||||||
int32_t next_world_id = !(vcpu->arch_vcpu.cur_context);
|
int32_t next_world_id = !(vcpu->arch_vcpu.cur_context);
|
||||||
|
|
||||||
if (next_world_id >= NR_WORLD) {
|
if (next_world_id >= NR_WORLD) {
|
||||||
pr_err("%s world_id %d exceed max number of Worlds\n",
|
dev_dbg(ACRN_DBG_TRUSTY_HYCALL,
|
||||||
|
"%s world_id %d exceed max number of Worlds\n",
|
||||||
__func__, next_world_id);
|
__func__, next_world_id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!vcpu->vm->sworld_control.flag.supported) {
|
if (!vcpu->vm->sworld_control.flag.supported) {
|
||||||
pr_err("Secure World is not supported!\n");
|
dev_dbg(ACRN_DBG_TRUSTY_HYCALL,
|
||||||
|
"Secure World is not supported!\n");
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!vcpu->vm->sworld_control.flag.active) {
|
if (!vcpu->vm->sworld_control.flag.active) {
|
||||||
pr_err("Trusty is not initialized!\n");
|
dev_dbg(ACRN_DBG_TRUSTY_HYCALL,
|
||||||
|
"Trusty is not initialized!\n");
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,17 +45,20 @@ int32_t hcall_world_switch(struct vcpu *vcpu)
|
||||||
int32_t hcall_initialize_trusty(struct vcpu *vcpu, uint64_t param)
|
int32_t hcall_initialize_trusty(struct vcpu *vcpu, uint64_t param)
|
||||||
{
|
{
|
||||||
if (!vcpu->vm->sworld_control.flag.supported) {
|
if (!vcpu->vm->sworld_control.flag.supported) {
|
||||||
pr_err("Secure World is not supported!\n");
|
dev_dbg(ACRN_DBG_TRUSTY_HYCALL,
|
||||||
|
"Secure World is not supported!\n");
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vcpu->vm->sworld_control.flag.active) {
|
if (vcpu->vm->sworld_control.flag.active) {
|
||||||
pr_err("Trusty already initialized!\n");
|
dev_dbg(ACRN_DBG_TRUSTY_HYCALL,
|
||||||
|
"Trusty already initialized!\n");
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vcpu->arch_vcpu.cur_context != NORMAL_WORLD) {
|
if (vcpu->arch_vcpu.cur_context != NORMAL_WORLD) {
|
||||||
pr_err("%s, must initialize Trusty from Normal World!\n",
|
dev_dbg(ACRN_DBG_TRUSTY_HYCALL,
|
||||||
|
"%s, must initialize Trusty from Normal World!\n",
|
||||||
__func__);
|
__func__);
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue