Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1743348iof; Tue, 7 Jun 2022 10:38:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7m0n7NjPGs97Io89TeAbgrarbamp5LxMHiHHM3gByaeJwu+TNN9Mghp1NmPwmC9fKa8wN X-Received: by 2002:a17:906:5d14:b0:6ff:4a45:11de with SMTP id g20-20020a1709065d1400b006ff4a4511demr27112507ejt.576.1654623484470; Tue, 07 Jun 2022 10:38:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654623484; cv=none; d=google.com; s=arc-20160816; b=xU36lgxszXSEOkZhraVphQKTqSZiwxQCcMf50hqNOC+HE7DBSfBU0XX3FmxgF4nO2h ktdR1vwW/kgaBafwgIRJ/wVIJoEvd/e6IZgoQidurYXK5KnvZ3B63vgHDl2C96wuz79h /W8xxvUugGrQtxQuaYygUcrCUz26YUX3uARO9mhXHUzB2nVEscDmLFPxNTEbXtGTaLaP hx0JPnkzt/W/pDN9yW5YPOvdgpHQ/37CBGTWdg4NS8UjdrBObFoYGZQSiE6yusfF+KYA /sCDSiECRp7FkAI6A2GCzXuPa0eG+3+soVchRsb8qjNr7W63nh9xteWbc/9pAPafmMbZ aOIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=tn8n2EP4nBOl/jeJiKD2hmW0PfLCuCcbPrCveEkgN4I=; b=nprWUVvGGWexs5hmPmWqlY2iQwQCjZp0329+bVB63DvkNvBaQ/uNCcxs1PCx6iDspD ZLzLUB6z354ZVZmSQcJq71TCwHv+YupTKaip1YlNXknffuP7oKAst2ZgcKrPxKjnUv84 VXh8+u3nYuCelNZff8JETUwuD9k+Ab6tUBP4pDSKhyGNwY0Gm7qHsYIEqlx0j6pHIllx uaHF4LDs1XnNB4SHoL+jjXNI0wznqFoFLkwXoanG8MHNDghfcAv6dbuA5zK8qUpnbeyK eSU7wMpwVL4VHAqMteV4yiHEkfsEJ/y6+wsr9959dO3U5h7dpblMk7XozmDL/Yqsjmpj KxTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EvLPldjE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s14-20020a056402164e00b00425f7237b06si36008edx.73.2022.06.07.10.37.38; Tue, 07 Jun 2022 10:38:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EvLPldjE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240527AbiFGKDZ (ORCPT + 99 others); Tue, 7 Jun 2022 06:03:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240607AbiFGKDV (ORCPT ); Tue, 7 Jun 2022 06:03:21 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AB9F4A7E18 for ; Tue, 7 Jun 2022 03:03:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654596197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tn8n2EP4nBOl/jeJiKD2hmW0PfLCuCcbPrCveEkgN4I=; b=EvLPldjEC5hfvruGlMG3BHC7V2EOxavvsVJpOAgiGHpbvvu+adiwgOAEHPUA9/m1vN9vGf J7n2xXYTv8pUJk7KkTlc32apWGOA/4pOlut0zuCT3epO0zxQqtk1lLZWWVJX8AikYDHKlb fegO2bnCjonYD7cMTwQtXJBwkqRcavw= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-116-ZCY9MiO1Pq6LUwshSdlNhw-1; Tue, 07 Jun 2022 06:03:14 -0400 X-MC-Unique: ZCY9MiO1Pq6LUwshSdlNhw-1 Received: by mail-qv1-f69.google.com with SMTP id kk8-20020a056214508800b004645738eff6so7355197qvb.8 for ; Tue, 07 Jun 2022 03:03:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=tn8n2EP4nBOl/jeJiKD2hmW0PfLCuCcbPrCveEkgN4I=; b=FZAZS0aQabDl0iCK9bOgj9iiaSHwsNM20RxFP9f8dK7Fv/ovQ3I6IKJEluLUMrKWhs l/FuyilUIueD4jVkKSeT/Bpau31mwdmMTBpvmqUxJhIe6c7SSfb6lhv6uEP9+DLLpxtm Km+wr5qnDJEQbquC5oWJ9cApM0AMObWF3iyz7xOhv+B4QsEJsjemQIzBbes0FF2O8hNv aUEJDCBQHQyhZtmwSqht5dcpkQgHIxT4pqFqSJTkdymG4v6Jwj5XOHvaGz7DBhQitw8o ATjphrPfSJ4owLggVpJedmSruW+s1FJmSQHnvxUhv1ADuOl8js1RyJlL6HAgBIGlggCx s7Hg== X-Gm-Message-State: AOAM531o8M6q2oAuO9qeeqvD2p2V8Z0/uBHLTvvIphmDWdAfaf4aqwCQ R0rjOcXKpIe7qtKNtzW2H+/6OvezBw2naRZhXCzxoEt1KAFNAqbe6W7FqpB2JYuGoLwU1ZNHMM/ veAefQlrUmUDSzfP2o7puTYY2 X-Received: by 2002:a05:6214:5004:b0:464:4b5d:be65 with SMTP id jo4-20020a056214500400b004644b5dbe65mr34443447qvb.73.1654596192512; Tue, 07 Jun 2022 03:03:12 -0700 (PDT) X-Received: by 2002:a05:6214:5004:b0:464:4b5d:be65 with SMTP id jo4-20020a056214500400b004644b5dbe65mr34443425qvb.73.1654596192116; Tue, 07 Jun 2022 03:03:12 -0700 (PDT) Received: from [10.35.4.238] (bzq-82-81-161-50.red.bezeqint.net. [82.81.161.50]) by smtp.gmail.com with ESMTPSA id az37-20020a05620a172500b006a6ebde4799sm462050qkb.90.2022.06.07.03.03.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 03:03:11 -0700 (PDT) Message-ID: Subject: Re: [PATCH v6 25/38] KVM: selftests: Move HYPERV_LINUX_OS_ID definition to a common header From: Maxim Levitsky To: Vitaly Kuznetsov , kvm@vger.kernel.org, Paolo Bonzini Cc: Sean Christopherson , Wanpeng Li , Jim Mattson , Michael Kelley , Siddharth Chandrasekaran , Yuan Yao , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 07 Jun 2022 13:03:08 +0300 In-Reply-To: <20220606083655.2014609-26-vkuznets@redhat.com> References: <20220606083655.2014609-1-vkuznets@redhat.com> <20220606083655.2014609-26-vkuznets@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-2.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2022-06-06 at 10:36 +0200, Vitaly Kuznetsov wrote: > HYPERV_LINUX_OS_ID needs to be written to HV_X64_MSR_GUEST_OS_ID by > each Hyper-V specific selftest. > > Signed-off-by: Vitaly Kuznetsov > --- >  tools/testing/selftests/kvm/include/x86_64/hyperv.h  | 3 +++ >  tools/testing/selftests/kvm/x86_64/hyperv_features.c | 5 ++--- >  2 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/tools/testing/selftests/kvm/include/x86_64/hyperv.h b/tools/testing/selftests/kvm/include/x86_64/hyperv.h > index b66910702c0a..f0a8a93694b2 100644 > --- a/tools/testing/selftests/kvm/include/x86_64/hyperv.h > +++ b/tools/testing/selftests/kvm/include/x86_64/hyperv.h > @@ -185,4 +185,7 @@ >  /* hypercall options */ >  #define HV_HYPERCALL_FAST_BIT          BIT(16) >   > +/* Proper HV_X64_MSR_GUEST_OS_ID value */ > +#define HYPERV_LINUX_OS_ID ((u64)0x8100 << 48) > + >  #endif /* !SELFTEST_KVM_HYPERV_H */ > diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_features.c b/tools/testing/selftests/kvm/x86_64/hyperv_features.c > index 672915ce73d8..98c020356925 100644 > --- a/tools/testing/selftests/kvm/x86_64/hyperv_features.c > +++ b/tools/testing/selftests/kvm/x86_64/hyperv_features.c > @@ -14,7 +14,6 @@ >  #include "hyperv.h" >   >  #define VCPU_ID 0 > -#define LINUX_OS_ID ((u64)0x8100 << 48) >   >  extern unsigned char rdmsr_start; >  extern unsigned char rdmsr_end; > @@ -127,7 +126,7 @@ static void guest_hcall(vm_vaddr_t pgs_gpa, struct hcall_data *hcall) >         int i = 0; >         u64 res, input, output; >   > -       wrmsr(HV_X64_MSR_GUEST_OS_ID, LINUX_OS_ID); > +       wrmsr(HV_X64_MSR_GUEST_OS_ID, HYPERV_LINUX_OS_ID); >         wrmsr(HV_X64_MSR_HYPERCALL, pgs_gpa); >   >         while (hcall->control) { > @@ -230,7 +229,7 @@ static void guest_test_msrs_access(void) >                          */ >                         msr->idx = HV_X64_MSR_GUEST_OS_ID; >                         msr->write = 1; > -                       msr->write_val = LINUX_OS_ID; > +                       msr->write_val = HYPERV_LINUX_OS_ID; >                         msr->available = 1; >                         break; >                 case 3: Reviewed-by: Maxim Levitsky Best regards, Maxim Levitsky