Commit 3991f35
KVM: x86/xen: allow vcpu_info to be mapped by fixed HVA
If the guest does not explicitly set the GPA of vcpu_info structure in
memory then, for guests with 32 vCPUs or fewer, the vcpu_info embedded
in the shared_info page may be used. As described in a previous commit,
the shared_info page is an overlay at a fixed HVA within the VMM, so in
this case it also more optimal to activate the vcpu_info cache with a
fixed HVA to avoid unnecessary invalidation if the guest memory layout
is modified.
Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
Link: https://lore.kernel.org/r/20240215152916.1158-14-paul@xen.org
[sean: use kvm_gpc_is_{gpa,hva}_active()]
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent b9220d3 commit 3991f35
3 files changed
Lines changed: 52 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5523 | 5523 | | |
5524 | 5524 | | |
5525 | 5525 | | |
5526 | | - | |
5527 | | - | |
5528 | | - | |
5529 | | - | |
5530 | | - | |
| 5526 | + | |
| 5527 | + | |
| 5528 | + | |
| 5529 | + | |
| 5530 | + | |
| 5531 | + | |
5531 | 5532 | | |
5532 | 5533 | | |
5533 | 5534 | | |
| |||
5649 | 5650 | | |
5650 | 5651 | | |
5651 | 5652 | | |
| 5653 | + | |
| 5654 | + | |
| 5655 | + | |
| 5656 | + | |
| 5657 | + | |
| 5658 | + | |
| 5659 | + | |
| 5660 | + | |
| 5661 | + | |
| 5662 | + | |
| 5663 | + | |
| 5664 | + | |
| 5665 | + | |
| 5666 | + | |
| 5667 | + | |
5652 | 5668 | | |
5653 | 5669 | | |
5654 | 5670 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
622 | 622 | | |
623 | 623 | | |
624 | 624 | | |
| 625 | + | |
625 | 626 | | |
626 | 627 | | |
627 | 628 | | |
| |||
652 | 653 | | |
653 | 654 | | |
654 | 655 | | |
| 656 | + | |
| 657 | + | |
655 | 658 | | |
656 | 659 | | |
657 | 660 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
782 | 782 | | |
783 | 783 | | |
784 | 784 | | |
| 785 | + | |
785 | 786 | | |
786 | 787 | | |
787 | 788 | | |
788 | 789 | | |
789 | 790 | | |
790 | 791 | | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
795 | 810 | | |
796 | 811 | | |
797 | | - | |
798 | | - | |
799 | 812 | | |
800 | 813 | | |
801 | 814 | | |
| |||
1017 | 1030 | | |
1018 | 1031 | | |
1019 | 1032 | | |
1020 | | - | |
| 1033 | + | |
1021 | 1034 | | |
1022 | 1035 | | |
1023 | 1036 | | |
1024 | 1037 | | |
1025 | 1038 | | |
1026 | 1039 | | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
1027 | 1048 | | |
1028 | 1049 | | |
1029 | 1050 | | |
| |||
0 commit comments