[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <27de096d-4386-fb46-fd6d-229bea7b7a4a@linux.intel.com>
Date: Wed, 3 Aug 2022 11:55:49 +0800
From: Binbin Wu <binbin.wu@...ux.intel.com>
To: Kai Huang <kai.huang@...el.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Cc: linux-acpi@...r.kernel.org, seanjc@...gle.com, pbonzini@...hat.com,
dave.hansen@...el.com, len.brown@...el.com, tony.luck@...el.com,
rafael.j.wysocki@...el.com, reinette.chatre@...el.com,
dan.j.williams@...el.com, peterz@...radead.org, ak@...ux.intel.com,
kirill.shutemov@...ux.intel.com,
sathyanarayanan.kuppuswamy@...ux.intel.com,
isaku.yamahata@...el.com, thomas.lendacky@....com,
Tianyu.Lan@...rosoft.com, rdunlap@...radead.org, Jason@...c4.com,
juri.lelli@...hat.com, mark.rutland@....com, frederic@...nel.org,
yuehaibing@...wei.com, dongli.zhang@...cle.com
Subject: Re: [PATCH v5 02/22] cc_platform: Add new attribute to prevent ACPI
CPU hotplug
On 2022/6/22 19:15, Kai Huang wrote:
>
> @@ -357,6 +358,17 @@ static int acpi_processor_add(struct acpi_device *device,
> struct device *dev;
> int result = 0;
>
> + /*
> + * If the confidential computing platform doesn't support ACPI
> + * memory hotplug, the BIOS should never deliver such event to
memory or cpu hotplug?
> + * the kernel. Report ACPI CPU hot-add as a BIOS bug and ignore
> + * the new CPU.
> + */
> + if (cc_platform_has(CC_ATTR_ACPI_CPU_HOTPLUG_DISABLED)) {
> + dev_err(&device->dev, "[BIOS bug]: Platform doesn't support ACPI CPU hotplug. New CPU ignored.\n");
> + return -EINVAL;
> + }
> +
> pr = kzalloc(sizeof(struct acpi_processor), GFP_KERNEL);
> if (!pr)
> return -ENOMEM;
> @@ -434,6 +446,17 @@ static void acpi_processor_remove(struct acpi_device *device)
> if (!device || !acpi_driver_data(device))
> return;
>
> + /*
> + * The confidential computing platform is broken if ACPI memory
ditto
> + * hot-removal isn't supported but it happened anyway. Assume
> + * it's not guaranteed that the kernel can continue to work
> + * normally. Just BUG().
> + */
> + if (cc_platform_has(CC_ATTR_ACPI_CPU_HOTPLUG_DISABLED)) {
> + dev_err(&device->dev, "Platform doesn't support ACPI CPU hotplug. BUG().\n");
> + BUG();
> + }
>
Powered by blists - more mailing lists