* Question about the kvm emulator
@ 2014-05-22 3:55 Jidong Xiao
2014-05-22 11:42 ` Paolo Bonzini
0 siblings, 1 reply; 3+ messages in thread
From: Jidong Xiao @ 2014-05-22 3:55 UTC (permalink / raw)
To: KVM
Hi,
I noticed that there is a file call emulate.c, under the directory of
arch/x86/kvm/, in its header part, it says:
"Generic x86 (32-bit and 64-bit) instruction decoder and emulator."
I am confused about this, since qemu will be the emulator, why does
kvm itself also includes such an emulator? In particular, I added some
printk debug statement in x86_emulate_insn() and
emulate_instruction(), but I never see them being invoked. Can someone
kindly explain this, thank you!
-Jidong
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Question about the kvm emulator
2014-05-22 3:55 Question about the kvm emulator Jidong Xiao
@ 2014-05-22 11:42 ` Paolo Bonzini
2014-05-23 2:24 ` Jidong Xiao
0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2014-05-22 11:42 UTC (permalink / raw)
To: Jidong Xiao, KVM
Il 22/05/2014 05:55, Jidong Xiao ha scritto:
> Hi,
>
> I noticed that there is a file call emulate.c, under the directory of
> arch/x86/kvm/, in its header part, it says:
>
> "Generic x86 (32-bit and 64-bit) instruction decoder and emulator."
>
> I am confused about this, since qemu will be the emulator, why does
> kvm itself also includes such an emulator? In particular, I added some
> printk debug statement in x86_emulate_insn() and
> emulate_instruction(), but I never see them being invoked. Can someone
> kindly explain this, thank you!
QEMU is providing the device model and interfaces with KVM. QEMU's CPU
emulation functionality is not used when running with KVM.
The KVM emulator is used: 1) to execute instructions that read or write
to device memory; 2) to run "big real mode" programs on microprocessors
that do not support it natively, for example Intel processors older than
Westmere.
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Question about the kvm emulator
2014-05-22 11:42 ` Paolo Bonzini
@ 2014-05-23 2:24 ` Jidong Xiao
0 siblings, 0 replies; 3+ messages in thread
From: Jidong Xiao @ 2014-05-23 2:24 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: KVM
Thanks Paolo, it's very clear.
-Jidong
On Thu, May 22, 2014 at 7:42 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 22/05/2014 05:55, Jidong Xiao ha scritto:
>
>> Hi,
>>
>> I noticed that there is a file call emulate.c, under the directory of
>> arch/x86/kvm/, in its header part, it says:
>>
>> "Generic x86 (32-bit and 64-bit) instruction decoder and emulator."
>>
>> I am confused about this, since qemu will be the emulator, why does
>> kvm itself also includes such an emulator? In particular, I added some
>> printk debug statement in x86_emulate_insn() and
>> emulate_instruction(), but I never see them being invoked. Can someone
>> kindly explain this, thank you!
>
>
> QEMU is providing the device model and interfaces with KVM. QEMU's CPU
> emulation functionality is not used when running with KVM.
>
> The KVM emulator is used: 1) to execute instructions that read or write to
> device memory; 2) to run "big real mode" programs on microprocessors that do
> not support it natively, for example Intel processors older than Westmere.
>
> Paolo
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-23 2:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-22 3:55 Question about the kvm emulator Jidong Xiao
2014-05-22 11:42 ` Paolo Bonzini
2014-05-23 2:24 ` Jidong Xiao
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.