From patchwork Wed Feb 5 09:37:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 11365963 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 92FD2138D for ; Wed, 5 Feb 2020 09:39:12 +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 6FA5121741 for ; Wed, 5 Feb 2020 09:39:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="tmwkQ7XX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6FA5121741 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.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 1izH8D-0007kO-Sf; Wed, 05 Feb 2020 09:38:01 +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 1izH8C-0007kJ-7A for xen-devel@lists.xenproject.org; Wed, 05 Feb 2020 09:38:00 +0000 X-Inumbo-ID: 31bf7a74-47fb-11ea-90ae-12813bfff9fa Received: from smtp-fw-9101.amazon.com (unknown [207.171.184.25]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 31bf7a74-47fb-11ea-90ae-12813bfff9fa; Wed, 05 Feb 2020 09:37:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1580895480; x=1612431480; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ZxZdUktzqPrd8a47hhi2nVCeq4+JLMmc/G1tqqMpNe4=; b=tmwkQ7XX4HBm6Y8X35vu0m4RJa8P/1pZLNDbrMMA1LZuNjLCA3J4ZsCZ tGa5mu/jN+xPQccCHAMOmYNlWclWuWU5RTx2NcIR8PFjxiSxOc1I4oljz AxDwSxwjVRXqAXr0VtemZNuO9x8Yx6cNBu0nUhNAoSqCiaEKPeW5sQj9K M=; IronPort-SDR: Ip7YIjIbDtFFnzQ89+7gOTiYxP0CoMYibgm3e0xsKSWXOCyHcwVRY9Q7DDo2WzmZMU83iIj/+R 4iQYTE7jvCxw== X-IronPort-AV: E=Sophos;i="5.70,405,1574121600"; d="scan'208";a="14764432" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1e-62350142.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP; 05 Feb 2020 09:37:30 +0000 Received: from EX13MTAUEA002.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1e-62350142.us-east-1.amazon.com (Postfix) with ESMTPS id 98009A2A90; Wed, 5 Feb 2020 09:37:29 +0000 (UTC) Received: from EX13D32EUB003.ant.amazon.com (10.43.166.165) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1236.3; Wed, 5 Feb 2020 09:37:29 +0000 Received: from EX13MTAUEA001.ant.amazon.com (10.43.61.82) by EX13D32EUB003.ant.amazon.com (10.43.166.165) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 5 Feb 2020 09:37:28 +0000 Received: from u2f063a87eabd5f.cbg10.amazon.com (10.125.106.135) by mail-relay.amazon.com (10.43.61.243) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 5 Feb 2020 09:37:26 +0000 From: Paul Durrant To: Date: Wed, 5 Feb 2020 09:37:24 +0000 Message-ID: <20200205093724.2854-1-pdurrant@amazon.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [PATCH] libxl: fix assertion failure in stub domain creation X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Anthony PERARD , Paul Durrant , Ian Jackson , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" An assertion in libxl__domain_make(): 'soft_reset || *domid == INVALID_DOMID' does not hold true for stub domain creation, where soft_reset is false but the passed in domid == 0. This is easily fixed by changing the initializer in libxl__spawn_stub_dm(). Fixes: 75259239d85d ("libxl_create: make 'soft reset' explicit") Signed-off-by: Paul Durrant Acked-by: Anthony PERARD --- Cc: Ian Jackson Cc: Wei Liu Cc: Anthony PERARD Cc: Roger Pau Monné An example of the assertion failure can be seen at: http://logs.test-lab.xenproject.org/osstest/logs/146726/test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm/10.ts-debian-hvm-install.log --- tools/libxl/libxl_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index f758daf3b6..3b1da90167 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -2127,7 +2127,7 @@ void libxl__spawn_stub_dm(libxl__egc *egc, libxl__stub_dm_spawn_state *sdss) goto out; } - sdss->pvqemu.guest_domid = 0; + sdss->pvqemu.guest_domid = INVALID_DOMID; libxl_domain_create_info_init(&dm_config->c_info); dm_config->c_info.type = LIBXL_DOMAIN_TYPE_PV;