public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: "kvm@vger.kernel.org mailing list" <kvm@vger.kernel.org>
Cc: kvm-ppc@vger.kernel.org, Gleb Natapov <gleb@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Paul Mackerras <paulus@samba.org>
Subject: [PULL 13/51] KVM: PPC: Book3S HV: Don't crash host on unknown guest interrupt
Date: Thu, 31 Oct 2013 22:17:58 +0100	[thread overview]
Message-ID: <1383254316-11243-14-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1383254316-11243-1-git-send-email-agraf@suse.de>

From: Paul Mackerras <paulus@samba.org>

If we come out of a guest with an interrupt that we don't know about,
instead of crashing the host with a BUG(), we now return to userspace
with the exit reason set to KVM_EXIT_UNKNOWN and the trap vector in
the hw.hardware_exit_reason field of the kvm_run structure, as is done
on x86.  Note that run->exit_reason is already set to KVM_EXIT_UNKNOWN
at the beginning of kvmppc_handle_exit().

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 arch/powerpc/kvm/book3s_hv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index e42fb54..de9520f 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -709,8 +709,8 @@ static int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
 		printk(KERN_EMERG "trap=0x%x | pc=0x%lx | msr=0x%llx\n",
 			vcpu->arch.trap, kvmppc_get_pc(vcpu),
 			vcpu->arch.shregs.msr);
+		run->hw.hardware_exit_reason = vcpu->arch.trap;
 		r = RESUME_HOST;
-		BUG();
 		break;
 	}
 
