All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhengwang Ruan <ruan.zhengwang@gmail.com>
To: avi@redhat.com
Cc: kvm@vger.kernel.org
Subject: Re: Some questions from a freshman to this community
Date: Tue, 26 Jun 2012 10:20:03 +0800	[thread overview]
Message-ID: <4FE91C53.2060904@gmail.com> (raw)
In-Reply-To: <4FE8491D.2080309@gmail.com>

Hi guys,

Could you guys kindly help me answer these questions below? This is very 
helpful for me to learn kvm. Thanks! :-)

Regards,

Zhengwang


-------- Original Message --------
From: Zhengwang Ruan
Sent: 2012年06月26日 星期二 10时16分49秒
To: kvm
Subject: Some questions from a freshman to this community
> Hi all,
>
> I am freshman to this community, I have some questions roughly about 
> how does KVM work, please help me answer these questions, thank you!
>
> 1, What is the relation between kvm-mod and kvm-qemu?
>
> Is kvm-qemu mainly used to emulate the first initial 16-bit code of a 
> guest, then this qemu context will be replaced by the real guest, such 
> as linux, windows? But I also see some emulation code in kvm-mod, what 
> are these code used for?
>
> 2, How to handle irqs in kvm-mod?
>
> I found vmx_inject_irq is used to inject an interrupt to a guest by 
> writing vmcs for a guest, initialized by this call trace: vmx_init -> 
> kvm_init -> kvm_arch_init (kvm_x86_ops is assigned in this call), then 
> kvm_x86_ops will be used everywhere to set_irq for guests. Am I right?
>
> But I seems to me that vmx_inject_irq is only called by 
> .unlocked_ioctl in kvm_vcpu_fops file_operation struct, where could we 
> use this file operation? If a device wants to issue an interrupt to a 
> guest, how does this happen in device driver?
>
> 3, APIC.
>
> I see that each vcpu has a local apic (vcpu.arch->apic), and some 
> functions use this area ranged by this apic pointer to do setting and 
> reading. Is this used to emulate apic for each vcpu? If so, when and 
> where this will be used by guests?
>
> 4, The relation between kvm_vcpu_arch and vmcs.
>
> There are some regular registers in kvm_vcpu_arch, and the values for 
> these registers also be used to read and write. I am confused about 
> this, if we want to read/write a register for a guest, we don't 
> directly use those values in vmcs??
>
>
> Regards,
>
> Zhengwang
>


      reply	other threads:[~2012-06-26  2:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-25 11:18 Some questions from a freshman to this community Zhengwang Ruan
2012-06-26  2:20 ` Zhengwang Ruan [this message]

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=4FE91C53.2060904@gmail.com \
    --to=ruan.zhengwang@gmail.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    /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 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.