]> Git Repo - linux.git/commitdiff
kvm: x86: set wall_clock in kvm_write_wall_clock()
authorOliver Upton <[email protected]>
Tue, 18 Aug 2020 15:24:27 +0000 (15:24 +0000)
committerPaolo Bonzini <[email protected]>
Wed, 21 Oct 2020 21:36:31 +0000 (17:36 -0400)
Small change to avoid meaningless duplication in the subsequent patch.
No functional change intended.

Reviewed-by: Jim Mattson <[email protected]>
Reviewed-by: Peter Shier <[email protected]>
Signed-off-by: Oliver Upton <[email protected]>
Change-Id: I77ab9cdad239790766b7a49d5cbae5e57a3005ea
Message-Id: <20200818152429.1923996[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
arch/x86/kvm/x86.c

index a70733d2abf0c0582cb9a2844f8b932dc95c26fa..b928e092da037b9de286b191e148ceb66d85f8c7 100644 (file)
@@ -1916,6 +1916,8 @@ static void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock)
        struct pvclock_wall_clock wc;
        u64 wall_nsec;
 
+       kvm->arch.wall_clock = wall_clock;
+
        if (!wall_clock)
                return;
 
@@ -3117,7 +3119,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
                break;
        case MSR_KVM_WALL_CLOCK_NEW:
        case MSR_KVM_WALL_CLOCK:
-               vcpu->kvm->arch.wall_clock = data;
                kvm_write_wall_clock(vcpu->kvm, data);
                break;
        case MSR_KVM_SYSTEM_TIME_NEW:
This page took 0.070349 seconds and 4 git commands to generate.