Having 64-bits guests support without VT-x / AMD-V

Here you can provide suggestions on how to improve the product, website, etc.
Locked
efortin
Posts: 2
Joined: 29. Dec 2008, 19:54

Having 64-bits guests support without VT-x / AMD-V

Post by efortin »

I would like to know why with 64-bits guests, we absolutely need VT-x or AMD-V support. Every single virtualization software seem to need these instructions in order to support 64-bits guests.

At first, I didn't understand and thought that the reason may be that there's only two PL (Privilege Level) in Long mode on x86 CPU. This would be explained by the fact that guest OS system code runs at CPL=1 and user code at CPL=3. If you only have two PL, then its harder because your guest OS system code needs to run at CPL=3 as well. I verified in x64 doc and it's not the case, all four PL are there.

Then I thought that maybe virtualization software on x86 make heavy use of segmentation. This would explain the need for VT-x and al support because segmentation has been removed from x64. I don't have any confirmation on that one yet. So that was my first question.

My second question would then be if this support is needed to simplify virtualization software developers tasks, meaning that full 64-bits guests support would be possible, but difficult, without these instructions. Or if it is absolutely physically impossible to have 64-bits guests without them.

If it is indeed possible to have 64-bits guests without VT-x and AMD-V then I would highly suggest you add this support. I have a good P7350 CPU, from the Penryn generation, but without VT-x support. So right now I can't have 64-bits guests.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

This one has been discussed on a number of occasions. Have a search as below to find them. This is technically possible, just the same way as 32 bit s/w emulation was. However, to develop the JiT code patching so support 64 bit code is a major piece of development work. Given that both Intel and AMD are moving to include AMD-V / VT-x on all their future CPUs and that H/W virtualisation is fast overhauling S/W translation techniques in terms of performance, there just isn't the benefit case for doing all this development. Sorry.

If you need 64bit S/W emulation then some of the VMware products support this.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
efortin
Posts: 2
Joined: 29. Dec 2008, 19:54

Post by efortin »

TerryE wrote:This one has been discussed on a number of occasions. Have a search as below to find them. This is technically possible, just the same way as 32 bit s/w emulation was. However, to develop the JiT code patching so support 64 bit code is a major piece of development work. Given that both Intel and AMD are moving to include AMD-V / VT-x on all their future CPUs and that H/W virtualisation is fast overhauling S/W translation techniques in terms of performance, there just isn't the benefit case for doing all this development. Sorry.

If you need 64bit S/W emulation then some of the VMware products support this.
Thanks for the answer. I should have looked with the search engine, as always...

Two comments on my side. First, Intel is notorious for stripping down features on their processor depending on the intended market. Even though the core is perfectly capable of supporting it, they permanently disable some features. This is definitely not going to change. And in my opinion, VT-x is a very good candidate for this "features differentiation" scheme Intel uses.

Secondly, it has been said by the developers of Virtual Box that their software virtualization is marginaly slower, and sometimes faster, than VT-x and AMD-V. And given some benchmark I've seen, I tend to agree.

So in my opinion, this would be worth the work.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

efortin wrote: It has been said by the developers of Virtual Box that their software virtualization is marginaly slower, and sometimes faster, than VT-x and AMD-V. And given some benchmark I've seen, I tend to agree.
That was definitely the case for the first generation H/W virtualisation, but we're now on the second with the third in the wings. This is no longer the case.
efortin wrote:So in my opinion, this would be worth the work.
But sadly you aren't the one with the chequebook to fund this development work :wink:
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Post by Technologov »

TerryE wrote:
>If you need 64bit S/W emulation then some of the VMware products support this.

Very interesting thread.
AFAIK all VMware products require VT to run 64-bit guests.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Yup, that's what I thought until a poster in an earlier post pointed out that I was wrong. Have a look at VMware — Hardware and Firmware Requirements for 64-Bit Guest Operating Systems. VMware seems to need a 64-bit CPU plus segmentation support. In the case of Intel CPUs
Intel EM64T CPUs do not have segmentation support in long mode. If the Intel EM64T CPU is VT-capable, it comes with hardware virtualization support (Intel's Virtualization Technology). This hardware virtualization support allows Workstation and VMware Server to work around the lack of segmentation, making it possible to run 64-bit guest operating systems on Intel EM64T VT-capable CPUs.
so it used VT-x for this purpose, but it the case of AMD CPUs
Segmentation support is missing from the initial AMD64 processors (that is, revision C and earlier) while running in long mode ... As a result, AMD64 processors must be revision D or later to run 64-bit guest operating systems.
So VMware does support Opteron E-series, but AMD-V was only introduced with Opteron F-Series.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Guest

Post by Guest »

This is my experience today trying to install openSUSE 11.1 64-bit in VirtualBox 2.1 using MS WinXPx64 as the host. It mimics past experiences ...
Image
Obviously, VirtualBox is presenting a 32-bit environment to the installer. The openSUSE installer recognizes it and aborts.

In some relatively short time, I cannot say when, there will not be any 32-bit OS for personal computers and, at the same time, SMP (at least multi-core) will be the standard CPU environment with single CPU as special cases. This is the direction computing has been moving since at least the early 90's. It is not going to change direction for i386 compatible CPU. (and frankly, when a revolutionary change occurs for central processing units, it surely will not be limited to 32-bit!)

It is illogical to pursue 32-bit and single core environment, especially for virtualization. Being illogical is not in of itself bad, ..., but for a company that desires and, in truth, needs profit it most certainly is the wrong approach.

There are millions of Opteron Rev E CPUs out there. Support them the way they should be: 64-bit (guest) OS!
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

TerryE wrote:So VMware does support Opteron E-series, but AMD-V was only introduced with Opteron F-Series.
fhj52 wrote:There are millions of Opteron Rev E CPUs out there. Support them the way they should be: 64-bit (guest) OS! ... MS XPx64 Host & Linux 32-bit guest but I WANT MY 64-bit GUEST! as MS 64-bit guest on 64-bit Linux host. Using dual Opteron 254 & 285 (Rev E4) systems in (degraded) i*86 uniprocessor mode.
VBox uses AMD-V on AMD to support 64bit guests. Opteron Rev E CPUs do not offer AMD-V. VBox is a free product, so I guess its a case of take it or leave it. I want doesn't get. As I said you can use VMware Workstation (at ~ $200 IIRC) if you want 64bit guests.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Guest

Why I cannot use V'Box

Post by Guest »

I like VirtualBox. But I use only 64-bit OS.
In 1993 I told a computer, um, salesperson that I really did not want to buy an 8/16/32-bit single processor system because that is not where personal computing was headed. He laughed at me when I told him 64-bit multi-processor is what I desired.
...
Well, I am getting the last laugh but some people are still making that difficult.

I bought Opterons some years ago. All are Socket 940 Revision E. They do not have AMD-V support. (as mentioned, AMD only added that with the Socket F Opterons.) I cannot buy new processors because it means a brand new system build including mainboard, RAM, etc.(...). In the future(years i hope) I may purchase Intel again but that won't help me now.

At this time I need to get full use out of the CPUs that I own. Virtualization will help me to do that.

This
Sun Microsystems, Inc. wrote:You need a 64-bit processor with hardware virtualization support (see chapter 1.2, Software vs. hardware virtualization (VT-x and AMD-V), page 10).
does not fly with me.
This is why.
Sun Microsystems, Inc. wrote:While VirtualBox does support the hardware features listed above, they are optional: you can enable or disable hardware virtualization individiually for each virtual machine.
In fact, depending on the workload, VirtualBox’s software virtualization may even be faster than hardware virtualization. Other virtualization products that require hardware virtualization are usually much less sophisticated and tuned compared to VirtualBox. With VT-x and AMD-V, a special CPU environment has to be entered in order to execute guest code and whenever activity of the VMM is required, this environment has to be left and then entered again. This can be an expensive operation and in many circumstances, the benefits of hardware virtualization may not outweigh the performance penalty.
That means that, in truth, the CPU virtualization support is not required.

It is completely illogical to state that I *must* have AMD-V or Intel-VT capable processors and then tell me that, no, I don't really need the hardware support from either.
Then to further state that the software virtualization might actually be faster than using AMC-V or Intel-VT, honestly, just makes me crazy|mad.
...

I installed VMWARE Workstation 6.5 on Linux 64-bit system the other day(VMWARE has a half-price sale this month so I thought I'd give them a look, again). MS WinXPx64 installed w/o a hitch. It runs about like MS Win OS always runs.

But honestly I like V'Box more. I also prefer Linux. Linux, as odd as it may seem to some people, keeps me from going totally nuts because all MS OS drive me crazy!

So for my sanity, and all people who prefer 64-bit OS, please take out the requirement to have a -V or -VT CPU and present the environment for what it is: 64-bit. Note that VMware only requires Revision E or later for Opterons. V'Box can certainly do this too.

For goodness sakes, it is not like we are asking VirtualBox to support 64-bit OS on 32-bit CPU! This is doable. It needs to be done so please do it.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

fhj52 wrote:For goodness sakes, it is not like we are asking VirtualBox to support 64-bit OS on 32-bit CPU! This is doable. It needs to be done so please do it.
Of course it is doable, technically. I've discussed this before here and on other topics, but doing so will take a not inconsiderable bit of development work. So who is going to pay for it? Where is the market? Where is the revenue stream for Sun to do this? AFAIK, there isn't one.

Current AMD processors support AMD-V, so this is a historic problem. If you have an only Opteron Rev E motherboard then you probably don't have enough memory to support a guest with >4Gb RAM so why do you need a 64bit guest OS now. By the time that you do need to use 64bit guests you will have replaced your motherboard.

Sun isn't a charity. Why not just take VMware's half-price offer?
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Guest

Post by Guest »

TerryE wrote:
fhj52 wrote:For goodness sakes, it is not like we are asking VirtualBox to support 64-bit OS on 32-bit CPU! This is doable. It needs to be done so please do it.
Of course it is doable, technically. I've discussed this before here and on other topics, but doing so will take a not inconsiderable bit of development work. So who is going to pay for it? Where is the market? Where is the revenue stream for Sun to do this? AFAIK, there isn't one.
Well, sure there is! Every box running 64-bit CPU is a potential customer. Who pays for it now is a Sun internal discussion but I do not believe that the technical work is that involved ...unless, unless, the issue is really cleaning up all the code that was hacked into V'Box(that should not have been but was for, I'm sure at the time, arguably good reasons).
...anyway, revenue is generated from customers who will buy Sun commercial products because Sun got them as customers by offering something unique and thereby got their foot in the door. VMware knows this. VMware knows that customers running VMware today on non-V CPU, e.g., Rev E Opterons, will most likely run VMware in the future too when V' is built into most CPUs.
TerryE wrote:Current AMD processors support AMD-V, so this is a historic problem.
Current AMD processors are not where the market is at this time. Holy smokes ... there is, comparatively, no market for new CPU from any company. People and companies don't buy new systems just because they are new, especially business customers. Heck fire, there are *still* many Pentium SERVERS. ... Point being that there is a moving distribution curve that contains all systems. Barcelona and Nehalem are barely in it(as would be Pentium or, e.g., Transmeta CPU). Surely the new processors will move the older ones out but this will take some years. Current market economics are such that it is not going to be as fast as might be in better times.
TerryE wrote:If you have an only Opteron Rev E motherboard then you probably don't have enough memory to support a guest with >4Gb RAM so why do you need a 64bit guest OS now. By the time that you do need to use 64bit guests you will have replaced your motherboard.
Now Terry, that is a wild (& incorrect) assumption. ... All systems here are workstation|server class SMP(multiple processors) and *all* such systems can carry at least 16GB of mainboard RAM; most can have 32GB or more. Now, TBH, I don't have 32GB installed because I have not found a good reason; i.e., no 64-bit on 64-bit virtualization that satisfies my needs. What I do has not extended past the 4GB, though it would with V'box or VMware.
...even desktop class systems often carry the firmware to handle 16GB; More so now than in the past because of the move to multi-core. There are many, many boards that handle 8GB; even micro-atx size boards!
TerryE wrote:Sun isn't a charity.
I assume that Sun, like Novell, Microsoft, Citrix and any other organization|business that is not non-profit are all trying to make a buck. Let's not forget that this is an *Innotek* product which was always free for personal use, the same as it is now. Sun only became involved (by purchase) to move into the Virtualization business so that they could offer their commercial businesses a Virtualization product. If their only business is Sun Servers running the newest AMD & Intel CPUs, no wonder their stock is in the tank. Nobody in their right mind is going to buy stock in a company that is devoted to much less than 50% of the market(dare I say less than 25%?) ...so I don't believe that is the case. Sun is surely supporting many commercial enterprises with REV E Opterons as well as the older 64-bit Intel.
In the rest of the (IBM PC) market, desktop is some 80% of the business. ... It is not charity to support people that go into work and present XYZ product in a meeting because they have it at home and it just works for their CPU that does not have -V or -VT.
TerryE wrote:Why not just take VMware's half-price offer?
I'm evaluating it. ... You are correct that VMware Workstation 6.5 for Linux (or MS Windows) as electronic download for $94.50 (this month) is a fairly good price(it should be the MSRP, IMO). However, as I said, clearly I thought, at this time " ... I like V'Box more. ". That may change: Attitudes from Sun that making the code correct is too much time & effort(cost) is certainly a good reason to make VirtualBox an "also played" in the Virtualization Game.

...
One major reason that I prefer VirtualBox Open Source Edition (OSE) as the virtualization appliance is the license: GPL.
I would happily contribute to the code to fix this issue of 64-bit guest but, honestly, by the time I get up to speed, ...well, it will be too late. Hence, I am here asking as politely and firmly as I can to get those who can do it now to do it.

I appreciate your responses( thank you ) but if you are not one of those people, let's try to get one|more of those who can. If Sun Microsystems is determined to toss away this market, it is their business but I would like to know before I spend more time & effort(& money) on VMware.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Comments like "cleaning up all the code that was hacked into V'Box" are neither fair nor constructive. Have you gone through the code?

Let's agree to differ and stop this. The argument is going in circles and being rude to the developers just doesn't help.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Locked