Posts: 4
Threads: 1
Joined: Aug 2010
Reputation:
0
Hello pcsx2 developers.I googled a bit and find current version of pcsx2 doesn't use the vt-x,vt-d,and AMD's virtulization instructions.
It's just a thinking if these instrutions do any good for direct accessing hardware?
If the answer is positive,will you use them to make pcsx2 run faster and better in the future?
Posts: 6.069
Threads: 68
Joined: May 2010
Reputation:
167
Location: Grenoble, France
virtualization == emulator of x86 on x86 CPU.
Posts: 6.069
Threads: 68
Joined: May 2010
Reputation:
167
Location: Grenoble, France
Well the purpose of those extensions is mostly to reduce the speed penalty of the virtualization. For example instead to emulate a GPU on the VM (ubber slow), the idea is to try to use the GPU directly (called hardware acceleration still a bit slower than native). If you run in native, you will already use the GPU directly.
It can run from a VM, but it mostly depends on the handling of OpenGL/Dx (emulated or not).
Posts: 4
Threads: 1
Joined: Aug 2010
Reputation:
0
Could some of these virtualization instructions replace some IO/VU/EE emulation functions used by pcsx2?
since it do help Virtualbox/VMware run faster compare with machines don't support vt-x,vt-d,,or amd-v.
Posts: 6.069
Threads: 68
Joined: May 2010
Reputation:
167
Location: Grenoble, France
03-03-2017, 04:19 PM
(This post was last modified: 03-03-2017, 04:20 PM by gregory.)
I'm not sure that "instruction" is the good wording here. It isn't like AVX instruction. Instead there are CPU features implemented by the Kernel.
For example an application works with virtual addresses and the hardware will translate them to physical addresses. In case of an x86 VM, you will do a double conversion guest virtual address => host virtual address => physical address. When you think about it, it would be much clever to ask the hardware to do a conversion from the guest virtual address to physical address directly.
So in theory, it will be possible to update the kernel so it can handle the EE virtual address without the above 2 conversions. However it will be tricky, the EE isn't an X86 CPU. We still need to handle special addresses like EE registers. Beside EE virtual address conversion is faster than x86 conversion. And it would be very fast on 64 bits.
Virtualization and Emulation is really different. The former shares the same arch on guest and host (so no emulation, just a virtual machine == share of the resources). The latter converts one machine to another, you can't reuse the same hardware. In other word, the goal of virtualization is to run multiple OS on the same PC (stability/resource sharing/security...).
Posts: 6.069
Threads: 68
Joined: May 2010
Reputation:
167
Location: Grenoble, France
What we need is either a faster CPU or a float coprocessor that match the PS2 behavior.