From patchwork Mon Nov 18 10:07:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 11249249 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 48E7B14C0 for ; Mon, 18 Nov 2019 10:07:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2786F20748 for ; Mon, 18 Nov 2019 10:07:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="C8s91vIo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726578AbfKRKHv (ORCPT ); Mon, 18 Nov 2019 05:07:51 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:29534 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726490AbfKRKHv (ORCPT ); Mon, 18 Nov 2019 05:07:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574071670; 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=ycY2H6t9OzJIOigDNMwvvZn5InpDjzanbHdcM8sdl9k=; b=C8s91vIo0nFh2UHdFzBQ1lHsDUFjMVs4Wodc2kxpX3DUDc9/S9MqB4jJkBg3d+YBSbCS2/ qolztN2fev/FDQS3WNHT0kNPaZ5JQO1KAv9IZGEUunRQJNgqoT/awY+R5dGo9x7W9NVCKt apo4uVo/jzq9wH3uYYdP+JFJZJumBAk= 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-228-FYiHeIxqMvSai-K4wDRg5g-1; Mon, 18 Nov 2019 05:07:46 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5E2FD107ACE4; Mon, 18 Nov 2019 10:07:45 +0000 (UTC) Received: from t460s.redhat.com (unknown [10.36.118.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id AF65C75E30; Mon, 18 Nov 2019 10:07:32 +0000 (UTC) From: David Hildenbrand To: kvm@vger.kernel.org Cc: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Thomas Huth , Christian Borntraeger , Cornelia Huck , Janosch Frank , David Hildenbrand Subject: [kvm-unit-tests PULL 01/12] s390x: Use loop to save and restore fprs Date: Mon, 18 Nov 2019 11:07:08 +0100 Message-Id: <20191118100719.7968-2-david@redhat.com> In-Reply-To: <20191118100719.7968-1-david@redhat.com> References: <20191118100719.7968-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: FYiHeIxqMvSai-K4wDRg5g-1 X-Mimecast-Spam-Score: 0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Janosch Frank Let's save some lines in the assembly by using a loop to save and restore the fprs. Tested-by: Thomas Huth Signed-off-by: Janosch Frank Message-Id: <20191104085533.2892-1-frankja@linux.ibm.com> Signed-off-by: David Hildenbrand --- s390x/cstart64.S | 38 ++++++-------------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/s390x/cstart64.S b/s390x/cstart64.S index 5dc1577..8e2b21e 100644 --- a/s390x/cstart64.S +++ b/s390x/cstart64.S @@ -99,44 +99,18 @@ memsetxc: lctlg %c0, %c0, 0(%r1) /* save fprs 0-15 + fpc */ la %r1, GEN_LC_SW_INT_FPRS - std %f0, 0(%r1) - std %f1, 8(%r1) - std %f2, 16(%r1) - std %f3, 24(%r1) - std %f4, 32(%r1) - std %f5, 40(%r1) - std %f6, 48(%r1) - std %f7, 56(%r1) - std %f8, 64(%r1) - std %f9, 72(%r1) - std %f10, 80(%r1) - std %f11, 88(%r1) - std %f12, 96(%r1) - std %f13, 104(%r1) - std %f14, 112(%r1) - std %f15, 120(%r1) + .irp i, 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 + std \i, \i * 8(%r1) + .endr stfpc GEN_LC_SW_INT_FPC .endm .macro RESTORE_REGS /* restore fprs 0-15 + fpc */ la %r1, GEN_LC_SW_INT_FPRS - ld %f0, 0(%r1) - ld %f1, 8(%r1) - ld %f2, 16(%r1) - ld %f3, 24(%r1) - ld %f4, 32(%r1) - ld %f5, 40(%r1) - ld %f6, 48(%r1) - ld %f7, 56(%r1) - ld %f8, 64(%r1) - ld %f9, 72(%r1) - ld %f10, 80(%r1) - ld %f11, 88(%r1) - ld %f12, 96(%r1) - ld %f13, 104(%r1) - ld %f14, 112(%r1) - ld %f15, 120(%r1) + .irp i, 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 + ld \i, \i * 8(%r1) + .endr lfpc GEN_LC_SW_INT_FPC /* restore cr0 */ lctlg %c0, %c0, GEN_LC_SW_INT_CR0 From patchwork Mon Nov 18 10:07:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 11249251 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 D77DD109A for ; Mon, 18 Nov 2019 10:08:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A93CE2075E for ; Mon, 18 Nov 2019 10:08:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gG0BdZP8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726631AbfKRKIH (ORCPT ); Mon, 18 Nov 2019 05:08:07 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:31089 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726490AbfKRKIG (ORCPT ); Mon, 18 Nov 2019 05:08:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574071685; 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=nC0AqvvWidkax+v3pzB/eWLt038JFSPeFc6EVeNhyyY=; b=gG0BdZP8BGVfpJBetbe+vRBncCH5ccPs0VTf3EyvBJzbprC/H+L79c8sg68ZFQWZDLF20i Y8ZMy8160UmFgS9ZZmi6RbbMB9otJLh8cWfhMkyMwRQ2vV11V6KgfZEeO9tGcie6kH3r/q 14oqjQBOQu4TdNBt2ARUBm23ADm/vaw= 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-202-reG-CCP9NquAiUQ4nKFOFw-1; Mon, 18 Nov 2019 05:08:02 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E3984107ACFE; Mon, 18 Nov 2019 10:08:00 +0000 (UTC) Received: from t460s.redhat.com (unknown [10.36.118.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id A31925090C; Mon, 18 Nov 2019 10:07:45 +0000 (UTC) From: David Hildenbrand To: kvm@vger.kernel.org Cc: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Thomas Huth , Christian Borntraeger , Cornelia Huck , Janosch Frank , Claudio Imbrenda , David Hildenbrand Subject: [kvm-unit-tests PULL 02/12] s390x: remove redundant defines Date: Mon, 18 Nov 2019 11:07:09 +0100 Message-Id: <20191118100719.7968-3-david@redhat.com> In-Reply-To: <20191118100719.7968-1-david@redhat.com> References: <20191118100719.7968-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: reG-CCP9NquAiUQ4nKFOFw-1 X-Mimecast-Spam-Score: 0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Claudio Imbrenda Signed-off-by: Claudio Imbrenda Reviewed-by: Christian Borntraeger Reviewed-by: Janosch Frank Reviewed-by: Thomas Huth Reviewed-by: David Hildenbrand Message-Id: <1572023194-14370-2-git-send-email-imbrenda@linux.ibm.com> Signed-off-by: David Hildenbrand --- lib/s390x/sclp.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/s390x/sclp.h b/lib/s390x/sclp.h index 4e69845..f00c3df 100644 --- a/lib/s390x/sclp.h +++ b/lib/s390x/sclp.h @@ -27,8 +27,6 @@ #define SCLP_ASSIGN_STORAGE 0x000D0001 #define SCLP_CMD_READ_EVENT_DATA 0x00770005 #define SCLP_CMD_WRITE_EVENT_DATA 0x00760005 -#define SCLP_CMD_READ_EVENT_DATA 0x00770005 -#define SCLP_CMD_WRITE_EVENT_DATA 0x00760005 #define SCLP_CMD_WRITE_EVENT_MASK 0x00780005 /* SCLP Memory hotplug codes */ From patchwork Mon Nov 18 10:07:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 11249255 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 BE67D14C0 for ; Mon, 18 Nov 2019 10:08:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9EBCB20748 for ; Mon, 18 Nov 2019 10:08:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QrWGW2Ng" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726705AbfKRKIJ (ORCPT ); Mon, 18 Nov 2019 05:08:09 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:27553 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726646AbfKRKIJ (ORCPT ); Mon, 18 Nov 2019 05:08:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574071688; 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=RYH4thB6j6aBghyZyhHkBFN46zj5pZJ7K3MvGDSM+uo=; b=QrWGW2NgnLRwHa7cI/5MffQyr30I34uJF/viN2tvtnS3xUGvPLuAMPOYs2Cuz5+c6W9b4D axfKmKlEf+wBZf5uQYvbHyBUndK1LncPB7WI8kxuIj0CiXqM2c3uw+nEoSr2zDzPZ0iGg5 RzCZUlTI8+Nkci3qDfPVkan9DCUUTyE= 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-175-AyC8rkvUPXKiT34g1IZ_sQ-1; Mon, 18 Nov 2019 05:08:06 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 830851802CE0; Mon, 18 Nov 2019 10:08:05 +0000 (UTC) Received: from t460s.redhat.com (unknown [10.36.118.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C69075E30; Mon, 18 Nov 2019 10:08:01 +0000 (UTC) From: David Hildenbrand To: kvm@vger.kernel.org Cc: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Thomas Huth , Christian Borntraeger , Cornelia Huck , Janosch Frank , Claudio Imbrenda , David Hildenbrand Subject: [kvm-unit-tests PULL 03/12] s390x: improve error reporting for interrupts Date: Mon, 18 Nov 2019 11:07:10 +0100 Message-Id: <20191118100719.7968-4-david@redhat.com> In-Reply-To: <20191118100719.7968-1-david@redhat.com> References: <20191118100719.7968-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: AyC8rkvUPXKiT34g1IZ_sQ-1 X-Mimecast-Spam-Score: 0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Claudio Imbrenda Improve error reporting for unexpected external interrupts to also print the received external interrupt code. Signed-off-by: Claudio Imbrenda Reviewed-by: Janosch Frank Reviewed-by: Thomas Huth Reviewed-by: David Hildenbrand Acked-by: Christian Borntraeger Message-Id: <1572023194-14370-3-git-send-email-imbrenda@linux.ibm.com> Signed-off-by: David Hildenbrand --- lib/s390x/interrupt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/s390x/interrupt.c b/lib/s390x/interrupt.c index 5cade23..1636207 100644 --- a/lib/s390x/interrupt.c +++ b/lib/s390x/interrupt.c @@ -118,8 +118,8 @@ void handle_ext_int(void) { if (!ext_int_expected && lc->ext_int_code != EXT_IRQ_SERVICE_SIG) { - report_abort("Unexpected external call interrupt: at %#lx", - lc->ext_old_psw.addr); + report_abort("Unexpected external call interrupt (code %#x): at %#lx", + lc->ext_int_code, lc->ext_old_psw.addr); return; } From patchwork Mon Nov 18 10:07:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 11249257 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 97FD114C0 for ; Mon, 18 Nov 2019 10:08:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7772D2084D for ; Mon, 18 Nov 2019 10:08:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="H7GPZgpt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726740AbfKRKIQ (ORCPT ); Mon, 18 Nov 2019 05:08:16 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:32485 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726490AbfKRKIQ (ORCPT ); Mon, 18 Nov 2019 05:08:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574071695; 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=Q9/21UM7sPX+fr8RxiF1Rp1FbeR5FKDFOLwbAWbjJXQ=; b=H7GPZgpt7zIeq3fgZikXJhCKOR7n1jQMJzI9qACLe3yW1Fp4INDEaN6SJzvp6k1xK0Vmiw BumsF5NwZookO7tTK0e32EBoqgvPXc4R2o7fa09VP0uykkR4/5pnltwhwFojNdeS0bfoTj Z8eMFIYl0fECA7v7ZXBzk1gqUDcEkes= 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-15-gT_z_zUdPuSVxMhRuB_pUQ-1; Mon, 18 Nov 2019 05:08:11 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E9ECF1034B3A; Mon, 18 Nov 2019 10:08:09 +0000 (UTC) Received: from t460s.redhat.com (unknown [10.36.118.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id CE5CA75E30; Mon, 18 Nov 2019 10:08:05 +0000 (UTC) From: David Hildenbrand To: kvm@vger.kernel.org Cc: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Thomas Huth , Christian Borntraeger , Cornelia Huck , Janosch Frank , Claudio Imbrenda , David Hildenbrand Subject: [kvm-unit-tests PULL 04/12] s390x: sclp: expose ram_size and max_ram_size Date: Mon, 18 Nov 2019 11:07:11 +0100 Message-Id: <20191118100719.7968-5-david@redhat.com> In-Reply-To: <20191118100719.7968-1-david@redhat.com> References: <20191118100719.7968-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: gT_z_zUdPuSVxMhRuB_pUQ-1 X-Mimecast-Spam-Score: 0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Claudio Imbrenda Expose ram_size and max_ram_size through accessor functions. We only use get_ram_size in an upcoming patch, but having an accessor for the other one does not hurt. Signed-off-by: Claudio Imbrenda Reviewed-by: Thomas Huth Reviewed-by: David Hildenbrand Acked-by: Christian Borntraeger Reviewed-by: Janosch Frank Message-Id: <1572023194-14370-4-git-send-email-imbrenda@linux.ibm.com> Signed-off-by: David Hildenbrand --- lib/s390x/sclp.c | 10 ++++++++++ lib/s390x/sclp.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/lib/s390x/sclp.c b/lib/s390x/sclp.c index 56fca0c..7798f04 100644 --- a/lib/s390x/sclp.c +++ b/lib/s390x/sclp.c @@ -167,3 +167,13 @@ void sclp_memory_setup(void) mem_init(ram_size); } + +uint64_t get_ram_size(void) +{ + return ram_size; +} + +uint64_t get_max_ram_size(void) +{ + return max_ram_size; +} diff --git a/lib/s390x/sclp.h b/lib/s390x/sclp.h index f00c3df..6d40fb7 100644 --- a/lib/s390x/sclp.h +++ b/lib/s390x/sclp.h @@ -272,5 +272,7 @@ void sclp_console_setup(void); void sclp_print(const char *str); int sclp_service_call(unsigned int command, void *sccb); void sclp_memory_setup(void); +uint64_t get_ram_size(void); +uint64_t get_max_ram_size(void); #endif /* SCLP_H */ From patchwork Mon Nov 18 10:07:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 11249259 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 41695109A for ; Mon, 18 Nov 2019 10:08:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 218AB20730 for ; Mon, 18 Nov 2019 10:08:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IwS/Dulg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726855AbfKRKIT (ORCPT ); Mon, 18 Nov 2019 05:08:19 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:22811 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726761AbfKRKIS (ORCPT ); Mon, 18 Nov 2019 05:08:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574071697; 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=AsF9OHSdlsKS6rwHyhm8uC61MVisTsEjO24dF2lfbXE=; b=IwS/Dulg8jqgvMqrMJhc7jQWDiKBM6zcFDITRSElC5YyYbqd0PjFvysCDkI2tglEURRlC7 IHOtlxO+TItOPpCndUH6+DT2V561WnHqpNqhzwRC1TQZtjGX3AZgwYgnV/OAhh57oKa+S3 NQEJwPjMFL+AXkG40KQ15I5hGx/JGWY= 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-370-RVkvkPo_MOqD3kr72BuCWA-1; Mon, 18 Nov 2019 05:08:15 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 58095477; Mon, 18 Nov 2019 10:08:14 +0000 (UTC) Received: from t460s.redhat.com (unknown [10.36.118.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 42F8E66856; Mon, 18 Nov 2019 10:08:10 +0000 (UTC) From: David Hildenbrand To: kvm@vger.kernel.org Cc: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Thomas Huth , Christian Borntraeger , Cornelia Huck , Janosch Frank , David Hildenbrand Subject: [kvm-unit-tests PULL 05/12] s390x: Fix initial cr0 load comments Date: Mon, 18 Nov 2019 11:07:12 +0100 Message-Id: <20191118100719.7968-6-david@redhat.com> In-Reply-To: <20191118100719.7968-1-david@redhat.com> References: <20191118100719.7968-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: RVkvkPo_MOqD3kr72BuCWA-1 X-Mimecast-Spam-Score: 0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Janosch Frank We need to load cr0 to have access to all fprs during save and restore of fprs. Saving conditionally on basis of the CR0 AFP bit would be a pain. Reviewed-by: Thomas Huth Signed-off-by: Janosch Frank Message-Id: <20191111153345.22505-2-frankja@linux.ibm.com> Signed-off-by: David Hildenbrand --- s390x/cstart64.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/s390x/cstart64.S b/s390x/cstart64.S index 8e2b21e..043e34a 100644 --- a/s390x/cstart64.S +++ b/s390x/cstart64.S @@ -94,7 +94,7 @@ memsetxc: stmg %r0, %r15, GEN_LC_SW_INT_GRS /* save cr0 */ stctg %c0, %c0, GEN_LC_SW_INT_CR0 - /* load initial cr0 again */ + /* load a cr0 that has the AFP control bit which enables all FPRs */ larl %r1, initial_cr0 lctlg %c0, %c0, 0(%r1) /* save fprs 0-15 + fpc */ @@ -139,7 +139,7 @@ diag308_load_reset: xgr %r2, %r2 br %r14 /* Success path */ - /* We lost cr0 due to the reset */ + /* load a cr0 that has the AFP control bit which enables all FPRs */ 0: larl %r1, initial_cr0 lctlg %c0, %c0, 0(%r1) RESTORE_REGS From patchwork Mon Nov 18 10:07:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 11249261 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 1CE05109A for ; Mon, 18 Nov 2019 10:08:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F1D322075E for ; Mon, 18 Nov 2019 10:08:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Bqq+Z9Ni" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726874AbfKRKIU (ORCPT ); Mon, 18 Nov 2019 05:08:20 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:47017 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726460AbfKRKIT (ORCPT ); Mon, 18 Nov 2019 05:08:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574071699; 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=SuEdHgpSfnqJ4t9uIksCSEzHcYIlpI9neglm8kr4jHA=; b=Bqq+Z9NiLPsLPNwrknytIeHfENP/6VZkJsIxI+7WV5B3lEmM4HHPmyrfOpOiXuqu2eXLLB cym7vWrg2yPLH+gtDGi2IlDNpbYqhEu/ceYXHTXKYJRg7h2iiFR5b1mSfW1eeXu5cMB/gx QNgmURhDRKEUddSJxIeDsF0t50j2uto= 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-295-Xz-aM7d-NBObScfusYInwA-1; Mon, 18 Nov 2019 05:08:17 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5D61C1802CEA; Mon, 18 Nov 2019 10:08:16 +0000 (UTC) Received: from t460s.redhat.com (unknown [10.36.118.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id A168B66856; Mon, 18 Nov 2019 10:08:14 +0000 (UTC) From: David Hildenbrand To: kvm@vger.kernel.org Cc: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Thomas Huth , Christian Borntraeger , Cornelia Huck , Janosch Frank , David Hildenbrand Subject: [kvm-unit-tests PULL 06/12] s390x: Add CR save area Date: Mon, 18 Nov 2019 11:07:13 +0100 Message-Id: <20191118100719.7968-7-david@redhat.com> In-Reply-To: <20191118100719.7968-1-david@redhat.com> References: <20191118100719.7968-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: Xz-aM7d-NBObScfusYInwA-1 X-Mimecast-Spam-Score: 0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Janosch Frank If we run with DAT enabled and do a reset, we need to save the CRs to backup our ASCEs on a diag308 for example. Reviewed-by: Thomas Huth Signed-off-by: Janosch Frank Message-Id: <20191111153345.22505-3-frankja@linux.ibm.com> Signed-off-by: David Hildenbrand --- lib/s390x/asm-offsets.c | 2 +- lib/s390x/asm/arch_def.h | 4 ++-- lib/s390x/interrupt.c | 4 ++-- lib/s390x/smp.c | 2 +- s390x/cstart64.S | 10 +++++----- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/s390x/asm-offsets.c b/lib/s390x/asm-offsets.c index 6e2d259..4b213f8 100644 --- a/lib/s390x/asm-offsets.c +++ b/lib/s390x/asm-offsets.c @@ -57,7 +57,7 @@ int main(void) OFFSET(GEN_LC_SW_INT_GRS, lowcore, sw_int_grs); OFFSET(GEN_LC_SW_INT_FPRS, lowcore, sw_int_fprs); OFFSET(GEN_LC_SW_INT_FPC, lowcore, sw_int_fpc); - OFFSET(GEN_LC_SW_INT_CR0, lowcore, sw_int_cr0); + OFFSET(GEN_LC_SW_INT_CRS, lowcore, sw_int_crs); OFFSET(GEN_LC_MCCK_EXT_SA_ADDR, lowcore, mcck_ext_sa_addr); OFFSET(GEN_LC_FPRS_SA, lowcore, fprs_sa); OFFSET(GEN_LC_GRS_SA, lowcore, grs_sa); diff --git a/lib/s390x/asm/arch_def.h b/lib/s390x/asm/arch_def.h index 96cca2e..07d4e5e 100644 --- a/lib/s390x/asm/arch_def.h +++ b/lib/s390x/asm/arch_def.h @@ -78,8 +78,8 @@ struct lowcore { uint64_t sw_int_fprs[16]; /* 0x0280 */ uint32_t sw_int_fpc; /* 0x0300 */ uint8_t pad_0x0304[0x0308 - 0x0304]; /* 0x0304 */ - uint64_t sw_int_cr0; /* 0x0308 */ - uint8_t pad_0x0310[0x11b0 - 0x0310]; /* 0x0310 */ + uint64_t sw_int_crs[16]; /* 0x0308 */ + uint8_t pad_0x0310[0x11b0 - 0x0388]; /* 0x0388 */ uint64_t mcck_ext_sa_addr; /* 0x11b0 */ uint8_t pad_0x11b8[0x1200 - 0x11b8]; /* 0x11b8 */ uint64_t fprs_sa[16]; /* 0x1200 */ diff --git a/lib/s390x/interrupt.c b/lib/s390x/interrupt.c index 1636207..3e07867 100644 --- a/lib/s390x/interrupt.c +++ b/lib/s390x/interrupt.c @@ -124,13 +124,13 @@ void handle_ext_int(void) } if (lc->ext_int_code == EXT_IRQ_SERVICE_SIG) { - lc->sw_int_cr0 &= ~(1UL << 9); + lc->sw_int_crs[0] &= ~(1UL << 9); sclp_handle_ext(); } else { ext_int_expected = false; } - if (!(lc->sw_int_cr0 & CR0_EXTM_MASK)) + if (!(lc->sw_int_crs[0] & CR0_EXTM_MASK)) lc->ext_old_psw.mask &= ~PSW_MASK_EXT; } diff --git a/lib/s390x/smp.c b/lib/s390x/smp.c index 7602886..f57f420 100644 --- a/lib/s390x/smp.c +++ b/lib/s390x/smp.c @@ -189,7 +189,7 @@ int smp_cpu_setup(uint16_t addr, struct psw psw) cpu->lowcore->sw_int_grs[15] = (uint64_t)cpu->stack + (PAGE_SIZE * 4); lc->restart_new_psw.mask = 0x0000000180000000UL; lc->restart_new_psw.addr = (uint64_t)smp_cpu_setup_state; - lc->sw_int_cr0 = 0x0000000000040000UL; + lc->sw_int_crs[0] = 0x0000000000040000UL; /* Start processing */ rc = sigp_retry(cpu->addr, SIGP_RESTART, 0, NULL); diff --git a/s390x/cstart64.S b/s390x/cstart64.S index 043e34a..4be20fc 100644 --- a/s390x/cstart64.S +++ b/s390x/cstart64.S @@ -92,8 +92,8 @@ memsetxc: .macro SAVE_REGS /* save grs 0-15 */ stmg %r0, %r15, GEN_LC_SW_INT_GRS - /* save cr0 */ - stctg %c0, %c0, GEN_LC_SW_INT_CR0 + /* save crs 0-15 */ + stctg %c0, %c15, GEN_LC_SW_INT_CRS /* load a cr0 that has the AFP control bit which enables all FPRs */ larl %r1, initial_cr0 lctlg %c0, %c0, 0(%r1) @@ -112,8 +112,8 @@ memsetxc: ld \i, \i * 8(%r1) .endr lfpc GEN_LC_SW_INT_FPC - /* restore cr0 */ - lctlg %c0, %c0, GEN_LC_SW_INT_CR0 + /* restore crs 0-15 */ + lctlg %c0, %c15, GEN_LC_SW_INT_CRS /* restore grs 0-15 */ lmg %r0, %r15, GEN_LC_SW_INT_GRS .endm @@ -150,7 +150,7 @@ diag308_load_reset: smp_cpu_setup_state: xgr %r1, %r1 lmg %r0, %r15, GEN_LC_SW_INT_GRS - lctlg %c0, %c0, GEN_LC_SW_INT_CR0 + lctlg %c0, %c0, GEN_LC_SW_INT_CRS br %r14 pgm_int: From patchwork Mon Nov 18 10:07:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 11249269 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 8EED2109A for ; Mon, 18 Nov 2019 10:08:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6F58420727 for ; Mon, 18 Nov 2019 10:08:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Tot139I2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726961AbfKRKIf (ORCPT ); Mon, 18 Nov 2019 05:08:35 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:53837 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726939AbfKRKIe (ORCPT ); Mon, 18 Nov 2019 05:08:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574071713; 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=AF5kCxnhcY+wtM+5gf1bIk5t+a0ot/QQ0x+BuTjmraA=; b=Tot139I2U6Nvr7IlYR3YiF78ymXOXbyjs3M5fcyTPSywVL8ya/4ZKRhV5egFTa29CFs4zg jLFhL0Q3VhQhmgJiGIevovy1KNpEiNZx2Pin5MJdTGrG2xGHUcytLn1WOfe3at1mhdZ3Lb Yv0xTFR36VyYgxtQQbaIGOnx9hd2yy0= 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-364-TIj_l0MVOQG6d5dv4cUlhA-1; Mon, 18 Nov 2019 05:08:23 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E233D477; Mon, 18 Nov 2019 10:08:22 +0000 (UTC) Received: from t460s.redhat.com (unknown [10.36.118.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id A5FFE75E30; Mon, 18 Nov 2019 10:08:16 +0000 (UTC) From: David Hildenbrand To: kvm@vger.kernel.org Cc: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Thomas Huth , Christian Borntraeger , Cornelia Huck , Janosch Frank , David Hildenbrand Subject: [kvm-unit-tests PULL 07/12] s390x: Load reset psw on diag308 reset Date: Mon, 18 Nov 2019 11:07:14 +0100 Message-Id: <20191118100719.7968-8-david@redhat.com> In-Reply-To: <20191118100719.7968-1-david@redhat.com> References: <20191118100719.7968-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: TIj_l0MVOQG6d5dv4cUlhA-1 X-Mimecast-Spam-Score: 0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Janosch Frank On a diag308 subcode 0 CRs will be reset, so we need a PSW mask without DAT. Also we need to set the short psw indication to be compliant with the architecture. Let's therefore define a reset PSW mask with 64 bit addressing and short PSW indication that is compliant with architecture and use it. Signed-off-by: Janosch Frank Reviewed-by: Thomas Huth Message-Id: <20191113112403.7664-1-frankja@linux.ibm.com> Signed-off-by: David Hildenbrand --- lib/s390x/asm-offsets.c | 1 + lib/s390x/asm/arch_def.h | 4 +++- s390x/cstart64.S | 24 +++++++++++++++++------- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/lib/s390x/asm-offsets.c b/lib/s390x/asm-offsets.c index 4b213f8..61d2658 100644 --- a/lib/s390x/asm-offsets.c +++ b/lib/s390x/asm-offsets.c @@ -58,6 +58,7 @@ int main(void) OFFSET(GEN_LC_SW_INT_FPRS, lowcore, sw_int_fprs); OFFSET(GEN_LC_SW_INT_FPC, lowcore, sw_int_fpc); OFFSET(GEN_LC_SW_INT_CRS, lowcore, sw_int_crs); + OFFSET(GEN_LC_SW_INT_PSW, lowcore, sw_int_psw); OFFSET(GEN_LC_MCCK_EXT_SA_ADDR, lowcore, mcck_ext_sa_addr); OFFSET(GEN_LC_FPRS_SA, lowcore, fprs_sa); OFFSET(GEN_LC_GRS_SA, lowcore, grs_sa); diff --git a/lib/s390x/asm/arch_def.h b/lib/s390x/asm/arch_def.h index 07d4e5e..cf6e1ca 100644 --- a/lib/s390x/asm/arch_def.h +++ b/lib/s390x/asm/arch_def.h @@ -79,7 +79,8 @@ struct lowcore { uint32_t sw_int_fpc; /* 0x0300 */ uint8_t pad_0x0304[0x0308 - 0x0304]; /* 0x0304 */ uint64_t sw_int_crs[16]; /* 0x0308 */ - uint8_t pad_0x0310[0x11b0 - 0x0388]; /* 0x0388 */ + struct psw sw_int_psw; /* 0x0388 */ + uint8_t pad_0x0310[0x11b0 - 0x0398]; /* 0x0398 */ uint64_t mcck_ext_sa_addr; /* 0x11b0 */ uint8_t pad_0x11b8[0x1200 - 0x11b8]; /* 0x11b8 */ uint64_t fprs_sa[16]; /* 0x1200 */ @@ -98,6 +99,7 @@ struct lowcore { uint8_t pad_0x1400[0x1800 - 0x1400]; /* 0x1400 */ uint8_t pgm_int_tdb[0x1900 - 0x1800]; /* 0x1800 */ } __attribute__ ((__packed__)); +_Static_assert(sizeof(struct lowcore) == 0x1900, "Lowcore size"); #define PGM_INT_CODE_OPERATION 0x01 #define PGM_INT_CODE_PRIVILEGED_OPERATION 0x02 diff --git a/s390x/cstart64.S b/s390x/cstart64.S index 4be20fc..86dd4c4 100644 --- a/s390x/cstart64.S +++ b/s390x/cstart64.S @@ -126,13 +126,18 @@ memsetxc: .globl diag308_load_reset diag308_load_reset: SAVE_REGS - /* Save the first PSW word to the IPL PSW */ + /* Backup current PSW mask, as we have to restore it on success */ epsw %r0, %r1 - st %r0, 0 - /* Store the address and the bit for 31 bit addressing */ - larl %r0, 0f - oilh %r0, 0x8000 - st %r0, 0x4 + st %r0, GEN_LC_SW_INT_PSW + st %r1, GEN_LC_SW_INT_PSW + 4 + /* Load reset psw mask (short psw, 64 bit) */ + lg %r0, reset_psw + /* Load the success label address */ + larl %r1, 0f + /* Or it to the mask */ + ogr %r0, %r1 + /* Store it at the reset PSW location (real 0x0) */ + stg %r0, 0 /* Do the reset */ diag %r0,%r2,0x308 /* Failure path */ @@ -144,7 +149,10 @@ diag308_load_reset: lctlg %c0, %c0, 0(%r1) RESTORE_REGS lhi %r2, 1 - br %r14 + larl %r0, 1f + stg %r0, GEN_LC_SW_INT_PSW + 8 + lpswe GEN_LC_SW_INT_PSW +1: br %r14 .globl smp_cpu_setup_state smp_cpu_setup_state: @@ -184,6 +192,8 @@ svc_int: lpswe GEN_LC_SVC_OLD_PSW .align 8 +reset_psw: + .quad 0x0008000180000000 initial_psw: .quad 0x0000000180000000, clear_bss_start pgm_int_psw: From patchwork Mon Nov 18 10:07:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 11249263 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 3A098109A for ; Mon, 18 Nov 2019 10:08:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1903A2075E for ; Mon, 18 Nov 2019 10:08:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QTPTv3a+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726490AbfKRKI3 (ORCPT ); Mon, 18 Nov 2019 05:08:29 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:47336 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726911AbfKRKI3 (ORCPT ); Mon, 18 Nov 2019 05:08:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574071707; 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=qJtIoVFxnvQq0GiDnYNrdlkt26kdN31589zuSnD4DfY=; b=QTPTv3a+J22F+qJcutAfTIodxQLKM1ik/S3bxHajsIpewXw/MxujHXNCOC+sMz4jZyvzGS 3YRlU2BZeAuD7+mFLcZvWt6zWG5OzEZT8Cg91sBekC29DrgaCSwsM0ZlGSPLie6kZ5kMHx i6omKJFcx0rqOmZmt7hVdPsZM2RX3Mc= 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-312-qTlVN3wwNOWmjIDDy7Sq-w-1; Mon, 18 Nov 2019 05:08:26 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2002B802482; Mon, 18 Nov 2019 10:08:25 +0000 (UTC) Received: from t460s.redhat.com (unknown [10.36.118.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3990466856; Mon, 18 Nov 2019 10:08:23 +0000 (UTC) From: David Hildenbrand To: kvm@vger.kernel.org Cc: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Thomas Huth , Christian Borntraeger , Cornelia Huck , Janosch Frank , =?utf-8?q?Alex_Benn=C3=A9e?= , David Hildenbrand Subject: [kvm-unit-tests PULL 08/12] travis.yml: Re-arrange the test matrix Date: Mon, 18 Nov 2019 11:07:15 +0100 Message-Id: <20191118100719.7968-9-david@redhat.com> In-Reply-To: <20191118100719.7968-1-david@redhat.com> References: <20191118100719.7968-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: qTlVN3wwNOWmjIDDy7Sq-w-1 X-Mimecast-Spam-Score: 0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Thomas Huth We will soon need more control over the individual test matrix entries, so we should not limit the matrix to "env" sections, i.e. put the "matrix:" keyword on the top, not the "env:". Signed-off-by: Thomas Huth Reviewed-by: Alex Bennée Message-Id: <20191113112649.14322-2-thuth@redhat.com> Signed-off-by: David Hildenbrand --- .travis.yml | 92 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 56 insertions(+), 36 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6c14953..611bbdc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,44 +16,64 @@ addons: - qemu-system git: submodules: false -env: - matrix: - - CONFIG="" - BUILD_DIR="." - TESTS="vmexit_cpuid vmexit_mov_from_cr8 vmexit_mov_to_cr8 vmexit_ipi + +matrix: + include: + - env: + - CONFIG="" + - BUILD_DIR="." + - TESTS="vmexit_cpuid vmexit_mov_from_cr8 vmexit_mov_to_cr8 vmexit_ipi vmexit_ple_round_robin vmexit_tscdeadline vmexit_tscdeadline_immed" - - CONFIG="" - BUILD_DIR="x86-builddir" - TESTS="ioapic-split ioapic smptest smptest3 eventinj msr port80 syscall + + - env: + - CONFIG="" + - BUILD_DIR="x86-builddir" + - TESTS="ioapic-split ioapic smptest smptest3 eventinj msr port80 syscall tsc rmap_chain umip intel_iommu vmexit_inl_pmtimer vmexit_ipi_halt" - - CONFIG="--arch=arm --cross-prefix=arm-linux-gnueabihf-" - BUILD_DIR="." - TESTS="selftest-vectors-kernel selftest-vectors-user selftest-smp" - - CONFIG="--arch=arm --cross-prefix=arm-linux-gnueabihf-" - BUILD_DIR="arm-buildir" - TESTS="pci-test pmu gicv2-active gicv3-active psci selftest-setup" - - CONFIG="--arch=arm64 --cross-prefix=aarch64-linux-gnu-" - BUILD_DIR="." - TESTS="selftest-vectors-kernel selftest-vectors-user selftest-smp" - - CONFIG="--arch=arm64 --cross-prefix=aarch64-linux-gnu-" - BUILD_DIR="arm64-buildir" - TESTS="pci-test pmu gicv2-active gicv3-active psci timer selftest-setup" - - CONFIG="--arch=ppc64 --endian=little --cross-prefix=powerpc64le-linux-gnu-" - BUILD_DIR="." - TESTS="spapr_hcall emulator rtas-set-time-of-day" - ACCEL="tcg,cap-htm=off" - - CONFIG="--arch=ppc64 --endian=little --cross-prefix=powerpc64le-linux-gnu-" - BUILD_DIR="ppc64le-buildir" - TESTS="rtas-get-time-of-day rtas-get-time-of-day-base" - ACCEL="tcg,cap-htm=off" - - CONFIG="--arch=s390x --cross-prefix=s390x-linux-gnu-" - BUILD_DIR="." - TESTS="diag10 diag308" - ACCEL="tcg,firmware=s390x/run" - - CONFIG="--arch=s390x --cross-prefix=s390x-linux-gnu-" - BUILD_DIR="s390x-builddir" - TESTS="sieve" - ACCEL="tcg,firmware=s390x/run" + + - env: + - CONFIG="--arch=arm --cross-prefix=arm-linux-gnueabihf-" + - BUILD_DIR="." + - TESTS="selftest-vectors-kernel selftest-vectors-user selftest-smp" + + - env: + - CONFIG="--arch=arm --cross-prefix=arm-linux-gnueabihf-" + - BUILD_DIR="arm-buildir" + - TESTS="pci-test pmu gicv2-active gicv3-active psci selftest-setup" + + - env: + - CONFIG="--arch=arm64 --cross-prefix=aarch64-linux-gnu-" + - BUILD_DIR="." + - TESTS="selftest-vectors-kernel selftest-vectors-user selftest-smp" + + - env: + - CONFIG="--arch=arm64 --cross-prefix=aarch64-linux-gnu-" + - BUILD_DIR="arm64-buildir" + - TESTS="pci-test pmu gicv2-active gicv3-active psci timer selftest-setup" + + - env: + - CONFIG="--arch=ppc64 --endian=little --cross-prefix=powerpc64le-linux-gnu-" + - BUILD_DIR="." + - TESTS="spapr_hcall emulator rtas-set-time-of-day" + - ACCEL="tcg,cap-htm=off" + + - env: + - CONFIG="--arch=ppc64 --endian=little --cross-prefix=powerpc64le-linux-gnu-" + - BUILD_DIR="ppc64le-buildir" + - TESTS="rtas-get-time-of-day rtas-get-time-of-day-base" + - ACCEL="tcg,cap-htm=off" + + - env: + - CONFIG="--arch=s390x --cross-prefix=s390x-linux-gnu-" + - BUILD_DIR="." + - TESTS="diag10 diag308" + - ACCEL="tcg,firmware=s390x/run" + + - env: + - CONFIG="--arch=s390x --cross-prefix=s390x-linux-gnu-" + - BUILD_DIR="s390x-builddir" + - TESTS="sieve" + - ACCEL="tcg,firmware=s390x/run" before_script: - mkdir -p $BUILD_DIR && cd $BUILD_DIR From patchwork Mon Nov 18 10:07:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 11249265 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 6DFA414C0 for ; Mon, 18 Nov 2019 10:08:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4DD4A20730 for ; Mon, 18 Nov 2019 10:08:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ys1nd8Xr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726875AbfKRKIc (ORCPT ); Mon, 18 Nov 2019 05:08:32 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:37201 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726883AbfKRKIc (ORCPT ); Mon, 18 Nov 2019 05:08:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574071710; 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=ZfvXdtX0wKwBsx+KEmmak6xSgdeeaaCJeHyIPPx4sco=; b=Ys1nd8Xr2iVwM1X1Nz+Xdd2LV72FPYPmNc5WThTgKMs6/44qbzMXKGdfIX4ZYKVYKxHyMC JTGll9DI2HRaLijHW/KSbwskDm0FzkUC1Pl4Fv1hRFusadh3W6Id+CgP3g4vK9JWz1u4Y/ D73C5pCLFC4wP7sfJP7iyGGpMUsEbWk= 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-206-lAvcC-ACM96RCqNwWUw60A-1; Mon, 18 Nov 2019 05:08:28 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4B8E71800D7D; Mon, 18 Nov 2019 10:08:27 +0000 (UTC) Received: from t460s.redhat.com (unknown [10.36.118.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6C9FE66856; Mon, 18 Nov 2019 10:08:25 +0000 (UTC) From: David Hildenbrand To: kvm@vger.kernel.org Cc: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Thomas Huth , Christian Borntraeger , Cornelia Huck , Janosch Frank , =?utf-8?q?Alex_Benn=C3=A9e?= , David Hildenbrand Subject: [kvm-unit-tests PULL 09/12] travis.yml: Install only the required packages for each entry in the matrix Date: Mon, 18 Nov 2019 11:07:16 +0100 Message-Id: <20191118100719.7968-10-david@redhat.com> In-Reply-To: <20191118100719.7968-1-david@redhat.com> References: <20191118100719.7968-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: lAvcC-ACM96RCqNwWUw60A-1 X-Mimecast-Spam-Score: 0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Thomas Huth We don't need all cross compiler and QEMU versions for each and every entry in the test matrix, only the ones for the current target architecture. So let's speed up the installation process a little bit by only installing the packages that we really need. Signed-off-by: Thomas Huth Reviewed-by: Alex Bennée Message-Id: <20191113112649.14322-3-thuth@redhat.com> Signed-off-by: David Hildenbrand --- .travis.yml | 53 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index 611bbdc..3f5b5ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,75 +1,84 @@ sudo: false dist: bionic language: c -compiler: - - gcc cache: ccache -addons: - apt: - packages: - # Cross Toolchains - - gcc-arm-linux-gnueabihf - - gcc-aarch64-linux-gnu - - gcc-powerpc64le-linux-gnu - - gcc-s390x-linux-gnu - # Run dependencies - - qemu-system git: submodules: false matrix: include: - - env: + + - addons: + apt_packages: gcc qemu-system-x86 + env: - CONFIG="" - BUILD_DIR="." - TESTS="vmexit_cpuid vmexit_mov_from_cr8 vmexit_mov_to_cr8 vmexit_ipi vmexit_ple_round_robin vmexit_tscdeadline vmexit_tscdeadline_immed" - - env: + - addons: + apt_packages: gcc qemu-system-x86 + env: - CONFIG="" - BUILD_DIR="x86-builddir" - TESTS="ioapic-split ioapic smptest smptest3 eventinj msr port80 syscall tsc rmap_chain umip intel_iommu vmexit_inl_pmtimer vmexit_ipi_halt" - - env: + - addons: + apt_packages: gcc-arm-linux-gnueabihf qemu-system-arm + env: - CONFIG="--arch=arm --cross-prefix=arm-linux-gnueabihf-" - BUILD_DIR="." - TESTS="selftest-vectors-kernel selftest-vectors-user selftest-smp" - - env: + - addons: + apt_packages: gcc-arm-linux-gnueabihf qemu-system-arm + env: - CONFIG="--arch=arm --cross-prefix=arm-linux-gnueabihf-" - BUILD_DIR="arm-buildir" - TESTS="pci-test pmu gicv2-active gicv3-active psci selftest-setup" - - env: + - addons: + apt_packages: gcc-aarch64-linux-gnu qemu-system-aarch64 + env: - CONFIG="--arch=arm64 --cross-prefix=aarch64-linux-gnu-" - BUILD_DIR="." - TESTS="selftest-vectors-kernel selftest-vectors-user selftest-smp" - - env: + - addons: + apt_packages: gcc-aarch64-linux-gnu qemu-system-aarch64 + env: - CONFIG="--arch=arm64 --cross-prefix=aarch64-linux-gnu-" - BUILD_DIR="arm64-buildir" - TESTS="pci-test pmu gicv2-active gicv3-active psci timer selftest-setup" - - env: + - addons: + apt_packages: gcc-powerpc64le-linux-gnu qemu-system-ppc + env: - CONFIG="--arch=ppc64 --endian=little --cross-prefix=powerpc64le-linux-gnu-" - BUILD_DIR="." - TESTS="spapr_hcall emulator rtas-set-time-of-day" - ACCEL="tcg,cap-htm=off" - - env: + - addons: + apt_packages: gcc-powerpc64le-linux-gnu qemu-system-ppc + env: - CONFIG="--arch=ppc64 --endian=little --cross-prefix=powerpc64le-linux-gnu-" - BUILD_DIR="ppc64le-buildir" - TESTS="rtas-get-time-of-day rtas-get-time-of-day-base" - ACCEL="tcg,cap-htm=off" - - env: + - addons: + apt_packages: gcc-s390x-linux-gnu qemu-system-s390x + env: - CONFIG="--arch=s390x --cross-prefix=s390x-linux-gnu-" - BUILD_DIR="." - TESTS="diag10 diag308" - ACCEL="tcg,firmware=s390x/run" - - env: + - addons: + apt_packages: gcc-s390x-linux-gnu qemu-system-s390x + env: - CONFIG="--arch=s390x --cross-prefix=s390x-linux-gnu-" - BUILD_DIR="s390x-builddir" - TESTS="sieve" From patchwork Mon Nov 18 10:07:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 11249267 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 0658F184E for ; Mon, 18 Nov 2019 10:08:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DA05D20727 for ; Mon, 18 Nov 2019 10:08:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fDJ+NLuz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726883AbfKRKId (ORCPT ); Mon, 18 Nov 2019 05:08:33 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:52566 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726922AbfKRKIc (ORCPT ); Mon, 18 Nov 2019 05:08:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574071711; 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=aq+jdGNHAVTsKPtuya3iDlxhCgoEdRjl8mf9wNUuL2M=; b=fDJ+NLuzO9thB8xJFw+XGL74gWC1/zwB9g2V405vmNHD1TEYWtCAG8F47Se3Uf8KC111C5 8NEwW1RTJkbq4wsZw9hy+JGnhsTbx4zRVj+YuTBQ0KrSmaGuNfMefeygyGRSAmY/2T8BP5 VsC08frkkAQX35mV7rN6x+UcILNBdqc= 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-188-1RIWPw8-Nf2mbWQjl9Ig3g-1; Mon, 18 Nov 2019 05:08:30 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5200F107ACCC; Mon, 18 Nov 2019 10:08:29 +0000 (UTC) Received: from t460s.redhat.com (unknown [10.36.118.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 97CBF66856; Mon, 18 Nov 2019 10:08:27 +0000 (UTC) From: David Hildenbrand To: kvm@vger.kernel.org Cc: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Thomas Huth , Christian Borntraeger , Cornelia Huck , Janosch Frank , David Hildenbrand Subject: [kvm-unit-tests PULL 10/12] travis.yml: Test with KVM instead of TCG (on x86) Date: Mon, 18 Nov 2019 11:07:17 +0100 Message-Id: <20191118100719.7968-11-david@redhat.com> In-Reply-To: <20191118100719.7968-1-david@redhat.com> References: <20191118100719.7968-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: 1RIWPw8-Nf2mbWQjl9Ig3g-1 X-Mimecast-Spam-Score: 0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Thomas Huth Travis nowadays supports KVM in their CI pipelines, so we can finally run the kvm-unit-tests with KVM instead of TCG here. Unfortunately, there are some quirks: First, /dev/kvm is not accessible on Ubuntu by default. You have to be "root" or in the "kvm" group to access it. But changing the group of the current user is not taking into account for the current shell process, so that would need some indirections in the yml file. Thus the yml script now rather changes the group and "g+s" permission of the qemu binary instead. Second, not all x86 tests are working in this environment, so we still have to manually select the test set here (but the amount of tests is definitely higher now than what we were able to run with TCG before). Signed-off-by: Thomas Huth Message-Id: <20191113174842.20759-1-thuth@redhat.com> Signed-off-by: David Hildenbrand --- .travis.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3f5b5ee..89c50fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -sudo: false +sudo: true dist: bionic language: c cache: ccache @@ -13,16 +13,21 @@ matrix: env: - CONFIG="" - BUILD_DIR="." - - TESTS="vmexit_cpuid vmexit_mov_from_cr8 vmexit_mov_to_cr8 vmexit_ipi - vmexit_ple_round_robin vmexit_tscdeadline vmexit_tscdeadline_immed" + - 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 umip" + - ACCEL="kvm" - addons: apt_packages: gcc qemu-system-x86 env: - CONFIG="" - BUILD_DIR="x86-builddir" - - TESTS="ioapic-split ioapic smptest smptest3 eventinj msr port80 syscall - tsc rmap_chain umip intel_iommu vmexit_inl_pmtimer vmexit_ipi_halt" + - 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" + - ACCEL="kvm" - addons: apt_packages: gcc-arm-linux-gnueabihf qemu-system-arm @@ -85,6 +90,10 @@ matrix: - ACCEL="tcg,firmware=s390x/run" before_script: + - if [ "$ACCEL" = "kvm" ]; then + sudo chgrp kvm /usr/bin/qemu-system-* ; + sudo chmod g+s /usr/bin/qemu-system-* ; + fi - mkdir -p $BUILD_DIR && cd $BUILD_DIR - if [ -e ./configure ]; then ./configure $CONFIG ; fi - if [ -e ../configure ]; then ../configure $CONFIG ; fi From patchwork Mon Nov 18 10:07:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 11249273 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 97DD814C0 for ; Mon, 18 Nov 2019 10:08:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7655820727 for ; Mon, 18 Nov 2019 10:08:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="RtDf8GxJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726765AbfKRKIu (ORCPT ); Mon, 18 Nov 2019 05:08:50 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:29623 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726918AbfKRKIu (ORCPT ); Mon, 18 Nov 2019 05:08:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574071729; 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=F8vgWb5qUnWEwR+Fluif1KFc66Z2f+jFG4Lwyq0kh4Q=; b=RtDf8GxJefYYvnHkVi2jI4OQPB1tZ2AAbX3MN5GdFsW6EJcNSvGpa/hlmDAXARGvM5KpEL duEq04kc3Nh4Gs49991wMpY7SepwoeMb951Uax/jtgeVcUmDP3xlm6cWkChmBRk++cdTqm yCczknwiwByOqiJLKDqyeUf7XO5hZLU= 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-291-iHNB-VPFPx6HIk7cGV9rzQ-1; Mon, 18 Nov 2019 05:08:35 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DC780107ACC6; Mon, 18 Nov 2019 10:08:33 +0000 (UTC) Received: from t460s.redhat.com (unknown [10.36.118.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9A78766856; Mon, 18 Nov 2019 10:08:29 +0000 (UTC) From: David Hildenbrand To: kvm@vger.kernel.org Cc: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Thomas Huth , Christian Borntraeger , Cornelia Huck , Janosch Frank , =?utf-8?q?Alex_Benn=C3=A9e?= , David Hildenbrand Subject: [kvm-unit-tests PULL 11/12] travis.yml: Test the i386 build, too Date: Mon, 18 Nov 2019 11:07:18 +0100 Message-Id: <20191118100719.7968-12-david@redhat.com> In-Reply-To: <20191118100719.7968-1-david@redhat.com> References: <20191118100719.7968-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: iHNB-VPFPx6HIk7cGV9rzQ-1 X-Mimecast-Spam-Score: 0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Thomas Huth After installing gcc-multilib, we can also test the 32-bit builds on Travis. Signed-off-by: Thomas Huth Reviewed-by: Alex Bennée Message-Id: <20191113112649.14322-5-thuth@redhat.com> Signed-off-by: David Hildenbrand --- .travis.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.travis.yml b/.travis.yml index 89c50fe..6858c3a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,21 @@ matrix: vmexit_tscdeadline_immed vmx_apic_passthrough_thread syscall" - ACCEL="kvm" + - addons: + apt_packages: gcc gcc-multilib qemu-system-x86 + env: + - CONFIG="--arch=i386" + - BUILD_DIR="." + - TESTS="eventinj port80 sieve tsc taskswitch umip vmexit_ple_round_robin" + + - addons: + apt_packages: gcc gcc-multilib qemu-system-x86 + env: + - CONFIG="--arch=i386" + - BUILD_DIR="i386-builddir" + - TESTS="vmexit_mov_from_cr8 vmexit_ipi vmexit_ipi_halt vmexit_mov_to_cr8 + vmexit_cpuid vmexit_tscdeadline vmexit_tscdeadline_immed" + - addons: apt_packages: gcc-arm-linux-gnueabihf qemu-system-arm env: From patchwork Mon Nov 18 10:07:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 11249271 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 DE3B914C0 for ; Mon, 18 Nov 2019 10:08:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B32D420727 for ; Mon, 18 Nov 2019 10:08:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Niih3T+U" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726939AbfKRKIm (ORCPT ); Mon, 18 Nov 2019 05:08:42 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:20580 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726956AbfKRKIl (ORCPT ); Mon, 18 Nov 2019 05:08:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574071720; 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=JCxaUCZLLy3tTwT9N1l1ulIsEarmu4H/s/AHqsHjk00=; b=Niih3T+UUzvP3apTeiquGpnGVNc+oUjOMQLUU2JEhlwVXAgivoxvRJhpfP1c3F+py5lim4 Vire7PoTg9h/j3iNiEjoMhj/Ewr3cqKnr6gN4uAKkaMinPK89RzncWkxqaRDpaPKYKit1r ygxw+IBi7VtWUxxnhg+xf6eahiEcNMs= 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-288-ZvmXdU10Mu6TpM86W3qAcw-1; Mon, 18 Nov 2019 05:08:39 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 25E15802691; Mon, 18 Nov 2019 10:08:38 +0000 (UTC) Received: from t460s.redhat.com (unknown [10.36.118.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 32CC866856; Mon, 18 Nov 2019 10:08:34 +0000 (UTC) From: David Hildenbrand To: kvm@vger.kernel.org Cc: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Thomas Huth , Christian Borntraeger , Cornelia Huck , Janosch Frank , =?utf-8?q?Alex_Benn=C3=A9e?= , David Hildenbrand Subject: [kvm-unit-tests PULL 12/12] travis.yml: Expect that at least one test succeeds Date: Mon, 18 Nov 2019 11:07:19 +0100 Message-Id: <20191118100719.7968-13-david@redhat.com> In-Reply-To: <20191118100719.7968-1-david@redhat.com> References: <20191118100719.7968-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: ZvmXdU10Mu6TpM86W3qAcw-1 X-Mimecast-Spam-Score: 0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Thomas Huth While working on the travis.yml file, I've run into cases where all tests are reported as "SKIP" by the run_test.sh script (e.g. when QEMU could not be started). This should not result in a successful test run, so mark it as failed if not at least one test passed. Signed-off-by: Thomas Huth Reviewed-by: Alex Bennée Message-Id: <20191113112649.14322-6-thuth@redhat.com> Signed-off-by: David Hildenbrand --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 6858c3a..4162366 100644 --- a/.travis.yml +++ b/.travis.yml @@ -116,3 +116,4 @@ script: - make -j3 - ACCEL="${ACCEL:-tcg}" ./run_tests.sh -v $TESTS | tee results.txt - if grep -q FAIL results.txt ; then exit 1 ; fi + - if ! grep -q PASS results.txt ; then exit 1 ; fi