KVM: Remove unused and write-only variables
authorAvi Kivity <avi@qumranet.com>
Wed, 21 Mar 2007 16:14:42 +0000 (18:14 +0200)
committerAvi Kivity <avi@qumranet.com>
Thu, 3 May 2007 07:52:26 +0000 (10:52 +0300)
Trivial cleanup.

Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/kvm_svm.h
drivers/kvm/svm.c

index 624f1ca48657e9d0f4fafd3d1c45b63fbfd1ebe3..a1a9eba50d4787f9ce9fea7d2cb12fba7d23549c 100644 (file)
@@ -28,8 +28,6 @@ struct vcpu_svm {
        struct svm_cpu_data *svm_data;
        uint64_t asid_generation;
 
-       unsigned long cr0;
-       unsigned long cr4;
        unsigned long db_regs[NUM_DB_REGS];
 
        u64 next_rip;
index 191bc45b83e089f118f74b4bcbe26564f94233d0..ddc0505c337498279a50c9c698e77338b164dc02 100644 (file)
@@ -576,7 +576,6 @@ static int svm_create_vcpu(struct kvm_vcpu *vcpu)
        vcpu->svm->vmcb = page_address(page);
        memset(vcpu->svm->vmcb, 0, PAGE_SIZE);
        vcpu->svm->vmcb_pa = page_to_pfn(page) << PAGE_SHIFT;
-       vcpu->svm->cr0 = 0x00000010;
        vcpu->svm->asid_generation = 0;
        memset(vcpu->svm->db_regs, 0, sizeof(vcpu->svm->db_regs));
        init_vmcb(vcpu->svm->vmcb);
@@ -736,7 +735,6 @@ static void svm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
                }
        }
 #endif
-       vcpu->svm->cr0 = cr0;
        vcpu->cr0 = cr0;
        cr0 |= CR0_PG_MASK | CR0_WP_MASK;
        cr0 &= ~(CR0_CD_MASK | CR0_NW_MASK);