A thinking about vitualization instructions.
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?

Sponsored links

virtualization == emulator of x86 on x86 CPU.
(03-02-2017, 04:22 PM)gregory Wrote: virtualization == emulator of x86 on x86 CPU.

I see,I was thinking if pcsx2 could run from virtual box/Vmware,,and get additionial hardware acceleration.
Thx for the answer gregory.
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).
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.
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...).
thx again for your detailed explanation. Smile
My purpose is to make people to think if there are better ways to make pcsx2 run better by using the tools we haven't discovered yet.
So the current virtualization is just a "hardware resource assignment" tool from what you explained  it's still very hard to use it,but i read there will be ARM cpu on the socket AM4 motherboard after Ryzen.So let's see if it will be different in the future.At that time maybe this idea will be useful.

Edit: here is the source of ARM CPU
What we need is either a faster CPU or a float coprocessor that match the PS2 behavior.

Users browsing this thread: 1 Guest(s)