Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1551200pxb; Wed, 10 Feb 2021 10:55:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjACVCIvGzfbYlNK8babQDV/iWDDi5/qNT9bhC7f4QLQIwK5etXp5nAEdehGsBBkg2NeV9 X-Received: by 2002:a05:6402:3508:: with SMTP id b8mr4522901edd.341.1612983326127; Wed, 10 Feb 2021 10:55:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612983326; cv=none; d=google.com; s=arc-20160816; b=lRTrbv1asNQ5F6tVr4Pytx2P0G+vEn4A8rYrR1jZA8z61HnL9wMbPGWC0+HI79ZgKt 3mBh6JJ+l7hxZc+l1Y/ocEF2vc1ywyBqka4NHtr6G34DrTwNwoqU2kjEsS9tTR7UpE4s +HcEJfuWssU9uR5srUO2+lC9SDXFu0UJQv0hPJCpr1ammtu1PM/wrMCYzC20dUSV7hA3 vEO6LggFzE9SEFw7jAqBcU7bzwq5EAlLKvokUJgmVgaMddWYWIE41INFt8FEQ4fxGrEm lwQ2N5rJgpjvCPzWGqX2vDA/H/+/wvUgGsVvF4MvtSSdnZyu9ZjB2iLZMHznHLmuJb10 qPpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PrXct6DxGDPic1inZjhVX9QRlhCGy/nKux4XIfvSnek=; b=vkwgUrVtGGubSCbJoruo8tv6ag45p5e0EMc/+RR5fawvuy57JdT4aW35jcM1SlujIH r/DMxKFhG5vNSbPWgJM+vQWM/JUDwxpKtZXKKA5X6H6zxpYwkSmttSMeh+DynuefUbi7 FHhliqWHL6G75VBZhQ+2dBJr6aAKDtiQluD572HJn8HYFmKzxpVNnuggyc05CN3BidHQ 7LCQu8ncsOKSH/AVr1UzLnYolTPht/54HI3ctL4Bc10xrVo8Metb+AYutlA2njVDYELE RtvKjVywKL+w+gW7S92ZjzqHhBmSayXtb4ngYhQ9TTAfkn//InJg2RlNZpM+sAelO9aN 03aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=M55pfGWT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lw18si1901374ejb.271.2021.02.10.10.55.02; Wed, 10 Feb 2021 10:55:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=M55pfGWT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234493AbhBJSxZ (ORCPT + 99 others); Wed, 10 Feb 2021 13:53:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234361AbhBJSuB (ORCPT ); Wed, 10 Feb 2021 13:50:01 -0500 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61514C06174A for ; Wed, 10 Feb 2021 10:49:21 -0800 (PST) Received: by mail-pl1-x632.google.com with SMTP id s15so1701238plr.9 for ; Wed, 10 Feb 2021 10:49:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=PrXct6DxGDPic1inZjhVX9QRlhCGy/nKux4XIfvSnek=; b=M55pfGWTmTPwTfDb3YFKVtGAlSDZ7UyA7Tq59R2NqH5Im/dh3wW6+Cl6wqAaSuzS38 SBxmHvZ6xRGyDs7ERzpJ+iiow1U7FkXRZUp/InDLKcsPdTwejem8hW+5VMb5njvc4zP7 AAwrE6GKXSw35SDZqnDYjwTIz0iG0WDIY3BFVCtJHhDwzLU2wU1qd0lebl7klxT91jGE fMMCukQW0Ift+pEPk3Wj4NJuGObdSCs7YnnpYYjFvEiM1FG1RVfBNPwuOUI7tXHI+/c4 trp09lxLIk1koB19hwJcAQ9yZ+M3M5r1ZGDo9mkzRcJak2ExE3oplSBIm6sxtcTgYqTq Bbdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PrXct6DxGDPic1inZjhVX9QRlhCGy/nKux4XIfvSnek=; b=XHJHkvFYacNSSAjIti5LY62Bk5J7U9ivYU2PdOP6JYiradv5QwryiY4mrr/NP7fLHa k18aPys0cZSrfgf6ZYN3dhFr9urUZvLxe6yR8DsPsOE2fdHMZ6MlGzVoXgIZ6krQZDgh aRnODSQ6/Edd7CPlOx8Ip3FC4JFClimh6umJQixLZxNJlqSVaktKuNFXOQCg6DIj+q6y rVBlLrZW9HB2oyOd5nEkvyiOC/dKuGsIUWfGe+DwLeH7R2hAU+5zNMtiQJisPRH8cq0r 9cS+eA8+yMB1h8gElGJkFWtnLz81uZco0ggWJjk/zf/No/oA2z+off95Aj6l5bsE2lkO y51Q== X-Gm-Message-State: AOAM531BAPRbDZBmeaI3R18TAS18+W9cQa76XESDrtlsf4elpc4aS7sw elo93bGSF2FprvxHW4cV/MKigw== X-Received: by 2002:a17:902:710a:b029:e3:858:8c91 with SMTP id a10-20020a170902710ab02900e308588c91mr2266454pll.75.1612982960683; Wed, 10 Feb 2021 10:49:20 -0800 (PST) Received: from google.com ([2620:15c:f:10:11fc:33d:bf1:4cb8]) by smtp.gmail.com with ESMTPSA id i14sm3204390pfk.28.2021.02.10.10.49.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 10:49:20 -0800 (PST) Date: Wed, 10 Feb 2021 10:49:13 -0800 From: Sean Christopherson To: Paolo Bonzini Cc: Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, David Woodhouse Subject: Re: [PATCH 0/5] KVM: x86/xen: Selftest fixes and a cleanup Message-ID: References: <20210210182609.435200-1-seanjc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 10, 2021, Paolo Bonzini wrote: > On 10/02/21 19:26, Sean Christopherson wrote: > > Fix a '40' vs '0x40' bug in the new Xen shinfo selftest, and clean up some > > other oddities that made root causing the problem far more painful than it > > needed to be. > > > > Note, Paolo already queued a patch from Vitaly that adds the tests to > > .gitignore[*], i.e. patch 01 can likely be dropped. I included it here > > for completeness. > > > > [*] https://lkml.kernel.org/r/20210129161821.74635-1-vkuznets@redhat.com > > > > Sean Christopherson (5): > > KVM: selftests: Ignore recently added Xen tests' build output > > KVM: selftests: Fix size of memslots created by Xen tests > > KVM: selftests: Fix hex vs. decimal snafu in Xen test > > KVM: sefltests: Don't bother mapping GVA for Xen shinfo test > > KVM: x86/xen: Explicitly pad struct compat_vcpu_info to 64 bytes > > > > arch/x86/kvm/xen.h | 11 ++++++----- > > tools/testing/selftests/kvm/.gitignore | 2 ++ > > tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c | 12 +++++------- > > tools/testing/selftests/kvm/x86_64/xen_vmcall_test.c | 3 +-- > > 4 files changed, 14 insertions(+), 14 deletions(-) > > > > Stupid question: how did you notice that? In other words what broke for you > and not for me? I assume sheer dumb luck? The test checks a single bit, so there's a 50/50 chance it will pass if whatever it's reading is non-zero. If my math is correct (big if), the net effect is that the check was against pvclock_vcpu_time_info.tsc_to_system_mul, which on my VM where I'm running the test is always 0xcd4681c9. ==== Test Assertion Failure ==== x86_64/xen_shinfo_test.c:161: ti->version && !(ti->version & 1) pid=1236 tid=1236 - Interrupted system call 1 0x0000000000401623: main at xen_shinfo_test.c:160 2 0x00007f303e261bf6: ?? ??:0 3 0x00000000004016f9: _start at ??:? Bad time_info version cd4681c9