]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
[S390] kvm-s390: Fix host crash on misbehaving guests
authorChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 6 Jun 2011 12:14:38 +0000 (14:14 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 6 Jun 2011 12:14:56 +0000 (14:14 +0200)
commit 9ff4cfb3fcfd48b49fdd9be7381b3be340853aa4 ([S390] kvm-390: Let
kernel exit SIE instruction on work) fixed a problem of commit
commit cd3b70f5d4d82f85d1e1d6e822f38ae098cf7c72 ([S390] virtualization
aware cpu measurement) but uncovered another one.

If a kvm guest accesses guest real memory that doesnt exist, the
page fault handler calls the sie hook, which then rewrites
the return psw from sie_inst to either sie_exit or sie_reenter.
On return, the page fault handler will then detect the wrong access
as a kernel fault causing a kernel oops in sie_reenter or sie_exit.

We have to add these two addresses to the exception  table to allow
graceful exits.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kvm/sie64a.S

index ab0e041ac54cf2b17fc0b631bf0ed6cd4f59fd53..5faa1b1b23fa78f19d8f399f7681e3573ade6ee7 100644 (file)
@@ -93,4 +93,6 @@ sie_err:
 
        .section __ex_table,"a"
        .quad   sie_inst,sie_err
+       .quad   sie_exit,sie_err
+       .quad   sie_reenter,sie_err
        .previous