x86/kvm: Don't enable IRQ when IRQ enabled in kvm_wait
authorLai Jiangshan <laijs@linux.alibaba.com>
Sat, 14 Aug 2021 03:51:29 +0000 (11:51 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 6 Sep 2021 10:32:35 +0000 (06:32 -0400)
commita40b2fd064bb7c0425c7cbdca2120cf0609a90a2
tree61c680a35109089ed05a60335f7e4290e7291bd4
parent3cc4e148b96263313e3dce926eae569c942bb74e
x86/kvm: Don't enable IRQ when IRQ enabled in kvm_wait

Commit f4e61f0c9add3 ("x86/kvm: Fix broken irq restoration in kvm_wait")
replaced "local_irq_restore() when IRQ enabled" with "local_irq_enable()
when IRQ enabled" to suppress a warnning.

Although there is no similar debugging warnning for doing local_irq_enable()
when IRQ enabled as doing local_irq_restore() in the same IRQ situation.  But
doing local_irq_enable() when IRQ enabled is no less broken as doing
local_irq_restore() and we'd better avoid it.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
Message-Id: <20210814035129.154242-1-jiangshanlai@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kernel/kvm.c