Sun VirtualBox question

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Srowen
Member
Member
Posts: 60
Joined: Thu Feb 26, 2009 2:31 pm
Location: Genova, ITALY

Sun VirtualBox question

Post by Srowen »

Hi osdever!
I hope that someone use the sun virtual box and know something about it. I use it to test my kernel that is multithread and also multiprocess. But i've got some problem.. You have to know that i test my kernel in a real pc with a pentium 4 and 512mb of ram and the virtual box is installed on my macbook with an intel core 2 duo and i've got snow leopard.

Now, i notice in virtual box the option on the VT-x/AMD-V and google say me that it is something to do a better and fast virtualization of the machine.

My kernel is very easy and for the moment i want only to test the fork syscall and the clone one. Both syscall work great in the real pc so i think that they aren't bugged.
But, if i try to desable the VT-x/AMD-V option, the fork doesn't work. (exactly, i've got a general protection fault while i try to switch to the son process)
As the same, if i enable the VT-x/AMD-V option, the clone doesn't work.

Maybe there is something bugged or wrong in my syscall, but first i wont to understand what enable or desable this option do. Thanks in advance for the reply.

EDIT: i also try my os in parallels and it works great, no problem for both the syscall.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Sun VirtualBox question

Post by AJ »

Hi,

I've no idea if this is what's causing your problem, but I have had problems with triple-faults on virtualised hardware (VPC, I think) when I was trying to use task gates (for automatic stack switching on double-fault exceptions). On further enquiry, I found that this was a known bug and there were no plans to fix it (probably becuase it was VPC and it caused no known problems with running MS Operating Systems...).

So, basically, how are you handling the interrupt? Is it just a standard ISR or are you trying something more fancy? If this isn't the problem, I'm not sure what else it is, but will have more of a think about it...

Cheers,
Adam
smeezekitty
Member
Member
Posts: 50
Joined: Sat Mar 21, 2009 9:42 pm

Re: Sun VirtualBox question

Post by smeezekitty »

Virtual Box is well...buggy.
but if it does not work quite right in ether mode its time to do some code tweaking :).
Srowen
Member
Member
Posts: 60
Joined: Thu Feb 26, 2009 2:31 pm
Location: Genova, ITALY

Re: Sun VirtualBox question

Post by Srowen »

AJ wrote:
So, basically, how are you handling the interrupt? Is it just a standard ISR or are you trying something more fancy? If this isn't the problem, I'm not sure what else it is, but will have more of a think about it...
Yes i use a very simple and standard ISR. For the moment i don't switch to user mode. To handle the interrupt i simply push the cpu register in the user stack and then i change the stack to the kernel stack.
tantrikwizard
Member
Member
Posts: 153
Joined: Sun Jan 07, 2007 9:40 am
Contact:

Re: Sun VirtualBox question

Post by tantrikwizard »

Try the V-box groups for more accurate explanations, they will have better domain expertise on that product than most members here. It also wouldn't hurt to post the resulting findings here or on the wiki if a good explanation is found so others could benefit.

Good luck
Post Reply