|
@@ -276,6 +276,7 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val)
|
|
|
{
|
|
|
unsigned index;
|
|
|
bool mask_before, mask_after;
|
|
|
+ int old_remote_irr, old_delivery_status;
|
|
|
union kvm_ioapic_redirect_entry *e;
|
|
|
|
|
|
switch (ioapic->ioregsel) {
|
|
@@ -298,6 +299,9 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val)
|
|
|
return;
|
|
|
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;
|
|
@@ -305,6 +309,8 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val)
|
|
|
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
|