kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Some questions from a freshman to this community
@ 2012-06-25 11:18 Zhengwang Ruan
  2012-06-26  2:20 ` Zhengwang Ruan
  0 siblings, 1 reply; 2+ messages in thread
From: Zhengwang Ruan @ 2012-06-25 11:18 UTC (permalink / raw)
  To: kvm

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-26  2:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-25 11:18 Some questions from a freshman to this community Zhengwang Ruan
2012-06-26  2:20 ` Zhengwang Ruan

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).