diff options
author | Eric Anholt <eric@anholt.net> | 2009-12-01 09:01:54 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-12-01 09:01:54 -0800 |
commit | f40d6817a5c2bf84f5fe7b5d1a83f1e8f8669951 (patch) | |
tree | 1c515a34a60f65cbfd3cf1a387427d0a9fdf878f /arch/x86/kvm/x86.c | |
parent | 103a196f4224dc6872081305cf7f82ebf67aa7bd (diff) | |
parent | 46557bef3f3834ac33031c7be27d39d90d507442 (diff) |
Merge remote branch 'airlied/drm-next' into drm-intel-next
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 9b9695322f5..ae07d261527 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1692,7 +1692,7 @@ static int kvm_vcpu_ioctl_x86_setup_mce(struct kvm_vcpu *vcpu, unsigned bank_num = mcg_cap & 0xff, bank; r = -EINVAL; - if (!bank_num) + if (!bank_num || bank_num >= KVM_MAX_MCE_BANKS) goto out; if (mcg_cap & ~(KVM_MCE_CAP_SUPPORTED | 0xff | 0xff0000)) goto out; @@ -4051,7 +4051,7 @@ static int save_guest_segment_descriptor(struct kvm_vcpu *vcpu, u16 selector, return kvm_write_guest_virt(dtable.base + index*8, seg_desc, sizeof(*seg_desc), vcpu); } -static u32 get_tss_base_addr(struct kvm_vcpu *vcpu, +static gpa_t get_tss_base_addr(struct kvm_vcpu *vcpu, struct desc_struct *seg_desc) { u32 base_addr = get_desc_base(seg_desc); |