From: Roman Kagan <rkagan@virtuozzo.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: kvm@vger.kernel.org, x86@kernel.org,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"K. Y. Srinivasan" <kys@microsoft.com>,
"Haiyang Zhang" <haiyangz@microsoft.com>,
"Stephen Hemminger" <sthemmin@microsoft.com>,
"Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>,
"Andy Lutomirski" <luto@kernel.org>,
"Mohammed Gamal" <mmorsy@redhat.com>,
"Cathy Avery" <cavery@redhat.com>,
linux-kernel@vger.kernel.org, devel@linuxdriverproject.org
Subject: Re: [PATCH 3/6] x86/hyper-v: reenlightenment notifications support
Date: Mon, 11 Dec 2017 20:10:24 +0300 [thread overview]
Message-ID: <20171211171023.GA2304@rkaganb.sw.ru> (raw)
In-Reply-To: <87bmj5k2pa.fsf@vitty.brq.redhat.com>
On Mon, Dec 11, 2017 at 10:56:33AM +0100, Vitaly Kuznetsov wrote:
> Roman Kagan <rkagan@virtuozzo.com> writes:
> > On Fri, Dec 08, 2017 at 11:49:57AM +0100, Vitaly Kuznetsov wrote:
> >> +void register_hv_tsc_update(void (*cb)(void))
> >> +{
> >
> > The function name seems unfortunate. IMHO such a name suggests
> > registering a callback on a notifier chain (rather than unconditionally
> > replacing the old callback), and having no other side effects.
>
> I see, any suggestion? register_hv_reenlightenment_cb? register_hv_tscchange_cb?
IMHO arm_hv_reenlightenment_cb or arm_hv_tscchange_cb would be better,
but I'm not very good at giving descriptive names.
>
> >
> >> + struct hv_reenlightenment_control re_ctrl = {
> >> + .vector = HYPERV_REENLIGHTENMENT_VECTOR,
> >> + .enabled = 1,
> >> + .target_vp = hv_vp_index[smp_processor_id()]
> >> + };
> >> + struct hv_tsc_emulation_control emu_ctrl = {.enabled = 1};
> >> +
> >> + if (!(ms_hyperv.features & HV_X64_ACCESS_REENLIGHTENMENT))
> >> + return;
> >
> > What happens then? L2 guests keep running with their clocks ticking at
> > a different speed?
> >
>
> In reallity this never happens -- in case nested virtualization is
> supported reenlightenment is also available. In theory, L0 can emulate
> TSC acceess for forever after migration.
I would think that Hyper-V only started rdtsc emulation if
TSC_EMULATION_CONTROL was turned on, which wouldn't happen here.
But indeed, normally this shouldn't be a problem. It may make sense
just to issue a warning if the feature is unsupported, though.
Roman.
next prev parent reply other threads:[~2017-12-11 17:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-08 10:49 [PATCH 0/6] x86/kvm/hyperv: stable clocksorce for L2 guests when running nested KVM on Hyper-V Vitaly Kuznetsov
2017-12-08 10:49 ` [PATCH 1/6] x86/hyper-v: check for required priviliges in hyperv_init() Vitaly Kuznetsov
2017-12-08 10:49 ` [PATCH 2/6] x86/hyper-v: add a function to read both TSC and TSC page value simulateneously Vitaly Kuznetsov
2017-12-08 10:49 ` [PATCH 3/6] x86/hyper-v: reenlightenment notifications support Vitaly Kuznetsov
2017-12-08 18:10 ` Roman Kagan
2017-12-11 9:56 ` Vitaly Kuznetsov
2017-12-11 17:10 ` Roman Kagan [this message]
2017-12-12 8:04 ` Vitaly Kuznetsov
2017-12-13 0:50 ` Michael Kelley (EOSG)
2017-12-13 10:03 ` Vitaly Kuznetsov
2017-12-08 10:49 ` [PATCH 4/6] x86/hyper-v: redirect reenlightment notifications on CPU offlining Vitaly Kuznetsov
2017-12-08 10:49 ` [PATCH 5/6] x86/kvm: pass stable clocksource to guests when running nested on Hyper-V Vitaly Kuznetsov
2017-12-08 10:50 ` [PATCH 6/6] x86/kvm: support Hyper-V reenlightenment Vitaly Kuznetsov
2017-12-08 17:39 ` Roman Kagan
2017-12-11 9:57 ` Vitaly Kuznetsov
2017-12-12 8:17 ` Vitaly Kuznetsov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171211171023.GA2304@rkaganb.sw.ru \
--to=rkagan@virtuozzo.com \
--cc=Michael.H.Kelley@microsoft.com \
--cc=cavery@redhat.com \
--cc=devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=mmorsy@redhat.com \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=sthemmin@microsoft.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®