Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp777625pxp; Fri, 11 Mar 2022 14:53:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1zCn5sVDyv7fcgG+PZ6D7vDBZfUWzdDr6uyQmEVsn3E8KiBHBPFQalwibjLyNVawg2ZYx X-Received: by 2002:a17:903:2349:b0:153:9b5:c468 with SMTP id c9-20020a170903234900b0015309b5c468mr12802280plh.163.1647039212504; Fri, 11 Mar 2022 14:53:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647039212; cv=none; d=google.com; s=arc-20160816; b=fJGn3oyhkTQW6iNkrTFeMmUJ5ynr2ROi1tkqf5INGM+e4FVz6CIIuY9cLs2myLm0Te ZWtpvGZzgVYbHVXPPrtw3R//DNILlvEikVx+jCdiFotKmzPoRla/Ek62tZJWJyS6/Cp0 Aww7sRcg3po3wuElzC8Nx4y8dBQC2L+n+i3ryt77arvQn/IVDT5vu7cH+xYRgV3+Gijk 4HoSoG20uyxvWwyKF1m0GI+GUt94LBah1nRe6L1FWWhbiNleVvVr04LTzF5KwNvfmy+0 1s4+8uGP7lfxnGlS+Y+rTD/p1whRRT5/MeDZBG5wzIa4omFYYXG7vt3GUKvT5WtjInqb 2anA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:reply-to:dkim-signature; bh=ofFBB4c5rOaIb3neyIo33ooJpytj9xkzw7AbqyDBID4=; b=KZ8oJEvSAFNpw5S65GznTaCUYJjGoO9KJVGvJsfqujxAdoBz1yeb8t3a2td+yoFYAD rknUtkyQ8UQopMFIQnDSurFAMChBlSo4YFjHK1MNLMRRrJ9tINo0CaE3k+nqmE7PnfYQ WZvh2nLSC2pmXnSP7Y2QojM6frRYEnI+k93wWLsY2KDzR/7RDRy3GvmZlRHow2qX/f5h 0LnyOMdAcy/QxxgrF0Hq/IqKC8VMXcADpPMXl6PJG3g5dVNxXW3Czf5So1DUMUYEs2Tj JWeMIof12IdenUDKAX91pQwXWFobvqh5+GNY3x9rlfH8UBiWCdMBNymZWAxPTf06pVSq MqFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="Smz1YUw/"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id g7-20020a17090a578700b001bd4e7011d2si5866031pji.157.2022.03.11.14.53.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 14:53:32 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="Smz1YUw/"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9B4E8369E75; Fri, 11 Mar 2022 13:54:28 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347095AbiCKGC5 (ORCPT + 99 others); Fri, 11 Mar 2022 01:02:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346756AbiCKFzI (ORCPT ); Fri, 11 Mar 2022 00:55:08 -0500 Received: from mail-pg1-x54a.google.com (mail-pg1-x54a.google.com [IPv6:2607:f8b0:4864:20::54a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4A37FFFB8 for ; Thu, 10 Mar 2022 21:53:43 -0800 (PST) Received: by mail-pg1-x54a.google.com with SMTP id j15-20020a633c0f000000b00380ed7c5e91so1973418pga.6 for ; Thu, 10 Mar 2022 21:53:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=reply-to:date:in-reply-to:message-id:mime-version:references :subject:from:to:cc; bh=ofFBB4c5rOaIb3neyIo33ooJpytj9xkzw7AbqyDBID4=; b=Smz1YUw/PJiXcA87/XZNdy5svGjVCUkkW3++TDKBW/XYFuBCMra2fgtXR1k0Kk1Rvi 1ef9WSEhi37Ikxl8VZ/7Ah+0sbqMRdORA1n20U6viuR9Af9m7AKGDWpGKhMI6Viq7aDj Qa+OOILTygq4RMOiYNsuZSwJERxcGAzDb3qkADLZkuSMkmd7Nh2+Ht8dQ7So6tnIF1c4 +c7wJAlEl4OKBxyH5sBvICQfp9byb8vGq9pTRGRPcL8BHGtT0BsNFPPpuuMWWmRGoKOR S0rLSNzIgdLYJe5R5fUkrvaSIR1wdV/Qkn8HI/QHdwLpMoonUfKO96XYnAJ8ea3muTCU ltLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:reply-to:date:in-reply-to:message-id :mime-version:references:subject:from:to:cc; bh=ofFBB4c5rOaIb3neyIo33ooJpytj9xkzw7AbqyDBID4=; b=Lpm6qFlrXCGJY8ihTM1q4UEW20GZGRHzxO9oOkOY9ml28YPGrWUutkBRcqr2K6epxm fddZ1+HGTClboHbZLgLqP7pvFks/8VVm5FD2dUdRUtJEQIKW1TpSLa/xeft8SBS5FQ7p GTIzWF55Jxxnw1+OOercZm0puVS5FcdGiybmCyzo/+IPSy38pFpY6u6trNdoLW6Gem4S hTZPLyvwf6QcXfvdmBJOvERd6Vziou7Aswpy9RTn+JZsmiiZ1lK5nf8bO4RDFvTDSQ4/ G6UXpr6Du7uOSPPdV5sFVYMMlcWnjEHE19pWjw9Sue/oTsBNWbDKPpsph+Degig+HSiE l0gQ== X-Gm-Message-State: AOAM533vpAkn3R7Sp60c4y/nkM1FKvHvkt9gzTIYhnJWvKale3sKNDMY qdLkvPom+WjQVtkTzMYtv353RNAQ82EVhbt5h5cs/UKdnMqjf1DGYLMYMDPyP4U8schuIfRcH1G BrUUE6tjtU/oUbo2k132qBVNgXuQGEc+0Sk2dkP3ruNk3Sr4hw8uRjvDG3y+JA/iPNf0AlQ== X-Received: from seanjc.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:3e5]) (user=seanjc job=sendgmr) by 2002:a05:6a00:174f:b0:4f3:fe06:61b5 with SMTP id j15-20020a056a00174f00b004f3fe0661b5mr8491682pfc.50.1646978022977; Thu, 10 Mar 2022 21:53:42 -0800 (PST) Reply-To: Sean Christopherson Date: Fri, 11 Mar 2022 05:50:44 +0000 In-Reply-To: <20220311055056.57265-1-seanjc@google.com> Message-Id: <20220311055056.57265-94-seanjc@google.com> Mime-Version: 1.0 References: <20220311055056.57265-1-seanjc@google.com> X-Mailer: git-send-email 2.35.1.723.g4982287a31-goog Subject: [RFC PATCH 093/105] KVM: selftests: Convert s390x/diag318_test_handler away from VCPU_ID From: Sean Christopherson To: linux-kernel@vger.kernel.org Cc: Sean Christopherson Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no 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 Signed-off-by: Sean Christopherson --- .../selftests/kvm/lib/s390x/diag318_test_handler.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/kvm/lib/s390x/diag318_test_handler.c b/tools/testing/selftests/kvm/lib/s390x/diag318_test_handler.c index 86b9e611ad87..21c31fe10c1a 100644 --- a/tools/testing/selftests/kvm/lib/s390x/diag318_test_handler.c +++ b/tools/testing/selftests/kvm/lib/s390x/diag318_test_handler.c @@ -8,8 +8,6 @@ #include "test_util.h" #include "kvm_util.h" -#define VCPU_ID 6 - #define ICPT_INSTRUCTION 0x04 #define IPA0_DIAG 0x8300 @@ -27,14 +25,15 @@ static void guest_code(void) */ static uint64_t diag318_handler(void) { + struct kvm_vcpu *vcpu; struct kvm_vm *vm; struct kvm_run *run; uint64_t reg; uint64_t diag318_info; - vm = vm_create_default(VCPU_ID, 0, guest_code); - vcpu_run(vm, VCPU_ID); - run = vcpu_state(vm, VCPU_ID); + vm = vm_create_with_one_vcpu(&vcpu, guest_code); + vcpu_run(vm, vcpu->id); + run = vcpu->run; TEST_ASSERT(run->exit_reason == KVM_EXIT_S390_SIEIC, "DIAGNOSE 0x0318 instruction was not intercepted"); -- 2.35.1.723.g4982287a31-goog