Re: [PATCH RFC v2 1/2] tsm: Add TVM Measurement Register Support

From: Xing, Cedric
Date: Mon Nov 04 2024 - 18:37:21 EST


On 11/4/2024 4:22 PM, James Bottomley wrote:
On Mon, 2024-11-04 at 16:14 -0600, Xing, Cedric wrote:
On 11/3/2024 9:51 PM, Alexey Kardashevskiy wrote:
On 1/11/24 03:50, Cedric Xing wrote:
diff --git a/drivers/virt/coco/tsm.c b/drivers/virt/coco/tsm-
core.c
similarity index 95%
rename from drivers/virt/coco/tsm.c
rename to drivers/virt/coco/tsm-core.c
index 9432d4e303f1..92e961f21507 100644
--- a/drivers/virt/coco/tsm.c
+++ b/drivers/virt/coco/tsm-core.c
@@ -1,8 +1,6 @@
  // SPDX-License-Identifier: GPL-2.0-only
  /* Copyright(c) 2023 Intel Corporation. All rights reserved. */
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-

Why remove it?

It's not used anywhere...

Yes, it is; it's used in this line, which the patch doesn't appear to
remove:

int tsm_register(const struct tsm_ops *ops, void *priv)
{
const struct tsm_ops *conflict;

guard(rwsem_write)(&tsm_rwsem);
conflict = provider.ops;
if (conflict) {
pr_err("\"%s\" ops already registered\n", conflict->name);
^^^^^^^
Now I remember. I had been seeing the module name somehow got printed twice in the log, so I removed it. Probably something wrong with my build env. I'll add that back. Thanks for pointing this out!