Re: [PATCH v7 030/102] KVM: TDX: Do TDX specific vcpu initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/13/2022 4:35 AM, Isaku Yamahata wrote:
On Fri, Jul 08, 2022 at 10:14:43AM +0800,
Yuan Yao <yuan.yao@xxxxxxxxxxxxxxx> wrote:

...
+int tdx_vcpu_ioctl(struct kvm_vcpu *vcpu, void __user *argp)
+{
+	struct kvm_tdx *kvm_tdx = to_kvm_tdx(vcpu->kvm);
+	struct vcpu_tdx *tdx = to_tdx(vcpu);
+	struct kvm_tdx_cmd cmd;
+	u64 err;
+
+	if (tdx->initialized)

Minor: How about "tdx_vcpu->initialized" ? there's
"is_td_initialized()" below, the "tdx" here may lead guys to treat it
as whole td vm until they confirmed it's type again.

I think you man tdx->vcpu_initialized.  If so, makes sense. I'll rename it.

IMO, no need to do so.

All around tdx.c, "tdx" is the brief pointer name, just like "vmx" used in vmx.c. People will get used to it.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux