diff options
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index aff3479867a8..c990424d86d0 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -1641,10 +1641,12 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, | |||
1641 | u32 index, int *nent, int maxnent) | 1641 | u32 index, int *nent, int maxnent) |
1642 | { | 1642 | { |
1643 | unsigned f_nx = is_efer_nx() ? F(NX) : 0; | 1643 | unsigned f_nx = is_efer_nx() ? F(NX) : 0; |
1644 | unsigned f_gbpages = kvm_x86_ops->gb_page_enable() ? F(GBPAGES) : 0; | ||
1645 | #ifdef CONFIG_X86_64 | 1644 | #ifdef CONFIG_X86_64 |
1645 | unsigned f_gbpages = (kvm_x86_ops->get_lpage_level() == PT_PDPE_LEVEL) | ||
1646 | ? F(GBPAGES) : 0; | ||
1646 | unsigned f_lm = F(LM); | 1647 | unsigned f_lm = F(LM); |
1647 | #else | 1648 | #else |
1649 | unsigned f_gbpages = 0; | ||
1648 | unsigned f_lm = 0; | 1650 | unsigned f_lm = 0; |
1649 | #endif | 1651 | #endif |
1650 | unsigned f_rdtscp = kvm_x86_ops->rdtscp_supported() ? F(RDTSCP) : 0; | 1652 | unsigned f_rdtscp = kvm_x86_ops->rdtscp_supported() ? F(RDTSCP) : 0; |