Re: [PATCH v2] KVM x86/xen: add an override for PVCLOCK_TSC_STABLE_BIT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31/10/2023 23:06, David Woodhouse wrote:
[snip]
                 mutex_lock(&kvm->lock);
                 if (!kvm->created_vcpus) {
                         kvm->arch.force_tsc_unstable = true;
                         r = 0;
                 }
                 mutex_unlock(&kvm->lock);

So that it would be blatantly obvious that there's no race with checking a per-VM
flag without any lock/RCU protections.

Makes sense. Although TBH if the VMM wants to flip this bit on and off
at runtime while the guest clocks are being updated, it deserves what
it gets. It's not a problem for KVM.


The first version of the patch that used an attribute requested a clock update when the attribute was set. I dropped that in this version but I think it'd best to re-instate it.

  Paul




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux