Skip to content

Commit

Permalink
KVM: x86/xen: Fix get_attr of KVM_XEN_ATTR_TYPE_SHARED_INFO
Browse files Browse the repository at this point in the history
In commit 319afe6 ("KVM: xen: do not use struct gfn_to_hva_cache") we
stopped storing this in-kernel as a GPA, and started storing it as a GFN.
Which means we probably should have stopped calling gpa_to_gfn() on it
when userspace asks for it back.

Cc: [email protected]
Fixes: 319afe6 ("KVM: xen: do not use struct gfn_to_hva_cache")
Signed-off-by: David Woodhouse <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
dwmw2 authored and bonzini committed Nov 18, 2021
1 parent b8453cd commit 4e84364
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/xen.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ int kvm_xen_hvm_get_attr(struct kvm *kvm, struct kvm_xen_hvm_attr *data)
break;

case KVM_XEN_ATTR_TYPE_SHARED_INFO:
data->u.shared_info.gfn = gpa_to_gfn(kvm->arch.xen.shinfo_gfn);
data->u.shared_info.gfn = kvm->arch.xen.shinfo_gfn;
r = 0;
break;

Expand Down

0 comments on commit 4e84364

Please sign in to comment.