From patchwork Fri Jun 18 10:20:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 12330929 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=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 10BA7C48BDF for ; Fri, 18 Jun 2021 10:21:20 +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 9D95C61241 for ; Fri, 18 Jun 2021 10:21:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D95C61241 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.144403.265783 (Exim 4.92) (envelope-from ) id 1luBca-0005eK-4l; Fri, 18 Jun 2021 10:21:08 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 144403.265783; Fri, 18 Jun 2021 10:21:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1luBca-0005eD-04; Fri, 18 Jun 2021 10:21:08 +0000 Received: by outflank-mailman (input) for mailman id 144403; Fri, 18 Jun 2021 10:21:06 +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.92) (envelope-from ) id 1luBcY-0005e6-9c for xen-devel@lists.xenproject.org; Fri, 18 Jun 2021 10:21:06 +0000 Received: from de-smtp-delivery-102.mimecast.com (unknown [194.104.109.102]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 84f872d9-f83e-47d7-87e9-0ea5af0b22d7; Fri, 18 Jun 2021 10:21:04 +0000 (UTC) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01lp2051.outbound.protection.outlook.com [104.47.1.51]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-23-ifoYLjiJO5mrmltFyfeC1Q-1; Fri, 18 Jun 2021 12:21:02 +0200 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by VI1PR04MB6862.eurprd04.prod.outlook.com (2603:10a6:803:130::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.21; Fri, 18 Jun 2021 10:21:01 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::f06c:6f5d:34d2:1c36]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::f06c:6f5d:34d2:1c36%5]) with mapi id 15.20.4242.021; Fri, 18 Jun 2021 10:21:00 +0000 Received: from [10.156.60.236] (37.24.206.209) by PR0P264CA0163.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19 via Frontend Transport; Fri, 18 Jun 2021 10:21:00 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 84f872d9-f83e-47d7-87e9-0ea5af0b22d7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624011663; 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; bh=dAYCbiHz5W5de7kCOn2UsXKOpDE9eB18Ff1fPYV212I=; b=EsV17lEyp9C3Yu8gmZSo/x8qacCCHafpDZAZyNbugb7RgqLYDBp92vQ8b9Hx/h7XBeVNHN kWjpF1UcmYaX8It9lOwpP7ww7aMuQIwU2/R3bBhLmDMTdd9LgqOJwHEGopl2gzjGUqVkCh pEGznZdRukNKpUNL8u+mRvpJ1oOIHRY= X-MC-Unique: ifoYLjiJO5mrmltFyfeC1Q-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J1nhdtDduAVF4aythp+atH//rtvnSiSOvZb6nWjvrrpI5PadJ+0jLvyxJRauY2QxFDLwM/39SClHRYDRtVa9YfJ4tSyDD8Fju0W4vcu/WNXKmLWbWjjowXmtMWxdSfMGaQzBXS4zyZ0Rwgsqlpmnjh+dXT97I2otquA0jTU90El2lOWzvln+sUkBp78vUvNkPSOnJ7krLQkMLYwzz5DwSMfI7oj+H/CZc4QrwCFYbbh6hkzA3lTrPd3bpszRp9tkDiK2fbY4e165g9sf+TFh1R94Nz2zOjhZIXIUawNTXGjlXMDN13YPHyE+YSYCkeE1K5QVgElfDUTl7zsYl2ucPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dAYCbiHz5W5de7kCOn2UsXKOpDE9eB18Ff1fPYV212I=; b=DJ7BH0L9TrbJR8pt4ex5xyySk/lVI118/aeHq+9kImMUVdDhzoLSUfzcvmackcyGEEgkYy7h3nFUsSeYfBjmWqCYApN3fn+fo2gYnsDJDzaaexdXPcTIyA/6krKeIAgxbiAJ9l4fAjbYME7+pXu8wUzl7f8VIJW1MhnxlKVZOLiCe6Srz9lgBsUbz4ENJ7eHw1rSBduUhM0UYkSuIWwsn95SHtfNDzU0D8lVFKcBjYWy7F371sieHGLQVXGUwSqPyRg2LoHU1aJsiYL7gMns+AAe24tSj5GzGgMm0GqDbtQfSAiMy/M0aotHgjWIINwHLu8dbQp2atsT25Eu9q+T5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=suse.com; Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Ian Jackson , Juergen Gross From: Jan Beulich Subject: [PATCH 0/5] allow xc_domain_maximum_gpfn() to observe full GFN value To: "xen-devel@lists.xenproject.org" Message-ID: Date: Fri, 18 Jun 2021 12:20:58 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 Content-Language: en-US X-Originating-IP: [37.24.206.209] X-ClientProxiedBy: PR0P264CA0163.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1b::31) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 54da9493-b0a5-49dc-ac73-08d93242c536 X-MS-TrafficTypeDiagnostic: VI1PR04MB6862: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8sq7yEMyN6MrBOnU5HividyYGQRo78kE379aEmBT/QorjbmGitHwrzTo9uj3jm/kFY/7n8/fN4ETVzdSyPjrEXTRiZkIPstVaNCqokKM43TiKy+KLIiPVTLRnzpRQmRujkMldhuMRmwfeYAr/laUeOdVTD7uI6Kqr1CWUSfdJi1EZPHTZ3q0QfH3/tCLzaGHPFNnEeBFQXEuJgic5zxDXpi/B1SGoQGhl3aB+sfC1nZrb3+t7ucRiOTzZjLq/F1qYm24KsRKCzZHZ5EJmKTiHJgNRSRw0yJvNEbzp5MIjCthG2o9rACXuY4DSyCiE0cP0/+fZPxuv1cSqnwnIBr5a7J09q/YJ8Tj4dylcUQqQsomK/kFvFf6P7TZHeF4dRS0bH0zJgbwXxOWz1sZoT+Ta3UjUm4PT/xcKFL9ofwHZnBSkaWgAZzrYcG7yPC/UV6KXo8Yu0ehrK59U3UGViPePtLOcmRiH7qF+AXm7lnX3FQBcjdCm1P1zq71dx3REJnkqRpZX9jyc6i8Ig8KmG/FfqfI7I+6AtuNuKV4K5gMtqw+dmfmS2vt1OM2WNUuqf29g80riISVU46Xg4a1KRjFCfVZ9keylcYXshrJjqoPLfZxCfzZ+GPwPfYceknqN10YTTuaI+j2iAyoXIbU3v1Qu3W0yBZRwDNR1UQ+DslDEFv9nDkhhlVyF6SzvLyq+Gif X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(136003)(39860400002)(346002)(366004)(376002)(396003)(66946007)(26005)(2616005)(4326008)(66556008)(316002)(6916009)(956004)(107886003)(31686004)(8676002)(36756003)(38100700002)(186003)(2906002)(86362001)(16526019)(83380400001)(54906003)(5660300002)(16576012)(66476007)(8936002)(6486002)(478600001)(31696002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 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?utf-8?q?/zCBUGDEuEotMYbfDJYk1nknPgIVR49orCmW/rgJZ2cPRLthgNMjB7i1RCyPn3Ocq?= =?utf-8?q?tu58RDC3Tk0gsru4GP3A0o7v7tNOqjHgRFSRQEgXHm6vYMH89j2lPYJ6OE0zEhisC?= =?utf-8?q?y7JAy9SW0wMNr35KXIBn8vWOsZifrtXdVmqPqThK8QB09wK1jWha1JnneE/OIMVO+?= =?utf-8?q?BB20iXd6CtCF592Ejku81v/El72E2lNIKcuKXUodifQgVN0z5aiodOR6lt4KWPW7X?= =?utf-8?q?Lc2+WEEX5yeKSdDDdmxUEAUMiHdMydMnEQx08EFu4VBce6Fx5RBf1Rh/NxVq/02Se?= =?utf-8?q?uLTbTfwjKO4V/y5n/gxKBrWnNEaA8dIxxQC7QrUi2cjl6g4JlsrLNgS1AIB0ZX6du?= =?utf-8?q?pKl3cnn/By2wGpEmkjYEtx73sGie4csRw1bvonD9r8ga19Mg0Z7uPWxWA8c8LIQ0n?= =?utf-8?q?v+yb/xEhpjm5+QUZ?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54da9493-b0a5-49dc-ac73-08d93242c536 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2021 10:21:00.8850 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tPGA83IGLh8q+g+Ox93WLsZZF7IAib4Nq85pBthzvUEufDjNTNTgve2oGNfWXjsM+Qf+eoSRjrYoUQS22IyR8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6862 The present remaining osstest failures are due to truncation of the GFN resulting from the hypercall return value being passed back through the ioctl() return value (on Linux and Solaris), which is "int", plus the same for some further internal interfaces (osdep_hypercall(), xencall()). Some of the memory-op sub-ops, like the one involved here, may pass back values which don't fit into "int". Different effects can be observed with a 32- and 64-bit tool stack, each causing one test to fail. The changes here will only deal with the truncation resulting when sizeof(int) < sizeof(long), i.e. only on 64-bit. For the 32-bit tool stack case to work in such a situation, yet uglier hackery would be needed. But even if the full value got passed back, we'd then hit: #ifdef __i386__ /* Very large domains (> 1TB) will exhaust virtual address space. */ if ( nr_pfns > 0x0fffffff ) { errno = E2BIG; PERROR("Cannot save this big a guest"); return -1; } #endif in xg_sr_save_x86_hvm.c:x86_hvm_setup() (and there's a similar check on the restore path). I wonder in how far a guest property can legitimately cause an osstest push to be prevented by causing a failure like this one. And of course I'm also puzzled by the ovmf change having managed to make it through its push gate. Note that I can't tell at this point whether there aren't further issues, as I've not actually tried the ovmf case. I could easily see there being oom issues there then, once to full value gets used for setting up the p2m monitoring during migration. Or processing might then take overly long. 1: x86/HVM: wire up multicalls 2: libxencall: osdep_hypercall() should return long 3: libxencall: introduce variant of xencall2() returning long 4: libxc: use multicall for memory-op on Linux (and Solaris) 5: libxc: make xc_domain_maximum_gpfn() endianness-agnostic Jan