Re: [PATCH v19 035/130] KVM: TDX: Add place holder for TDX VM specific mem_enc_op ioctl

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

 



> 
> > > +
> > > +	mutex_lock(&kvm->lock);
> > > +
> > > +	switch (tdx_cmd.id) {
> > > +	default:
> > > +		r = -EINVAL;
> > 
> > I am not sure whether you should return -ENOTTY to be consistent with the
> > previous vt_mem_enc_ioctl() where a TDX-specific IOCTL is issued for non-TDX
> > guest.
> > 
> > Here I think the invalid @id means the sub-command isn't valid.
> 
> vt_vcpu_mem_enc_ioctl() checks non-TDX case and returns -ENOTTY.  We know that
> the guest is TD.

But the command is not supported, right?

I roughly recall I saw somewhere that in such case we should return -ENOTTY, but
I cannot find the link now.

But I found this old link uses -ENOTTY:

https://lwn.net/Articles/58719/

So, just fyi.




[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