Re: [PATCH v2] KVM: SVM: Convert plain error code numbers to defines

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

 



Hi Sean,

On 12/2/2024 4:11 PM, Sean Christopherson wrote:

> 
> E.g. something like this?  Definitely feel free to suggest better names.
> 
> static inline void svm_vmgexit_set_return_code(struct vcpu_svm *svm,
> 					       u64 response, u64 data)
> {
> 	ghcb_set_sw_exit_info_1(svm->sev_es.ghcb, response);
> 	ghcb_set_sw_exit_info_2(svm->sev_es.ghcb, data);
> }
> 
If I make this function more generic where the exit info is set for both KVM and the guest, then maybe I can write something like this:

void ghcb_set_exit_info(struct ghcb *ghcb,
                      u64 info1, u64 info2)
{
	ghcb_set_sw_exit_info_1(ghcb, info1);
	ghcb_set_sw_exit_info_2(ghcb, info2);

}
This way we can address every possible case that sets the exit info - not only KVM. 

And I am not sure about the wrappers for each specific case because we will have too many, too specific small functions, but if you want them I can add them.

Thanks,
Melody





[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