All of
 help / color / mirror / Atom feed
From: "Radim Krčmář" <>
To: Roman Kagan <>
Cc:, Paolo Bonzini <>,
	Evgeny Yakovlev <>,
	"Denis V . Lunev" <>,
	Eduardo Habkost <>,
	Igor Mammedov <>
Subject: Re: [PATCH v2 1/2] x86:kvm:hyperv: add KVM_CAP_HYPERV_SYNIC2
Date: Wed, 21 Jun 2017 22:09:15 +0200	[thread overview]
Message-ID: <20170621200915.GD27032@potion> (raw)
In-Reply-To: <>

2017-06-16 20:37+0300, Roman Kagan:
> There is a flaw in the Hyper-V SynIC implementation in KVM: when message
> page or event flags page is enabled by setting the corresponding msr,
> KVM zeroes it out.  This is problematic because on migration the
> corresponding MSRs are loaded on the destination, so the content of
> those pages is lost.
> This went unnoticed so far because the only user of those pages was
> in-KVM hyperv synic timers, which could continue working despite that
> zeroing.
> Newer QEMU uses those pages for Hyper-V VMBus implementation, and
> zeroing them breaks the migration.
> Besides, in newer QEMU the content of those pages is fully managed by
> QEMU, so zeroing them is undesirable even when writing the MSRs from the
> guest side.
> To support this new scheme, introduce a new capability,
> KVM_CAP_HYPERV_SYNIC2, which, when enabled, makes sure that the synic
> pages aren't zeroed out in KVM.
> Signed-off-by: Roman Kagan <>
> ---

I have changed the subject tags to more common "kvm: x86: hyperv:" and
added minimal documentation:

diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 4029943887a3..3f4b1d5f0dce 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -4157,3 +4157,10 @@ Currently the following bits are defined for the device_irq_level bitmap:
 Future versions of kvm may implement additional events. These will get
 indicated by returning a higher number from KVM_CHECK_EXTENSION and will be
 listed above.
+Architectures: x86
+The only difference from KVM_CAP_HYPERV_SYNIC is that KVM does not clear SynIC
+pages when the guest enables them.

Please let me know if you'd like to improve it.

  reply	other threads:[~2017-06-21 20:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-16 17:37 [PATCH v2 0/2] x86:kvm:hyperv: fix userspace interaction flaws Roman Kagan
2017-06-16 17:37 ` [PATCH v2 1/2] x86:kvm:hyperv: add KVM_CAP_HYPERV_SYNIC2 Roman Kagan
2017-06-21 20:09   ` Radim Krčmář [this message]
2017-06-22  5:14     ` Roman Kagan
2017-06-22 12:06       ` Paolo Bonzini
2017-06-22 12:13         ` Roman Kagan
2017-06-16 17:37 ` [PATCH v2 2/2] x86:kvm:hyperv: make VP_INDEX managed by userspace Roman Kagan
2017-06-22 12:14   ` Paolo Bonzini

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170621200915.GD27032@potion \ \ \ \ \ \ \ \ \

* 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.