From 1fe3696a7687269796eaa6f1738014ad4200c373 Mon Sep 17 00:00:00 2001
From: Dean Nelson <dnelson@redhat.com>
Date: Fri, 15 Oct 2010 21:17:29 -0300
Subject: [RHEL6 qemu-kvm PATCH 3/7] Fix parameters of prctl

RH-Author: Dean Nelson <dnelson@redhat.com>
Message-id: <20101015211728.4348.68737.send-patch@localhost6.localdomain6>
Patchwork-id: 12688
O-Subject: [RHEL6.1 qemu-kvm PATCH v2 1/5] Fix parameters of prctl
Bugzilla: 585910
RH-Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
RH-Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>

Resolves RHBZ 585910.

Because kenrel prctl implementation checks whether arg4 and arg5 are 0
for PR_MCE_KILL, qmeu-kvm should invoke prctl syscall as that.

Backport of upstream commit:
http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=commitdiff;h=08fd26ba6ba34b718a4478bc025c1a584c6a9267

---

 qemu-kvm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 qemu-kvm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qemu-kvm.c b/qemu-kvm.c
index 8b042e7..717957e 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1996,7 +1996,7 @@ int kvm_init_ap(void)
     action.sa_flags = SA_SIGINFO;
     action.sa_sigaction = (void (*)(int, siginfo_t*, void*))sigbus_handler;
     sigaction(SIGBUS, &action, NULL);
-    prctl(PR_MCE_KILL, 1, 1);
+    prctl(PR_MCE_KILL, 1, 1, 0, 0);
     return 0;
 }
 
-- 
1.6.5.5

