PAE flag not passed from host to guest in VirtualBox 4.3.*

Discussions about using Linux guests in VirtualBox.
Post Reply
robatino
Posts: 167
Joined: 17. Dec 2008, 21:15

PAE flag not passed from host to guest in VirtualBox 4.3.*

Post by robatino »

On doing 32-bit Fedora installs into a VirtualBox 4.3.* guest (first 4.3.0 and then 4.3.2) I noticed that even though the Fedora 19 x86_64 host supports PAE, the kernel being installed in the guest was the non-PAE version. Checking the output of "cat /proc/cpuinfo" on both the host and guest showed that on the guest, a number of flags supported by the host, including "pae", were missing. I also checked that in a KVM install, although a few flags were missing in the guest, the "pae" flag was present, at least.

I'm fairly sure that until recently, the "pae" flag was passed in vbox from host to guest. What determines which flags are passed, in an arbitrary VM, from host to guest? Is it a bug when any are missing? And is it a bug in this case that vbox is no longer passing the "pae" flag?
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Any and all
Contact:

Re: PAE flag not passed from host to guest in VirtualBox 4.3

Post by michaln »

robatino wrote:What determines which flags are passed, in an arbitrary VM, from host to guest?
The VM settings, for the most part. If you don't have the PAE/NX setting enabled for your VM, it is expected that the guest won't see it (in version 4.3).
Is it a bug when any are missing?
No. It's fully expected that the guest won't see all host flags.
And is it a bug in this case that vbox is no longer passing the "pae" flag?
No. But there was a bug in version 4.2.x and older in that it somewhat unpredictably passed the PAE capability to the guest without being asked to. Version 4.3 behaves predictably and obeys the VM settings for 64-bit guest and PAE support consistently on all hosts.
robatino
Posts: 167
Joined: 17. Dec 2008, 21:15

Re: PAE flag not passed from host to guest in VirtualBox 4.3

Post by robatino »

michaln wrote:
robatino wrote:What determines which flags are passed, in an arbitrary VM, from host to guest?
The VM settings, for the most part. If you don't have the PAE/NX setting enabled for your VM, it is expected that the guest won't see it (in version 4.3).
Thank you. After going into System/Processor and checking the "Enable PAE/NX" box, I now see the "pae" flag in the guest.
michaln wrote:
robatino wrote:And is it a bug in this case that vbox is no longer passing the "pae" flag?
No. But there was a bug in version 4.2.x and older in that it somewhat unpredictably passed the PAE capability to the guest without being asked to. Version 4.3 behaves predictably and obeys the VM settings for 64-bit guest and PAE support consistently on all hosts.
Just wondering - the "Enable PAE/NX" box was unchecked by default. Wouldn't it be better for it to be checked by default? What are the reasons for it not to be? (BTW, I don't remember if 4.2.* had such a box, or if it did, what the setting was. If it did, I suppose I might have unchecked the box for some reason, and then 4.3.* could have preserved that setting.)
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Any and all
Contact:

Re: PAE flag not passed from host to guest in VirtualBox 4.3

Post by michaln »

robatino wrote:Just wondering - the "Enable PAE/NX" box was unchecked by default. Wouldn't it be better for it to be checked by default? What are the reasons for it not to be?
It may be checked by default, and the defaults depend on the guest type. For existing VMs, the settings won't be changed though.
(BTW, I don't remember if 4.2.* had such a box, or if it did, what the setting was. If it did, I suppose I might have unchecked the box for some reason, and then 4.3.* could have preserved that setting.)
The setting has been there for a long time. The difference is that 4.2.x on your system ignored the PAE setting and 4.3.x does not. Unfortunately the bug was in 4.2.x and we can't retroactively fix it, so users may be slightly inconvenienced by having to check the PAE box explicitly.

The reason for not always exposing PAE is that depending on the host, it may be more expensive to emulate.
robatino
Posts: 167
Joined: 17. Dec 2008, 21:15

Re: PAE flag not passed from host to guest in VirtualBox 4.3

Post by robatino »

I just checked by creating new 32- and 64-bit guests in VirtualBox 4.3.2, with a 64-bit host, and in each case, the "Enable PAE/NX" box is unchecked by default, so I'll have to remember to set that. Thanks.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Any and all
Contact:

Re: PAE flag not passed from host to guest in VirtualBox 4.3

Post by michaln »

The setting will depend on the exact guest type. Generally for guest types where PAE isn't required, it won't be set by default. Also note that for 64-bit guests, the PAE setting is not truly relevant because 64-bit paging requires PAE/NX to be also available.
robatino
Posts: 167
Joined: 17. Dec 2008, 21:15

Re: PAE flag not passed from host to guest in VirtualBox 4.3

Post by robatino »

michaln wrote:The setting will depend on the exact guest type. Generally for guest types where PAE isn't required, it won't be set by default. Also note that for 64-bit guests, the PAE setting is not truly relevant because 64-bit paging requires PAE/NX to be also available.
Well, strictly speaking, you don't actually need PAE in a 32-bit Fedora guest, since a non-PAE kernel is available, but the vast majority of CPUs do support PAE, so it means that vbox guests behave differently from what most people would expect.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Any and all
Contact:

Re: PAE flag not passed from host to guest in VirtualBox 4.3

Post by michaln »

Guessing what "most people would expect" is a loser's game :)
Post Reply