All of lore.kernel.org
 help / color / mirror / Atom feed
* Did the "TCG" emulation mode has a full capability compare with the "KVM" emulation mode?
@ 2024-06-24  8:28 tugouxp
  2024-06-24  8:57 ` Alex Bennée
  0 siblings, 1 reply; 4+ messages in thread
From: tugouxp @ 2024-06-24  8:28 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 449 bytes --]

Hello folks:
   I have a puzzle on qemu major two emuation implentions on whole system emulation, that is ,except the emuation speed, did the TCG work mode has any weakness than "KVM" work mode on whole system emulations(including kernek and user-space)? is there any work that kvm can do but TCG cant? 


of course kvm is much faster than TCG, but my question just about the funtion, not care about speed.


thanks for your kindly help!
BRs
zilong.

[-- Attachment #2: Type: text/html, Size: 777 bytes --]

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

* Re: Did the "TCG" emulation mode has a full capability compare with the "KVM" emulation mode?
  2024-06-24  8:28 Did the "TCG" emulation mode has a full capability compare with the "KVM" emulation mode? tugouxp
@ 2024-06-24  8:57 ` Alex Bennée
  2024-06-24  9:06   ` tugouxp
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Bennée @ 2024-06-24  8:57 UTC (permalink / raw)
  To: tugouxp; +Cc: qemu-devel

tugouxp <13824125580@163.com> writes:

> Hello folks:
>    I have a puzzle on qemu major two emuation implentions on whole system emulation, that is ,except the emuation speed,
> did the TCG work mode has any weakness than "KVM" work mode on whole system emulations(including kernek and
> user-space)?

It depends on the guest architecture. Some are more complete than
others. The x86 emulation for example doesn't cover all the modern x86
extensions although there have been some improvements to its vector
handling recently.

One thing TCG can do that KVM can't is emulate code running at higher
priority than kernel-mode. For example for ARM we can emulate the
EL3/Root domain and secure and confidential realms. In KVM you can only
run a guest EL1 kernel and its user space.

> is there any work that kvm can do but TCG cant? 
>
> of course kvm is much faster than TCG, but my question just about the funtion, not care about speed.
>
> thanks for your kindly help!
> BRs
> zilong.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


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

* Re:Re: Did the "TCG" emulation mode has a full capability compare with the "KVM" emulation mode?
  2024-06-24  8:57 ` Alex Bennée
@ 2024-06-24  9:06   ` tugouxp
  2024-06-24  9:23     ` Alex Bennée
  0 siblings, 1 reply; 4+ messages in thread
From: tugouxp @ 2024-06-24  9:06 UTC (permalink / raw)
  To: Alex Bennée; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1574 bytes --]

Thank you!

BTW, TCG also has two backends implemention, 1. Native host arch tranlation. and 2. TCI byte code interpreter. The difference is that the first one will tranlation the target arch code to host arch instrtions and then executed in host cpu. but the latter is a high level interperation. compare these two backends, Are there any capability difference on the system emulation about the two backends? thank you.

















At 2024-06-24 16:57:40, "Alex Bennée" <alex.bennee@linaro.org> wrote:
>tugouxp <13824125580@163.com> writes:
>
>> Hello folks:
>>    I have a puzzle on qemu major two emuation implentions on whole system emulation, that is ,except the emuation speed,
>> did the TCG work mode has any weakness than "KVM" work mode on whole system emulations(including kernek and
>> user-space)?
>
>It depends on the guest architecture. Some are more complete than
>others. The x86 emulation for example doesn't cover all the modern x86
>extensions although there have been some improvements to its vector
>handling recently.
>
>One thing TCG can do that KVM can't is emulate code running at higher
>priority than kernel-mode. For example for ARM we can emulate the
>EL3/Root domain and secure and confidential realms. In KVM you can only
>run a guest EL1 kernel and its user space.
>
>> is there any work that kvm can do but TCG cant? 
>>
>> of course kvm is much faster than TCG, but my question just about the funtion, not care about speed.
>>
>> thanks for your kindly help!
>> BRs
>> zilong.
>
>-- 
>Alex Bennée
>Virtualisation Tech Lead @ Linaro

[-- Attachment #2: Type: text/html, Size: 2101 bytes --]

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

* Re: Did the "TCG" emulation mode has a full capability compare with the "KVM" emulation mode?
  2024-06-24  9:06   ` tugouxp
@ 2024-06-24  9:23     ` Alex Bennée
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Bennée @ 2024-06-24  9:23 UTC (permalink / raw)
  To: tugouxp; +Cc: qemu-devel

tugouxp  <13824125580@163.com> writes:

> Thank you!
>
> BTW, TCG also has two backends implemention, 1. Native host arch tranlation. and 2. TCI byte code interpreter. The
> difference is that the first one will tranlation the target arch code to host arch instrtions and then executed in host cpu. but
> the latter is a high level interperation. compare these two backends, Are there any capability difference on the system
> emulation about the two backends? thank you.

No - TCI is just a slower fallback to interpret TCG ops directly
compared to executing JITed code.

>
> At 2024-06-24 16:57:40, "Alex Bennée" <alex.bennee@linaro.org> wrote:
>>tugouxp <13824125580@163.com> writes:
>>
>>> Hello folks:
>>>    I have a puzzle on qemu major two emuation implentions on whole system emulation, that is ,except the emuation speed,
>>> did the TCG work mode has any weakness than "KVM" work mode on whole system emulations(including kernek and
>>> user-space)?
>>
>>It depends on the guest architecture. Some are more complete than
>>others. The x86 emulation for example doesn't cover all the modern x86
>>extensions although there have been some improvements to its vector
>>handling recently.
>>
>>One thing TCG can do that KVM can't is emulate code running at higher
>>priority than kernel-mode. For example for ARM we can emulate the
>>EL3/Root domain and secure and confidential realms. In KVM you can only
>>run a guest EL1 kernel and its user space.
>>
>>> is there any work that kvm can do but TCG cant? 
>>>
>>> of course kvm is much faster than TCG, but my question just about the funtion, not care about speed.
>>>
>>> thanks for your kindly help!
>>> BRs
>>> zilong.
>>
>>-- 
>>Alex Bennée
>>Virtualisation Tech Lead @ Linaro

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


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

end of thread, other threads:[~2024-06-24  9:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-24  8:28 Did the "TCG" emulation mode has a full capability compare with the "KVM" emulation mode? tugouxp
2024-06-24  8:57 ` Alex Bennée
2024-06-24  9:06   ` tugouxp
2024-06-24  9:23     ` Alex Bennée

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.