From patchwork Thu Oct 1 07:22:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 11811017 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7563592C for ; Thu, 1 Oct 2020 07:22:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5B20E21531 for ; Thu, 1 Oct 2020 07:22:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IfOyB661" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731342AbgJAHWq (ORCPT ); Thu, 1 Oct 2020 03:22:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:37377 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731330AbgJAHWo (ORCPT ); Thu, 1 Oct 2020 03:22:44 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601536962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=3CD6D8u0IDtlVRO4Rki12jrlUun38FvaDxOMGSocPnA=; b=IfOyB6618ac/Qe29q1iWkTkFA/qawNs78n6ttAOrtusGhoU7zrhFdStHPQ5Ln62JiUG1RS sMhVRiL/JB1ctT2kJPZjrgKmx+MewdRCMX2Uf47zrbTD17/rFAhy7l8YMYLUCEp/dNDchY c0Pra7vlYMRnCcWxho4t8EGtqmDqnis= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-389-nN_utaYEMi64SBOmvLLDwQ-1; Thu, 01 Oct 2020 03:22:40 -0400 X-MC-Unique: nN_utaYEMi64SBOmvLLDwQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CCA6A873119 for ; Thu, 1 Oct 2020 07:22:39 +0000 (UTC) Received: from thuth.com (ovpn-112-107.ams2.redhat.com [10.36.112.107]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8F57C60BF1; Thu, 1 Oct 2020 07:22:38 +0000 (UTC) From: Thomas Huth To: kvm@vger.kernel.org Cc: pbonzini@redhat.com, drjones@redhat.com, lvivier@redhat.com Subject: [PATCH v2 1/7] travis.yml: Rework the x86 64-bit tests Date: Thu, 1 Oct 2020 09:22:28 +0200 Message-Id: <20201001072234.143703-2-thuth@redhat.com> In-Reply-To: <20201001072234.143703-1-thuth@redhat.com> References: <20201001072234.143703-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org We currently have three test jobs here: 1) gcc, in-tree build 2) gcc, out-of-tree build 3) clang, in-tree build Keeping everything in perspective, it should be sufficient to only use two build jobs for this, one in-tree with one compiler, and one out-of-tree with the other compiler. So let's re-order the jobs accordingly now. And while we're at it, make sure that all additional tests that work with the newer QEMU from Ubuntu Focal now are tested, too, and that we check all possible tests with Clang. Signed-off-by: Thomas Huth --- .travis.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index ef3cc40..0feaec1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,30 +12,30 @@ jobs: env: - CONFIG="" - BUILD_DIR="." - - TESTS="access asyncpf debug emulator ept hypercall hyperv_stimer - hyperv_synic idt_test intel_iommu ioapic ioapic-split - kvmclock_test msr pcid rdpru realmode rmap_chain s3 setjmp umip" + - TESTS="access asyncpf debug emulator ept hypercall hyperv_clock + hyperv_connections hyperv_stimer hyperv_synic idt_test intel_iommu + ioapic ioapic-split kvmclock_test memory msr pcid pcid-disabled + rdpru realmode rmap_chain s3 setjmp sieve smap smptest smptest3 + syscall tsc tsc_adjust tsx-ctrl umip vmexit_cpuid vmexit_inl_pmtimer + vmexit_ipi vmexit_ipi_halt vmexit_mov_from_cr8 vmexit_mov_to_cr8 + vmexit_ple_round_robin vmexit_tscdeadline vmexit_tscdeadline_immed + vmexit_vmcall vmx_apic_passthrough_thread xsave" - ACCEL="kvm" - addons: apt_packages: clang-10 qemu-system-x86 + compiler: clang env: - CONFIG="--cc=clang-10" - - BUILD_DIR="." - - TESTS="access asyncpf debug emulator ept hypercall hyperv_stimer - hyperv_synic idt_test intel_iommu ioapic ioapic-split - kvmclock_test msr pcid rdpru realmode rmap_chain s3 setjmp umip" - - ACCEL="kvm" - - - addons: - apt_packages: gcc qemu-system-x86 - env: - - CONFIG="" - BUILD_DIR="x86-builddir" - - TESTS="smptest smptest3 tsc tsc_adjust xsave vmexit_cpuid vmexit_vmcall - sieve vmexit_inl_pmtimer vmexit_ipi_halt vmexit_mov_from_cr8 - vmexit_mov_to_cr8 vmexit_ple_round_robin vmexit_tscdeadline - vmexit_tscdeadline_immed vmx_apic_passthrough_thread syscall" + - TESTS="access asyncpf debug emulator ept hypercall hyperv_clock + hyperv_connections hyperv_stimer hyperv_synic idt_test intel_iommu + ioapic ioapic-split kvmclock_test memory msr pcid pcid-disabled + rdpru realmode rmap_chain s3 setjmp sieve smap smptest smptest3 + syscall tsc tsc_adjust tsx-ctrl umip vmexit_cpuid vmexit_inl_pmtimer + vmexit_ipi vmexit_ipi_halt vmexit_mov_from_cr8 vmexit_mov_to_cr8 + vmexit_ple_round_robin vmexit_tscdeadline vmexit_tscdeadline_immed + vmexit_vmcall vmx_apic_passthrough_thread xsave" - ACCEL="kvm" - addons: From patchwork Thu Oct 1 07:22:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 11811015 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 600B092C for ; Thu, 1 Oct 2020 07:22:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A43821707 for ; Thu, 1 Oct 2020 07:22:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bpB8nc+H" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731365AbgJAHWq (ORCPT ); Thu, 1 Oct 2020 03:22:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:44548 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725892AbgJAHWp (ORCPT ); Thu, 1 Oct 2020 03:22:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601536963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=aCGPvWUx7E7rUnKJq6XsZzdK2CK3flcGFSH/VuFta/4=; b=bpB8nc+HXmWLloChulmP1ZaDrQBLVCTNXzZlG5+nINE+cM/Ezqk7KBhgrL9npjTbBBxzia U+p7sh/PBEifyBsIIToQWMQVMKVg2iT7pxyxyzJgmnG/Fb6si0rdJbM3SmR6n7iGsHhMmk 3fsGBVz6WbQZDI3qyhcGPbY0wwcaxxY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-26-3HW-uZKaPVyuNPru6_dw3Q-1; Thu, 01 Oct 2020 03:22:42 -0400 X-MC-Unique: 3HW-uZKaPVyuNPru6_dw3Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 570BB425D8 for ; Thu, 1 Oct 2020 07:22:41 +0000 (UTC) Received: from thuth.com (ovpn-112-107.ams2.redhat.com [10.36.112.107]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2ABA860BF1; Thu, 1 Oct 2020 07:22:39 +0000 (UTC) From: Thomas Huth To: kvm@vger.kernel.org Cc: pbonzini@redhat.com, drjones@redhat.com, lvivier@redhat.com Subject: [PATCH v2 2/7] travis.yml: Refresh the x86 32-bit test list Date: Thu, 1 Oct 2020 09:22:29 +0200 Message-Id: <20201001072234.143703-3-thuth@redhat.com> In-Reply-To: <20201001072234.143703-1-thuth@redhat.com> References: <20201001072234.143703-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org With the new QEMU from Ubuntu Focal, we can now run additional tests that were failing before. Signed-off-by: Thomas Huth --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0feaec1..5cd6dbf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,8 +43,8 @@ jobs: env: - CONFIG="--arch=i386" - BUILD_DIR="." - - TESTS="asyncpf hyperv_stimer hyperv_synic kvmclock_test msr pmu realmode - s3 sieve smap smptest smptest3 taskswitch taskswitch2 tsc_adjust" + - TESTS="asyncpf kvmclock_test msr pmu realmode s3 setjmp sieve smap + smptest smptest3 taskswitch taskswitch2 tsc tsc_adjust tsx-ctrl umip" - ACCEL="kvm" - addons: @@ -52,9 +52,9 @@ jobs: env: - CONFIG="--arch=i386" - BUILD_DIR="i386-builddir" - - TESTS="cmpxchg8b tsx-ctrl umip vmexit_cpuid vmexit_ipi vmexit_ipi_halt - vmexit_mov_from_cr8 vmexit_mov_to_cr8 vmexit_ple_round_robin - vmexit_tscdeadline vmexit_tscdeadline_immed vmexit_vmcall setjmp" + - TESTS="cmpxchg8b vmexit_vmcall vmexit_cpuid vmexit_ipi vmexit_ipi_halt + vmexit_mov_from_cr8 vmexit_mov_to_cr8 vmexit_ple_round_robin + vmexit_inl_pmtimer vmexit_tscdeadline vmexit_tscdeadline_immed" - ACCEL="kvm" - addons: From patchwork Thu Oct 1 07:22:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 11811019 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A3DF8112C for ; Thu, 1 Oct 2020 07:22:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 882DB2158C for ; Thu, 1 Oct 2020 07:22:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="I8EiFcl2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731353AbgJAHWt (ORCPT ); Thu, 1 Oct 2020 03:22:49 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36854 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731371AbgJAHWt (ORCPT ); Thu, 1 Oct 2020 03:22:49 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601536968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=q3VX2HZ1pS8feGfzyxG5cAr4WcdFjaSW4U4XDOx6dUk=; b=I8EiFcl21e68FgKIM8QP0YpUK0ybGNNOwte9J1yDKqfGV9vDFa8JSt4otp/R86u9ccJOLX 86Acc2OxCPpqTP8Vqls36ztHKjxtGfVnwXaffedYS4nDTw3rfiLs776WU/kXC+wZBswl8F MRz1CTE9xmiSvaAg0lPjMot62LRdcbQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-455-LZL1d0qQMfa_XNBUWaD-YQ-1; Thu, 01 Oct 2020 03:22:46 -0400 X-MC-Unique: LZL1d0qQMfa_XNBUWaD-YQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8852C801AAC for ; Thu, 1 Oct 2020 07:22:45 +0000 (UTC) Received: from thuth.com (ovpn-112-107.ams2.redhat.com [10.36.112.107]) by smtp.corp.redhat.com (Postfix) with ESMTP id B614160BF1; Thu, 1 Oct 2020 07:22:41 +0000 (UTC) From: Thomas Huth To: kvm@vger.kernel.org Cc: pbonzini@redhat.com, drjones@redhat.com, lvivier@redhat.com Subject: [PATCH v2 3/7] travis.yml: Add the selftest-setup ppc64 test Date: Thu, 1 Oct 2020 09:22:30 +0200 Message-Id: <20201001072234.143703-4-thuth@redhat.com> In-Reply-To: <20201001072234.143703-1-thuth@redhat.com> References: <20201001072234.143703-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org This test now seems to be working with the newer version of QEMU in Ubuntu Focal, so we can run it now in the Travis builds, too. Signed-off-by: Thomas Huth --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5cd6dbf..547d8d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -90,7 +90,7 @@ jobs: env: - CONFIG="--arch=ppc64 --endian=little --cross-prefix=powerpc64le-linux-gnu-" - BUILD_DIR="." - - TESTS="spapr_hcall emulator rtas-set-time-of-day" + - TESTS="selftest-setup spapr_hcall emulator rtas-set-time-of-day" - ACCEL="tcg,cap-htm=off" - addons: From patchwork Thu Oct 1 07:22:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 11811027 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 22DDC92C for ; Thu, 1 Oct 2020 07:23:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EF02C21531 for ; Thu, 1 Oct 2020 07:22:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="V+m8NB7o" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731484AbgJAHW7 (ORCPT ); Thu, 1 Oct 2020 03:22:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:38856 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731444AbgJAHW4 (ORCPT ); Thu, 1 Oct 2020 03:22:56 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601536974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=bp7eVt/GZmB7ydFRGprxtKVGtrQbZrgzniSBsu3qoQQ=; b=V+m8NB7o/4rCjkgqnQRczrwsmbWFUlFRoQAwhgzhyaT6xb113k6T5+diUzJbm1neK/zSJl xO5jQxvv9tsaX2MoLz5wKXLmhHk+MCaf5Z9twgLKlMep0py9wHcmAzof6b1FgEl64aH5iB xusuIAmikJFPF+qRajXvrjb6PIItCZo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-450-8Cm5oT-yPm6OfcYbovQEcg-1; Thu, 01 Oct 2020 03:22:48 -0400 X-MC-Unique: 8Cm5oT-yPm6OfcYbovQEcg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3869A801AC2 for ; Thu, 1 Oct 2020 07:22:47 +0000 (UTC) Received: from thuth.com (ovpn-112-107.ams2.redhat.com [10.36.112.107]) by smtp.corp.redhat.com (Postfix) with ESMTP id E6CCB60BF1; Thu, 1 Oct 2020 07:22:45 +0000 (UTC) From: Thomas Huth To: kvm@vger.kernel.org Cc: pbonzini@redhat.com, drjones@redhat.com, lvivier@redhat.com Subject: [PATCH v2 4/7] kbuild: fix asm-offset generation to work with clang Date: Thu, 1 Oct 2020 09:22:31 +0200 Message-Id: <20201001072234.143703-5-thuth@redhat.com> In-Reply-To: <20201001072234.143703-1-thuth@redhat.com> References: <20201001072234.143703-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org KBuild abuses the asm statement to write to a file and clang chokes about these invalid asm statements. Hack it even more by fooling this is actual valid asm code. This is an adaption of the Linux kernel commit cf0c3e68aa81f992b0 which in turn is based on a patch for the U-Boot: http://patchwork.ozlabs.org/patch/375026/ Signed-off-by: Thomas Huth Reviewed-by: Andrew Jones Tested-by: Andrew Jones --- lib/kbuild.h | 6 +++--- scripts/asm-offsets.mak | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/kbuild.h b/lib/kbuild.h index ab99db6..79644e5 100644 --- a/lib/kbuild.h +++ b/lib/kbuild.h @@ -1,8 +1,8 @@ #ifndef _KBUILD_H_ #define _KBUILD_H_ #define DEFINE(sym, val) \ - asm volatile("\n->" #sym " %0 " #val : : "i" (val)) + asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) #define OFFSET(sym, str, mem) DEFINE(sym, offsetof(struct str, mem)) -#define COMMENT(x) asm volatile("\n->#" x) -#define BLANK() asm volatile("\n->" : : ) +#define COMMENT(x) asm volatile("\n.ascii \"->#" x "\"") +#define BLANK() asm volatile("\n.ascii \"->\"" : : ) #endif diff --git a/scripts/asm-offsets.mak b/scripts/asm-offsets.mak index b35da09..7b64162 100644 --- a/scripts/asm-offsets.mak +++ b/scripts/asm-offsets.mak @@ -8,10 +8,11 @@ # define sed-y - "/^->/{s:->#\(.*\):/* \1 */:; \ + 's:^[[:space:]]*\.ascii[[:space:]]*"\(.*\)".*:\1:; \ + /^->/{s:->#\(.*\):/* \1 */:; \ s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \ s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ - s:->::; p;}" + s:->::; p;}' endef define make_asm_offsets From patchwork Thu Oct 1 07:22:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 11811023 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2AA13112C for ; Thu, 1 Oct 2020 07:22:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 11B312158C for ; Thu, 1 Oct 2020 07:22:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DSV35VLD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731478AbgJAHWz (ORCPT ); Thu, 1 Oct 2020 03:22:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:60044 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731449AbgJAHWy (ORCPT ); Thu, 1 Oct 2020 03:22:54 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601536973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=Vz9fFD7Do5tf1ywGJ7bzN/b6Apbl8A7Fb9fNHS/U1ng=; b=DSV35VLD5UF+VYRb4uE/Dk1Y/ZrRBSYeeycFvGb05FWa3McdUSWwZE5dlkpENd1npZLlJm Pp8O1p7JiGoox2kuzXnhEx6O+ppRyAXFMrR9/46QF8crD6FkmrawB5H+AMLMZV7sNGSWMz cGyKL5U9cjvL/hZ3jqU0tme5XwXvoKg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-396-nCunpcwyMp6wThw8H4Bqgg-1; Thu, 01 Oct 2020 03:22:49 -0400 X-MC-Unique: nCunpcwyMp6wThw8H4Bqgg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CB89D802B51 for ; Thu, 1 Oct 2020 07:22:48 +0000 (UTC) Received: from thuth.com (ovpn-112-107.ams2.redhat.com [10.36.112.107]) by smtp.corp.redhat.com (Postfix) with ESMTP id 96C9D60BF1; Thu, 1 Oct 2020 07:22:47 +0000 (UTC) From: Thomas Huth To: kvm@vger.kernel.org Cc: pbonzini@redhat.com, drjones@redhat.com, lvivier@redhat.com Subject: [PATCH v2 5/7] arm/pmu: Fix inline assembly for Clang Date: Thu, 1 Oct 2020 09:22:32 +0200 Message-Id: <20201001072234.143703-6-thuth@redhat.com> In-Reply-To: <20201001072234.143703-1-thuth@redhat.com> References: <20201001072234.143703-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Clang complains here: arm/pmu.c:201:16: error: value size does not match register size specified by the constraint and modifier [-Werror,-Wasm-operand-widths] : [pmcr] "r" (pmcr) ^ arm/pmu.c:194:18: note: use constraint modifier "w" " msr pmcr_el0, %[pmcr]\n" ^~~~~~~ %w[pmcr] arm/pmu.c:200:17: error: value size does not match register size specified by the constraint and modifier [-Werror,-Wasm-operand-widths] : [loop] "+r" (loop) ^ arm/pmu.c:196:11: note: use constraint modifier "w" "1: subs %[loop], %[loop], #1\n" ^~~~~~~ %w[loop] arm/pmu.c:200:17: error: value size does not match register size specified by the constraint and modifier [-Werror,-Wasm-operand-widths] : [loop] "+r" (loop) ^ arm/pmu.c:196:20: note: use constraint modifier "w" "1: subs %[loop], %[loop], #1\n" ^~~~~~~ %w[loop] arm/pmu.c:284:35: error: value size does not match register size specified by the constraint and modifier [-Werror,-Wasm-operand-widths] : [addr] "r" (addr), [pmcr] "r" (pmcr), [loop] "r" (loop) ^ arm/pmu.c:274:28: note: use constraint modifier "w" " msr pmcr_el0, %[pmcr]\n" ^~~~~~~ %w[pmcr] arm/pmu.c:284:54: error: value size does not match register size specified by the constraint and modifier [-Werror,-Wasm-operand-widths] : [addr] "r" (addr), [pmcr] "r" (pmcr), [loop] "r" (loop) ^ arm/pmu.c:276:23: note: use constraint modifier "w" " mov x10, %[loop]\n" ^~~~~~~ %w[loop] pmcr should be 64-bit since it is a sysreg, but for loop we can use the "w" modifier. Suggested-by: Drew Jones Signed-off-by: Thomas Huth Reviewed-by: Andrew Jones Tested-by: Andrew Jones --- arm/pmu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arm/pmu.c b/arm/pmu.c index cece53e..831fb66 100644 --- a/arm/pmu.c +++ b/arm/pmu.c @@ -190,15 +190,16 @@ static inline uint8_t get_pmu_version(void) */ static inline void precise_instrs_loop(int loop, uint32_t pmcr) { + uint64_t pmcr64 = pmcr; asm volatile( " msr pmcr_el0, %[pmcr]\n" " isb\n" - "1: subs %[loop], %[loop], #1\n" + "1: subs %w[loop], %w[loop], #1\n" " b.gt 1b\n" " msr pmcr_el0, xzr\n" " isb\n" : [loop] "+r" (loop) - : [pmcr] "r" (pmcr) + : [pmcr] "r" (pmcr64) : "cc"); } @@ -268,8 +269,9 @@ static void test_event_introspection(void) * pmccntr read after this function returns the exact instructions executed * in the controlled block. Loads @loop times the data at @address into x9. */ -static void mem_access_loop(void *addr, int loop, uint32_t pmcr) +static void mem_access_loop(void *addr, long loop, uint32_t pmcr) { + uint64_t pmcr64 = pmcr; asm volatile( " msr pmcr_el0, %[pmcr]\n" " isb\n" @@ -281,7 +283,7 @@ asm volatile( " msr pmcr_el0, xzr\n" " isb\n" : - : [addr] "r" (addr), [pmcr] "r" (pmcr), [loop] "r" (loop) + : [addr] "r" (addr), [pmcr] "r" (pmcr64), [loop] "r" (loop) : "x9", "x10", "cc"); } From patchwork Thu Oct 1 07:22:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 11811021 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 474A592C for ; Thu, 1 Oct 2020 07:22:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 22B74216C4 for ; Thu, 1 Oct 2020 07:22:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="G0hnpuzK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731402AbgJAHWy (ORCPT ); Thu, 1 Oct 2020 03:22:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:33154 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731433AbgJAHWx (ORCPT ); Thu, 1 Oct 2020 03:22:53 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601536973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=hXFxCA1THgFF6E/WD3R3Q+VIFfK2zhJenxQYSaQDe00=; b=G0hnpuzKhLbOYcggE7iX2wIfylI2v52My+lhv55ytdQgXIbsRF2k5s5reU57BYYfVAvlXu MH2K5JGPBdGS8YH5pHdwFkX47dXx50uQCra2/hvDvFK8O1m1Xo8m9AUNRq4WB8fLq0GNZ9 EPy2Ws+stbQBy4BEirzYjicn7FZhglM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-248-c8K0NzUkMu2jkX3iQADj1w-1; Thu, 01 Oct 2020 03:22:51 -0400 X-MC-Unique: c8K0NzUkMu2jkX3iQADj1w-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 72F9B186DD20 for ; Thu, 1 Oct 2020 07:22:50 +0000 (UTC) Received: from thuth.com (ovpn-112-107.ams2.redhat.com [10.36.112.107]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3561B60BF1; Thu, 1 Oct 2020 07:22:49 +0000 (UTC) From: Thomas Huth To: kvm@vger.kernel.org Cc: pbonzini@redhat.com, drjones@redhat.com, lvivier@redhat.com Subject: [PATCH v2 6/7] lib/arm64/spinlock: Fix inline assembly for Clang Date: Thu, 1 Oct 2020 09:22:33 +0200 Message-Id: <20201001072234.143703-7-thuth@redhat.com> In-Reply-To: <20201001072234.143703-1-thuth@redhat.com> References: <20201001072234.143703-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org /home/travis/build/huth/kvm-unit-tests/lib/arm64/spinlock.c:29:12: error: value size does not match register size specified by the constraint and modifier [-Werror,-Wasm-operand-widths] : "=&r" (val), "=&r" (fail) ^ /home/travis/build/huth/kvm-unit-tests/lib/arm64/spinlock.c:27:9: note: use constraint modifier "w" " mov %0, #1\n" ^~ %w0 Use the "w" modifier as suggested to fix the issue. Signed-off-by: Thomas Huth Reviewed-by: Andrew Jones Tested-by: Andrew Jones --- lib/arm64/spinlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/arm64/spinlock.c b/lib/arm64/spinlock.c index fac4fc9..258303d 100644 --- a/lib/arm64/spinlock.c +++ b/lib/arm64/spinlock.c @@ -24,7 +24,7 @@ void spin_lock(struct spinlock *lock) asm volatile( "1: ldaxr %w0, [%2]\n" " cbnz %w0, 1b\n" - " mov %0, #1\n" + " mov %w0, #1\n" " stxr %w1, %w0, [%2]\n" : "=&r" (val), "=&r" (fail) : "r" (&lock->v) From patchwork Thu Oct 1 07:22:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 11811025 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 756A2112C for ; Thu, 1 Oct 2020 07:22:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 42DBC21481 for ; Thu, 1 Oct 2020 07:22:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="C4jgF8u5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731430AbgJAHW5 (ORCPT ); Thu, 1 Oct 2020 03:22:57 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:59955 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731390AbgJAHWz (ORCPT ); Thu, 1 Oct 2020 03:22:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601536974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=uV31I6aF+e2KZFY5U2Vw1ex4RY5hMoOFs3xZ0n6rpRY=; b=C4jgF8u5+fZ6RUafK4DLp2mu+Zj8uqkHsKQ0EORXjzOIuO1DDBQHfUo09hm63zqTMr4qon Ot/FXu0WjL5FhoJoc70RaSZxQa+aKya6W5V5IrjUu7Fq7U/HOWf907P/wYvB0ugYHsNyn4 2hE1jgG2nqTy+7/HqC7yRWG3SDMOFTY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-119-AeAJNrUbN4iUbssYCgqWdw-1; Thu, 01 Oct 2020 03:22:53 -0400 X-MC-Unique: AeAJNrUbN4iUbssYCgqWdw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1BDC6801AC2 for ; Thu, 1 Oct 2020 07:22:52 +0000 (UTC) Received: from thuth.com (ovpn-112-107.ams2.redhat.com [10.36.112.107]) by smtp.corp.redhat.com (Postfix) with ESMTP id D1BE160BF1; Thu, 1 Oct 2020 07:22:50 +0000 (UTC) From: Thomas Huth To: kvm@vger.kernel.org Cc: pbonzini@redhat.com, drjones@redhat.com, lvivier@redhat.com Subject: [PATCH v2 7/7] travis.yml: Rework the aarch64 jobs Date: Thu, 1 Oct 2020 09:22:34 +0200 Message-Id: <20201001072234.143703-8-thuth@redhat.com> In-Reply-To: <20201001072234.143703-1-thuth@redhat.com> References: <20201001072234.143703-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org With the new QEMU from Ubuntu Focal, we can now run some more tests with TCG. Also switch the second build job to native arm64, so we can use Clang to compile these tests to get some additional compiler test coverage. Signed-off-by: Thomas Huth --- .travis.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 547d8d7..5af7344 100644 --- a/.travis.yml +++ b/.travis.yml @@ -76,14 +76,21 @@ jobs: env: - CONFIG="--arch=arm64 --cross-prefix=aarch64-linux-gnu-" - BUILD_DIR="." - - TESTS="selftest-vectors-kernel selftest-vectors-user selftest-smp" + - TESTS="cache gicv2-active gicv2-ipi gicv3-active gicv3-ipi pci-test + pmu-cycle-counter pmu-event-counter-config pmu-sw-incr psci + selftest-setup selftest-smp selftest-vectors-kernel + selftest-vectors-user timer" - - addons: - apt_packages: gcc-aarch64-linux-gnu qemu-system-aarch64 + - arch: arm64 + addons: + apt_packages: clang-10 qemu-system-aarch64 + compiler: clang env: - - CONFIG="--arch=arm64 --cross-prefix=aarch64-linux-gnu-" + - CONFIG="--arch=arm64 --cc=clang-10" - BUILD_DIR="arm64-buildir" - - TESTS="pci-test pmu gicv2-active gicv3-active psci timer selftest-setup" + - TESTS="cache gicv2-active gicv2-ipi gicv3-active gicv3-ipi pci-test + pmu-cycle-counter pmu-event-counter-config pmu-sw-incr selftest-setup + selftest-smp selftest-vectors-kernel selftest-vectors-user timer" - addons: apt_packages: gcc-powerpc64le-linux-gnu qemu-system-ppc