Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1545173pxb; Wed, 10 Feb 2021 10:45:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIbLkGx16miu4MQSMQ9aqkuLlsE7xnNw6byh2SS+Fcn7r6pYi1F6rqK1RsNSctTb57cxV0 X-Received: by 2002:a17:906:27d7:: with SMTP id k23mr4436850ejc.300.1612982739557; Wed, 10 Feb 2021 10:45:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612982739; cv=none; d=google.com; s=arc-20160816; b=rrdGcafdAXQL1OLI0vFkUNL/geq7QyDAKMp1jjUcEoammxvl4lk1j6ZrUx++NkVny8 FDZ6Pki7kWqtU/ramZ1+wrqYIVeeyapjw71W5nEaDdIDXWaDvtKwvFVmYoTuegcEtJ3I B2ONRZ2R5H9jEaASSGBbotjLuwCdGVYPGhZzZZBR8R4s0hWqCf1f/ud9tZfwEeYTWVga xs95LqibSzuqeXRsGnSzhvVi+SgMafAKI3uoRyMImpv+HZBs3vX21s/6JgmyR/Q0lsnA IZN52Z3c0TI9LDCSp5290fIRlW+ltjAUGgsKcnlevlAEgFY3rrX5dvyyOvbSmOuTHUj0 yJOA== 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:sender:dkim-signature; bh=QyQE3EdrqBvyx/EpOPhJj5SBwQHKK6yPydf0zBuWnjI=; b=kB9/uqzvqcvoDE397UhSAIYX0EH0uxwrw1C98KRpN42FWTmQdgpjcY3b7Q+ge7soL/ Ciam/Mbz8sM7OIwtftvGlI8oIutUiiyFhngA/LWqlfKcCI5/iEm3qIqsxquGmO6EmL+5 IyBpf+6re0+D6QAepou94hguSkzCkIsXpw9Nv4d45D2rvImAdtpQBUs2SQOX1/+VHySo ND/se8BVSZXzHN32+0+Yf7oRAqUGVtfh7exgRhIqDzRqjoW2eZ0exm8kRJpu5K0a+ZpR KjlKoN1MZ1lJhk035iycYJKjlG8DaDFKiGZoT70CeWyDsgpexeofsWfbVzn/K/rawOMk lMYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=IZQDi86Z; 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 jz3si1817982ejc.700.2021.02.10.10.45.15; Wed, 10 Feb 2021 10:45:39 -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=IZQDi86Z; 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 S234149AbhBJSmO (ORCPT + 99 others); Wed, 10 Feb 2021 13:42:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234197AbhBJS1v (ORCPT ); Wed, 10 Feb 2021 13:27:51 -0500 Received: from mail-qv1-xf49.google.com (mail-qv1-xf49.google.com [IPv6:2607:f8b0:4864:20::f49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46231C0617AA for ; Wed, 10 Feb 2021 10:26:24 -0800 (PST) Received: by mail-qv1-xf49.google.com with SMTP id p4so2063495qvn.23 for ; Wed, 10 Feb 2021 10:26:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:reply-to:date:in-reply-to:message-id:mime-version:references :subject:from:to:cc; bh=QyQE3EdrqBvyx/EpOPhJj5SBwQHKK6yPydf0zBuWnjI=; b=IZQDi86ZCM/UWeCQWeODOWfhtsGqzS5/TOXfadVuSw6WuPvR8j13JDMi2i0sh6vESF IqAhmzewaORsdMThrJ9fVlCP/yep47VjEFXUTMJkhK3r5Zhwv9A+tQqr8bRCa6hFjoZM G6SefOgNDG7bNlOY/Ue9Xivk/y6AZ7JJaBjyb9xm4HX+7ZRA5hWsHdjBaSM0URW9ku1e RWbeGJiqdnlT/vqcmw92OFOT8xxDu3+SSOlnov4hDv0Ty3iqzSpRTVFcgHDlKhmjmtce k1t/pP2AKolsdY9WIZZeEPTVi9Pb8oAnwhUhWG21frgllQ/vS9giudZ10Ft7+UaJbgf0 cheQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:date:in-reply-to:message-id :mime-version:references:subject:from:to:cc; bh=QyQE3EdrqBvyx/EpOPhJj5SBwQHKK6yPydf0zBuWnjI=; b=JDJYzL37kCfJQpuTxQZgzaXDQI9TNnOhML8Kojk02xBeJHcsqLQdPLf7nXORtsqq5x Kw6CF9phZSXMHCxpDzI231Ro1PKN+czjAsMsgmiTJOwEPzE0Fuh2wrP/UrbzUWQQXngt KjhVfqF3zGW6YbnkcLK9urkSBDTOoip/+QEsLiXdKfvS5YOSZvL+N2ZBUclV8cAkcyPW 8mL3IEV1SHMpTd1tCCeAJBqqtXKEe7zCyx/jCSLGxnMdOdJHjkBg1wcv3ff2JmaCZrRp dNevajGa0dCKzqUoCpknai159zRflWpOq/xTDuz+CxQwJsQrJYu9ZDbm3O4+4zxGv7nT OOfA== X-Gm-Message-State: AOAM531GC8C+Np44ZZMoj0WTonFiVSq+PMm8nSxmZ2O3djNI26+kF87V +M/Ep+zDvsX7kxcq4olyxlbL4fYBIp0= Sender: "seanjc via sendgmr" X-Received: from seanjc798194.pdx.corp.google.com ([2620:15c:f:10:11fc:33d:bf1:4cb8]) (user=seanjc job=sendgmr) by 2002:a0c:bd93:: with SMTP id n19mr4048142qvg.5.1612981583481; Wed, 10 Feb 2021 10:26:23 -0800 (PST) Reply-To: Sean Christopherson Date: Wed, 10 Feb 2021 10:26:08 -0800 In-Reply-To: <20210210182609.435200-1-seanjc@google.com> Message-Id: <20210210182609.435200-5-seanjc@google.com> Mime-Version: 1.0 References: <20210210182609.435200-1-seanjc@google.com> X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog Subject: [PATCH 4/5] KVM: sefltests: Don't bother mapping GVA for Xen shinfo test From: Sean Christopherson To: Paolo Bonzini Cc: Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, David Woodhouse Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Don't bother mapping the Xen shinfo pages into the guest, they don't need to be accessed using the GVAs and passing a define with "GPA" in the name to addr_gva2hpa() is confusing. Cc: David Woodhouse Signed-off-by: Sean Christopherson --- tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c b/tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c index b2a3be9eba8e..9246ea310587 100644 --- a/tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c +++ b/tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c @@ -80,7 +80,6 @@ int main(int argc, char *argv[]) /* Map a region for the shared_info page */ vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS, SHINFO_REGION_GPA, SHINFO_REGION_SLOT, 2, 0); - virt_map(vm, SHINFO_REGION_GPA, SHINFO_REGION_GPA, 2, 0); struct kvm_xen_hvm_config hvmc = { .flags = KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL, @@ -147,9 +146,9 @@ int main(int argc, char *argv[]) struct pvclock_wall_clock *wc; struct pvclock_vcpu_time_info *ti, *ti2; - wc = addr_gva2hva(vm, SHINFO_REGION_GPA + 0xc00); - ti = addr_gva2hva(vm, SHINFO_REGION_GPA + 0x40 + 0x20); - ti2 = addr_gva2hva(vm, PVTIME_ADDR); + wc = addr_gpa2hva(vm, SHINFO_REGION_GPA + 0xc00); + ti = addr_gpa2hva(vm, SHINFO_REGION_GPA + 0x40 + 0x20); + ti2 = addr_gpa2hva(vm, PVTIME_ADDR); vm_ts.tv_sec = wc->sec; vm_ts.tv_nsec = wc->nsec; -- 2.30.0.478.g8a0d178c01-goog