lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFgQCTvKMoFUwG273EN0XfUBOidDMfDqETY=XvY5rb6nD1KPvw@mail.gmail.com>
Date:	Sat, 14 Jan 2012 12:31:10 +0800
From:	Liu ping fan <kernelfans@...il.com>
To:	Stefan Hajnoczi <stefanha@...il.com>
Cc:	kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: Could anybody give some description about the implement of
 hyercall in kvm?

On Fri, Jan 13, 2012 at 6:11 PM, Stefan Hajnoczi <stefanha@...il.com> wrote:
> On Fri, Jan 13, 2012 at 7:45 AM, Liu ping fan <kernelfans@...il.com> wrote:
>> On Thu, Jan 12, 2012 at 5:21 PM, Stefan Hajnoczi <stefanha@...il.com> wrote:
>>> On Thu, Jan 12, 2012 at 4:38 AM, Liu ping fan <kernelfans@...il.com> wrote:
>>>> Could anybody give some description about the implement of hyercall in
>>>> kvm? Or give some links about it?
>>>
>>> Try git grep hypercall arch/x86/kvm.
>>>
>>> Take a look at arch/x86/kvm/x86.c kvm_set_msr_common() and
>>> kvm_emulate_hypercall().  Some of the KVM time-keeping, minimal HyperV
>>> support, and async page faults live there.  Also see
>>> arch/x86/include/asm/kvm_para.h.
>>>
>>> Hypercalls are architecture-specific so if you are interested in ppc
>>> or s390, check those arch directories.
>>>
>> Thanks, but when I tried to start from the macro "____PVOP_VCALL", but
>> lost in it. If there is some document like the hypercall in Xen, this
>> will be appreciated. (And I guest Hypercall in kvm is the same as Xen
>> which is very similar to syscall, right?)
>
> You can read about paravirt_ops to understand why that layer of
> indirection is present:
> http://lwn.net/Articles/194543/
>
> But that macro is not the actual hypercall instructions, just a
> mechanism for runtime-patching the kernel depending on whether it's
> running on bare metal, KVM, Xen, etc.
>
> What you really should look at if you're interested in specific
> paravirt features that you are interested in.  For example,
> arch/x86/kernel/kvmclock.c implements a paravirt clock using
> "paravirt" Model Specific Registers and a shared memory region as the
> guest<->host interface.  So I guess you could say KVM paravirt uses
> several mechanisms for host<->guest interaction.
>
Ok, thank you very much. You give a great help

ping fan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