Giter VIP home page Giter VIP logo

microv's People

Contributors

brendank310 avatar chp-io avatar jaredwright avatar paulocoghi avatar pavan-infovision avatar rianquinn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

microv's Issues

KVM_IRQFD

Add ioctl KVM_IRQFD to the shim, along with integration tests.

are there any Signed drivers for production?

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?

KVM_IRQ_LINE

Add ioctl KVM_IRQ_LINE to the shim, along with integration tests.

Project Still Active?

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.

KVM_SET_USER_MEMORY_REGION

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;
}

`

KVM_SIGNAL_MSI

Add ioctl KVM_SIGNAL_MSI to the shim, along with integration tests.

KVM_CREATE_IRQCHIP

Add ioctl KVM_CREATE_IRQCHIP to the shim, along with integration tests.

KVM_GET_LAPIC

Add ioctl KVM_GET_LAPIC to the shim, along with integration tests.

KVM_GET_IRQCHIP

Add ioctl KVM_GET_IRQCHIP to the shim, along with integration tests.

KVM_GET_PIT2

Add ioctl KVM_GET_PIT2 to the shim, along with integration tests.

KVM_CREATE_PIT2

Add ioctl KVM_CREATE_PIT2 to the shim, along with integration tests.

KVM_SET_LAPIC

Add ioctl KVM_SET_LAPIC to the shim, along with integration tests.

KVM_SET_IRQCHIP

Add ioctl KVM_SET_IRQCHIP to the shim, along with integration tests.

KVM_SET_PIT2

Add ioctl KVM_SET_PIT2 to the shim, along with integration tests.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.