-- 
1.8.1.4

  parent reply	other threads:[~2013-10-31 21:17 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-31 21:17 [PULL 00/51] ppc patch queue 2013-10-31 Alexander Graf
2013-10-31 21:17 ` [PULL 01/51] KVM: PPC: Book3S HV: Reserve POWER8 space in get/set_one_reg Alexander Graf
2013-10-31 21:17 ` [PULL 02/51] KVM: PPC: Book3S HV: Save/restore SIAR and SDAR along with other PMU registers Alexander Graf
2013-10-31 21:17 ` [PULL 03/51] KVM: PPC: Book3S HV: Implement timebase offset for guests Alexander Graf
2013-10-31 21:17 ` [PULL 04/51] KVM: PPC: Book3S: Add GET/SET_ONE_REG interface for VRSAVE Alexander Graf
2013-10-31 21:17 ` [PULL 05/51] KVM: PPC: Book3S HV: Implement H_CONFER Alexander Graf
2013-10-31 21:17 ` [PULL 06/51] KVM: PPC: Book3S HV: Restructure kvmppc_hv_entry to be a subroutine Alexander Graf
2013-10-31 21:17 ` [PULL 07/51] KVM: PPC: Book3S HV: Pull out interrupt-reading code into " Alexander Graf
2013-10-31 21:17 ` [PULL 08/51] KVM: PPC: Book3S HV: Avoid unbalanced increments of VPA yield count Alexander Graf
2013-10-31 21:17 ` [PULL 09/51] KVM: PPC: BookE: Add GET/SET_ONE_REG interface for VRSAVE Alexander Graf
2013-10-31 21:17 ` [PULL 10/51] KVM: PPC: Book3S HV: Store LPCR value for each virtual core Alexander Graf
2013-10-31 21:17 ` [PULL 11/51] KVM: PPC: Book3S HV: Add support for guest Program Priority Register Alexander Graf
2013-10-31 21:17 ` [PULL 12/51] KVM: PPC: Book3S HV: Support POWER6 compatibility mode on POWER7 Alexander Graf
2013-10-31 21:17 ` Alexander Graf [this message]
2013-10-31 21:17 ` [PULL 14/51] KVM: PPC: Book3S PR: Fix compilation without CONFIG_ALTIVEC Alexander Graf
2013-10-31 21:18 ` [PULL 15/51] KVM: PPC: Book3S PR: Keep volatile reg values in vcpu rather than shadow_vcpu Alexander Graf
2013-10-31 21:18 ` [PULL 16/51] KVM: PPC: Book3S PR: Allow guest to use 64k pages Alexander Graf
2013-10-31 21:18 ` [PULL 17/51] KVM: PPC: Book3S PR: Use 64k host pages where possible Alexander Graf
2013-10-31 21:18 ` [PULL 18/51] KVM: PPC: Book3S PR: Handle PP0 page-protection bit in guest HPTEs Alexander Graf
2013-10-31 21:18 ` [PULL 19/51] KVM: PPC: Book3S PR: Correct errors in H_ENTER implementation Alexander Graf
2013-10-31 21:18 ` [PULL 20/51] KVM: PPC: Book3S PR: Make HPT accesses and updates SMP-safe Alexander Graf
2013-10-31 21:18 ` [PULL 21/51] KVM: PPC: Book3S PR: Allocate kvm_vcpu structs from kvm_vcpu_cache Alexander Graf
2013-10-31 21:18 ` [PULL 22/51] KVM: PPC: Book3S: Move skip-interrupt handlers to common code Alexander Graf
2013-10-31 21:18 ` [PULL 23/51] KVM: PPC: Book3S PR: Better handling of host-side read-only pages Alexander Graf
2013-10-31 21:18 ` [PULL 24/51] KVM: PPC: Book3S PR: Use mmu_notifier_retry() in kvmppc_mmu_map_page() Alexander Graf
2013-10-31 21:18 ` [PULL 25/51] KVM: PPC: Book3S PR: Mark pages accessed, and dirty if being written Alexander Graf
2013-10-31 21:18 ` [PULL 26/51] KVM: PPC: Book3S PR: Reduce number of shadow PTEs invalidated by MMU notifiers Alexander Graf
2013-10-31 21:18 ` [PULL 27/51] kvm: powerpc: book3s hv: Fix vcore leak Alexander Graf
2013-10-31 21:18 ` [PULL 28/51] KVM: PPC: Book3S HV: Better handling of exceptions that happen in real mode Alexander Graf
2013-10-31 21:18 ` [PULL 29/51] powerpc: book3e: _PAGE_LENDIAN must be _PAGE_ENDIAN Alexander Graf
2013-10-31 21:18 ` [PULL 30/51] kvm: powerpc: allow guest control "E" attribute in mas2 Alexander Graf
2013-10-31 21:18 ` [PULL 31/51] kvm: powerpc: allow guest control "G" " Alexander Graf
2013-10-31 21:18 ` [PULL 32/51] kvm: powerpc: e500: mark page accessed when mapping a guest page Alexander Graf
2013-10-31 21:18 ` [PULL 33/51] powerpc: remove unnecessary line continuations Alexander Graf
2013-10-31 21:18 ` [PULL 34/51] powerpc: move debug registers in a structure Alexander Graf
2013-11-03 14:30   ` Gleb Natapov
2013-11-03 20:56     ` Benjamin Herrenschmidt
2013-11-04  0:03       ` Scott Wood
2013-11-04  6:43         ` Alexander Graf
2013-11-04  6:51           ` Benjamin Herrenschmidt
2013-10-31 21:18 ` [PULL 35/51] powerpc: export debug registers save function for KVM Alexander Graf
2013-10-31 21:18 ` [PULL 36/51] KVM: PPC: E500: exit to user space on "ehpriv 1" instruction Alexander Graf
2013-10-31 21:18 ` [PULL 37/51] KVM: PPC: E500: Using "struct debug_reg" Alexander Graf
2013-10-31 21:18 ` [PULL 38/51] KVM: PPC: E500: Add userspace debug stub support Alexander Graf
2013-10-31 21:18 ` [PULL 39/51] kvm: powerpc: book3s: remove kvmppc_handler_highmem label Alexander Graf
2013-10-31 21:18 ` [PULL 40/51] kvm: powerpc: book3s: move book3s_64_vio_hv.c into the main kernel binary Alexander Graf
2013-10-31 21:18 ` [PULL 41/51] kvm: powerpc: book3s: pr: Rename KVM_BOOK3S_PR to KVM_BOOK3S_PR_POSSIBLE Alexander Graf
2013-10-31 21:18 ` [PULL 42/51] kvm: powerpc: book3s: Add a new config variable CONFIG_KVM_BOOK3S_HV_POSSIBLE Alexander Graf
2013-10-31 21:18 ` [PULL 43/51] kvm: powerpc: Add kvmppc_ops callback Alexander Graf
2013-10-31 21:18 ` [PULL 44/51] kvm: powerpc: book3s: Cleanup interrupt handling code Alexander Graf
2013-10-31 21:18 ` [PULL 45/51] kvm: powerpc: book3s: Add is_hv_enabled to kvmppc_ops Alexander Graf
2013-10-31 21:18 ` [PULL 46/51] kvm: powerpc: book3s: pr: move PR related tracepoints to a separate header Alexander Graf
2013-10-31 21:18 ` [PULL 47/51] kvm: powerpc: booke: Move booke related tracepoints to " Alexander Graf
2013-10-31 21:18 ` [PULL 48/51] kvm: powerpc: book3s: Support building HV and PR KVM as module Alexander Graf
2013-10-31 21:18 ` [PULL 49/51] kvm: Add struct kvm arg to memslot APIs Alexander Graf
2013-10-31 21:18 ` [PULL 50/51] kvm: powerpc: book3s: Allow the HV and PR selection per virtual machine Alexander Graf
2013-10-31 21:18 ` [PULL 51/51] kvm: powerpc: book3s: drop is_hv_enabled Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1383254316-11243-14-git-send-email-agraf@suse.de \
    --to=agraf@suse.de \
    --cc=gleb@redhat.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox