From: Andrey Smetanin <asmetanin@virtuozzo.com>
To: Pavel Fedin <p.fedin@samsung.com>,
'Roman Kagan' <rkagan@virtuozzo.com>,
'Peter Hornyack' <peterhornyack@google.com>,
'Paolo Bonzini' <pbonzini@redhat.com>,
'kvm list' <kvm@vger.kernel.org>,
"'Denis V. Lunev'" <den@openvz.org>,
'Gleb Natapov' <gleb@kernel.org>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4 5/5] kvm/x86: Hyper-V kvm exit
Date: Mon, 21 Dec 2015 16:48:48 +0300 [thread overview]
Message-ID: <56780340.6050507@virtuozzo.com> (raw)
In-Reply-To: <003201d13bf3$714edae0$53ec90a0$@samsung.com>
On 12/21/2015 04:28 PM, Pavel Fedin wrote:
> Hello!
>
>> Yes, we can use KVM_EXIT_REG_IO/MSR_IO for Hyper-V SynIC MSRS's changes
>> and can even use only one MSR value . So union inside struct
>> kvm_hyperv_exit is excessive.
>>
>> But we still need Vcpu exit to handle VMBus hypercalls by QEMU to
>> emulate VMBus devices inside QEMU.
>>
>> And currently we are going to extend struct kvm_hyperv_exit
>> to store Hyper-V VMBus hypercall parameters.
>
> Hm... Hypercalls, you say?
> We already have KVM_EXIT_HYPERCALL. Documentation says it's currently unused. Is it a leftover from ia64 KVM? Could we reuse it for
> the purpose?
>
>> but could we replace Hyper-V VMBus hypercall and it's parameters
>> by KVM_EXIT_REG_IO/MSR_IO too?
>
> It depends. Can i read about these hypercalls somewhere? Is there any documentation?
I don't know about a documentation, but you can look at the code of
Hyper-V hypercall handling inside KVM:
https://github.com/torvalds/linux/blob/master/arch/x86/kvm/hyperv.c#L346
The code simply decodes hypercall parameters from vcpu registers then
handle hypercall code in switch and encode return code inside vcpu
registers. Probably encode and decode of hypercall parameters/return
code can be done in QEMU so we need only some exit with parameter that
this is Hyper-V hypercall and probably KVM_EXIT_HYPERCALL is good for it.
But KVM_EXIT_HYPERCALL is not used inside KVM/QEMU so requires
implementation.
>
> Kind regards,
> Pavel Fedin
> Expert Engineer
> Samsung Electronics Research center Russia
>
>
next prev parent reply other threads:[~2015-12-21 13:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 12:36 [Qemu-devel] [PATCH v4 0/5] KVM: Hyper-V synthetic interrupt controller Andrey Smetanin
2015-11-10 12:36 ` [Qemu-devel] [PATCH v4 1/5] kvm/irqchip: kvm_arch_irq_routing_update renaming split Andrey Smetanin
2015-11-10 12:36 ` [Qemu-devel] [PATCH v4 2/5] kvm/x86: split ioapic-handled and EOI exit bitmaps Andrey Smetanin
2015-11-10 12:36 ` [Qemu-devel] [PATCH v4 3/5] kvm/x86: per-vcpu apicv deactivation support Andrey Smetanin
2015-11-10 12:36 ` [Qemu-devel] [PATCH v4 4/5] kvm/x86: Hyper-V synthetic interrupt controller Andrey Smetanin
2015-11-10 12:36 ` [Qemu-devel] [PATCH v4 5/5] kvm/x86: Hyper-V kvm exit Andrey Smetanin
2015-12-18 15:19 ` Pavel Fedin
2015-12-18 15:53 ` Denis V. Lunev
2015-12-18 16:01 ` Paolo Bonzini
2015-12-18 18:10 ` Peter Hornyack
2015-12-18 18:23 ` Paolo Bonzini
2015-12-18 18:39 ` Roman Kagan
2015-12-21 12:59 ` Andrey Smetanin
2015-12-21 13:28 ` Pavel Fedin
2015-12-21 13:48 ` Andrey Smetanin [this message]
2015-12-21 15:21 ` Pavel Fedin
2015-12-18 18:25 ` 'Roman Kagan'
2015-12-21 7:44 ` Pavel Fedin
2015-12-18 18:00 ` '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=56780340.6050507@virtuozzo.com \
--to=asmetanin@virtuozzo.com \
--cc=den@openvz.org \
--cc=gleb@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=p.fedin@samsung.com \
--cc=pbonzini@redhat.com \
--cc=peterhornyack@google.com \
--cc=qemu-devel@nongnu.org \
--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;
as well as URLs for NNTP newsgroup(s).