From: Roman Kagan <rkagan@virtuozzo.com>
To: David Hildenbrand <david@redhat.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
kvm@vger.kernel.org, "Radim Krčmář" <rkrcmar@redhat.com>,
"Denis V. Lunev" <den@openvz.org>,
"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
"Vitaly Kuznetsov" <vkuznets@redhat.com>
Subject: Re: [PATCH v5 2/2] kvm: x86: hyperv: guest->host event signaling via eventfd
Date: Wed, 13 Dec 2017 11:41:50 +0300 [thread overview]
Message-ID: <20171213084149.GA18723@rkaganb.sw.ru> (raw)
In-Reply-To: <5357cf50-7f23-cab1-4baa-48fe83bc39b2@redhat.com>
On Tue, Dec 12, 2017 at 07:20:52PM +0100, David Hildenbrand wrote:
> On 12.12.2017 19:18, Roman Kagan wrote:
> > On Tue, Dec 12, 2017 at 05:29:02PM +0100, David Hildenbrand wrote:
> >> On 12.12.2017 17:22, Paolo Bonzini wrote:
> >>> On 12/12/2017 17:07, Roman Kagan wrote:
> >> (although it would be good to have another look at the hyperv specific
> >> conn_id handling)
> >
> > Are you talking about this weird flag_no part of the hypercall parameter
> > which we add to the conn_id?
> >
> > Yes this is something I'm not quite comfortable with: we've never seen
> > it being anything but 0, and Linux guest drivers ignore its existence
> > altogether (and there seem to be no fields in the vmbus protocol
> > structures to let the guest know of the allowed numbers there).
> >
> > So I may be misinterpreting the spec; and it may be prudent just to
> > reject all flag_no != 0 hypercalls until we actually start seeing ones,
> > and then research how to handle them correctly. What do you think?
>
> Could be done, but if it isn't too much trouble, let's try to get it
> right from the beginning.
>
> Can you point me at the spec so I can verify?
Sure. The Hyper-V spec is
https://github.com/Microsoft/Virtualization-Documentation/raw/master/tlfs/Hypervisor%20Top%20Level%20Functional%20Specification%20v5.0b.pdf
Hope you can read Microsoftish better than me. The relevant part is
chapter 11, "Inter-Partition Communication"; the hypercall itself is
described in "11.11.2 HvSignalEvent".
However, the VMBus guest drivers in Linux use only a limited subset of
those. In particular, the concept of ports seems completely unused, the
connections appear pre-established, and the parent partition informs the
guest of the connection to signal for a specific channel via a u32 field
in the channel offer message.
(See drivers/hv/channel_mgmt.c:vmbus_onoffer for how the connection_id
from the offer is recorded, and drivers/hv/connection.c:vmbus_set_event
for how it's used for signaling.)
So I'm tempted to think this extra flag number is just the usual
overdesign, and I'd better require it to be zero. This is certainly the
case for all the VMBus devices currently supported by the Linux guest
drivers, so we should be good with it too.
Roman.
next prev parent reply other threads:[~2017-12-13 8:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-12 16:07 [PATCH v5 0/2] kvm: x86: hyperv: guest->host event signaling via eventfd Roman Kagan
2017-12-12 16:07 ` [PATCH v5 1/2] kvm: x86: factor out kvm.arch.hyperv (de)init Roman Kagan
2017-12-12 16:07 ` [PATCH v5 2/2] kvm: x86: hyperv: guest->host event signaling via eventfd Roman Kagan
2017-12-12 16:22 ` Paolo Bonzini
2017-12-12 16:29 ` David Hildenbrand
2017-12-12 18:18 ` Roman Kagan
2017-12-12 18:20 ` David Hildenbrand
2017-12-13 8:41 ` Roman Kagan [this message]
2017-12-13 9:35 ` David Hildenbrand
2017-12-13 10:00 ` Roman Kagan
2017-12-12 17:03 ` Roman Kagan
2017-12-13 9:51 ` David Hildenbrand
2017-12-13 11:04 ` Roman Kagan
2017-12-13 11:14 ` David Hildenbrand
2017-12-13 12:16 ` Roman Kagan
2017-12-13 9:55 ` David Hildenbrand
2017-12-13 11:44 ` Roman Kagan
2017-12-13 11:46 ` David Hildenbrand
2017-12-13 11:51 ` David Hildenbrand
2017-12-13 11:57 ` David Hildenbrand
2017-12-13 12:58 ` Roman Kagan
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=20171213084149.GA18723@rkaganb.sw.ru \
--to=rkagan@virtuozzo.com \
--cc=david@redhat.com \
--cc=den@openvz.org \
--cc=konrad.wilk@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=vkuznets@redhat.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