On 4/18/2025 5:17 PM, Zhao Liu wrote:
  configs/devices/i386-softmmu/default.mak |  1 +
  hw/i386/Kconfig                          |  5 +++
  qapi/qom.json                            | 15 +++++++++
  target/i386/kvm/meson.build              |  2 ++
  target/i386/kvm/tdx.c                    | 43 ++++++++++++++++++++++++
  target/i386/kvm/tdx.h                    | 21 ++++++++++++

SEV.* and confidential-guest.* are all placed in target/i386/.
It's best if all of these can be in the same place.

I think it's more reasonable to put TDX code under KVM directory since TDX depends on KVM.

Regarding SEV, I think the same applies. But it was merged as is and I don't see it strongly that it has to move.

  6 files changed, 87 insertions(+)
  create mode 100644 target/i386/kvm/tdx.c
  create mode 100644 target/i386/kvm/tdx.h

...

diff --git a/target/i386/kvm/tdx.h b/target/i386/kvm/tdx.h
new file mode 100644
index 000000000000..f3b725336161
--- /dev/null
+++ b/target/i386/kvm/tdx.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#ifndef QEMU_I386_TDX_H
+#define QEMU_I386_TDX_H

I386_TDX_H is enough... the QEMU prefix is rarely seen in the whole
project.

# git grep -r "#ifndef QEMU_" ./ | wc -l
# 329

I'm not sure if 329 means rarely?

I will just keep it unchanged unless someone objects it strongly.

Others look good,

Reviewed-by: Zhao Liu <zhao1....@intel.com>

Thanks!


Reply via email to