Patch "KVM: x86: ioapic: Preserve read-only values in the redirection table" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
KVM: x86: ioapic: Preserve read-only values in the redirection table
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
kvm-x86-ioapic-preserve-read-only-values-in-the-redirection-table.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Thu Feb 1 13:58:04 CET 2018
From: Nikita Leshenko <[email protected]>
Date: Sun, 5 Nov 2017 15:52:33 +0200
Subject: KVM: x86: ioapic: Preserve read-only values in the redirection table
From: Nikita Leshenko <[email protected]>
[ Upstream commit b200dded0a6974a3b69599832b2203483920ab25 ]
According to 82093AA (IOAPIC) manual, Remote IRR and Delivery Status are read-only. QEMU implements the bits as RO in commit 479c2a1cb7fb ("ioapic: keep RO bits for IOAPIC entry").
--- arch/x86/kvm/ioapic.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/x86/kvm/ioapic.c +6 -0
@@ -278,6 +278,7 @@ static void ioapic_write_indirect(struct {unsigned index;bool mask_before, mask_after; +int old_remote_irr, old_delivery_status;union kvm_ioapic_redirect_entry *e;switch (ioapic->ioregsel) {
@@ -300,6 +301,9 @@ static void ioapic_write_indirect(structreturn ; e = &ioapic->redirtbl[index]; mask_before = e->fields.mask; +/* Preserve read-only fields */ + old_remote_irr = e->fields.remote_irr; + old_delivery_status = e->fields.delivery_status;if (ioapic->ioregsel &1 ) { e->bits &=0xffffffff ; e->bits |= (u64 ) val <<32 ;
@@ -307,6 +311,8 @@ static void ioapic_write_indirect(struct e->bits &= ~0xffffffffULL ; e->bits |= (u32 ) val; } + e->fields.remote_irr = old_remote_irr; + e->fields.delivery_status = old_delivery_status;/* * Some OSes (Linux, Xen) assume that Remote IRR bit will
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/kvm-x86-don-t-re-execute-instruction-when-not-passing-cr2-value.patch queue-4.9/kvm-x86-ioapic-preserve-read-only-values-in-the-redirection-table.patch queue-4.9/kvm-x86-ioapic-fix-level-triggered-eoi-and-ioapic-reconfigure-race.patch queue-4.9/kvm-x86-emulator-return-to-user-mode-on-l1-cpl-0-emulation-failure.patch queue-4.9/kvm-x86-ioapic-clear-remote-irr-when-entry-is-switched-to-edge-triggered.patch