diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-30 11:15:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-30 11:15:19 -0500 |
commit | 9e0600f5cf6cecfcab5046d1453a9538c054d8a7 (patch) | |
tree | 81d9e2731cb72011beb3ba63fa1a947329dadecb /virt | |
parent | 22985bf59b0228769dc568d6401ed2090e2eed27 (diff) | |
parent | a63dd7480d8f3c2b52e1e2bcab83e3e64c7c61a1 (diff) |
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM fixes from Paolo Bonzini:
- x86 bugfixes: APIC, nested virtualization, IOAPIC
- PPC bugfix: HPT guests on a POWER9 radix host
* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (26 commits)
KVM: Let KVM_SET_SIGNAL_MASK work as advertised
KVM: VMX: Fix vmx->nested freeing when no SMI handler
KVM: VMX: Fix rflags cache during vCPU reset
KVM: X86: Fix softlockup when get the current kvmclock
KVM: lapic: Fixup LDR on load in x2apic
KVM: lapic: Split out x2apic ldr calculation
KVM: PPC: Book3S HV: Fix migration and HPT resizing of HPT guests on radix hosts
KVM: vmx: use X86_CR4_UMIP and X86_FEATURE_UMIP
KVM: x86: Fix CPUID function for word 6 (80000001_ECX)
KVM: nVMX: Fix vmx_check_nested_events() return value in case an event was reinjected to L2
KVM: x86: ioapic: Preserve read-only values in the redirection table
KVM: x86: ioapic: Clear Remote IRR when entry is switched to edge-triggered
KVM: x86: ioapic: Remove redundant check for Remote IRR in ioapic_set_irq
KVM: x86: ioapic: Don't fire level irq when Remote IRR set
KVM: x86: ioapic: Fix level-triggered EOI and IOAPIC reconfigure race
KVM: x86: inject exceptions produced by x86_decode_insn
KVM: x86: Allow suppressing prints on RDMSR/WRMSR of unhandled MSRs
KVM: x86: fix em_fxstor() sleeping while in atomic
KVM: nVMX: Fix mmu context after VMLAUNCH/VMRESUME failure
KVM: nVMX: Validate the IA32_BNDCFGS on nested VM-entry
...
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/arm/arm.c | 8 | ||||
-rw-r--r-- | virt/kvm/kvm_main.c | 23 |
2 files changed, 26 insertions, 5 deletions
diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c index a6524ff27de4..a67c106d73f5 100644 --- a/virt/kvm/arm/arm.c +++ b/virt/kvm/arm/arm.c | |||
@@ -615,7 +615,6 @@ static void check_vcpu_requests(struct kvm_vcpu *vcpu) | |||
615 | int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) | 615 | int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) |
616 | { | 616 | { |
617 | int ret; | 617 | int ret; |
618 | sigset_t sigsaved; | ||
619 | 618 | ||
620 | if (unlikely(!kvm_vcpu_initialized(vcpu))) | 619 | if (unlikely(!kvm_vcpu_initialized(vcpu))) |
621 | return -ENOEXEC; | 620 | return -ENOEXEC; |
@@ -633,8 +632,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
633 | if (run->immediate_exit) | 632 | if (run->immediate_exit) |
634 | return -EINTR; | 633 | return -EINTR; |
635 | 634 | ||
636 | if (vcpu->sigset_active) | 635 | kvm_sigset_activate(vcpu); |
637 | sigprocmask(SIG_SETMASK, &vcpu->sigset, &sigsaved); | ||
638 | 636 | ||
639 | ret = 1; | 637 | ret = 1; |
640 | run->exit_reason = KVM_EXIT_UNKNOWN; | 638 | run->exit_reason = KVM_EXIT_UNKNOWN; |
@@ -769,8 +767,8 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
769 | kvm_pmu_update_run(vcpu); | 767 | kvm_pmu_update_run(vcpu); |
770 | } | 768 | } |
771 | 769 | ||
772 | if (vcpu->sigset_active) | 770 | kvm_sigset_deactivate(vcpu); |
773 | sigprocmask(SIG_SETMASK, &sigsaved, NULL); | 771 | |
774 | return ret; | 772 | return ret; |
775 | } | 773 | } |
776 | 774 | ||
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index f169ecc4f2e8..c422c10cd1dd 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -2065,6 +2065,29 @@ void kvm_vcpu_mark_page_dirty(struct kvm_vcpu *vcpu, gfn_t gfn) | |||
2065 | } | 2065 | } |
2066 | EXPORT_SYMBOL_GPL(kvm_vcpu_mark_page_dirty); | 2066 | EXPORT_SYMBOL_GPL(kvm_vcpu_mark_page_dirty); |
2067 | 2067 | ||
2068 | void kvm_sigset_activate(struct kvm_vcpu *vcpu) | ||
2069 | { | ||
2070 | if (!vcpu->sigset_active) | ||
2071 | return; | ||
2072 | |||
2073 | /* | ||
2074 | * This does a lockless modification of ->real_blocked, which is fine | ||
2075 | * because, only current can change ->real_blocked and all readers of | ||
2076 | * ->real_blocked don't care as long ->real_blocked is always a subset | ||
2077 | * of ->blocked. | ||
2078 | */ | ||
2079 | sigprocmask(SIG_SETMASK, &vcpu->sigset, ¤t->real_blocked); | ||
2080 | } | ||
2081 | |||
2082 | void kvm_sigset_deactivate(struct kvm_vcpu *vcpu) | ||
2083 | { | ||
2084 | if (!vcpu->sigset_active) | ||
2085 | return; | ||
2086 | |||
2087 | sigprocmask(SIG_SETMASK, ¤t->real_blocked, NULL); | ||
2088 | sigemptyset(¤t->real_blocked); | ||
2089 | } | ||
2090 | |||
2068 | static void grow_halt_poll_ns(struct kvm_vcpu *vcpu) | 2091 | static void grow_halt_poll_ns(struct kvm_vcpu *vcpu) |
2069 | { | 2092 | { |
2070 | unsigned int old, val, grow; | 2093 | unsigned int old, val, grow; |