From patchwork Thu Aug 2 14:29:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 1267611 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id ED17D3FCC5 for ; Thu, 2 Aug 2012 14:29:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754384Ab2HBO3M (ORCPT ); Thu, 2 Aug 2012 10:29:12 -0400 Received: from mail-bk0-f46.google.com ([209.85.214.46]:35421 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753123Ab2HBO3L (ORCPT ); Thu, 2 Aug 2012 10:29:11 -0400 Received: by bkwj10 with SMTP id j10so4280772bkw.19 for ; Thu, 02 Aug 2012 07:29:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=JCWi662kjHWBjzS9VzsrfaXGjUKZOKGowB1FVcXZOzI=; b=B5QF4CAS5Poc7zF7MwXxMbZlaKnVtZUmgcNWYzrvC4EdQukMh4r2Q0rxk3RshRM6KC YSZUHaeVP2O09Tf26Z2HmTgP8VfWndan+SlwR2WzbPn6hqqB5ewwUieOxUojnjw2czl1 8dBe4gpDVmnvphw31tFSmcTVDy9qH+40vj3EHMI+5GfJb3TLYI7GLGaMEhDVRR5z/hUW 2zcn0TpiJ1zq6ngEYii4V0CqKPC4fuYZD1TxNBZz1DALfx/WaAJ2afQLH27p4OlxWML7 imPBlPsxYLb+W68Av4pp52AsG9VwxRvr4ePlrnSbqhPblePN5oFr8VtabsYE5aSadKXG KLGg== Received: by 10.204.152.137 with SMTP id g9mr8574034bkw.106.1343917750012; Thu, 02 Aug 2012 07:29:10 -0700 (PDT) Received: from localhost.localdomain (95-89-78-76-dynip.superkabel.de. [95.89.78.76]) by mx.google.com with ESMTPS id hg13sm3544831bkc.7.2012.08.02.07.29.08 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 02 Aug 2012 07:29:09 -0700 (PDT) From: Sasha Levin To: penberg@kernel.org, mingo@elte.hu, gorcunov@gmail.com Cc: kvm@vger.kernel.org, Sasha Levin Subject: [PATCH 1/2] kvm tools: prevent guest softlockup errors when pausing Date: Thu, 2 Aug 2012 16:29:23 +0200 Message-Id: <1343917764-28715-1-git-send-email-levinsasha928@gmail.com> X-Mailer: git-send-email 1.7.8.6 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Use the new KVM_KVMCLOCK_CTRL ioctl to prevent guests from wrongfully detecting lockups when in fact they were paused. Signed-off-by: Sasha Levin --- tools/kvm/builtin-run.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c index 21d5f34..a4d900b 100644 --- a/tools/kvm/builtin-run.c +++ b/tools/kvm/builtin-run.c @@ -524,6 +524,7 @@ static void handle_pause(int fd, u32 type, u32 len, u8 *msg) kvm__continue(); } else if (type == KVM_IPC_PAUSE && !is_paused) { kvm->vm_state = KVM_VMSTATE_PAUSED; + ioctl(kvm->vm_fd, KVM_KVMCLOCK_CTRL); kvm__pause(); } else { return;