7
7
#include <hypervisor.h>
8
8
#include <hypercall.h>
9
9
10
+ #define ACRN_DBG_TRUSTY_HYCALL 6U
11
+
10
12
/* this hcall is only come from trusty enabled vcpu itself, and cannot be
11
13
* called from other vcpus
12
14
*/
@@ -15,18 +17,21 @@ int32_t hcall_world_switch(struct vcpu *vcpu)
15
17
int32_t next_world_id = !(vcpu -> arch_vcpu .cur_context );
16
18
17
19
if (next_world_id >= NR_WORLD ) {
18
- pr_err ("%s world_id %d exceed max number of Worlds\n" ,
20
+ dev_dbg (ACRN_DBG_TRUSTY_HYCALL ,
21
+ "%s world_id %d exceed max number of Worlds\n" ,
19
22
__func__ , next_world_id );
20
23
return - EINVAL ;
21
24
}
22
25
23
26
if (!vcpu -> vm -> sworld_control .flag .supported ) {
24
- pr_err ("Secure World is not supported!\n" );
27
+ dev_dbg (ACRN_DBG_TRUSTY_HYCALL ,
28
+ "Secure World is not supported!\n" );
25
29
return - EPERM ;
26
30
}
27
31
28
32
if (!vcpu -> vm -> sworld_control .flag .active ) {
29
- pr_err ("Trusty is not initialized!\n" );
33
+ dev_dbg (ACRN_DBG_TRUSTY_HYCALL ,
34
+ "Trusty is not initialized!\n" );
30
35
return - EPERM ;
31
36
}
32
37
@@ -40,17 +45,20 @@ int32_t hcall_world_switch(struct vcpu *vcpu)
40
45
int32_t hcall_initialize_trusty (struct vcpu * vcpu , uint64_t param )
41
46
{
42
47
if (!vcpu -> vm -> sworld_control .flag .supported ) {
43
- pr_err ("Secure World is not supported!\n" );
48
+ dev_dbg (ACRN_DBG_TRUSTY_HYCALL ,
49
+ "Secure World is not supported!\n" );
44
50
return - EPERM ;
45
51
}
46
52
47
53
if (vcpu -> vm -> sworld_control .flag .active ) {
48
- pr_err ("Trusty already initialized!\n" );
54
+ dev_dbg (ACRN_DBG_TRUSTY_HYCALL ,
55
+ "Trusty already initialized!\n" );
49
56
return - EPERM ;
50
57
}
51
58
52
59
if (vcpu -> arch_vcpu .cur_context != NORMAL_WORLD ) {
53
- pr_err ("%s, must initialize Trusty from Normal World!\n" ,
60
+ dev_dbg (ACRN_DBG_TRUSTY_HYCALL ,
61
+ "%s, must initialize Trusty from Normal World!\n" ,
54
62
__func__ );
55
63
return - EPERM ;
56
64
}
0 commit comments