From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Xu Subject: Re: [kvm-unit-tests PATCH 12/14] x86: intel-iommu: add dmar test Date: Thu, 20 Oct 2016 13:41:00 +0800 Message-ID: <20161020054100.GF15168@pxdev.xzpeter.org> References: <1476448852-30062-1-git-send-email-peterx@redhat.com> <1476448852-30062-13-git-send-email-peterx@redhat.com> <20161019203353.GD8573@potion> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: kvm@vger.kernel.org, jan.kiszka@web.de, agordeev@redhat.com, drjones@redhat.com, pbonzini@redhat.com To: Radim =?utf-8?B?S3LEjW3DocWZ?= Return-path: Received: from mx1.redhat.com ([209.132.183.28]:60272 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753115AbcJTFlF (ORCPT ); Thu, 20 Oct 2016 01:41:05 -0400 Content-Disposition: inline In-Reply-To: <20161019203353.GD8573@potion> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Oct 19, 2016 at 10:33:53PM +0200, Radim Krčmář wrote: > 2016-10-14 20:40+0800, Peter Xu: [...] > > int main(int argc, char *argv[]) > > { > > + int ret; > > + pci_edu_dev_t dev; > > + > > setup_vm(); > > smp_init(); > > setup_idt(); > > @@ -37,5 +76,18 @@ int main(int argc, char *argv[]) > > vtd_enable_ir(); > > report("IR enablement", vtd_status() & VTD_GCMD_IR); > > > > + report("DMAR support 39 bits address width", > > + vtd_cap() & VTD_CAP_SAGAW); > > + > > + report("DMAR support huge pages", vtd_cap() & VTD_CAP_SLLPS); > > + > > + ret = edu_init(&dev); > > + if (ret) { > > + printf("Please specify \"-device edu\" to test IOMMU.\n"); > > + return -1; > > The test did something before this point, so we should print a summary > before exiting. Probably the best thing would be to report_skip() the > following tests, because the device needed for them couldn't be found. Sounds reasonable. Will fix. Thanks! -- peterx