On Tue, 2022-12-13 at 17:04 +0800, Yu Zhang wrote: > --- a/arch/x86/kvm/xen.c > +++ b/arch/x86/kvm/xen.c > @@ -41,7 +41,7 @@ static int kvm_xen_shared_info_init(struct kvm *kvm, gfn_t gfn) > int ret = 0; > int idx = srcu_read_lock(&kvm->srcu); > > - if (gfn == GPA_INVALID) { > + if (gfn == INVALID_GPA) { > kvm_gpc_deactivate(gpc); > goto out; > } > @@ -659,7 +659,7 @@ int kvm_xen_hvm_get_attr(struct kvm *kvm, struct kvm_xen_hvm_attr *data) > if (kvm->arch.xen.shinfo_cache.active) > data->u.shared_info.gfn = gpa_to_gfn(kvm->arch.xen.shinfo_cache.gpa); > else > - data->u.shared_info.gfn = GPA_INVALID; > + data->u.shared_info.gfn = INVALID_GPA; > r = 0; > break; Strictly, those are INVALID_GFN not INVALID_GPA but I have so far managed to pretend not to notice... If we're bikeshedding the naming then I might have suggested INVALID_PAGE but that already exists as an hpa_t type.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature