From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewrqK-0007Gb-Vq for qemu-devel@nongnu.org; Fri, 16 Mar 2018 12:04:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewrqE-0002e3-D5 for qemu-devel@nongnu.org; Fri, 16 Mar 2018 12:04:32 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:49348 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ewrqE-0002dS-9Y for qemu-devel@nongnu.org; Fri, 16 Mar 2018 12:04:26 -0400 References: <20180312151233.16565-1-vkuznets@redhat.com> <20180312151233.16565-3-vkuznets@redhat.com> <7d1afa27-9653-75dc-ebfe-8633b93f1ce6@redhat.com> <87efkk9i2j.fsf@vitty.brq.redhat.com> <87605w9gh5.fsf@vitty.brq.redhat.com> From: Paolo Bonzini Message-ID: Date: Fri, 16 Mar 2018 17:04:08 +0100 MIME-Version: 1.0 In-Reply-To: <87605w9gh5.fsf@vitty.brq.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] i386/kvm: lower requirements for Hyper-V frequency MSRs exposure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vitaly Kuznetsov Cc: Richard Henderson , Eduardo Habkost , Marcelo Tosatti , Roman Kagan , qemu-devel@nongnu.org On 16/03/2018 16:40, Vitaly Kuznetsov wrote: >> On older kernel without re-enlightenment support, you don't want to >> expose the frequency MSRs unless invtsc is on, right? >> > Actually no, I think it's OK to expose frequency MSRs even when we don't > have invtsc and don't support re-enlightenment. Nested Hyper-V won't > pass stable TSC pages to its guests unless it sees either invtsc or > reenlightenment. So as long as we have something to put to these MSRs > (env->tsc_khz) I *think* we can expose them. > > I may actually be missing the reason why Ladi put > tsc_is_stable_and_known() here. Probably because I asked him to. :) It looks like Hyper-V knows that you need re-enlightenment in order to really trust the frequency MSRs (of course the TSC page is special because it has the sequence count). So the patch is good. Thanks! Paolo > In case we're running Windows (and not > Hyper-V) as a guest KVM will update TSC page on migration. And genuine > Hyper-V also exposes these MSRs without exposing INVTSC flag by > default.