From patchwork Wed Mar 11 17:20:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 11432359 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 CF59B1392 for ; Wed, 11 Mar 2020 17:22:28 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 764CD20736 for ; Wed, 11 Mar 2020 17:22:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="fB9RA6TZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 764CD20736 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jC524-0002z1-RU; Wed, 11 Mar 2020 17:20:36 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jC523-0002yw-Fe for xen-devel@lists.xenproject.org; Wed, 11 Mar 2020 17:20:35 +0000 X-Inumbo-ID: 9d7c516a-63bc-11ea-b027-12813bfff9fa Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 9d7c516a-63bc-11ea-b027-12813bfff9fa; Wed, 11 Mar 2020 17:20:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1583947234; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=/BjKoiOIXnCoIb8GyzLHLIBG3RMyNlkDODrdMAM2RvA=; b=fB9RA6TZASZQ1g00lBnTlch1Dnh+hLeoSRvhUJizC8bHQlolgx4azN6f MdX//w2Mhpm+EREl15O0lLbWGQDiD6AavV/sI7Zkf/hUPvglXvreLfQxY iQvYOc2HsU2ct57geS04PEgQwkz5iTxw8I58TKmLM6UiPDq32YSvVAS4M c=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: SrKN8Y1KjoHEREBvJ9hmkGKFH7+0qpETGtNRhnlPEKPI+HVEaL+rZnPgOr0X57UAkVYJ04P54B tKCG3rVh2fb40BXpn2qSJQJh1SOED0gc8qDV54xJpuhhCHAa89vS7d4+Y1H8hqVVEd6ZZwe0j9 Y1XbWGV0R4S2E/xL/1vqCaAvdN2bPjvzx+tH7A4xPSRbRLFaEawj1aZjS+jsnuh5yWIx/Z7x21 P6dJJAMk0WMY1JXjGoV2j+lsnLN4Uzre2XoGT9STzY7/wy8BuB9ooqwTBH8DWaBkN5FYaRMmzB GVE= X-SBRS: 2.7 X-MesageID: 13794323 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,541,1574139600"; d="scan'208";a="13794323" From: Roger Pau Monne To: Date: Wed, 11 Mar 2020 18:20:05 +0100 Message-ID: <20200311172010.7777-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH OSSTEST v5 1/5] host: introduce modify_host X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: ian.jackson@eu.citrix.com, Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Abstract the set_property checks and DB call into a helper. No functional change. Signed-off-by: Roger Pau Monné Reviewed-by: Ian Jackson --- Requested on IRC: 17:09:30 Diziet Also if it were me I would put the modify_host refactoring in its own nfc patch, but I won't insist on that... --- changes since v4: - New in this version. --- Osstest/HostDB/Executive.pm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Osstest/HostDB/Executive.pm b/Osstest/HostDB/Executive.pm index 7ffca6c4..d402bcac 100644 --- a/Osstest/HostDB/Executive.pm +++ b/Osstest/HostDB/Executive.pm @@ -51,6 +51,16 @@ END } } +sub modify_host ($$$) { + my ($hd, $ho, $query) = @_; + my $blessing = intended_blessing(); + + die "Attempting to modify host with intended blessing $blessing != real" + if $blessing ne "real"; + + db_retry($dbh_tests, [qw(resources)], $query); +} + sub set_property($$$$) { my ($hd, $ho, $prop, $val) = @_; my $rmq = $dbh_tests->prepare(<execute($ho->{Name}, $prop); if (length $val) { $addq->execute($ho->{Name}, $prop, $val); From patchwork Wed Mar 11 17:20:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 11432363 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 5FC8B14B7 for ; Wed, 11 Mar 2020 17:22:29 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0769620746 for ; Wed, 11 Mar 2020 17:22:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="X38EqW4V" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0769620746 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jC526-0002zC-3i; Wed, 11 Mar 2020 17:20:38 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jC525-0002z7-60 for xen-devel@lists.xenproject.org; Wed, 11 Mar 2020 17:20:37 +0000 X-Inumbo-ID: 9ef52f8a-63bc-11ea-a6c1-bc764e2007e4 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9ef52f8a-63bc-11ea-a6c1-bc764e2007e4; Wed, 11 Mar 2020 17:20:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1583947236; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ull+dy34N/MPjwzwky5Fi1qaIR1ACu8/L8uLhFr4S0k=; b=X38EqW4VQyt9HUOQI6pz3EXUGVm8VNe0LJrdigOqoqI4tNu8PfC/5fNB ElxssXzL0JWSugEhzkLjQSZ/OofbaIcyxDOdYk2uqbi9AQ/ixmWCt92u4 EcVjRIzotV+cIMqKL4IaHdIswVs7nEgItD3VC6v8GtYe36kvw6NNwW3J1 4=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa4.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: 9A5CT1XPAqn22yzNo8yTIgTiJhOA1WuYw0KGmvCc7Q1QM8EUa9OBelPaYuRlJhwWcAylnkiWhk 5lbMrI5UD/SZgSPW8lCVq1FueAvl4Vo5tlHIih9kaZJQSwfKuY/Yt0P8E6I3XS0mCLyFS3k9VF yV3H2/AsOJNss2qSQX56XwDgS+otcTOAf7nkVteQPEelPktKU06yA+OtkUCBSeUZZJCpr4IQS1 G46U6Y9w5NFG6xhyv2TSkVSNSZzDU2GOD4i3izWGUkYnvmAEpCdcVtYCOeS+rgTO8QMLjwfOSz 3ss= X-SBRS: 2.7 X-MesageID: 14418290 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,541,1574139600"; d="scan'208";a="14418290" From: Roger Pau Monne To: Date: Wed, 11 Mar 2020 18:20:07 +0100 Message-ID: <20200311172010.7777-3-roger.pau@citrix.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200311172010.7777-1-roger.pau@citrix.com> References: <20200311172010.7777-1-roger.pau@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH OSSTEST v5 3/5] ts-examine-hostprops-save: record hostflags also X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: ian.jackson@eu.citrix.com, Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Commit putative hotflags into the database if present on the runvars. Signed-off-by: Roger Pau Monné Reviewed-by: Ian Jackson --- Changes since v4: - New in this version. --- Requested by Ian on IRC: 17:08:58 Diziet royger: I think your ts-examine-hostprops-save hunk in 2/ belongs in 1/ ? (Or in a separate 1.5/ along with hostflag_putative_record.) --- Osstest/TestSupport.pm | 8 +++++++- ts-examine-hostprops-save | 23 ++++++++++++++--------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index ceb6bb7b..1c13e2af 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -86,7 +86,7 @@ BEGIN { power_state power_cycle power_reboot_attempts serial_fetch_logs set_host_property modify_host_flag propname_massage propname_check - hostprop_putative_record + hostprop_putative_record hostflag_putative_record get_stashed open_unique_stashfile compress_stashed dir_identify_vcs @@ -1417,6 +1417,12 @@ sub modify_host_flag ($$$) { $mhostdb->modify_flag($ho, $flag, $set); } +sub hostflag_putative_record ($$$) { + my ($ho, $prop, $set) = @_; + + store_runvar("hostflag/$ho->{Ident}/$prop", !!$set); +} + sub get_target_property ($$;$); sub get_target_property ($$;$) { my ($ho, $prop, $defval) = @_; diff --git a/ts-examine-hostprops-save b/ts-examine-hostprops-save index 55d23392..e50ea7fb 100755 --- a/ts-examine-hostprops-save +++ b/ts-examine-hostprops-save @@ -27,20 +27,25 @@ tsreadconfig(); our $blessing = intended_blessing(); -logm("setting host properties"); +logm("setting host properties and flags"); # NB: in order to aid debug only attempt to save the host props on flights # with intended real blessing, for the rest just do a dry run. our $dry_run = $blessing ne "real"; -logm("not saving host props with intended blessing $blessing != real") +logm("not saving host props/flags with intended blessing $blessing != real") if $dry_run; foreach my $k (sort keys %r) { - next unless $k =~ m/^hostprop\/([^\/]*)\/([^\/]*)$/; - my $ho = selecthost($1); - my $prop = $2; - - logm("recording for $ho->{Name} $prop=$r{$k}"); - - set_host_property($ho, $prop, $r{$k}) if !$dry_run; + next unless $k =~ m/^host(prop|flag)\/([^\/]*)\/([^\/]*)$/; + my $type = $1; + my $ho = selecthost($2); + my $prop = $3; + + if ($type eq "flag") { + logm("recording flag $prop set: $r{$k} for $ho->{Name}"); + modify_host_flag($ho, $prop, !!$r{$k}) if !$dry_run; + } else { + logm("recording prop for $ho->{Name} $prop=$r{$k}"); + set_host_property($ho, $prop, $r{$k}) if !$dry_run; + } } From patchwork Wed Mar 11 17:20:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 11432367 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 C46B614B7 for ; Wed, 11 Mar 2020 17:22:37 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B61E20736 for ; Wed, 11 Mar 2020 17:22:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="efZDZSGd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B61E20736 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jC52V-00034K-Vc; Wed, 11 Mar 2020 17:21:03 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jC52V-000347-5J for xen-devel@lists.xenproject.org; Wed, 11 Mar 2020 17:21:03 +0000 X-Inumbo-ID: ae9228f8-63bc-11ea-b027-12813bfff9fa Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id ae9228f8-63bc-11ea-b027-12813bfff9fa; Wed, 11 Mar 2020 17:21:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1583947262; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sLtREZEZlLC3yG0EYRrHTKiKUb68+Sp17JtPH4fHjhs=; b=efZDZSGdfQwcY3Ew3k8JyDqb2+7g8hUjQ5kKTZetap/qEpWQJFAU342l BCe/VfddpdYKya5m3CSRChKhaEu9kFng8a3pVUwKgcjjE1TsllKwBWm0k KPoqoCinMVyFYEcxv6n/lHhIs8imwj9zH3EK1Rb1F3eMeTiIcDatlIdgL o=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa4.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: I92wLXCwNnoqMOytSPOjtlw119r2p1RCy2ebfdZZguufx49Td7XxkzaCRVy+M3D9KZPBOT5G0E 7p0NmWTs5Th+0HEv3XbXwrRkjK1rAVOm2+cPVg4//Tc36PUqSUGX1a0nQkMbOaJ4DqR+i0WgAW hxqGwuw6LVA4jEUI9YCE4loXoHU3HzajkQo3chTsaTZyvDf8l51nY6OdOe1kMi7ssf/NYK2IBC EIebBMtwqxYjcQdYtoiTBj4Tg5khOEFcejNhYfvCzA82EldJViIiUCXIJCXZACm5/IPPshWIQv sa0= X-SBRS: 2.7 X-MesageID: 14418296 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,541,1574139600"; d="scan'208";a="14418296" From: Roger Pau Monne To: Date: Wed, 11 Mar 2020 18:20:08 +0100 Message-ID: <20200311172010.7777-4-roger.pau@citrix.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200311172010.7777-1-roger.pau@citrix.com> References: <20200311172010.7777-1-roger.pau@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH OSSTEST v5 4/5] examine: detect IOMMU availability and add it as a hostflag X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: ian.jackson@eu.citrix.com, Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Introduce a new test to check for iommu availability and add it as a hostflag if found. Signed-off-by: Roger Pau Monné --- Changes since v4: - Split out code into separate patches. Changes since v3: - Fail if `xl info` command fails. Changes since v2: - Allow flags to be removed. - Fix set_flag addition to HostBD/Static.pm. --- sg-run-job | 1 + ts-examine-iommu | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100755 ts-examine-iommu diff --git a/sg-run-job b/sg-run-job index 7c58d4ba..f6bfdfd5 100755 --- a/sg-run-job +++ b/sg-run-job @@ -679,6 +679,7 @@ proc examine-host-examine {install} { if {$ok} { run-ts -. = ts-examine-serial-post + host run-ts . = ts-examine-logs-save + host + run-ts . = ts-examine-iommu + host run-ts . = ts-examine-hostprops-save } } diff --git a/ts-examine-iommu b/ts-examine-iommu new file mode 100755 index 00000000..099d4be5 --- /dev/null +++ b/ts-examine-iommu @@ -0,0 +1,32 @@ +#!/usr/bin/perl -w +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2009-2020 Citrix Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +use strict qw(vars); +BEGIN { unshift @INC, qw(.); } +use Osstest; +use Osstest::TestSupport; + +tsreadconfig(); + +our ($whhost) = @ARGV; +$whhost ||= 'host'; +our $ho= selecthost($whhost); +our $info = target_cmd_output_root($ho, 'xl info', 10); +our $has_iommu = $info =~ /directio/; + +logm("$ho->{Ident} iommu: $has_iommu"); +hostflag_putative_record($ho, "iommu", $has_iommu); From patchwork Wed Mar 11 17:20:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 11432365 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 647D91731 for ; Wed, 11 Mar 2020 17:22:29 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 075DD20736 for ; Wed, 11 Mar 2020 17:22:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="RCTWZa3z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 075DD20736 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jC52D-0002zx-Ld; Wed, 11 Mar 2020 17:20:45 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jC52D-0002zk-8g for xen-devel@lists.xenproject.org; Wed, 11 Mar 2020 17:20:45 +0000 X-Inumbo-ID: a0525679-63bc-11ea-b027-12813bfff9fa Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id a0525679-63bc-11ea-b027-12813bfff9fa; Wed, 11 Mar 2020 17:20:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1583947238; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yPIugyZ+fj++irY3fYM/ZRIAMkQlMlmC6H1RGvWA3ug=; b=RCTWZa3zK1GOw76aD/e8ajKSjuY0LAFvecWuhCHF4lZCLM6gzanjdMMr 3fhArwQ23hB4mFNH7a6xDADeYTOdHNnryYMGc2VfXRYvmzUYz+Lz0p2cL TKp1R7DaTlGxWbGLKNabGy/pxpHTUFfX9YPqGVD65srigdXVpAL4GfN1x g=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: vfiJrD0qOCmRGkD1z8UEWEGGuFS6hWB+B1rcVAotTqbU0eNOhySB8yQbhV2Kc6gqyy8eN7l69r H/upVuWKhqDbeHsKzWx2vZclhsAQcsZSoJOSQ6HDJdwnck8P4wQUbkANJ84heSgtI3tkJOFlPf bEVWWE7DAJtvHePk2SdEx8yV5zR+ufPwfSe9qAyBbUbIARBLQ31oBmAVH5uokHk041T2waMcwk AOp8eSh8zo5GSY9pO2x8tZhNQxKfLlOU4m4PEBm8nAz8zPtpvjqul0MGC94xOrxqsxAGKm7bZc bfs= X-SBRS: 2.7 X-MesageID: 14128994 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,541,1574139600"; d="scan'208";a="14128994" From: Roger Pau Monne To: Date: Wed, 11 Mar 2020 18:20:09 +0100 Message-ID: <20200311172010.7777-5-roger.pau@citrix.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200311172010.7777-1-roger.pau@citrix.com> References: <20200311172010.7777-1-roger.pau@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH OSSTEST v5 5/5] make-flight: add dom0 PVH test X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: ian.jackson@eu.citrix.com, Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Add a dom0 PVH test, the test to be run is launching a PV guest (test-debian). Note the PVH dom0 tests are only enabled for Xen >= 4.13. The runvar difference is: +test-amd64-amd64-dom0pvh-xl-amd all_host_di_version 2020-02-10 +test-amd64-amd64-dom0pvh-xl-intel all_host_di_version 2020-02-10 +test-amd64-amd64-dom0pvh-xl-amd all_host_suite stretch +test-amd64-amd64-dom0pvh-xl-intel all_host_suite stretch +test-amd64-amd64-dom0pvh-xl-amd all_hostflags arch-amd64,arch-xen-amd64,suite-stretch,purpose-test,hvm-amd,iommu +test-amd64-amd64-dom0pvh-xl-intel all_hostflags arch-amd64,arch-xen-amd64,suite-stretch,purpose-test,hvm-intel,iommu +test-amd64-amd64-dom0pvh-xl-amd arch amd64 +test-amd64-amd64-dom0pvh-xl-intel arch amd64 +test-amd64-amd64-dom0pvh-xl-amd buildjob build-amd64 +test-amd64-amd64-dom0pvh-xl-intel buildjob build-amd64 +test-amd64-amd64-dom0pvh-xl-amd debian_arch amd64 +test-amd64-amd64-dom0pvh-xl-intel debian_arch amd64 +test-amd64-amd64-dom0pvh-xl-amd debian_kernkind pvops +test-amd64-amd64-dom0pvh-xl-intel debian_kernkind pvops +test-amd64-amd64-dom0pvh-xl-amd debian_suite stretch +test-amd64-amd64-dom0pvh-xl-intel debian_suite stretch +test-amd64-amd64-dom0pvh-xl-amd kernbuildjob build-amd64-pvops +test-amd64-amd64-dom0pvh-xl-intel kernbuildjob build-amd64-pvops +test-amd64-amd64-dom0pvh-xl-amd kernkind pvops +test-amd64-amd64-dom0pvh-xl-intel kernkind pvops +test-amd64-amd64-dom0pvh-xl-amd toolstack xl +test-amd64-amd64-dom0pvh-xl-intel toolstack xl +test-amd64-amd64-dom0pvh-xl-amd xen_boot_append dom0=pvh,verbose +test-amd64-amd64-dom0pvh-xl-intel xen_boot_append dom0=pvh,verbose Signed-off-by: Roger Pau Monné Reviewed-by: Ian Jackson --- Changes since v1: - Request hosts with iommu flag. --- make-flight | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/make-flight b/make-flight index b08431dc..48f164cc 100755 --- a/make-flight +++ b/make-flight @@ -753,6 +753,16 @@ test_matrix_do_one () { *) test_shim=y ;; esac + # PVH dom0 tests for versions >= 4.13 only + case "$xenbranch" in + xen-3.*-testing) test_dom0pvh=n ;; + xen-4.?-testing) test_dom0pvh=n ;; + xen-4.10-testing) test_dom0pvh=n ;; + xen-4.11-testing) test_dom0pvh=n ;; + xen-4.12-testing) test_dom0pvh=n ;; + *) test_dom0pvh=y ;; + esac + # xend PV guest test on x86 only if [ x$test_xend = xy -a \( $dom0arch = "i386" -o $dom0arch = "amd64" \) ]; then job_create_test test-$xenarch$kern-$dom0arch-pv test-debian xend \ @@ -861,6 +871,20 @@ test_matrix_do_one () { fi + if [ x$test_dom0pvh = xy -a $xenarch = amd64 -a $dom0arch = amd64 ]; then + + for cpuvendor in amd intel; do + + job_create_test test-$xenarch$kern-$dom0arch-dom0pvh-xl-$cpuvendor \ + test-debian xl $xenarch $dom0arch $debian_runvars \ + all_hostflags=$most_hostflags,hvm-$cpuvendor,iommu \ + xen_boot_append='dom0=pvh,verbose' + + done + + fi + + if [ x$test_shim = xy -a $xenarch = amd64 ]; then job_create_test test-$xenarch$kern-$dom0arch-xl-pvshim \