Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xcap
xcap-capability-linux
Commits
f9625acc
Commit
f9625acc
authored
Mar 28, 2014
by
Weibin Sun
Committed by
Vikram Narayanan
Oct 25, 2016
Browse files
start info
parent
bed79408
Changes
2
Hide whitespace changes
Inline
Side-by-side
arch/x86/lcd/lcd_defs.h
View file @
f9625acc
...
...
@@ -4,6 +4,7 @@
#include
<linux/bitmap.h>
#include
<uapi/asm/bootparam.h>
#include
<asm/vmx.h>
#include
<xen/interface/xen.h>
#if !defined(VMX_EPT_AD_BIT)
#define VMX_EPT_AD_BIT (1ull << 21)
...
...
@@ -193,6 +194,7 @@ typedef struct {
struct
vmcs
*
vmcs
;
struct
boot_params
*
bp
;
struct
start_info
*
si
;
struct
module
*
mod
;
}
lcd_struct
;
...
...
arch/x86/lcd/lcd_main.c
View file @
f9625acc
...
...
@@ -1483,6 +1483,14 @@ static lcd_struct * vmx_create_vcpu(void) {
}
memset
(
vcpu
->
bp
,
0
,
sizeof
(
struct
boot_params
));
vcpu
->
si
=
(
struct
start_info
*
)
__get_free_page
(
GFP_KERNEL
)
if
(
!
vcpu
->
si
)
{
printk
(
KERN_ERR
"vmx: out of mem for start info
\n
"
);
goto
fail_si
;
}
memset
(
vcpu
->
si
,
0
,
sizeof
(
struct
start_info
));
vmx_get_cpu
(
vcpu
);
vmx_setup_vmcs
(
vcpu
);
vmx_setup_initial_guest_state
(
vcpu
);
...
...
@@ -1492,6 +1500,8 @@ static lcd_struct * vmx_create_vcpu(void) {
return
vcpu
;
fail_si:
free_page
(
vcpu
->
bp
);
fail_ept:
vmx_free_vpid
(
vcpu
);
fail_vpid:
...
...
@@ -1524,6 +1534,7 @@ static void vmx_destroy_vcpu(lcd_struct *vcpu)
vmx_free_vmcs
(
vcpu
->
vmcs
);
kfree
(
vcpu
->
bmp_pt_pages
);
free_page
(
vcpu
->
bp
);
free_page
(
vcpu
->
si
);
kfree
(
vcpu
);
}
...
...
@@ -2216,7 +2227,7 @@ int setup_vmlinux(lcd_struct *lcd) {
bp
->
e820_map
[
1
].
type
=
E820_RESERVED_KERN
;
// TODO: setup correct boot_params
lcd
->
regs
[
VCPU_REGS_RSI
]
=
elf_entry
;
err_out:
return
ret
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment