From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 192DF1482F5 for ; Mon, 6 Jan 2025 18:51:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736189474; cv=none; b=ljZKCfryp4+VAaPQ9xrwyp9P6JT6nJHL6eJ9QJPInVLYtbMr0DqSAm7STHS6/tuBTXP+aXnMDUvu9lA1Js0ZFjbNuLfDyAPBlOtwP3n2etHV/ZQORVw48C2LEBCA/hHHn9qmGMmTq1e5+vizo/ZJXaOBkwNXUUiRm2/e5AON1u4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736189474; c=relaxed/simple; bh=5ojvMFQpa1twefDybnqj5z7xLC46CL5p9sy8XUIxCNU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CbgcYc9tvl67SxIziecboPBlU6W3tKKwc9TinU2k4PSrFoKy4lWkfre+Jhc5xl3GRZA7flobL/jmJE3Z6AbVeN32QlPcq+NhJeD8Hhm2UL65IcxZqJBoCcGzHaBjThI1jaENTL6Gk00f3TUKloZQrgAeJgnBRshsXYQWD6cpwWs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=fQYj0UG+; arc=none smtp.client-ip=209.85.167.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="fQYj0UG+" Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-540218726d5so15125823e87.2 for ; Mon, 06 Jan 2025 10:51:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1736189471; x=1736794271; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=EaQfHsLDsnfvGcNBRlbWsLfc9KqwWwjY11rs6ucaAkk=; b=fQYj0UG+jEYjSUdAT5OjCmLy3VFou+VFjw07XhrhtIp2cmdEJSQvqVIvxAsID9oSg1 iOcGO5nfP/p+/wP2yhmiIUPayTwTjvRQDsnWqEwMNn7n+y22+5CRSWEg0lLUh3fwbSWl Opi5xvrOqQpUwJG+mniTOVTmCJ4UCSwJBjIMQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736189471; x=1736794271; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=EaQfHsLDsnfvGcNBRlbWsLfc9KqwWwjY11rs6ucaAkk=; b=HTM/Z05pUcYGnSpECDIMrlhS0Ca8NHRrJs2FT8lm/OV0Vm1MgU695IBGsFMK00n4GA /PQXTUkcZiGnH2XDXYrXAQAdFSzj/4V0HMmEvCnjjsiPMz5ju4qxprOFfkMZRCDvshiX 4+Hzk/OVo+BK3KDP/ilt1wl9RPGJAA4KYJT4/8aaB46YuvXk/cKi5IP5WYU/EQg/V34W dAg5niIulertdLUCbzqmaNUloi8E1z73wmiU/Fv/IqsIj0VwhMwEHAUihQV+5ZEmnF3M J74Q7YIPMQiy1EZX5Y7dNO5qTZkuIuFbs0Oetf031rHB2jvDDmGoZtp0HBD4C+tNzcjZ C19w== X-Forwarded-Encrypted: i=1; AJvYcCXTbCqt1gIAFuG42bqnYd8zWJJh7JI8XtQOtybu0sfhmOahwJwdo6QCxVtmRltCIyb8KaeIs3tAKl4yjwY=@vger.kernel.org X-Gm-Message-State: AOJu0Yxb6/Lvmh0/Gid5EVjf4+OHQOYV+IVoYN8PcroxdlO31AIhbU9q MH/HsG8+YBgCHgoImWrXDY45aJX+0lBkoN0cOlcXEHpEWpgreituqeqK6TEHRA== X-Gm-Gg: ASbGncvCYfJ4tROYZ/t6iQUsvys9b8AvMKCq4wyvqnMzYVHykZFZcjtXwVU7FwSzjHR /FOF7UZbJB9M+bzXcJXwvlYlyhA6fOWZpcYycOA7xprFsNZP4TtZwGYSofbiRBZHDgFLBZzmMPB HeEAgw4CC36HN6I0mui4Wwh4cLUua7n5LXgz7d2TunHdRGn3DD68rfk61V8335rlMeIPWrN20CH Y/11fc1RSJrZc0JTjw1Y5bp419a3s3syHNjP1HHhiLlf9iVpBf3oHJGNyQ= X-Google-Smtp-Source: AGHT+IFE/SlAbvZK2aLwBVBgEZktlXOxSsiXwjRwGpB0e2i8DlDaH8ekZr/csOmbHuIhRAM5BpWzCA== X-Received: by 2002:a05:6512:3f20:b0:542:1ba3:984c with SMTP id 2adb3069b0e04-54229524515mr19599262e87.6.1736189471197; Mon, 06 Jan 2025 10:51:11 -0800 (PST) Received: from google.com ([2a02:a31b:20c3:6680:f0a3:772a:c99:9bab]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5422382fa6asm4967356e87.229.2025.01.06.10.51.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2025 10:51:10 -0800 (PST) Date: Mon, 6 Jan 2025 19:51:04 +0100 From: Dmytro Maluka To: Christoph Hellwig Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , Rob Herring , Saravana Kannan , Saurabh Sengar , Usama Arif , Stephen Boyd , Frank Rowand , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" , =?utf-8?Q?Pierre-Cl=C3=A9ment?= Tosi , Shikha Panwar , Will Deacon , Keir Fraser , Michal Mazurek , =?utf-8?Q?Bart=C5=82omiej?= Grzesik , Tomasz Nowicki , Grzegorz Jaszczyk Subject: Re: [PATCH] x86/of: Restore possibility to use both ACPI and FDT from bootloader Message-ID: References: <20241223181813.224446-1-dmaluka@chromium.org> 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: On Mon, Jan 06, 2025 at 03:16:15AM -0800, Christoph Hellwig wrote: > On Mon, Dec 23, 2024 at 06:18:03PM +0000, Dmytro Maluka wrote: > > There are cases when the bootloader provides information to the kernel > > in both ACPI and DTB, not interchangeably. One such use case is virtual > > machines in Android. When running on x86, the Android Virtualization > > Framework (AVF) boots VMs with ACPI like it is usually done on x86 (i.e. > > the virtual LAPIC, IOAPIC, HPET, PCI MMCONFIG etc are described in ACPI) > > but also passes various AVF-specific boot parameters in DTB. This allows > > reusing the same implementations of various AVF components on both > > arm64 and x86. > > What are these "AVF-specific boot parameters"? Let me quote my reply to Rob: The strictly AVF-specific properties are described in [1]. When it comes to Linux guests, actually AFAIK currently all those properties are consumed by the guest userspace, not the guest kernel, so the role of the kernel is in fact just to pass them over to the userspace via sysfs. Besides that, one important DT binding used by AVF's Linux guest kernels, not userspace, is google,open-dice documented in Documentation/devicetree/bindings/reserved-memory/google,open-dice.yaml. [2] describes how it is used by the protected VM firmware (pvmfw) to securely boot protected VMs. Cc'ing some AVF folks to keep me honest. (AVF used to support protected VMs on arm64 only, but now we are trying to make them work on x86. So, taking google,open-dice as an example, we could add an ACPI binding to the open-dice driver, however bloating pvmfw with AML support is a no go, so we want to keep passing it via DT on x86 as well.) [1] https://android.googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/main/docs/device_trees.md#dt-for-guests [2] https://android.googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/main/guest/pvmfw/#handover-abi