qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] is the "tcg translation" necessary when the "kvm accele


From: Paolo Bonzini
Subject: Re: [Qemu-devel] is the "tcg translation" necessary when the "kvm acceleration" emulation mode enabled?
Date: Fri, 21 Dec 2018 07:33:08 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1

> scenario 1:  did the tcg translation need to be done in this case now
> that the host and target arch is the same?  or  let the kvm emulation
> the system wit the original instructions with out the TCG
> translation

TCG is turned off when KVM is enabled.  The code for TCG does not run at
all.

> scenario 2:   the pre condition is same with scenario 1 except the kvm
> is disable? so ,in this scenario, the TCG must be used in order to
> the pure software emulation without acceleration?

Correct.  In this case KVM is turned off.  The capabilities of the
emulated CPU will _not_ be what you have in your host processor, but
rather what QEMU implements.  For example, you will get no AVX.

> scenario 3:  in this scenario, the host and target arch is not the
> same, so how to use the "kvm mechainsim" in this case?  so the
> instructions feed to the kvm module to run must be translated By TCG
> module? right?

KVM cannot be used in this case; KVM is only enabled when the host and
the target are the same.

Paolo

On 21/12/18 02:57, tugouxp wrote:
> hi folks:
>     i am very puzzled about the relationship between "target cpu instruction" 
>  translated to host instructions through TCG module and the "kvm" 
> acceleration" mode.
> 
> 
> think about three scenario of emulation:
> scenario 1, 2 and 3 as follows:
> 
> 1. target cpu: x86_64,
>     host cpu:   x84_64,
>     emulation OS:   ubuntu_desktop_amd64.iso
>     kvm:  enabled.
> 
> 
> 2. target cpu: x86_64,
> 
>     host cpu:   x84_64,
> 
>     emulation OS:   ubuntu_desktop_amd64.iso
>     kvm:  disabled.
> 
> 
> 3. target cpu  x86_64,
>     host cpu:  armv8
>     emulationOS: ubuntu_desktop_amd64.iso
>     kvm:  enabled



reply via email to

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