bareflank / microv Goto Github PK
View Code? Open in Web Editor NEWA micro hypervisor for running micro VMs
License: Other
A micro hypervisor for running micro VMs
License: Other
Add ioctl KVM_SET_LAPIC to the shim, along with integration tests.
Both Xen and KVM (various userspaces) support Windows guests and KVM(Qemu) supports MacOS. KVM/Qemu supports a ton of other guests.
Add ioctl KVM_CREATE_PIT2 to the shim, along with integration tests.
Add ioctl KVM_GET_IRQCHIP to the shim, along with integration tests.
For KVM_SET_USER_MEMORY_REGION the following changes are needed
-->In microv/shim/include kvm_userspace_memory_region.h
->Changing the struct in the kvm_userspace_memory_region file with the following struct as explained in WIKI
struct kvm_userspace_memory_region { uint32_t slot; uint32_t flags; uint64_t guest_phys_addr; uint64_t memory_size; /* bytes */ uint64_t userspace_addr; /* start of the userspace allocated memory */ };
-->In microv/shim/linux/src entry .c
->Include the handle_vm_kvm_set_user_memory_region.c file
->Modify the dispatch_vm_kvm_set_user_memory_region by including the copy from user(to get the user memory) and calling the handle file with the user memory.
static long
dispatch_vm_kvm_set_user_memory_region(
struct kvm_userspace_memory_region *const ioctl_args)
{
struct kvm_userspace_memory_region kvm_userspace_mem;
if(copy_from_user(&kvm_userspace_mem, ioctl_args ,sizeof(kvm_userspace_mem)))
{
bferror("copy_from_user failed");
return -EFAULT;
}
if(handle_vm_kvm_set_user_memory_region(&kvm_userspace_mem))
{
bferror("handle_vm_kvm_set_user_memory_region failed");
return -EFAULT;
}
return 1;
}
-->In microv/shim/src handle file handle_vm_kvm_set_user_memory_region.c
->Include the g_hndl.h, platform.h, and mv_hypercall.h files.
->mutex_lock - to lock memory and used to take a userspace buffer of memory and tell the kernel that it cannot be paged out.
->Divide the user memory to 4k pages, find number of 4K pages required for the user memory (Memory size?)
->loop to load the user memory using the no. of pages as count for loop to end(how is the lock implemented in the project ? )
> Can get the Physical address from using platform_virt_to_phys() from platform.c ?
> Create new header to define the mv_mdl_entry_t & mv_mdl_t. Use these mdls to store the pages of the memory
https://github.com/Bareflank/MicroV/blob/master/docs/MicroV%20Hypercall%20Specification.md#1-introduction 1.4.5
> When memory is full it reaches MV_MDL_MAX_ENTRIES (When the loop ends should I consider that the memory is completly transfered or is there any parameter to notify this ? )
> Call mv_vm_op_mmio_map when memory is full or loop ends to stored the memory
->mutex unlock (Should we create a platform lock and platform_unlock functions or use existing once from online?)
->return shim success
int64_t
handle_vm_kvm_set_user_memory_region(struct kvm_userspace_memory_region *const ioctl_args)
{
platform_expects(MV_INVALID_HANDLE != g_hndl);
platform_expects(NULL != ioctl_args);
mutex_lock(ioctl_args->userspace_addr);
//platform_lock_mem(ioctl_args->userspace_addr,ioctl_args->memory_size);
//to find number of 4k pages required for requested user memory_size
int no_of_pages = ((ioctl_args->memory_size)/(1<<4));
for(loop=0; loop < no_of_pages; loop ++)
{
//-get phys address - need to identify
//-fill in mv_mdl_entry_t in mv_mdl_t - need to identify
//-if mv_mdl_t is full or done - need to identify
struct kvm_userspace_memory_region* kvm_userspace_mem = mv_vm_op_mmio_map(g_hndl);
platform_memcpy(ioctl_args, kvm_userspace_mem, sizeof(ioctl_args));
ioctl_args->userspace_addr = kvm_userspace_mem->userspace_addr;
}
mutex_unlock(ioctl_args->userspace_addr);
//platform_unlock_mem(ioctl_args->userspace_addr,ioctl_args->memory_size);
return SHIM_SUCCESS;
}
`
Add ioctl KVM_CREATE_IRQCHIP to the shim, along with integration tests.
Add ioctl KVM_SET_PIT2 to the shim, along with integration tests.
Add ioctl KVM_SIGNAL_MSI to the shim, along with integration tests.
Add ioctl KVM_GET_LAPIC to the shim, along with integration tests.
Add ioctl KVM_GET_PIT2 to the shim, along with integration tests.
Add ioctl KVM_SET_GSI_ROUTING to the shim, along with integration tests.
Hello,
I've a windows binary that checks the result of CPUID instructions to perform some actions. since CPUID is a memonic and hooking it is not possible , the only option is to use a hypervisor to trap the instruction and alter the results.
now the problem is that I can't use testmode and can't disable UEFI.
I was wondering are there any signed driver that solves this problem? if no , is there any way to get hold of a software that has the kernel driver signed which only perform some basic tasks , and a SDK is provided to interact and control the driver? does this make sense?
for example VMware drivers are signed and using the software I can tamper the CPUID a little with some .vmx modifications but I can't alter the results. is there something similar for micro hypervisors which allows that kind of access and has the drivers signed?
Add ioctl KVM_IRQ_LINE to the shim, along with integration tests.
Add ioctl KVM_IRQFD to the shim, along with integration tests.
Provide a reference to the spec that disallows do...while loops and refactor non-compliant code.
Hello,
I am exploring thin-hypervisors for possible use in a project that would focus towards the utilization of Unikernels over fully blown OS's and like the approach the MicroV uses and am interested a lot in the UEFI booting approach.
With that in mind, I am wondering if the project is still active and if we could discuss some ideas more?
Thanks and have a great day.
Add ioctl KVM_SET_IRQCHIP to the shim, along with integration tests.
Does MicroV microkernel run on one CPU core or multi core?
Could you help pointing out to me the API or function for sending IPI or INIT interrupt in MicroV?
Thanks.
Clean up clang tidy issues related to the demo branch, in preparation of a master branch merge.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.