From patchwork Mon Feb 17 14:54:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 11386577 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C8DB217E8 for ; Mon, 17 Feb 2020 14:55:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A8DC720679 for ; Mon, 17 Feb 2020 14:55:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="p0HEbZG+"; dkim=pass (1024-bit key) header.d=marvell.onmicrosoft.com header.i=@marvell.onmicrosoft.com header.b="awuFQAkj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729233AbgBQOzc (ORCPT ); Mon, 17 Feb 2020 09:55:32 -0500 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:13722 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728845AbgBQOzb (ORCPT ); Mon, 17 Feb 2020 09:55:31 -0500 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01HEjBKn001236; Mon, 17 Feb 2020 06:55:24 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=pfpt0818; bh=5mcqY449zy3Zfkv3CBJ8BylamkNGI5puC3rFXUTvS1I=; b=p0HEbZG+OnlN6/T8DkgM+yeFi1xgu5lswMM++zLvl9c4VMThMPS/hhvKyYSORcUUj0W5 YwZLH0J5jlkdMy7p0WKaceTjfiWYd9qBMqUxQL9NKklN9K0NK1Ac+z4VyLDSUBw+BOgc lgRjTcUmJQozGPZNwMld+8VI1WNiiEo4tdZkF9wb/eUrar5oR+Z/4zcEc6YZRw3YXfPk 0bYmQmoZxH8S6tarrsa0IynijlVp/O9HeWHBHTMcbQkwpWD+S8ThP/9SY9A6PTcmB6hf 36oXPmeyzHFp3fb5weoL/qFo/VG4CaPg0qX5h8dgZOIsUe5HCl9JlB16AJ6Eg8A+hhC1 fg== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2y6h1sychk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 17 Feb 2020 06:55:23 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 17 Feb 2020 06:55:21 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 17 Feb 2020 06:55:21 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.174) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Mon, 17 Feb 2020 06:55:21 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K0hRcbAI8oCRtPNHjHrdIBxt8Ovj6/zpLAlneQUiLu7NiNJx5OnbrUDvsFh81zN0BTwmTfrWArAjjTvRrHxSz7KswrbKp9Neire1h1tL8gCVYuIy07+yD364hYQoz1ZJutxdFsgx7h5CUPSvR0th7lfzig3i5BxhMZUufjYlqoVzJQu3LFPYvqkM37gJCZQwp4YarJbm1PSAvV5ZgxEWcvVN4tJlbFXQmBqfIuqF10N/km0bbrJqLyuBwqebMIUuayQ1ndX62uCdRJSmqO8SN2IihBAoT2fq6EP9jNsvftutow3zp7CwhCuS1ImSWI0//YHgaBOd/NJ+259mwMJhwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5mcqY449zy3Zfkv3CBJ8BylamkNGI5puC3rFXUTvS1I=; b=Szmxw+e5y3CXVuQZ5y0S7yU3wFikS1HWXeybe4cihR6cuHOWuY3WjsGqegJ/9tovtKdp5b90oIpUK4swfNjjRzDI6mrwUwiezCygl/AVS1Y5BNCuzl6tFtO1rztq1ewCV8t8UfF6EVYz4ggvXA1VdRkpBFVXg4+mATZf4bymJmPhnDPLQCbZewg8SLm3QDNRosEGeeUm8zYP9wD2sK0N38rBi0KoWpwpKHgzLrtqKqtoqpkbrzkr6hrwEs+9/X0DYaSwzNkkCPN1HfpS9Rqy9qjDYx2yceC/Ysh1wnj5rQIwOdTr04weFjeh3mS4lPgaWuIF6WSIVoHGXpyt8EYNDA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5mcqY449zy3Zfkv3CBJ8BylamkNGI5puC3rFXUTvS1I=; b=awuFQAkjOufsUhMVwKyl+mN+kkvVAliRHGXqtBRIk6frB9VEbxQdCEBMur8OKvxK11jCyYYI7K0P3TioBfZbtwmvv9CXkW+23wG7XjqY52zOZkaHvFDF3nT1D6Xqim97tVDPje+tOeXjwURKO6pyKRl7kj+HQSKH8SftUjtlqKY= Received: from DM6PR18MB2969.namprd18.prod.outlook.com (20.179.52.17) by DM6SPR01MB0045.namprd18.prod.outlook.com (20.176.120.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.22; Mon, 17 Feb 2020 14:55:19 +0000 Received: from DM6PR18MB2969.namprd18.prod.outlook.com ([fe80::d890:b3b7:629e:352c]) by DM6PR18MB2969.namprd18.prod.outlook.com ([fe80::d890:b3b7:629e:352c%6]) with mapi id 15.20.2729.031; Mon, 17 Feb 2020 14:55:19 +0000 From: Tomasz Nowicki To: , CC: , , , , , , , Tomasz Nowicki Subject: [PATCH 1/2] KVM: arm/arm64: Fix spurious htimer setup for emulated timer Date: Mon, 17 Feb 2020 15:54:37 +0100 Message-ID: <20200217145438.23289-2-tnowicki@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200217145438.23289-1-tnowicki@marvell.com> References: <20200217145438.23289-1-tnowicki@marvell.com> X-ClientProxiedBy: AM6P192CA0037.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:82::14) To DM6PR18MB2969.namprd18.prod.outlook.com (2603:10b6:5:170::17) MIME-Version: 1.0 Received: from localhost.localdomain (83.68.95.66) by AM6P192CA0037.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:82::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.22 via Frontend Transport; Mon, 17 Feb 2020 14:55:17 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [83.68.95.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5b926705-8cd8-4822-ea1f-08d7b3b9684a X-MS-TrafficTypeDiagnostic: DM6SPR01MB0045: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 0316567485 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(136003)(39850400004)(366004)(376002)(346002)(396003)(189003)(199004)(69590400006)(4326008)(5660300002)(36756003)(26005)(4744005)(107886003)(478600001)(2906002)(16526019)(186003)(8936002)(52116002)(2616005)(81156014)(8676002)(81166006)(316002)(6666004)(6486002)(86362001)(956004)(66946007)(6512007)(1076003)(6506007)(66476007)(66556008);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6SPR01MB0045;H:DM6PR18MB2969.namprd18.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WsKcU1OX0ML7qdNl9OGEry8QqVRhd+SkfgQorKzjvVuovJTKpi6AAFBJYhNtdgYKdEbQ2Nxigk+tL/i009ChCo5rF5nYrB2JR393Y0Oa4H636ykoUwT/YGp2UUE4DrKEvbNeDU5udTjRC5bd5AFaFQWvVpPm3evLFn2KM5jQYjcmH7E5g0LgJtC9gNbQfbqauGgA3A/DVpRwy3DnSaTAvLifntn3WQ0MYcPhJKBhihBm/09muf0f4YH2VLwzFQyLaZ0tmbMpyq0ufy97uQgzJvwtQqb1dAVbpZd/15ebKAeYLNj/6fopIWBA72evBVOerHwlDuE++k4au9LC6z8NshpOzLrbhTTcPnw14oda3sovwTn7HyTgWvfm12qZuRE6yms70RPVNwmu17/5LCHJvAiUMV4LmCgOZalYqHYAq+dRUC4qZuP3tlqsmFAZgDxD29tMeZmIdG1kaLfav7kWBckQupDFyLl+ntcrycSG3Tx6A/s6IJws36UD4wJbeFXaJS9FaQVrOZe7K24RYEiv+Qxz+Iq2XAfcukYBEtQnVII= X-MS-Exchange-AntiSpam-MessageData: ZdmZoE99DzZSkJSVLyzfWxltWKCeUEXZrnreFEdlrMPixPjEkVDXalGs9u3pLZliRYKHF1vHZlM/Af4GWpHCjP3MJ5cCxW5mgz4YkdeFqqkAKJlRA0MfhG1pjKz1bzSSAylB712bfsrDZLer1JpqJg== X-MS-Exchange-CrossTenant-Network-Message-Id: 5b926705-8cd8-4822-ea1f-08d7b3b9684a X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2020 14:55:19.9054 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vlZ2WJ8zZ32j2FY+1v61+70NMK8g4cjpwY0AlUkJdSmX3ZN2HkcOyIMQ+8h+PIGXjt8DCWn0Gwa9fScoHRFIbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6SPR01MB0045 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-17_08:2020-02-17,2020-02-17 signatures=0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The emulated timer needs no further software timer if the timer should fire now and there is no change in irq line level: (should_fire == 1 && should_fire == ctx->irq.level). In that case htimer should be simply canceled. Fixes: bee038a674875 ("KVM: arm/arm64: Rework the timer code to use a timer_map") Signed-off-by: Tomasz Nowicki --- virt/kvm/arm/arch_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c index 0d9438e9de2a..f1814f733ef8 100644 --- a/virt/kvm/arm/arch_timer.c +++ b/virt/kvm/arm/arch_timer.c @@ -326,7 +326,7 @@ static void timer_emulate(struct arch_timer_context *ctx) * scheduled for the future. If the timer cannot fire at all, * then we also don't need a soft timer. */ - if (!kvm_timer_irq_can_fire(ctx)) { + if (should_fire || !kvm_timer_irq_can_fire(ctx)) { soft_timer_cancel(&ctx->hrtimer); return; } From patchwork Mon Feb 17 14:54:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 11386581 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E1D3817E8 for ; Mon, 17 Feb 2020 14:55:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B71DF207FD for ; Mon, 17 Feb 2020 14:55:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="db9jY5aF"; dkim=pass (1024-bit key) header.d=marvell.onmicrosoft.com header.i=@marvell.onmicrosoft.com header.b="ZodKCLw5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729288AbgBQOzh (ORCPT ); Mon, 17 Feb 2020 09:55:37 -0500 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:49910 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729256AbgBQOzg (ORCPT ); Mon, 17 Feb 2020 09:55:36 -0500 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01HElXPG029659; Mon, 17 Feb 2020 06:55:25 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=pfpt0818; bh=A5vGDqzgJ2eCh+fVLxCc9iKpBuO+CvMkSobvsGud1gQ=; b=db9jY5aFAIbRYd2AeQC/tQZzOKdlWAMRpiIbg01KSPP5PahnyiLCwzRxBmOJHTDd0Reg jStdUfCpInN+ra91gXzGC5hteSUSrCM+PgkrMH3NtJCoAxLYxeVoOhtKk7AP9FjLowLa 1PDRPix/hiJYcoLhEx3lIK/cVvPNTJ17EpPFzf5MtK91mY5MnmYcWrw3MaRzdw+TXmgk jvr0t/4VkQUZIpdMZ4fNonRjk1MNK4H1IMuM+mP6PcQ199AJNOaSD6VGZ1CmVS54MGVX V5VetNfEMUNslLXoOumwBlJbQLmKBoOZhAFLivxe+ovThXg05reYOfQwVdyBOa3sQzBs sA== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2y6evv7nw4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 17 Feb 2020 06:55:25 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 17 Feb 2020 06:55:24 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 17 Feb 2020 06:55:23 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.175) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Mon, 17 Feb 2020 06:55:23 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G/E96GXKxxLkAAAmkyPRktTfAb3Gt+sPNoS76EtCsil0tC3Cjgvt2PuOobFXpb45C6kMs/fgYm316eYEdi5bB0olXdXV9Mog055zFBwDil+7A6MgpvbgFB+Vz1+JHT9X54tJy/d3ET1zWLQShYVkrdSxxVOUe1E3qFCgIzCqSI6UGRQJdiz4cnuv5WgOSYUYGvCPOZ46e0HqiM8DfjkungRISSotlSLFdTqRUlXQGpzcEFrpm1NBlvP1SiW5aInKeRLedR29/UBi2SiB9d/BRzfVk1lLo3YqfFDvaQwADUaqMGrKMIJckwjvxlOCU/ACFubrFVh4R/w+Phr1QBohnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A5vGDqzgJ2eCh+fVLxCc9iKpBuO+CvMkSobvsGud1gQ=; b=T9Iitln3vEOhdS+3ajcHiy3sfUu4CkpSrUoAOrgfWIlnXwON/LI/q5Br8p8bMh1HNUldTWaKmn3JZpVrk1zJogJ81Ox+qGs86Cm3iHUDqRs3UmndEKUEx8ABPZutWbsAUE3grTAaJanu36RjABbY/1y7Yat7p5iTYcpA7TiRW9cJsGu6N/u+mU2aVaeCbnT7rKuk7YTslxbEfpMvX+9UFjBzTlCAUYX3+lxiVgtaRS+bEKzSovh2erVQg/UhjzRGflavJI/OWyrhWGEVbDicnFQwmee96bLJevPuL0qb4nJXU++Rc6FHC98LqbmkWTL8KzeaAc/cKqnR4PoZsO/WNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A5vGDqzgJ2eCh+fVLxCc9iKpBuO+CvMkSobvsGud1gQ=; b=ZodKCLw5eZHAg9aDrexfOH+4lSyLahmZPOFzotkmgBeamdUAhleg+qALPdml/9HaACEbz7wRQ1al4mrTAk8xqMwVY8uRP75Prcw8TB2rpG4qywkeIZcWxd9IN63WLouZ7i+CpP9G2l4H5P+Vcn/5q1tuKigP8a+3E73RouuKGog= Received: from DM6PR18MB2969.namprd18.prod.outlook.com (20.179.52.17) by DM6SPR01MB0045.namprd18.prod.outlook.com (20.176.120.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.22; Mon, 17 Feb 2020 14:55:22 +0000 Received: from DM6PR18MB2969.namprd18.prod.outlook.com ([fe80::d890:b3b7:629e:352c]) by DM6PR18MB2969.namprd18.prod.outlook.com ([fe80::d890:b3b7:629e:352c%6]) with mapi id 15.20.2729.031; Mon, 17 Feb 2020 14:55:22 +0000 From: Tomasz Nowicki To: , CC: , , , , , , , Tomasz Nowicki Subject: [PATCH 2/2] KVM: arm/arm64: Fix htimer setup for emulated timer when irq goes down Date: Mon, 17 Feb 2020 15:54:38 +0100 Message-ID: <20200217145438.23289-3-tnowicki@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200217145438.23289-1-tnowicki@marvell.com> References: <20200217145438.23289-1-tnowicki@marvell.com> X-ClientProxiedBy: AM6P192CA0037.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:82::14) To DM6PR18MB2969.namprd18.prod.outlook.com (2603:10b6:5:170::17) MIME-Version: 1.0 Received: from localhost.localdomain (83.68.95.66) by AM6P192CA0037.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:82::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.22 via Frontend Transport; Mon, 17 Feb 2020 14:55:20 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [83.68.95.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dc067636-f96f-428d-6473-08d7b3b969ae X-MS-TrafficTypeDiagnostic: DM6SPR01MB0045: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3173; X-Forefront-PRVS: 0316567485 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(136003)(39850400004)(366004)(376002)(346002)(396003)(189003)(199004)(69590400006)(4326008)(5660300002)(36756003)(26005)(4744005)(107886003)(478600001)(2906002)(16526019)(186003)(8936002)(52116002)(2616005)(81156014)(8676002)(81166006)(316002)(6666004)(6486002)(86362001)(956004)(66946007)(6512007)(1076003)(6506007)(66476007)(66556008);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6SPR01MB0045;H:DM6PR18MB2969.namprd18.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3NEty4lkR1mar8yRz00aLQXlmqghaVy/2cMdYlSzOKg+dN1kb8U9Mce6PEp3p1GQj1umwWJLVS/Nkk896Q3VEBcIIySOx7FsruaJtLi2xEkaSM8qsyaBeQ4bi1jNdKSuYO8enDw8aCtkQGIDN6g5px+5MmUfVzvd7jY7xatIIUwS1zt9ye3KWDwPDvriKyeh67Q7QrJCCxG7BEIEuSgfbl0QWydOFUthe+JkQbZ4AToh7VAoryi/bjuUUERXpn41djq5Lb5P7umLTFEyKLosb16ck8eQpcFJbkaliw5s7wyxfQATLA1bVMnQt73koVujWA2yS0NYW5XuBZnAnepbvBhk3nQAy5+jrnfcqpIGyJFytV2deosrjYd8ioCeK8YK2bxKH63jwN3/sO+YdLHrOhpNgjGpyLY0ii943MxGKxHehg6Zk1NCCCqFvBhWbUrMxdgK0s5ID7OCvo7zR8jllV2XDg9U9hqLPhAbhDz3Fqhw6iohgImaaBGxlZ00QkiCPaZyldn4362r4CZyQYm1+l/vd05Z7lhqwWy7NDXMCCw= X-MS-Exchange-AntiSpam-MessageData: EbFY2x4BlSO8EIhBNovlbFbgFoHUlhZCUjrPl4XahnqFHnQWoXruYjNKl0C1WOfTEuoeNNYUupnzxdYw1/t/7BUW05O+UYl1QP4rbKL3s0L1sq/NdgYJVsSDKhPz4Vp6K9Yfeoiqks4CsNgD8k2DOA== X-MS-Exchange-CrossTenant-Network-Message-Id: dc067636-f96f-428d-6473-08d7b3b969ae X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2020 14:55:22.1961 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0ORpYIxMrjlVxgzkpEb1NM6OVl0O3g2D/fT+fUQZrmXjMMfaW0FmmCVRgheRvzxbtn+RJCqko57twIOWq/g/bw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6SPR01MB0045 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-17_08:2020-02-17,2020-02-17 signatures=0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org We still need to schedule software timer if the line goes down (should_fire == 0 && should_fire != ctx->irq.level) and there is still some time to expire again. Fixes: bee038a674875 ("KVM: arm/arm64: Rework the timer code to use a timer_map") Signed-off-by: Tomasz Nowicki --- virt/kvm/arm/arch_timer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c index f1814f733ef8..de14520c6cc2 100644 --- a/virt/kvm/arm/arch_timer.c +++ b/virt/kvm/arm/arch_timer.c @@ -316,10 +316,8 @@ static void timer_emulate(struct arch_timer_context *ctx) trace_kvm_timer_emulate(ctx, should_fire); - if (should_fire != ctx->irq.level) { + if (should_fire != ctx->irq.level) kvm_timer_update_irq(ctx->vcpu, should_fire, ctx); - return; - } /* * If the timer can fire now, we don't need to have a soft timer