Re: [PATCH 7/7] kvm x86: report 1GB page support to userspace

From: Joerg Roedel
Date: Sun Mar 29 2009 - 08:46:08 EST


On Sun, Mar 29, 2009 at 02:54:31PM +0300, Avi Kivity wrote:
> Joerg Roedel wrote:
>> If userspace knows that the kernel part supports 1GB pages it can enable
>> the corresponding cpuid bit so that guests actually use GB pages.
>>
>
>> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
>> index a1df2a3..6593198 100644
>> --- a/arch/x86/include/asm/kvm_host.h
>> +++ b/arch/x86/include/asm/kvm_host.h
>> @@ -542,6 +542,8 @@ struct kvm_x86_ops {
>> int (*set_tss_addr)(struct kvm *kvm, unsigned int addr);
>> int (*get_tdp_level)(void);
>> int (*get_mt_mask_shift)(void);
>> +
>> + bool (*gb_page_enable)(void);
>> };
>>
>
> Should enable unconditionally. Of course we need to find the shadow bug
> first, may be the has_wrprotected thingy.

This was the original plan. But how about VMX with EPT enabled? I am not
sure but I think this configuration will not support gbpages?

Joerg
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/