Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp903124imu; Sat, 17 Nov 2018 11:50:02 -0800 (PST) X-Google-Smtp-Source: AJdET5co+DfWqEQdwnxh1UXsiCn+TcDDo8sqrzaoye49fsREf5b716K4wc0BLgcb4l6BMctFH/G5 X-Received: by 2002:a65:5a4c:: with SMTP id z12mr14630902pgs.188.1542484202121; Sat, 17 Nov 2018 11:50:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542484202; cv=none; d=google.com; s=arc-20160816; b=DJ8JSuBUJ4MVSjA12Oj6R2Ueknaqvluic2slcNu+7TiiOaPjeF+vIyq7Vxzuiuv/Ut JzXt/1JUt+V//Bhtf+Y7E9I69lWM4CJudkwpfOTfC36bC5Eb+DzXGECnHmewNU6+4UaZ ncZ5pmFhBrhpWo07cx8mzWQbLl+C3wFMXa2qASVULpSRTa7IjOAbvmTCCZ4YKZg+YJpa 8QvIfV3ei92O3EVy4PnXuoj5FclyzBx49g8zRsatR9s+66Sw3njM80UJmVXuUmKZaCF9 BDLLL3kTjMli1T1Xaud41aZFBEJwTmeoOO9+lJwvBnDhNbKp50MuLR5UAAlxTpdD7dsF Q2VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=oTrnDUNKyHpyhiGL04RKJoPYdkUOWMG77u97HirAZPs=; b=TPU1b8utt/2CdPGkKy5L9a8yug085NC20L8Bb5GTmYdnE7oFy9QhH3paVAg0VzY9Uu RXviknTH+K7LeVTzGv+mnPJ8crbUiJpUeRDOvUd066D2QoHTHt73++POvKeRWyNQo/Yk DDTk6X8948Gcoi7YUdy27vADX9yiybvDfVBie96ZunQGwrj6M8TwBmr+Uosq9zXPqUle 4p4s+/0OCEjWCQieEM73FcK5tRHNqzZ65zAfdSjdjku9wVXIDFJRLm8ILF4iErhc1/7Z pK6s0tgacI6GHehATu0LqRHDlwKkZUKRH/z6Mm5A46BXFgKtCl0h1I1h6N6SL4qTnG+M R5sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mena-vt-edu.20150623.gappssmtp.com header.s=20150623 header.b=DZqhi2jp; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vt.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t19si18009380pgk.163.2018.11.17.11.49.17; Sat, 17 Nov 2018 11:50:02 -0800 (PST) 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=@mena-vt-edu.20150623.gappssmtp.com header.s=20150623 header.b=DZqhi2jp; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vt.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725806AbeKRGBx (ORCPT + 99 others); Sun, 18 Nov 2018 01:01:53 -0500 Received: from mail-ua1-f65.google.com ([209.85.222.65]:43643 "EHLO mail-ua1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725732AbeKRGBw (ORCPT ); Sun, 18 Nov 2018 01:01:52 -0500 Received: by mail-ua1-f65.google.com with SMTP id z11so9425409uaa.10 for ; Sat, 17 Nov 2018 11:44:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mena-vt-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oTrnDUNKyHpyhiGL04RKJoPYdkUOWMG77u97HirAZPs=; b=DZqhi2jpx5GTAcx/nq/ntY+vk8TTxLrLV47/3Ztisc9mpglq/1WtsbmdKPECvepeRR cUYdL2iPB01mvKzfleZwVv8mLfSwe6CP2dsq4VNZXXYRYpEZapHpKUmjh4xg7bozvSUp 1dDobxD1d/f9Prmk4yEXJTgvZ2fvcOz8Qfs2dJpNqkNzvaU+WYTUjtaPQSCn4vK9UsfT k1Lgx4OE5rkAFXXgBQUPZjXn3jTLYeYIDBD4MBN6nzb0EvP5XtrM9oKxi4dOcyN0RsAp pKyaDw3EDc4PerIcgW3Y9KHAB11iHkKvAIbkenu7R6LwWSfOGAab0jVV186vMpp8Ool+ qgAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oTrnDUNKyHpyhiGL04RKJoPYdkUOWMG77u97HirAZPs=; b=nNtGgLtReov2wBdw/WKy6c+YVbe6JRKSWLKBi1kL12bqkemMv2g0NOPxSygMsqJAJ+ D4/Bia8JK4Yt7Y5Lrcz/uP030L5shNw1IQWqd0Gakm3/8hENyJPBtCiTmWd38131VXXt C1otQnmtx0pjicddznD9+9IM8OvevNcI3/wWukdNTlOsizSGgwqjQZtlfPEvCODntV/D 671AqXLwN5LIEDr8yTo/D7EMqyngQvPOTRUE7S7/0CBpzV3/z0JpZXs5uglcCJeodSQM Dl/CRNqm0+z1nhaZh12j+fnoX670sIsfxChd2Vka9EYeUbh5w0RXVLj9vjanitlftrYd C9Jw== X-Gm-Message-State: AGRZ1gJKz+j6pasIhKTimOcye6jkQ1tj4vrV2XW445sQ2aQMh4/vrrDI YyBSXtN910xRzPDSPeBRky26Lj1ZrWznulgOxY5SVw== X-Received: by 2002:ab0:1393:: with SMTP id m19mr6884326uae.75.1542483849905; Sat, 17 Nov 2018 11:44:09 -0800 (PST) MIME-Version: 1.0 References: <20181114180807.6crs7awhvo26ldbr@hawk.localdomain> <20181115090203.5z25gwa2yznj6mmu@kamzik.brq.redhat.com> <20181115145028.qijg7hjswcuabrt2@kamzik.brq.redhat.com> <87efbmqore.fsf@vitty.brq.redhat.com> <8736s1qh3d.fsf@vitty.brq.redhat.com> In-Reply-To: <8736s1qh3d.fsf@vitty.brq.redhat.com> From: Ahmed Soliman Date: Sat, 17 Nov 2018 21:43:43 +0200 Message-ID: Subject: Re: KVM selftests are failing To: Vitaly Kuznetsov Cc: Anders Roxell , Shuah Khan , linux-kselftest@vger.kernel.org, Paolo Bonzini , Peter Xu , linux-kernel@vger.kernel.org, Andrew Jones Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 16, 2018 at 3:37 PM Vitaly Kuznetsov wrote: > > Ahmed Soliman writes: > > > Hello once again, > > > > I noticed that there is still more problems with kvmself test (at > > least on my machine) > > > > Any test that would successfully reach the guest's code immediately > > VMexit by a shutdown. > > > > $ ./vmx_tsc_adjust_test > > ==== Test Assertion Failure ==== > > x86_64/vmx_tsc_adjust_test.c:156: run->exit_reason == KVM_EXIT_IO > > pid=8499 tid=8499 - Success > > 1 0x00005604f07bd36c: ?? ??:0 > > 2 0x00007f5c0dc53ae6: ?? ??:0 > > 3 0x00005604f07bd4b9: ?? ??:0 > > Got exit_reason other than KVM_EXIT_IO: 8 (SHUTDOWN) > > > > Hm, this is weird. Do other KVM users, e.g. qemu work on this host? Are > you sure this happens on the first VCPU_RUN invocation? Yes and I have just tested: qemu-system-x86_64 -enable-kvm -cpu host,+vmx -m 2G And Linux as well as android for x86 booted up. Also I kinda have my kvm tests that works but they are not built on top of kvm selftest api. > Could you try doing > > trace-cmd record -e kvm ./x86_64/vmx_tsc_adjust_test && trace-cmd report > > to see if there's anything suspicious? Yes, there is a triple fault induced shutdown probably during EPT handling: vmx_tsc_adjust_-17638 [001] 15628.729863: kvm_update_master_clock: masterclock 0 hostclock tsc offsetmatched 0 vmx_tsc_adjust_-17638 [001] 15628.730820: kvm_write_tsc_offset: vcpu=5 prev=0 next=18446733817569215369 vmx_tsc_adjust_-17638 [001] 15628.730822: kvm_track_tsc: vcpu_id 5 masterclock 0 offsetmatched 0 nr_online 1 hostclock tsc vmx_tsc_adjust_-17638 [001] 15628.730911: kvm_fpu: load vmx_tsc_adjust_-17638 [001] 15628.730913: kvm_update_master_clock: masterclock 1 hostclock tsc offsetmatched 1 vmx_tsc_adjust_-17638 [001] 15628.730954: kvm_entry: vcpu 5 vmx_tsc_adjust_-17638 [001] 15628.730974: kvm_exit: reason EPT_VIOLATION rip 0x56545f0b8760 info 83 0 vmx_tsc_adjust_-17638 [001] 15628.730976: kvm_page_fault: address 180560 error_code 83 vmx_tsc_adjust_-17638 [001] 15628.730989: kvm_entry: vcpu 5 vmx_tsc_adjust_-17638 [001] 15628.730992: kvm_exit: reason TRIPLE_FAULT rip 0x56545f0b8760 info 0 0 vmx_tsc_adjust_-17638 [001] 15628.730993: kvm_fpu: unload vmx_tsc_adjust_-17638 [001] 15628.730996: kvm_userspace_exit: reason KVM_EXIT_SHUTDOWN (8) vmx_tsc_adjust_-17638 [002] 15628.739237: kvm_hv_stimer_cleanup: vcpu_id 5 timer 0 vmx_tsc_adjust_-17638 [002] 15628.739244: kvm_hv_stimer_cleanup: vcpu_id 5 timer 1 vmx_tsc_adjust_-17638 [002] 15628.739244: kvm_hv_stimer_cleanup: vcpu_id 5 timer 2 vmx_tsc_adjust_-17638 [002] 15628.739245: kvm_hv_stimer_cleanup: vcpu_id 5 timer 3 I will try to dive into them after my midterms are over(ends tomorrow) but I would need to verify that someone else can reproduce this, I tried bisecting but it seams that this bug was there from kvmselftests commit one (rebuilt kernel, kvm and the kvm selftests each time). Thanks,