diff options
| -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 e00dd0515a84..b9f55299ed7e 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
| @@ -4489,8 +4489,10 @@ static bool emulator_get_segment(struct x86_emulate_ctxt *ctxt, u16 *selector, | |||
| 4489 | kvm_get_segment(emul_to_vcpu(ctxt), &var, seg); | 4489 | kvm_get_segment(emul_to_vcpu(ctxt), &var, seg); |
| 4490 | *selector = var.selector; | 4490 | *selector = var.selector; |
| 4491 | 4491 | ||
| 4492 | if (var.unusable) | 4492 | if (var.unusable) { |
| 4493 | memset(desc, 0, sizeof(*desc)); | ||
| 4493 | return false; | 4494 | return false; |
| 4495 | } | ||
| 4494 | 4496 | ||
| 4495 | if (var.g) | 4497 | if (var.g) |
| 4496 | var.limit >>= 12; | 4498 | var.limit >>= 12; |
