I was planning on developing a VM that runs an x86_64 linux kernel inside my current OS. I want the VM to be some what like this:
The guest OS has direct access to all the hard ware except for storage devices and ram, these shall be virtuallized via the VM. The filesystem and ram are emulated by the OS. The main reason I want the guest kernel to have access to the hardware is so that I do not need to redo the drivers. Virtuallising the FS and RAM is done so that I can create a simple versioning system that allows me to backup the guest OS FS without any issues. How do you think I should go about doing this .
New design for Virtual kernel VM
-
- Posts: 21
- Joined: Mon May 03, 2010 10:19 pm
- Location: Asia, Planet Earth, Solar system, Milky way
New design for Virtual kernel VM
Zephirum OS- Super secure http://code.google.com/p/zephirum-server/
Number of blue screens of death I have seen: 19
Number of apple OS X kernel panics I have seen: 2
Number of linux kernel panics I have seen: 0
Number of blue screens of death I have seen: 19
Number of apple OS X kernel panics I have seen: 2
Number of linux kernel panics I have seen: 0
- NickJohnson
- Member
- Posts: 1249
- Joined: Tue Mar 24, 2009 8:11 pm
- Location: Sunnyvale, California
Re: New design for Virtual kernel VM
Allowing an OS in a VM access to all hardware is not a good idea. Not only will DMA not work due to the layer of paging the guest OS does not know about, but it is also a security and stability problem. Also, how do you know which ports correspond to storage devices and which don't?
Re: New design for Virtual kernel VM
On the other hand, I guess most design allow direct access to RAM for performance reason instead of emulation.
(I'm not sure but It may be done with some tricky hook and checks for mapping pages and hijack CR3/invlpg/etc).
By the way, if your VM is going to provide direct hardware access, you probably going to upset the host OS.
However, you may consider running your VM on bare metal, like VMWare ESX; so at least your VM can access most hardware directly.
(I'm not sure but It may be done with some tricky hook and checks for mapping pages and hijack CR3/invlpg/etc).
By the way, if your VM is going to provide direct hardware access, you probably going to upset the host OS.
However, you may consider running your VM on bare metal, like VMWare ESX; so at least your VM can access most hardware directly.
-
- Posts: 21
- Joined: Mon May 03, 2010 10:19 pm
- Location: Asia, Planet Earth, Solar system, Milky way
Re: New design for Virtual kernel VM
Yeah I'll run it on baremetal, also I'll keep it in real mode so the bootloader. Kind of like VMware ESX except it'll run only one OS. I'll have alook at KVM's source code for the paging issue.
Before loading the system I shall have figured which ports correspond to storage devices.NickJohnson wrote:Allowing an OS in a VM access to all hardware is not a good idea. Not only will DMA not work due to the layer of paging the guest OS does not know about, but it is also a security and stability problem. Also, how do you know which ports correspond to storage devices and which don't?
Zephirum OS- Super secure http://code.google.com/p/zephirum-server/
Number of blue screens of death I have seen: 19
Number of apple OS X kernel panics I have seen: 2
Number of linux kernel panics I have seen: 0
Number of blue screens of death I have seen: 19
Number of apple OS X kernel panics I have seen: 2
Number of linux kernel panics I have seen: 0
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: New design for Virtual kernel VM
"Because I (will) know" is not a valid argument
-
- Posts: 21
- Joined: Mon May 03, 2010 10:19 pm
- Location: Asia, Planet Earth, Solar system, Milky way
Re: New design for Virtual kernel VM
From what I figured out I have two options for doing what I wanted. I could para-virtuallize the linux kernel on top of my own, or I could emulate the CPU and HDD.
Zephirum OS- Super secure http://code.google.com/p/zephirum-server/
Number of blue screens of death I have seen: 19
Number of apple OS X kernel panics I have seen: 2
Number of linux kernel panics I have seen: 0
Number of blue screens of death I have seen: 19
Number of apple OS X kernel panics I have seen: 2
Number of linux kernel panics I have seen: 0