Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223402
b: refs/heads/master
c: 24d1b15
h: refs/heads/master
v: v3
  • Loading branch information
Joerg Roedel authored and Avi Kivity committed Dec 8, 2010
1 parent fde313d commit 060d6ff
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 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: 3ea3aa8cf67d3bbe00a19b6a4013d19efa7d0f41
refs/heads/master: 24d1b15f72abe3465e871d11cfc9dc34d1aab8b2
4 changes: 4 additions & 0 deletions trunk/arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3494,6 +3494,10 @@ static void svm_cpuid_update(struct kvm_vcpu *vcpu)
static void svm_set_supported_cpuid(u32 func, struct kvm_cpuid_entry2 *entry)
{
switch (func) {
case 0x00000001:
/* Mask out xsave bit as long as it is not supported by SVM */
entry->ecx &= ~(bit(X86_FEATURE_XSAVE));
break;
case 0x80000001:
if (nested)
entry->ecx |= (1 << 2); /* Set SVM bit */
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -4227,11 +4227,6 @@ static int vmx_get_lpage_level(void)
return PT_PDPE_LEVEL;
}

static inline u32 bit(int bitno)
{
return 1 << (bitno & 31);
}

static void vmx_cpuid_update(struct kvm_vcpu *vcpu)
{
struct kvm_cpuid_entry2 *best;
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,6 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {

u64 __read_mostly host_xcr0;

static inline u32 bit(int bitno)
{
return 1 << (bitno & 31);
}

static void kvm_on_user_return(struct user_return_notifier *urn)
{
unsigned slot;
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/x86/kvm/x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ static inline int is_paging(struct kvm_vcpu *vcpu)
return kvm_read_cr0_bits(vcpu, X86_CR0_PG);
}

static inline u32 bit(int bitno)
{
return 1 << (bitno & 31);
}

void kvm_before_handle_nmi(struct kvm_vcpu *vcpu);
void kvm_after_handle_nmi(struct kvm_vcpu *vcpu);
int kvm_inject_realmode_interrupt(struct kvm_vcpu *vcpu, int irq);
Expand Down

0 comments on commit 060d6ff

Please sign in to comment.