summaryrefslogtreecommitdiffstats
path: root/fs/coredump.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2013-10-04 21:45:04 +1000
committerAlexander Graf <agraf@suse.de>2013-10-17 14:49:37 +0200
commit44a3add86311bb9d060d795bcdcdc9b8c7a35bd0 (patch)
tree453d0aa59c4b4cdbd0c855e4a51dafae9eb5a7a6 /fs/coredump.h
parentf1378b1c0bdce349e21f271dec0612a6cfac5d14 (diff)
downloadop-kernel-dev-44a3add86311bb9d060d795bcdcdc9b8c7a35bd0.zip
op-kernel-dev-44a3add86311bb9d060d795bcdcdc9b8c7a35bd0.tar.gz
KVM: PPC: Book3S HV: Better handling of exceptions that happen in real mode
When an interrupt or exception happens in the guest that comes to the host, the CPU goes to hypervisor real mode (MMU off) to handle the exception but doesn't change the MMU context. After saving a few registers, we then clear the "in guest" flag. If, for any reason, we get an exception in the real-mode code, that then gets handled by the normal kernel exception handlers, which turn the MMU on. This is disastrous if the MMU is still set to the guest context, since we end up executing instructions from random places in the guest kernel with hypervisor privilege. In order to catch this situation, we define a new value for the "in guest" flag, KVM_GUEST_MODE_HOST_HV, to indicate that we are in hypervisor real mode with guest MMU context. If the "in guest" flag is set to this value, we branch off to an emergency handler. For the moment, this just does a branch to self to stop the CPU from doing anything further. While we're here, we define another new flag value to indicate that we are in a HV guest, as distinct from a PR guest. This will be useful when we have a kernel that can support both PR and HV guests concurrently. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'fs/coredump.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud