Yang, Sheng wrote:
>  
> +static int alloc_apic_access_page(struct kvm *kvm)
> +{
> +     struct kvm_userspace_memory_region kvm_userspace_mem;
> +     int r;
> +
> +     r = -EFAULT;
> +     /* Top memslot for apic access page */
> +     if (kvm->nmemslots == KVM_MEMORY_SLOTS)
> +             return r;
> +     kvm_userspace_mem.slot = kvm->nmemslots + 1;
> +     kvm_userspace_mem.flags = 0;
> +     kvm_userspace_mem.guest_phys_addr = 0xfee00000ULL;
> +     kvm_userspace_mem.memory_size = PAGE_SIZE;
> +     r = kvm_set_memory_region(kvm, &kvm_userspace_mem, 0);
> +     if (r)
> +             return r;
> +     kvm->apic_access_page = gfn_to_page(kvm, 0xfee00);
> +     return 0;
> +}
you probably want to use slot number 9 (every slot above KVM_MEMORY_SLOT 
and below KVM_MEMORY_SLOT + KVM+PRIVATE_MEM_SLOTS are private slots that 
meant to be used like you use them in your patch,) using the number 9 
slot will make the slot invisible to the guest
and insure that at runtime the user can still allocate and remove slots 
without clashing with your slots.
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ------------------------------------------------------------------------
>
> _______________________________________________
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to