qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 5/5] kvm/x86: Hyper-V kvm exit


From: Andrey Smetanin
Subject: Re: [Qemu-devel] [PATCH v4 5/5] kvm/x86: Hyper-V kvm exit
Date: Mon, 21 Dec 2015 16:48:48 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1



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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]