aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-03-21 12:14:42 -0400
committerAvi Kivity <avi@qumranet.com>2007-05-03 03:52:26 -0400
commitfcd3410870049cb74bb1a3a2458cb3ec21185cd1 (patch)
treefbb7abe5dfa4c01b6802cd65cd77e3b519816887
parent6da63cf95f6a19fe0a302232048452c96b178e45 (diff)
KVM: Remove unused and write-only variables
Trivial cleanup. Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r--drivers/kvm/kvm_svm.h2
-rw-r--r--drivers/kvm/svm.c2
2 files changed, 0 insertions, 4 deletions
diff --git a/drivers/kvm/kvm_svm.h b/drivers/kvm/kvm_svm.h
index 624f1ca48657..a1a9eba50d47 100644
--- a/drivers/kvm/kvm_svm.h
+++ b/drivers/kvm/kvm_svm.h
@@ -28,8 +28,6 @@ struct vcpu_svm {
28 struct svm_cpu_data *svm_data; 28 struct svm_cpu_data *svm_data;
29 uint64_t asid_generation; 29 uint64_t asid_generation;
30 30
31 unsigned long cr0;
32 unsigned long cr4;
33 unsigned long db_regs[NUM_DB_REGS]; 31 unsigned long db_regs[NUM_DB_REGS];
34 32
35 u64 next_rip; 33 u64 next_rip;
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 191bc45b83e0..ddc0505c3374 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -576,7 +576,6 @@ static int svm_create_vcpu(struct kvm_vcpu *vcpu)
576 vcpu->svm->vmcb = page_address(page); 576 vcpu->svm->vmcb = page_address(page);
577 memset(vcpu->svm->vmcb, 0, PAGE_SIZE); 577 memset(vcpu->svm->vmcb, 0, PAGE_SIZE);
578 vcpu->svm->vmcb_pa = page_to_pfn(page) << PAGE_SHIFT; 578 vcpu->svm->vmcb_pa = page_to_pfn(page) << PAGE_SHIFT;
579 vcpu->svm->cr0 = 0x00000010;
580 vcpu->svm->asid_generation = 0; 579 vcpu->svm->asid_generation = 0;
581 memset(vcpu->svm->db_regs, 0, sizeof(vcpu->svm->db_regs)); 580 memset(vcpu->svm->db_regs, 0, sizeof(vcpu->svm->db_regs));
582 init_vmcb(vcpu->svm->vmcb); 581 init_vmcb(vcpu->svm->vmcb);
@@ -736,7 +735,6 @@ static void svm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
736 } 735 }
737 } 736 }
738#endif 737#endif
739 vcpu->svm->cr0 = cr0;
740 vcpu->cr0 = cr0; 738 vcpu->cr0 = cr0;
741 cr0 |= CR0_PG_MASK | CR0_WP_MASK; 739 cr0 |= CR0_PG_MASK | CR0_WP_MASK;
742 cr0 &= ~(CR0_CD_MASK | CR0_NW_MASK); 740 cr0 &= ~(CR0_CD_MASK | CR0_NW_MASK);