From nobody Wed May 8 13:55:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1575643701; cv=none; d=zohomail.com; s=zohoarc; b=KygU5oW4MUh4t1s9e2cAn6LD0OCZtUQ88a4TfFj9j4XaVCZyi5RM8rWAX0hn5lWmKXvls2Y4Jo3Z+1jwnMN6EPsOPTi1mcsOTBTFoJpyAFiJ5VLtBbaTaFx3Qci0gH6q2voULwiTKPUalM+wbWb+mVsIoACKgzVf7W3mxnbwD2Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575643701; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0ygww+v1oU+33ypIhc68siMy+/iwT5tY9NlCzUkIOiA=; b=MG6mP/CXsuvBn38gcItb9MtczodPLpcHzJWUr80BpDTJ3NKrIFq5H/R8PzcZK7ZGxx/k88m7El5P0rObdd1F6i5y4lhCbC97aB4oI2CG8cJ2SFWuQzeHZhdf1IqFLpY3IOQsq5SfP3ykcGdLaV69wKogaQ3/oOf0BtqEoOY4KXI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1575643701683332.51790847421455; Fri, 6 Dec 2019 06:48:21 -0800 (PST) Received: from localhost ([::1]:38900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idEu2-0000Dc-GV for importer@patchew.org; Fri, 06 Dec 2019 09:48:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59602) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idEOL-0001T3-Lg for qemu-devel@nongnu.org; Fri, 06 Dec 2019 09:15:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1idEOK-0001Zc-DI for qemu-devel@nongnu.org; Fri, 06 Dec 2019 09:15:33 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:46173 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1idEOJ-0001Yh-Jx for qemu-devel@nongnu.org; Fri, 06 Dec 2019 09:15:31 -0500 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-DQjdipU1PaOFvZ-KIQj4Mg-1; Fri, 06 Dec 2019 09:00:18 -0500 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 8DEA2593AB; Fri, 6 Dec 2019 14:00:17 +0000 (UTC) Received: from virtlab501.virt.lab.eng.bos.redhat.com (virtlab501.virt.lab.eng.bos.redhat.com [10.19.152.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id A059E60FC1; Fri, 6 Dec 2019 14:00:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575641731; 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=0ygww+v1oU+33ypIhc68siMy+/iwT5tY9NlCzUkIOiA=; b=A8aApw5nNVPodUplLF5mGvlNUrTv9FBQ+p9DE7UcJuaU2GuqLVLfVZA+07E3Rs8wKSvDjt g6tyRptEfuW2QTfnPWlPfoyb7pq+E8r795XGTKMu5WWqSm2COJB0AoHzCXQBshA2LlFvAj 7yKjsgGE27nHnsfOS/3Fr7KIJ2uE2o8= From: Wainer dos Santos Moschetta To: qemu-devel@nongnu.org Subject: [PATCH 1/2] tests/acceptance: Add PVH boot test Date: Fri, 6 Dec 2019 09:00:11 -0500 Message-Id: <20191206140012.15517-2-wainersm@redhat.com> In-Reply-To: <20191206140012.15517-1-wainersm@redhat.com> References: <20191206140012.15517-1-wainersm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: DQjdipU1PaOFvZ-KIQj4Mg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, alex.bennee@linaro.org, wrampazz@redhat.com, crosa@redhat.com, philmd@redhat.com, sgarzare@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" QEMU 4.0 onward is able to boot an uncompressed kernel image by using the x86/HVM direct boot ABI. It needs Linux >=3D 4.21 built with CONFIG_PVH=3Dy. This introduces an acceptance test which checks an uncompressed Linux kernel image boots properly. Signed-off-by: Wainer dos Santos Moschetta Tested-by: Willian Rampazzo --- tests/acceptance/pvh.py | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 tests/acceptance/pvh.py diff --git a/tests/acceptance/pvh.py b/tests/acceptance/pvh.py new file mode 100644 index 0000000000..c68489c273 --- /dev/null +++ b/tests/acceptance/pvh.py @@ -0,0 +1,48 @@ +# Copyright (c) 2019 Red Hat, Inc. +# +# Author: +# Wainer dos Santos Moschetta +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +""" +x86/HVM direct boot acceptance tests. +""" + +from avocado.utils.kernel import KernelBuild +from avocado_qemu import Test +from avocado_qemu import wait_for_console_pattern + + +class Pvh(Test): + """ + Test suite for x86/HVM direct boot feature. + + :avocado: tags=3Dslow,arch=3Dx86_64,machine=3Dq35 + """ + def test_boot_vmlinux(self): + """ + Boot uncompressed kernel image. + """ + # QEMU can boot a vmlinux image for kernel >=3D 4.21 built + # with CONFIG_PVH=3Dy + kernel_version =3D '5.4.1' + kbuild =3D KernelBuild(kernel_version, work_dir=3Dself.workdir) + try: + kbuild.download() + kbuild.uncompress() + kbuild.configure(targets=3D['defconfig', 'kvmconfig'], + extra_configs=3D['CONFIG_PVH=3Dy']) + kbuild.build() + except: + self.cancel("Unable to build vanilla kernel %s" % kernel_versi= on) + + self.vm.set_machine('q35') + self.vm.set_console() + kernel_command_line =3D 'printk.time=3D0 console=3DttyS0' + self.vm.add_args('-kernel', kbuild.vmlinux, + '-append', kernel_command_line) + self.vm.launch() + wait_for_console_pattern(self, 'Kernel command line: %s' % + kernel_command_line) --=20 2.21.0 From nobody Wed May 8 13:55:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1575641295; cv=none; d=zohomail.com; s=zohoarc; b=BeXmFH/6Mj3V9+M6CLvsM9PmEe0oGdRi/jGL8p2w/5FJN6BlHpcEpWD3nsGN7lnBOGyBrGXC+ILVNNpDpQi7LQHhHW4K1TwhD5j8WZvUx/JWmkoPlqaNdgPawaG5csJvB+XImIjeRB6j3ifbEoeUbKbwn59OIXCi30ZNxTqHGo4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575641295; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uL6xgSKpIW04lcKl/oQ5qUW1xPRml+iMeURzo8n7Duk=; b=brozl1x2GP+hFPHMFU1XLcrszc/b7ECHwVEdcIex8NWuwV/YRSSZWgLh/7zFzdm6WOHEUQy+4gbO69UvMsgGqvqSjhNrS+wBZ8LfTgBwaWUvlcUBCGK6+tDcz7el3Plhh+7ZyMibrp8HGiD+jRMmjaOzvPONpLNakR1NWhZ3e3k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1575641295272177.284159018242; Fri, 6 Dec 2019 06:08:15 -0800 (PST) Received: from localhost ([::1]:37814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idEHF-0001bM-Ct for importer@patchew.org; Fri, 06 Dec 2019 09:08:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48364) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idEGC-0000oX-He for qemu-devel@nongnu.org; Fri, 06 Dec 2019 09:07:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1idEG9-0006gu-Si for qemu-devel@nongnu.org; Fri, 06 Dec 2019 09:07:06 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:47889 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1idEG9-0006fV-Kj for qemu-devel@nongnu.org; Fri, 06 Dec 2019 09:07:05 -0500 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-310-_sgUj_zxOxivOOt7eiW6Uw-1; Fri, 06 Dec 2019 09:00:19 -0500 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 961C81856A6C; Fri, 6 Dec 2019 14:00:18 +0000 (UTC) Received: from virtlab501.virt.lab.eng.bos.redhat.com (virtlab501.virt.lab.eng.bos.redhat.com [10.19.152.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id B0DD160FC1; Fri, 6 Dec 2019 14:00:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575641224; 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=uL6xgSKpIW04lcKl/oQ5qUW1xPRml+iMeURzo8n7Duk=; b=bpXWIkXk9Sg2aiT/LYF/eNws+z1vt7cCJb7sXDsc3PDLMdlOmxZcm9OTylOXkeXTM6E41J BFFTsHYjHpL5W0iCWNUJBXSVHT+0cGel0T0zDr9HalvyVqizI760A79Thj3eDXYj9CKyVa fYipGMFH/AxbpB8DDPBItwi+Pxh1YUw= From: Wainer dos Santos Moschetta To: qemu-devel@nongnu.org Subject: [PATCH 2/2] .travis.yml: Add kernel build deps for acceptance tests Date: Fri, 6 Dec 2019 09:00:12 -0500 Message-Id: <20191206140012.15517-3-wainersm@redhat.com> In-Reply-To: <20191206140012.15517-1-wainersm@redhat.com> References: <20191206140012.15517-1-wainersm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: _sgUj_zxOxivOOt7eiW6Uw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, alex.bennee@linaro.org, wrampazz@redhat.com, crosa@redhat.com, philmd@redhat.com, sgarzare@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The tests/acceptance/pvh.py test builds the Linux kernel at runtime so it needs dependencies installed in the container. Current used container image misses only libelf-dev, which is then added with this change. Signed-off-by: Wainer dos Santos Moschetta --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 445b0646c1..d8fe98eb63 100644 --- a/.travis.yml +++ b/.travis.yml @@ -277,6 +277,8 @@ matrix: - python3.5-venv - tesseract-ocr - tesseract-ocr-eng + # Additional kernel build dependencies + - libelf-dev =20 =20 # Using newer GCC with sanitizers --=20 2.21.0