SVM: do not intercept task switch with NPT
PATCH 1/1 SVM: do not intercept task switch with NPT
When KVM uses NPT there is no reason to intercept task switches. This patch removes the intercept for it in that case.
--- arch/x86/kvm/svm.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kvm/svm.c +1 -0
@@ -590,6 +590,7 @@ static void init_vmcb(struct vcpu_svm *svm)if (npt_enabled) {/* Setup VMCB for Nested Paging */ control->nested_ctl =1 ; + control->intercept &= ~(1ULL <<INTERCEPT_TASK_SWITCH ); control->intercept_exceptions &= ~(1 <<PF_VECTOR ); control->intercept_cr_read &= ~(INTERCEPT_CR0_MASK |INTERCEPT_CR3_MASK );
Signature · 9 lines
1.5.3.7 ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Avi Kivity
AppliedQuoted 3 lines · Joerg Roedel
When KVM uses NPT there is no reason to intercept task switches. This patch removes the intercept for it in that case.
Applied, thanks. I didn't know task switch and npt were related under svm.
Signature · 8 lines
Any sufficiently difficult bug is indistinguishable from a feature. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Quoted 6 lines · Avi Kivity
Quoted 3 lines · Joerg Roedel
When KVM uses NPT there is no reason to intercept task switches. This patch removes the intercept for it in that case.
Applied, thanks. I didn't know task switch and npt were related under svm.
The only reason why task switch is intercepted is the cr3 switch it involves. But with NPT we don't intercept cr3 switches anymore so we can disable task switch intercept too.
Joerg
Signature · 13 lines
| AMD Saxony Limited Liability Company & Co. KG
Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany
System | Register Court Dresden: HRA 4896
Research | General Partner authorized to represent:
Center | AMD Saxony LLC (Wilmington, Delaware, US)
| General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaoneQuoted 7 lines · Joerg Roedel
Quoted 2 lines
Applied, thanks. I didn't know task switch and npt were related under svm.
The only reason why task switch is intercepted is the cr3 switch it involves. But with NPT we don't intercept cr3 switches anymore so we can disable task switch intercept too.
Ah! Of course. Thanks.
Signature · 8 lines
Any sufficiently difficult bug is indistinguishable from a feature. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone