[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1] kvm/x86: Hyper-V tsc page setup
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v1] kvm/x86: Hyper-V tsc page setup |
Date: |
Fri, 22 Jan 2016 12:02:08 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
On 22/01/2016 11:15, Andrey Smetanin wrote:
>>
>> - unless KVM can use a master clock, it is incorrect to set up the TSC
>> page this way; the sequence needs to be 0xFFFFFFFF in that case
> 0xFFFFFFFF is not an invalid value for tsc page,
> see https://lkml.org/lkml/2015/11/2/655
oh, I see now.
>> - writing the TSC page must be done while all VCPUs are stopped, because
>> the TSC page doesn't provide the possibility for the guest to retry in
>> the middle of an update (like seqcount in Linux doess)
> I think Windows guest gives tsc page address at boot time and protects
> against other vcpu's tsc page access.
Sometimes the TSC is detected to be unstable and Linux switches to
another clocksource. At least in that case you can get a write to the
TSC page while the guest is running.
In that case it would be enough to write a zero to tsc_sequence, which
_can_ be done atomically while the guest is running. However, KVM
already has a mechanism to stop all VCPUs (KVM_REQ_MASTERCLOCK_UPDATE)
so we might as well use it.
Paolo
- Re: [Qemu-devel] [PATCH v1] kvm/x86: Hyper-V tsc page setup, (continued)
- Re: [Qemu-devel] [PATCH v1] kvm/x86: Hyper-V tsc page setup, Andrey Smetanin, 2016/01/12
- Re: [Qemu-devel] [PATCH v1] kvm/x86: Hyper-V tsc page setup, Denis V. Lunev, 2016/01/19
- Re: [Qemu-devel] [PATCH v1] kvm/x86: Hyper-V tsc page setup, Paolo Bonzini, 2016/01/20
- Re: [Qemu-devel] [PATCH v1] kvm/x86: Hyper-V tsc page setup, Andrey Smetanin, 2016/01/20
- Re: [Qemu-devel] [PATCH v1] kvm/x86: Hyper-V tsc page setup, Denis V. Lunev, 2016/01/20
- Re: [Qemu-devel] [PATCH v1] kvm/x86: Hyper-V tsc page setup, Roman Kagan, 2016/01/20
- Re: [Qemu-devel] [PATCH v1] kvm/x86: Hyper-V tsc page setup, Denis V. Lunev, 2016/01/20
- Re: [Qemu-devel] [PATCH v1] kvm/x86: Hyper-V tsc page setup, Paolo Bonzini, 2016/01/20
Re: [Qemu-devel] [PATCH v1] kvm/x86: Hyper-V tsc page setup, Paolo Bonzini, 2016/01/22
Re: [Qemu-devel] [PATCH v1] kvm/x86: Hyper-V tsc page setup, Andrey Smetanin, 2016/01/22