瀏覽代碼

KVM: PPC: Enable program interrupt to do MMIO

When we get a program interrupt we usually don't expect it to perform an
MMIO operation. But why not? When we emulate paired singles, we can end
up loading or storing to an MMIO address - and the handling of those
happens in the program interrupt handler.

So let's teach the program interrupt handler how to deal with EMULATE_MMIO.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
Alexander Graf 15 年之前
父節點
當前提交
e5c29e926c
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      arch/powerpc/kvm/book3s.c

+ 4 - 0
arch/powerpc/kvm/book3s.c

@@ -841,6 +841,10 @@ program_interrupt:
 			kvmppc_core_queue_program(vcpu, flags);
 			r = RESUME_GUEST;
 			break;
+		case EMULATE_DO_MMIO:
+			run->exit_reason = KVM_EXIT_MMIO;
+			r = RESUME_HOST_NV;
+			break;
 		default:
 			BUG();
 		}