]> git.karo-electronics.de Git - linux-beck.git/commitdiff
KVM: PPC: Enable program interrupt to do MMIO
authorAlexander Graf <agraf@suse.de>
Fri, 19 Feb 2010 10:00:43 +0000 (11:00 +0100)
committerAvi Kivity <avi@redhat.com>
Sun, 25 Apr 2010 09:35:24 +0000 (12:35 +0300)
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>
arch/powerpc/kvm/book3s.c

index 38f242a690f752d69de65f805d27d6d9a6a7b9ef..0446c5a39ae20e01b4475fe47f08bc6848b7b0d3 100644 (file)
@@ -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();
                }