From patchwork Fri Jul 2 11:48:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Varad Gautam X-Patchwork-Id: 12356011 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BAA1CC11F6E for ; Fri, 2 Jul 2021 11:48:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C86A61416 for ; Fri, 2 Jul 2021 11:48:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232055AbhGBLvY (ORCPT ); Fri, 2 Jul 2021 07:51:24 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:32972 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232021AbhGBLvX (ORCPT ); Fri, 2 Jul 2021 07:51:23 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 7BA1822982; Fri, 2 Jul 2021 11:48:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1625226530; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oQFJfMtJ7d44u/Eg9demA0543TOxxcunVlC/ArZcDv0=; b=o4x9NiSgX+HD1y+cGs/NAtT0HAa569xMwAnQBHAA5HKhlnRdlykHhBczJHNXLbMZ1xG6Uy bYECwfUOYzpioSUoN/tgTr5/bYGhP9JbITbGLjRUQ1gvUYUMoRI0P24FtzV09AoG/xW63b Q9ixPWR0fbsQJ5pyEpOs3MkaxxUwwE0= Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 1C24B11C84; Fri, 2 Jul 2021 11:48:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1625226530; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oQFJfMtJ7d44u/Eg9demA0543TOxxcunVlC/ArZcDv0=; b=o4x9NiSgX+HD1y+cGs/NAtT0HAa569xMwAnQBHAA5HKhlnRdlykHhBczJHNXLbMZ1xG6Uy bYECwfUOYzpioSUoN/tgTr5/bYGhP9JbITbGLjRUQ1gvUYUMoRI0P24FtzV09AoG/xW63b Q9ixPWR0fbsQJ5pyEpOs3MkaxxUwwE0= Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id SOhgBSL93mDDDAAALh3uQQ (envelope-from ); Fri, 02 Jul 2021 11:48:50 +0000 From: Varad Gautam To: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Cc: pbonzini@redhat.com, drjones@redhat.com, jroedel@suse.de, bp@suse.de, thomas.lendacky@amd.com, brijesh.singh@amd.com, varad.gautam@suse.com Subject: [kvm-unit-tests PATCH 6/6] x86: Disable some breaking tests for EFI and modify vmexit test Date: Fri, 2 Jul 2021 13:48:20 +0200 Message-Id: <20210702114820.16712-7-varad.gautam@suse.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210702114820.16712-1-varad.gautam@suse.com> References: <20210702114820.16712-1-varad.gautam@suse.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Disable some tests from building on EFI. These fail early, and need some adaptation (eg. inline asm changes / AP initialization / memory reclamation from EFI). Eg, asyncpf: runs out of memory since the allocator only uses the largest EFI_CONVENTIONAL_MEMORY block. hyperv_*: untested with EFI. vmexit: breaks since test arg passing isn't enabled - enable it except for pci-* cases since iomem needs more fixups. Signed-off-by: Varad Gautam --- x86/Makefile.common | 21 +++++++++++---------- x86/vmexit.c | 7 +++++++ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/x86/Makefile.common b/x86/Makefile.common index 98d8de9..b995a67 100644 --- a/x86/Makefile.common +++ b/x86/Makefile.common @@ -62,17 +62,18 @@ FLATLIBS = lib/libcflat.a @chmod a-x $@ tests-flatonly = $(TEST_DIR)/realmode.$(out) $(TEST_DIR)/eventinj.$(out) \ - $(TEST_DIR)/smap.$(out) $(TEST_DIR)/umip.$(out) - -tests-common = $(TEST_DIR)/vmexit.$(out) $(TEST_DIR)/tsc.$(out) \ - $(TEST_DIR)/smptest.$(out) $(TEST_DIR)/msr.$(out) \ - $(TEST_DIR)/hypercall.$(out) $(TEST_DIR)/sieve.$(out) \ - $(TEST_DIR)/kvmclock_test.$(out) $(TEST_DIR)/s3.$(out) \ + $(TEST_DIR)/smap.$(out) $(TEST_DIR)/umip.$(out) \ + $(TEST_DIR)/kvmclock_test.$(out) $(TEST_DIR)/hypercall.$(out) \ + $(TEST_DIR)/init.$(out) \ + $(TEST_DIR)/asyncpf.$(out) $(TEST_DIR)/hyperv_synic.$(out) \ + $(TEST_DIR)/hyperv_stimer.$(out) $(TEST_DIR)/hyperv_connections.$(out) + +tests-common = $(TEST_DIR)/tsc.$(out) $(TEST_DIR)/smptest.$(out) \ + $(TEST_DIR)/msr.$(out) $(TEST_DIR)/sieve.$(out) \ + $(TEST_DIR)/sieve.$(out) $(TEST_DIR)/s3.$(out) \ $(TEST_DIR)/pmu.$(out) $(TEST_DIR)/setjmp.$(out) \ - $(TEST_DIR)/tsc_adjust.$(out) $(TEST_DIR)/asyncpf.$(out) \ - $(TEST_DIR)/init.$(out) $(TEST_DIR)/hyperv_synic.$(out) \ - $(TEST_DIR)/hyperv_stimer.$(out) $(TEST_DIR)/hyperv_connections.$(out) \ - $(TEST_DIR)/tsx-ctrl.$(out) + $(TEST_DIR)/tsc_adjust.$(out) $(TEST_DIR)/tsx-ctrl.$(out) \ + $(TEST_DIR)/vmexit.$(out) ifneq ($(CONFIG_EFI),y) tests-common += $(tests-flatonly) diff --git a/x86/vmexit.c b/x86/vmexit.c index 999babf..4062f7a 100644 --- a/x86/vmexit.c +++ b/x86/vmexit.c @@ -560,6 +560,12 @@ static void enable_nx(void *junk) static bool test_wanted(struct test *test, char *wanted[], int nwanted) { +#ifdef CONFIG_EFI + if (strcmp(test->name, "pci-io") == 0 || strcmp(test->name, "pci-mem") == 0 ) + return false; + + return true; +#else int i; if (!nwanted) @@ -570,6 +576,7 @@ static bool test_wanted(struct test *test, char *wanted[], int nwanted) return true; return false; +#endif } int main(int ac, char **av)