From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 24CDE3164D8 for ; Wed, 15 Jul 2026 10:07:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784110064; cv=none; b=hBmLAWcXlZuiYFIPk9aCDUrUIWPciUWgce+98FpMaXebe19f9oNs8BPAR46UYvJH11mXrAhTiJpK0xHk1Q3TB2iTkEFzVzGWIQc5k93rIgp2z5y4ZxQIiuwJdPvLQi9FT/fZMimN+6mZGIj0ylXA23+TLTsUjDHjutyAn5mjKtU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784110064; c=relaxed/simple; bh=ldnZMMJlON6HIfiHIVtoMjjwnkVGPSUT40OvpAAMsBE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=O+MvLogmIGLlwQaZ3Hf6q78BZIKd+YY8BFiQf56fKgFA2B37EVNtqSTAuDE3byDdwGQ3iQ22Lu0k/7tIjjqNveYca95XzA3AcpXWup1xs1ttetbFom7sBM+PWAni6ZH+6Xz3oejS27nbDQ4bni54JMOCNHmVPyRdhHoqg5ZYHh8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=I8hw27qM; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="I8hw27qM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42E521F000E9; Wed, 15 Jul 2026 10:07:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784110062; bh=4bXLnFyODE05japap5GXpaQtw1wBFtwGQNwwJhJH4dc=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=I8hw27qMBDOlxg8QBDZOEtcGX5JZSs1pnwrVfVhrpCx+9OZ9SK5yauGyFPkt9/nci mJo8rgLdyKMNK4zG8UdbhQOUlgWkuV7AXZIdH46iSht7U8/c313dLWH9rn+3HscRT+ fyXDv4H3jAMbvP+zwerPlHjPoXp9pSDbaeHOWKbc= Date: Wed, 15 Jul 2026 12:07:36 +0200 From: Greg Kroah-Hartman To: Song Guo Cc: Arnd Bergmann , linux-kernel@vger.kernel.org Subject: Re: [PATCH] misc: open-dice: add ACPI device discovery support Message-ID: <2026071547-schematic-dugout-7078@gregkh> References: <20260715081821.3932123-1-songguo@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260715081821.3932123-1-songguo@google.com> On Wed, Jul 15, 2026 at 08:18:20AM +0000, Song Guo wrote: > OpenDICE can also used on x86 platforms for attestation, one of the > usecase is Android's protected VM. > > The OpenDICE device driver only supports device tree, adding ACPI > support so it can also be used on x86 environments easily. > > The patch is verified using crosvm, with the following ACPI table passed > using --acpi-table, with --file-backed-mapping for the corresponding > memory region. > > DefinitionBlock ( > "opendice.aml", "SSDT", 2, "GOOGLE", "OpenDICE", 0x00000001 > ) > { > Scope (\_SB) > { > Device (DICE) > { > Name (_HID, "PRP0001") > > Name (_DSD, Package () { > ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), > Package () { > Package () { > "compatible", > Package () { "google,open-dice" } > } > } > }) > > Name (_CRS, ResourceTemplate () { > Memory32Fixed (ReadOnly, 0x9D1C3000, 0x00001000) > }) > } > } > } > > Signed-off-by: Song Guo > --- > drivers/misc/open-dice.c | 51 +++++++++++++++++++++++++++++----------- > 1 file changed, 37 insertions(+), 14 deletions(-) > > diff --git a/drivers/misc/open-dice.c b/drivers/misc/open-dice.c > index 45060fb4ea27..303b35b03cb4 100644 > --- a/drivers/misc/open-dice.c > +++ b/drivers/misc/open-dice.c > @@ -2,6 +2,7 @@ > /* > * Copyright (C) 2021 - Google LLC > * Author: David Brazdil > + * Author: Song Guo > * > * Driver for Open Profile for DICE. > * > @@ -19,6 +20,7 @@ > * close(fd); > */ > > +#include > #include > #include > #include > @@ -31,7 +33,8 @@ > struct open_dice_drvdata { > struct mutex lock; > char name[16]; > - struct reserved_mem *rmem; > + phys_addr_t mem_base; > + resource_size_t mem_size; Shouldn't this be a 2 patch series, the first converting to use these two variables instead of reserved_mem, and the second adding ACPI support? Otherwise you are mixing the two different things here and it's a bit hard to follow. thanks, greg k-h