Software VT-x

Here you can provide suggestions on how to improve the product, website, etc.
Post Reply
groveborn
Posts: 1
Joined: 20. Oct 2010, 21:58
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Win7

Software VT-x

Post by groveborn »

I know that there are plenty of CPUs out there these days that support hardware VT-x and similar functions, but wouldn't it be nice if there were a software equivalent? Some of us can't upgrade to those CPUs due to system restrictions... Something that sits between Vbox and the system (or simply integrated) that grants the virtualizer full CPU access. Then again, I don't know that such a thing is possible.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Software VT-x

Post by Sasquatch »

Even if it would be possible, it's going to be so slow, you really don't want it. But it's not possible, because hardware virtualisation is actually a bug in the x86 architecture that got fixed. The processors were never made to work with virtualisation in this manner. Now they found a way to make it work better without loosing or altering the x86 architecture. There is more information about this on Wikipedia and other sites.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: Software VT-x

Post by Technologov »

The Good News is that VirtualBox supports software virtualization, so you can run your VMs on your CPU.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Software VT-x

Post by Sasquatch »

I think he's suggesting the VT-x requirement for 64 bit and SMP to be emulated in software.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
chaer
Posts: 2
Joined: 10. Jan 2014, 03:05

Re: Software VT-x

Post by chaer »

Any progress on Software VT-x ?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Software VT-x

Post by mpack »

Progress how? The notion is ridiculous. VT-x is hardware assisted virtualization. You can't do "hardware assisted" in software. Plus a VT-x enabled CPU exposes certain processor features that in the past had to be worked around using code patches: that can't be simulated either.

If the question is, are the devs ever going to do 64bit support in software only, I'd have thought the answer was no, because there's no market for it. Almost all modern CPUs that can run a 64bit OS already have VT-x (or AMD-v).
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: Software VT-x

Post by michaln »

There is about zero likelihood that VT-x would be fully emulated in software in VirtualBox. It makes very little sense for general use.

Some hypervisors (VMware, KVM) have the ability to expose VT-x/AMD-V to guest software, but only if the host hardware already supports it. It is possible that something like bochs emulates VT-x fully in software. This means much lower performance than e.g. the software virtualization that VirtualBox uses.

As usual, one problem is that for the amount of money Oracle would have to spend developing this, you can buy a mountain of VT-x capable hardware.
chaer
Posts: 2
Joined: 10. Jan 2014, 03:05

Re: Software VT-x

Post by chaer »

thanks for your reply.
attually, software virtulization is what i concern. could you please talk about the story "PATM_EMULATE_SYSENTER" ?
Hugh2
Posts: 6
Joined: 15. Feb 2012, 06:28

Re: Software VT-x

Post by Hugh2 »

michaln wrote:Some hypervisors (VMware, KVM) have the ability to expose VT-x/AMD-V to guest software, but only if the host hardware already supports it.
That's cool! How well does it work?

I always bought into the argument that you shouldn't try to nest VMs because performance will suck and you don't need to anyway because you can run any number of guests side by side instead of nested.

But I can think of a couple of use cases for it.
  • Debugging a hypervisor by running it in a VM.
  • Trying out VM software that you don't trust. (eg. don't trust it not to crash your PC, or just don't trust it to uninstall cleanly)
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: Software VT-x

Post by michaln »

I always bought into the argument that you shouldn't try to nest VMs because performance will suck and you don't need to anyway because you can run any number of guests side by side instead of nested.
That's still true. A non-nested VM will always perform better than a nested one.
Debugging a hypervisor by running it in a VM.
That is true, but it assumes the software implementation is bug-free (possibly true) and behaves exactly like hardware (not true--think TLB management for example).
Trying out VM software that you don't trust. (eg. don't trust it not to crash your PC, or just don't trust it to uninstall cleanly)
That would be the typical use case. Probably not something a significant percentage of users is interested in, although it would be interesting to know what exactly the percentage is.
ErikW
Posts: 20
Joined: 11. May 2012, 23:59

Re: Software VT-x

Post by ErikW »

The System Management Mode of Intel CPUs would certainly be capable of supporting software emulation of the VT-x features. The issue is definitely performance. The result would be so slow that the guest OS would be unusable, if it even did successfully boot.

A great analogy is floating-point instruction emulation. Intel no longer sells x86 CPUs without floating point hardware because modern software relies on floating-point calculations too much for emulated floating-point to have adequate performance.

VirtualBox uses other techniques to make up for the lack of hardware virtualization, including translating the binary instructions to include the necessary hooks when software is loaded into memory. Those techniques could be applied to SMP as well, though the complexity of the problem goes up dramatically when emulating multiple CPUs.

It is unfortunate that Intel and AMD chose to make hardware virtualization an optional feature. My solution is to only buy CPUs that provide the hardware features for virtualization and support enough memory and performance. Now that we've hit the 5 Ghz. clock rate ceiling it makes more sense to buy CPUs less often and spend the money on features to improve the performance of a particular application. Buying mediocre CPUs more frequently no longer provides significant performance increases.

Microsoft is pushing virtualization quite heavily, but only for server applications. We are probably going to see consumer Desktop PCs become less powerful and maybe disappear entirely. My guess is that gaming PCs and workstations will stay around, but remain in a higher price bracket, while many companies will bail out of the less expensive consumer desktop PC market.

I remember the days when those who chose to run NT 4.0 had limited choices for hardware and software applicable to personal computing, multimedia and gaming. We may be returning to that same situation, where "multimedia" and "consumer" devices will have to be used for those activities rather than a desktop PC. The good news is that the life cycle for desktop PCs may actually increase, and the quality may increase as well.

It makes little sense to invest effort into software emulation of hardware features that will likely become a standard part of the hardware. It's likely that the less expensive CPUs will disappear entirely or become embedded into non desktop devices.
Pattyyivi
Posts: 17
Joined: 20. Sep 2016, 16:33
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: w2k, XP, w10
Location: Warsaw, Poland

Re: Software VT-x

Post by Pattyyivi »

mpack wrote: Almost all modern CPUs that can run a 64bit OS already have VT-x (or AMD-v).
You mean desktop hardware, however what about some laptops, modern as well, some of them seem have the virtualization feature missing or switched off in the wired manner.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Software VT-x

Post by mpack »

What about them? If you need VT-x then make sure you buy a device that supports it. Just like if you need lots of RAM etc. As has already been made clear above, a software VT-x isn't going to happen for multiple reasons.
Pattyyivi
Posts: 17
Joined: 20. Sep 2016, 16:33
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: w2k, XP, w10
Location: Warsaw, Poland

Re: Software VT-x

Post by Pattyyivi »

You know, it is always easier and less cumbersome to make software alterations than hardware restructuring, replacing CPU can damage motherboard and CPU itself.
Besides, some laptop manufacturers disabled VT-x intentionally, anybody knows why?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Software VT-x

Post by socratis »

Pattyyivi wrote:You know, it is always easier and less cumbersome to make software alterations than hardware restructuring
You're joking, right? Either that, or you don't honestly understand how things work in the computer world.

Pattyyivi, I believe the answer has been given more than once in a very clear manner. Especially the one from michaln on the other thread that you were complaining about the same exactly thing (w10 without any hardware virtualization, why not?). Give it a rest. It's not going to happen. It doesn't make sense for Oracle's business model.

On the other hand, it is an open source project, so contributions are welcomed (https://www.virtualbox.org/wiki/Contributor_information). Or you can hire a developer to do this for you. Expect to pay at least 6 figures.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply