Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185979
b: refs/heads/master
c: 17cc393
h: refs/heads/master
i:
  185977: 6f356ee
  185975: e5a5e88
v: v3
  • Loading branch information
Sheng Yang authored and Marcelo Tosatti committed Mar 1, 2010
1 parent 831811e commit 521ded8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c9c5417455b0c2e3c164883354b5480e5aee3b36
refs/heads/master: 17cc393596823f4bbab81e68a9e23e7beadbcfca
2 changes: 1 addition & 1 deletion trunk/arch/x86/include/asm/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ struct kvm_x86_ops {
int (*set_tss_addr)(struct kvm *kvm, unsigned int addr);
int (*get_tdp_level)(void);
u64 (*get_mt_mask)(struct kvm_vcpu *vcpu, gfn_t gfn, bool is_mmio);
bool (*gb_page_enable)(void);
int (*get_lpage_level)(void);
bool (*rdtscp_supported)(void);

const struct trace_print_flags *exit_reasons_str;
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2911,9 +2911,9 @@ static const struct trace_print_flags svm_exit_reasons_str[] = {
{ -1, NULL }
};

static bool svm_gb_page_enable(void)
static int svm_get_lpage_level(void)
{
return true;
return PT_PDPE_LEVEL;
}

static bool svm_rdtscp_supported(void)
Expand Down Expand Up @@ -2986,7 +2986,7 @@ static struct kvm_x86_ops svm_x86_ops = {
.get_mt_mask = svm_get_mt_mask,

.exit_reasons_str = svm_exit_reasons_str,
.gb_page_enable = svm_gb_page_enable,
.get_lpage_level = svm_get_lpage_level,

.cpuid_update = svm_cpuid_update,

Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -4036,9 +4036,9 @@ static const struct trace_print_flags vmx_exit_reasons_str[] = {

#undef _ER

static bool vmx_gb_page_enable(void)
static int vmx_get_lpage_level(void)
{
return false;
return PT_DIRECTORY_LEVEL;
}

static inline u32 bit(int bitno)
Expand Down Expand Up @@ -4131,7 +4131,7 @@ static struct kvm_x86_ops vmx_x86_ops = {
.get_mt_mask = vmx_get_mt_mask,

.exit_reasons_str = vmx_exit_reasons_str,
.gb_page_enable = vmx_gb_page_enable,
.get_lpage_level = vmx_get_lpage_level,

.cpuid_update = vmx_cpuid_update,

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -1641,10 +1641,12 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
u32 index, int *nent, int maxnent)
{
unsigned f_nx = is_efer_nx() ? F(NX) : 0;
unsigned f_gbpages = kvm_x86_ops->gb_page_enable() ? F(GBPAGES) : 0;
#ifdef CONFIG_X86_64
unsigned f_gbpages = (kvm_x86_ops->get_lpage_level() == PT_PDPE_LEVEL)
? F(GBPAGES) : 0;
unsigned f_lm = F(LM);
#else
unsigned f_gbpages = 0;
unsigned f_lm = 0;
#endif
unsigned f_rdtscp = kvm_x86_ops->rdtscp_supported() ? F(RDTSCP) : 0;
Expand Down

0 comments on commit 521ded8

Please sign in to comment.