Skip to content
GitLab
Menu
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
67f218ae
Commit
67f218ae
authored
Nov 27, 2013
by
Weibin Sun
Committed by
Vikram Narayanan
Oct 25, 2016
Browse files
seems working
parent
df841332
Changes
2
Hide whitespace changes
Inline
Side-by-side
arch/x86/lcd/lcd_defs.h
View file @
67f218ae
...
...
@@ -204,6 +204,6 @@ struct lcd_tss_struct {
#define LCD_CODE_ADDR (0x1ULL << 32)
#define LCD_ISR_ADDR LCD_STACK_ADDR
#define LCD_ISR_ADDR
(
LCD_STACK_ADDR
+ LCD_STACK_SIZE)
#endif
arch/x86/lcd/lcd_main.c
View file @
67f218ae
...
...
@@ -411,7 +411,7 @@ static int ept_alloc_pt_item(struct vmx_vcpu *vcpu,
ret
=
-
ENOMEM
;
}
else
{
memset
((
void
*
)(
*
page
),
0
,
PAGE_SIZE
);
__set_epte
(
vcpu
,
epte
,
*
page
);
__set_epte
(
vcpu
,
epte
,
__pa
(
*
page
)
)
;
}
}
else
{
*
page
=
(
unsigned
long
)
epte_page_vaddr
(
*
epte
);
...
...
@@ -622,6 +622,8 @@ static int vmx_setup_initial_page_table(struct vmx_vcpu *vcpu) {
hpa
=
__get_free_page
(
GFP_KERNEL
);
if
(
!
hpa
)
return
-
ENOMEM
;
memset
((
void
*
)
hpa
,
0
,
PAGE_SIZE
);
hpa
=
__pa
(
hpa
);
/* No overwriting, should not exist at all. */
ret
=
ept_set_epte
(
vcpu
,
gpa
,
hpa
,
0
);
...
...
@@ -674,7 +676,7 @@ static int vmx_setup_initial_page_table(struct vmx_vcpu *vcpu) {
return
ret
;
}
ret
=
ept_set_epte
(
vcpu
,
vcpu
->
isr_page
,
LCD_ISR_ADDR
,
0
);
ret
=
ept_set_epte
(
vcpu
,
__pa
(
vcpu
->
isr_page
)
,
LCD_ISR_ADDR
,
0
);
if
(
ret
)
{
printk
(
KERN_ERR
"ept: ISR phy-addr occupied in EPT
\n
"
);
return
ret
;
...
...
@@ -1328,7 +1330,7 @@ static int setup_gdt(struct vmx_vcpu* vcpu) {
set_tssldt_descriptor
(
tssd
,
LCD_TSS_ADDR
,
DESC_TSS
,
LCD_TSS_SIZE
);
/* TSS segment */
memset
(
vcpu
->
tss
,
0
,
LCD_TSS
_SIZE
);
memset
(
vcpu
->
tss
,
0
,
PAGE
_SIZE
);
tss
=
&
vcpu
->
tss
->
tss
;
tss
->
sp0
=
LCD_STACK_ADDR
;
tss
->
io_bitmap_base
=
offsetof
(
struct
lcd_tss_struct
,
io_bitmap
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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