From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Roman Kagan <rkagan@virtuozzo.com>
Cc: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
Evgeny Yakovlev <eyakovlev@virtuozzo.com>,
"Denis V . Lunev" <den@openvz.org>,
Eduardo Habkost <ehabkost@redhat.com>,
Igor Mammedov <imammedo@redhat.com>
Subject: Re: [PATCH] x86:kvm:hyperv: make VP_INDEX managed by userspace
Date: Fri, 16 Jun 2017 18:03:27 +0200 [thread overview]
Message-ID: <20170616160326.GB5980@potion> (raw)
In-Reply-To: <20170616151621.21590-1-rkagan@virtuozzo.com>
2017-06-16 18:16+0300, Roman Kagan:
> Hyper-V identifies vCPUs by Virtual Processor Index, which can be
> queried via HV_X64_MSR_VP_INDEX msr. It is defined by the spec as a
> sequential number which can't exceed the maximum number of vCPUs per VM.
> APIC ids can be sparse and thus aren't a valid replacement for VP
> indices.
>
> Current KVM uses its internal vcpu index as VP_INDEX. However, to make
> it predictable and persistent across VM migrations, the userspace has to
> control the value of VP_INDEX.
>
> This patch achieves that, by storing vp_index explicitly on vcpu, and
> allowing HV_X64_MSR_VP_INDEX to be set from the host side. For
> compatibility it's initialized to KVM vcpu index. Also a few variables
> are renamed to make clear distinction betweed this Hyper-V vp_index and
> KVM vcpu_id (== APIC id).
>
> Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
> ---
Please add a kvm capability, so userspace doesn't trigger the unhandled
wrmsr messages when detecting this feature.
Thanks.
prev parent reply other threads:[~2017-06-16 16:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 15:16 [PATCH] x86:kvm:hyperv: make VP_INDEX managed by userspace Roman Kagan
2017-06-16 16:03 ` Radim Krčmář [this message]
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=20170616160326.GB5980@potion \
--to=rkrcmar@redhat.com \
--cc=den@openvz.org \
--cc=ehabkost@redhat.com \
--cc=eyakovlev@virtuozzo.com \
--cc=imammedo@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkagan@virtuozzo.com \
/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