Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1761461ybb; Thu, 9 Apr 2020 08:32:37 -0700 (PDT) X-Google-Smtp-Source: APiQypKFdfuW+dLp5DqVZri9wyCvjsi+7U63ZUvY/LreEGLAOInF8HHNNmrTx7lT5JuLuFTI9g1r X-Received: by 2002:a37:6e87:: with SMTP id j129mr405563qkc.358.1586446356955; Thu, 09 Apr 2020 08:32:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586446356; cv=none; d=google.com; s=arc-20160816; b=IKPTwlQ9NYedAic67DvuqRV/xmUu579vurF2YcNdYEQ5fbQ1dETQGNmSQPIpK5T87s 7VHMkCX4lvRfGqsSGnR43i3/Ts6OM2+Lc5r/AhPRk5KvrbiV3VgMOpJ0GnnnehNZObHq zu/KknbYdDj/BzH0oS1Unj1p2SOXbwDGhWuaIBrSHqNnpx8ya27oJdknnMffHvLfWoiG U4p2pYXE7GQB7PNKqfCYEgFQ13Mojnbkr1TrdwhW2ywZI0HFen5loE8trRxT/fMP0PnE FdHakUrcFkMWpZ4K9iusgCoUIrKAGPyh2Mk5OkVqIK4yvYAYwmc/RG2PCHPFGgOhdygE JC1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=KqSuwj1Lnw+46mOu5HvLLZOQhrSTpPUDCk9ASXa3iQI=; b=aEnJa4OdaZBrKxxfVx6dRIoIxxvEmqdX730/vuuNi0aD8asoUb9HaQByBXu1pPXovo s7rbIpBiHErOVzDJfTSAiKtigJqalvM6ymZU0e5xvcjzsVM2ZYkX2UNiYVulGfSqgv9s GYFhZQhkudbVCE34OuzGgmRD8/Mr4I0iliMKlM/u1oo4taGsNgwtK/pNkzFLUaUv6lRz MUP/lR8pNcM8d/hcgWmcACsu52qMFubZKmg0tJDnGsgjRUdWhofxnIK8vdPXXo/eavyH 7bFGRXW8PlmM45fVn7Jr/c6sr0fM/rGWisABgtzQYfQUnJ/angmmf/jDW2hNbp1YRm/Z mSrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=d5ONUE0g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x2si6284242qvd.5.2020.04.09.08.32.09; Thu, 09 Apr 2020 08:32:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=d5ONUE0g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728353AbgDIPaU (ORCPT + 99 others); Thu, 9 Apr 2020 11:30:20 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:38307 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728221AbgDIPaT (ORCPT ); Thu, 9 Apr 2020 11:30:19 -0400 Received: by mail-qk1-f193.google.com with SMTP id h14so4318334qke.5 for ; Thu, 09 Apr 2020 08:30:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KqSuwj1Lnw+46mOu5HvLLZOQhrSTpPUDCk9ASXa3iQI=; b=d5ONUE0gQuF4hk3cd/VSQKPVX4IwjmtsLuFUsGMclkB/xhBWg0Pty34wvNvc39ykJY EeNCzEYGA7j2gcFtlgPiNjUWg8c6M0knlzWB6nESPIxtc+rgA5b7sSENhNQ6odJr7BZz vEJ+caBJy71h0A3ced/bVeO/0yznbAH8hnAIqlR8XB9lGuhcqDF10KXkRO/0HYSlZihc ZVaJfb0whw0kt/8yQWVRemzmsgloGMzzFFi0FNeM4wz24m15M+JDmlyhxmZSpwczlwci rECKrsLhuRCPExqIiyyikfex584HV2NssvHiAUbdW146oHVg8609ybuqOMJVZfpFSI2x 8JCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KqSuwj1Lnw+46mOu5HvLLZOQhrSTpPUDCk9ASXa3iQI=; b=XNmyeMh1Ycg169WhJS7fq+WjGWgGbnzZ5WVdZidYNn/rhROKPn8ydG40zUFaBqZ71J BUvttGZNRrgMktOK7hzywTLPcDExNdF7TnZCmEitLpApuUHsiYuq2wIEMI5f0wqWnjJJ ZATfuxk8rJV/yCFWXpFaqQfhsDiPBBKjOurIStAH7hzLvv+iXvLcpXmgu8Min5X9j2l+ 0oaaDepIOeRj67TsUdgSgNh9vTD+mwe5Bi8vM++TTX9d+f+jDZEhelkkawknloxTBqwX LwgqQHA6nZJV9RVI5IQxTSPkx+2TlD6OixhzKqFeG/PzvYlPNYCk8C4R5gFYCV4Qp7BG vXLw== X-Gm-Message-State: AGi0PuaIgj19xeLdbC5kK5zX4Imh/jYmProQGg3fMUxnBp1yIuYZ0RV/ giQVw/VQbZPL7C7ICC5YX4TXnCCR2bv4eA== X-Received: by 2002:ae9:e80f:: with SMTP id a15mr352621qkg.367.1586446218111; Thu, 09 Apr 2020 08:30:18 -0700 (PDT) Received: from [192.168.1.153] (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id q5sm11214109qkn.59.2020.04.09.08.30.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Apr 2020 08:30:17 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: KCSAN + KVM = host reset From: Qian Cai In-Reply-To: Date: Thu, 9 Apr 2020 11:30:14 -0400 Cc: Paolo Bonzini , "paul E. McKenney" , kasan-dev , LKML , kvm@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: <2730C0CC-B8B5-4A65-A4ED-9DFAAE158AA6@lca.pw> References: <017E692B-4791-46AD-B9ED-25B887ECB56B@lca.pw> To: Marco Elver X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Apr 9, 2020, at 11:22 AM, Marco Elver wrote: >=20 > On Thu, 9 Apr 2020 at 17:10, Qian Cai wrote: >>=20 >>=20 >>=20 >>> On Apr 9, 2020, at 3:03 AM, Marco Elver wrote: >>>=20 >>> On Wed, 8 Apr 2020 at 23:29, Qian Cai wrote: >>>>=20 >>>>=20 >>>>=20 >>>>> On Apr 8, 2020, at 5:25 PM, Paolo Bonzini = wrote: >>>>>=20 >>>>> On 08/04/20 22:59, Qian Cai wrote: >>>>>> Running a simple thing on this AMD host would trigger a reset = right away. >>>>>> Unselect KCSAN kconfig makes everything work fine (the host would = also >>>>>> reset If only "echo off > /sys/kernel/debug/kcsan=E2=80=9D before = running qemu-kvm). >>>>>=20 >>>>> Is this a regression or something you've just started to play = with? (If >>>>> anything, the assembly language conversion of the AMD world switch = that >>>>> is in linux-next could have reduced the likelihood of such a = failure, >>>>> not increased it). >>>>=20 >>>> I don=E2=80=99t remember I had tried this combination before, so = don=E2=80=99t know if it is a >>>> regression or not. >>>=20 >>> What happens with KASAN? My guess is that, since it also happens = with >>> "off", something that should not be instrumented is being >>> instrumented. >>=20 >> No, KASAN + KVM works fine. >>=20 >>>=20 >>> What happens if you put a 'KCSAN_SANITIZE :=3D n' into >>> arch/x86/kvm/Makefile? Since it's hard for me to reproduce on this >>=20 >> Yes, that works, but this below alone does not work, >>=20 >> KCSAN_SANITIZE_kvm-amd.o :=3D n >=20 > There are some other files as well, that you could try until you hit > the right one. >=20 > But since this is in arch, 'KCSAN_SANITIZE :=3D n' wouldn't be too bad > for now. If you can't narrow it down further, do you want to send a > patch? No, that would be pretty bad because it will disable KCSAN for Intel KVM as well which is working perfectly fine right now. It is only AMD is broken. >=20 > Thanks, > -- Marco >=20 >> I have been able to reproduce this on a few AMD hosts. >>=20 >>> exact system, I'd ask you to narrow it down by placing = 'KCSAN_SANITIZE >>> :=3D n' into suspect subsystems' Makefiles. Once you get it to work = with >>> that, we can refine the solution. >>>=20 >>> Thanks, >>> -- Marco