Re: [PATCH v3 1/2] KVM: x86: Check hypercall's exit to userspace generically

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

 



On Wed, 2024-11-06 at 16:32 +0800, Binbin Wu wrote:
> > static void kvm_complete_hypercall_exit(struct kvm_vcpu *vcpu, int ret_reg,
> >  				        unsigned long ret, bool op_64_bit)
> > {
> >  	if (!op_64_bit)
> >  		ret = (u32)ret;
> >  	kvm_register_write_raw(vcpu, ret_reg, ret);
> >  	++vcpu->stat.hypercalls;
> > }
> If this is going to be the final version, it would be better to make it
> public, and export the symbol, so that TDX code can reuse it.

Does making it 'static inline' and moving to kvm_host.h work?

kvm_register_write_raw(), and kvm_register_mark_dirty() which is called by
kvm_register_write_raw()), are both 'static inline'.  Seems we can get rid of
export by making it 'static inline'.




[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