From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, 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 D2D9CC2D0E4 for ; Thu, 19 Nov 2020 12:03:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 75F56246D3 for ; Thu, 19 Nov 2020 12:03:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="o7fkJ6Ft" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727115AbgKSMDY (ORCPT ); Thu, 19 Nov 2020 07:03:24 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:46830 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726495AbgKSMDX (ORCPT ); Thu, 19 Nov 2020 07:03:23 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0AJC1juS015700; Thu, 19 Nov 2020 07:02:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=LhudYgp7LwyrzB9nzt7AbefNHLUSPXxp2TUOfBUDXPo=; b=o7fkJ6FtiGRijn5pIBAGGina1Qkkr4fdwDVKkAbDO/AV01TwrzuCzH5q/J204nfAucNa rSDhumvhzocyOnYOe8/BJRE9br990fWreOtVQuqohH0GuHLuJToEqZxt199FTDOtn8l6 2ZREDQAofFAU97dwCecaexqsUmO3S6UD1BE3RlwFfM3ZiZO48y6jHALi+EGv8/NZMy1b dQfs2nYv11E+56oqOxagsGt038uHKmiedaax3ZRJZfKikMWmOKS32MsDizVv5yuRtoG4 DJ/QUmor6hHENVRhLoGdjSrrBYaA7MwUVpIhV478qlAEHbIyLQlN+oQx9Ao/G8evUIg9 Rg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 34wg685eje-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Nov 2020 07:02:25 -0500 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0AJC2Mqg018550; Thu, 19 Nov 2020 07:02:24 -0500 Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 34wg685edm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Nov 2020 07:02:24 -0500 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0AJBrJJe029665; Thu, 19 Nov 2020 12:02:19 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma05fra.de.ibm.com with ESMTP id 34v69usa0p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Nov 2020 12:02:19 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0AJC2HNP63111558 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Nov 2020 12:02:17 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4099352054; Thu, 19 Nov 2020 12:02:17 +0000 (GMT) Received: from oc7455500831.ibm.com (unknown [9.171.22.151]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id AFB9152051; Thu, 19 Nov 2020 12:02:15 +0000 (GMT) Subject: Re: [PATCH v2] drivers/virt: vmgenid: add vm generation id driver To: "Catangiu, Adrian Costin" , "Graf (AWS), Alexander" , "Jason A. Donenfeld" , Jann Horn Cc: Willy Tarreau , "MacCarthaigh, Colm" , Andy Lutomirski , "Theodore Y. Ts'o" , Eric Biggers , "open list:DOCUMENTATION" , kernel list , "Woodhouse, David" , "bonzini@gnu.org" , "Singh, Balbir" , "Weiss, Radu" , "oridgar@gmail.com" , "ghammer@redhat.com" , Jonathan Corbet , Greg Kroah-Hartman , "Michael S. Tsirkin" , Qemu Developers , KVM list , Michal Hocko , "Rafael J. Wysocki" , Pavel Machek , Linux API , "mpe@ellerman.id.au" , linux-s390 , "areber@redhat.com" , Pavel Emelyanov , Andrey Vagin , Mike Rapoport , Dmitry Safonov <0x7f454c46@gmail.com>, Pavel Tikhomirov , "gil@azul.com" , "asmehra@redhat.com" , "dgunigun@redhat.com" , "vijaysun@ca.ibm.com" References: <3E05451B-A9CD-4719-99D0-72750A304044@amazon.com> From: Christian Borntraeger Message-ID: <300d4404-3efe-880e-ef30-692eabbff5f7@de.ibm.com> Date: Thu, 19 Nov 2020 13:02:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 In-Reply-To: <3E05451B-A9CD-4719-99D0-72750A304044@amazon.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US X-TM-AS-GCONF: 00 Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-11-19_08:2020-11-19,2020-11-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 clxscore=1011 malwarescore=0 priorityscore=1501 impostorscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 lowpriorityscore=0 suspectscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011190087 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16.11.20 16:34, Catangiu, Adrian Costin wrote: > - Background > > The VM Generation ID is a feature defined by Microsoft (paper: > http://go.microsoft.com/fwlink/?LinkId=260709) and supported by > multiple hypervisor vendors. > > The feature is required in virtualized environments by apps that work > with local copies/caches of world-unique data such as random values, > uuids, monotonically increasing counters, etc. > Such apps can be negatively affected by VM snapshotting when the VM > is either cloned or returned to an earlier point in time. > > The VM Generation ID is a simple concept meant to alleviate the issue > by providing a unique ID that changes each time the VM is restored > from a snapshot. The hw provided UUID value can be used to > differentiate between VMs or different generations of the same VM. > > - Problem > > The VM Generation ID is exposed through an ACPI device by multiple > hypervisor vendors but neither the vendors or upstream Linux have no > default driver for it leaving users to fend for themselves. I see that the qemu implementation is still under discussion. What is the status of the other existing implementations. Do they already exist? In other words is ACPI a given? I think the majority of this driver could be used with just a different backend for platforms without ACPI so in any case we could factor out the backend (acpi, virtio, whatever) but if we are open we could maybe start with something else. From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, 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 C7457C388F9 for ; Thu, 19 Nov 2020 12:13:40 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 E46F6246D3 for ; Thu, 19 Nov 2020 12:13:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="o7fkJ6Ft" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E46F6246D3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=de.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfiok-0003FW-PU for qemu-devel@archiver.kernel.org; Thu, 19 Nov 2020 07:13:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfiek-00055F-H8 for qemu-devel@nongnu.org; Thu, 19 Nov 2020 07:03:21 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:64164) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfiea-0005Nb-OD for qemu-devel@nongnu.org; Thu, 19 Nov 2020 07:03:18 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0AJC1juS015700; Thu, 19 Nov 2020 07:02:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=LhudYgp7LwyrzB9nzt7AbefNHLUSPXxp2TUOfBUDXPo=; b=o7fkJ6FtiGRijn5pIBAGGina1Qkkr4fdwDVKkAbDO/AV01TwrzuCzH5q/J204nfAucNa rSDhumvhzocyOnYOe8/BJRE9br990fWreOtVQuqohH0GuHLuJToEqZxt199FTDOtn8l6 2ZREDQAofFAU97dwCecaexqsUmO3S6UD1BE3RlwFfM3ZiZO48y6jHALi+EGv8/NZMy1b dQfs2nYv11E+56oqOxagsGt038uHKmiedaax3ZRJZfKikMWmOKS32MsDizVv5yuRtoG4 DJ/QUmor6hHENVRhLoGdjSrrBYaA7MwUVpIhV478qlAEHbIyLQlN+oQx9Ao/G8evUIg9 Rg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 34wg685eje-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Nov 2020 07:02:25 -0500 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0AJC2Mqg018550; Thu, 19 Nov 2020 07:02:24 -0500 Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 34wg685edm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Nov 2020 07:02:24 -0500 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0AJBrJJe029665; Thu, 19 Nov 2020 12:02:19 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma05fra.de.ibm.com with ESMTP id 34v69usa0p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Nov 2020 12:02:19 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0AJC2HNP63111558 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Nov 2020 12:02:17 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4099352054; Thu, 19 Nov 2020 12:02:17 +0000 (GMT) Received: from oc7455500831.ibm.com (unknown [9.171.22.151]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id AFB9152051; Thu, 19 Nov 2020 12:02:15 +0000 (GMT) Subject: Re: [PATCH v2] drivers/virt: vmgenid: add vm generation id driver To: "Catangiu, Adrian Costin" , "Graf (AWS), Alexander" , "Jason A. Donenfeld" , Jann Horn References: <3E05451B-A9CD-4719-99D0-72750A304044@amazon.com> From: Christian Borntraeger Message-ID: <300d4404-3efe-880e-ef30-692eabbff5f7@de.ibm.com> Date: Thu, 19 Nov 2020 13:02:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 In-Reply-To: <3E05451B-A9CD-4719-99D0-72750A304044@amazon.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US X-TM-AS-GCONF: 00 Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-19_08:2020-11-19, 2020-11-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 clxscore=1011 malwarescore=0 priorityscore=1501 impostorscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 lowpriorityscore=0 suspectscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011190087 Received-SPF: pass client-ip=148.163.156.1; envelope-from=borntraeger@de.ibm.com; helo=mx0a-001b2d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/19 07:02:56 X-ACL-Warn: Detected OS = Linux 3.x [generic] [fuzzy] X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "asmehra@redhat.com" , "dgunigun@redhat.com" , KVM list , "open list:DOCUMENTATION" , "ghammer@redhat.com" , "vijaysun@ca.ibm.com" , "Weiss, Radu" , Qemu Developers , Michal Hocko , Andrey Vagin , Pavel Machek , Pavel Tikhomirov , linux-s390 , Jonathan Corbet , "mpe@ellerman.id.au" , "Michael S. Tsirkin" , Eric Biggers , "Singh, Balbir" , "bonzini@gnu.org" , Dmitry Safonov <0x7f454c46@gmail.com>, "oridgar@gmail.com" , Andy Lutomirski , "gil@azul.com" , "MacCarthaigh, Colm" , "Theodore Y. Ts'o" , Linux API , "areber@redhat.com" , kernel list , Pavel Emelyanov , Mike Rapoport , Greg Kroah-Hartman , "Rafael J. Wysocki" , Willy Tarreau , "Woodhouse, David" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 16.11.20 16:34, Catangiu, Adrian Costin wrote: > - Background > > The VM Generation ID is a feature defined by Microsoft (paper: > http://go.microsoft.com/fwlink/?LinkId=260709) and supported by > multiple hypervisor vendors. > > The feature is required in virtualized environments by apps that work > with local copies/caches of world-unique data such as random values, > uuids, monotonically increasing counters, etc. > Such apps can be negatively affected by VM snapshotting when the VM > is either cloned or returned to an earlier point in time. > > The VM Generation ID is a simple concept meant to alleviate the issue > by providing a unique ID that changes each time the VM is restored > from a snapshot. The hw provided UUID value can be used to > differentiate between VMs or different generations of the same VM. > > - Problem > > The VM Generation ID is exposed through an ACPI device by multiple > hypervisor vendors but neither the vendors or upstream Linux have no > default driver for it leaving users to fend for themselves. I see that the qemu implementation is still under discussion. What is the status of the other existing implementations. Do they already exist? In other words is ACPI a given? I think the majority of this driver could be used with just a different backend for platforms without ACPI so in any case we could factor out the backend (acpi, virtio, whatever) but if we are open we could maybe start with something else.