[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3] kvmclock: update system_time_msr address for
From: |
Roman Kagan |
Subject: |
Re: [Qemu-devel] [PATCH v3] kvmclock: update system_time_msr address forcibly |
Date: |
Mon, 29 May 2017 16:39:46 +0300 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Mon, May 29, 2017 at 01:49:04PM +0300, Denis Plotnikov wrote:
> Do an update of system_time_msr address every time before reading
> the value of tsc_timestamp from guest's kvmclock page.
>
> There is no other code paths which ensure that qemu has an up-to-date
> value of system_time_msr. So, force this update on guest's tsc_timestamp
> reading.
>
> This bug causes effect on those nested setups which turn off TPR access
> interception for L2 guests and that access being intercepted by L0 doesn't
> show up in L1.
> Linux bootstrap initiate kvmclock before APIC initializing causing TPR access.
> That's why on L1 guests, having TPR interception turned on for L2, the effect
> of the bug is not revealed.
>
> This patch fixes this problem by making sure it knows the correct
> system_time_msr address every time it is needed.
>
> Signed-off-by: Denis Plotnikov <address@hidden>
> ---
> hw/i386/kvm/clock.c | 3 +++
> 1 file changed, 3 insertions(+)
>
Please don't forget the changelog.
Reviewed-by: Roman Kagan <address@hidden>