Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1267668

Re: [PATCH 1/1] drivers/hv: correct tsc page sequence invalid value

From "Denis V. Lunev" <den@openvz.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1] drivers/hv: correct tsc page sequence invalid value
Date 2015-11-12 08:20 +0100
Message-ID <qtUkO-5Od-5@gated-at.bofh.it> (permalink)
References <qqlCW-4Kt-21@gated-at.bofh.it> <qquGf-1YL-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 11/02/2015 10:42 PM, KY Srinivasan wrote:
>
>> -----Original Message-----
>> From: Denis V. Lunev [mailto:den@openvz.org]
>> Sent: Monday, November 2, 2015 3:34 AM
>> Cc: rkagan@virtuozzo.com; devel@linuxdriverproject.org; linux-
>> kernel@vger.kernel.org; Andrey Smetanin <asmetanin@virtuozzo.com>; KY
>> Srinivasan <kys@microsoft.com>; Haiyang Zhang
>> <haiyangz@microsoft.com>; Vitaly Kuznetsov <vkuznets@redhat.com>;
>> Denis V. Lunev <den@openvz.org>
>> Subject: [PATCH 1/1] drivers/hv: correct tsc page sequence invalid value
>>
>> From: Andrey Smetanin <asmetanin@virtuozzo.com>
>>
>> Hypervisor Top Level Functional Specification v3/4 says
>> that TSC page sequence value = -1(0xFFFFFFFF) is used to
>> indicate that TSC page no longer reliable source of reference
>> timer. Unfortunately, we found that Windows Hyper-V guest
>> side implementation uses sequence value = 0 to indicate
>> that Tsc page no longer valid. This is clearly visible
>> inside Windows 2012R2 ntoskrnl.exe HvlGetReferenceTime()
>> function dissassembly:
>>
>> HvlGetReferenceTime proc near
>>                   xchg    ax, ax
>> loc_1401C3132:
>>                   mov     rax, cs:HvlpReferenceTscPage
>>                   mov     r9d, [rax]
>>                   test    r9d, r9d
>>                   jz      short loc_1401C3176
>>                   rdtsc
>>                   mov     rcx, cs:HvlpReferenceTscPage
>>                   shl     rdx, 20h
>>                   or      rdx, rax
>>                   mov     rax, [rcx+8]
>>                   mov     rcx, cs:HvlpReferenceTscPage
>>                   mov     r8, [rcx+10h]
>>                   mul     rdx
>>                   mov     rax, cs:HvlpReferenceTscPage
>>                   add     rdx, r8
>>                   mov     ecx, [rax]
>>                   cmp     ecx, r9d
>>                   jnz     short loc_1401C3132
>>                   jmp     short loc_1401C3184
>> loc_1401C3176:
>>                   mov     ecx, 40000020h
>>                   rdmsr
>>                   shl     rdx, 20h
>>                   or      rdx, rax
>> loc_1401C3184:
>>                   mov     rax, rdx
>>                   retn
>> HvlGetReferenceTime endp
>>
>> This patch aligns Tsc page invalid sequence value with
>> Windows Hyper-V guest implementation which is more
>> compatible with both Hyper-V hypervisor and KVM hypervisor.
>>
>> Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
>> CC: "K. Y. Srinivasan" <kys@microsoft.com>
> Thanks Andrey; the Hyper-V team will be updating the Hyper-V documentation.
>
> Acked-by: K. Y. Srinivasan <kys@microsoft.com>
>
> Regards,
>
> K. Y
K.Y.,

can you pls clarify the state of this patch? It is a bit unclear
to me whether it is applied or not.

By the way, I also do not see the following patch
"drivers/hv: cleanup synic msrs if vmbus connect failed"
as applied in the Linux-next. You have promised to resend
it will correct author.

Thank you in advance,
     Den
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/1] drivers/hv: correct tsc page sequence invalid value "Denis V. Lunev" <den@openvz.org> - 2015-11-02 12:40 +0100
  RE: [PATCH 1/1] drivers/hv: correct tsc page sequence invalid value KY Srinivasan <kys@microsoft.com> - 2015-11-02 22:20 +0100
    Re: [PATCH 1/1] drivers/hv: correct tsc page sequence invalid value "Denis V. Lunev" <den@openvz.org> - 2015-11-12 08:20 +0100
      RE: [PATCH 1/1] drivers/hv: correct tsc page sequence invalid value KY Srinivasan <kys@microsoft.com> - 2015-11-12 18:40 +0100
        Re: [PATCH 1/1] drivers/hv: correct tsc page sequence invalid value "Denis V. Lunev" <den@openvz.org> - 2015-11-12 20:00 +0100

csiph-web