Avi Kivity wrote:
> However, I do see an issue with my proposal. To get the physical address
> of the page, we need to use vmalloc_to_page(). But that won't work if
> kvm is built into the kernel (and thus uses large pages for data).
>
Because of this issue, I'd like to apply the patch now and remove the
allocations if/when the module_to_page() thing hits mainline. However:
> static struct kvm_arch_ops vmx_arch_ops = {
> .cpu_has_kvm_support = cpu_has_kvm_support,
> .disabled_by_bios = vmx_disabled_by_bios,
> @@ -2505,6 +2523,28 @@ static int __init vmx_init(void)
> if (r)
> goto out1;
>
> + if (cpu_has_vmx_msr_bitmap) {
> + vmx_msr_bitmap = alloc_page(GFP_KERNEL | __GFP_HIGHMEM);
> + if (!vmx_msr_bitmap) {
> + r = -ENOMEM;
> + goto out1;
>
We need to undo kvm_init_arch() here.
> + }
> +
> + printk(KERN_INFO "kvm: Enable MSR bitmap support.\n");
> +
> + va = kmap(vmx_msr_bitmap);
>
kmap_atomic() is preferable.
>
> +#define cpu_has_vmx_msr_bitmap \
> + (vmcs_config.cpu_based_exec_ctrl & CPU_BASED_USE_MSR_BITMAPS)
> +
> #endif
This needs to be an inline local to vmx.c.
Did you see any performance improvements out of this?
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
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