Commit 6defa24
KVM: SEV: Init target VMCBs in sev_migrate_from
The target VMCBs during an intra-host migration need to correctly setup
for running SEV and SEV-ES guests. Add sev_init_vmcb() function and make
sev_es_init_vmcb() static. sev_init_vmcb() uses the now private function
to init SEV-ES guests VMCBs when needed.
Fixes: 0b020f5 ("KVM: SEV: Add support for SEV-ES intra host migration")
Fixes: b566393 ("KVM: SEV: Add support for SEV intra host migration")
Signed-off-by: Peter Gonda <pgonda@google.com>
Cc: Marc Orr <marcorr@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Message-Id: <20220623173406.744645-1-pgonda@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent ebdec85 commit 6defa24
3 files changed
Lines changed: 48 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1665 | 1665 | | |
1666 | 1666 | | |
1667 | 1667 | | |
| 1668 | + | |
| 1669 | + | |
1668 | 1670 | | |
| 1671 | + | |
1669 | 1672 | | |
1670 | 1673 | | |
1671 | 1674 | | |
1672 | 1675 | | |
1673 | 1676 | | |
1674 | 1677 | | |
| 1678 | + | |
1675 | 1679 | | |
1676 | 1680 | | |
1677 | 1681 | | |
1678 | 1682 | | |
1679 | 1683 | | |
1680 | 1684 | | |
| 1685 | + | |
1681 | 1686 | | |
1682 | 1687 | | |
1683 | 1688 | | |
| |||
1704 | 1709 | | |
1705 | 1710 | | |
1706 | 1711 | | |
1707 | | - | |
1708 | 1712 | | |
1709 | | - | |
1710 | | - | |
1711 | | - | |
1712 | | - | |
1713 | | - | |
| 1713 | + | |
| 1714 | + | |
1714 | 1715 | | |
1715 | | - | |
1716 | | - | |
| 1716 | + | |
1717 | 1717 | | |
1718 | | - | |
1719 | | - | |
1720 | | - | |
1721 | | - | |
| 1718 | + | |
| 1719 | + | |
1722 | 1720 | | |
1723 | | - | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
1724 | 1726 | | |
1725 | | - | |
1726 | | - | |
1727 | 1727 | | |
1728 | 1728 | | |
1729 | 1729 | | |
| |||
1740 | 1740 | | |
1741 | 1741 | | |
1742 | 1742 | | |
1743 | | - | |
1744 | | - | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
1745 | 1760 | | |
1746 | 1761 | | |
1747 | 1762 | | |
| |||
1789 | 1804 | | |
1790 | 1805 | | |
1791 | 1806 | | |
1792 | | - | |
1793 | | - | |
1794 | | - | |
1795 | | - | |
1796 | | - | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
1797 | 1810 | | |
1798 | 1811 | | |
1799 | 1812 | | |
| |||
2914 | 2927 | | |
2915 | 2928 | | |
2916 | 2929 | | |
2917 | | - | |
| 2930 | + | |
2918 | 2931 | | |
2919 | 2932 | | |
2920 | 2933 | | |
| |||
2967 | 2980 | | |
2968 | 2981 | | |
2969 | 2982 | | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
| 2988 | + | |
| 2989 | + | |
| 2990 | + | |
| 2991 | + | |
2970 | 2992 | | |
2971 | 2993 | | |
2972 | 2994 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1212 | 1212 | | |
1213 | 1213 | | |
1214 | 1214 | | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
1218 | | - | |
1219 | | - | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
1223 | | - | |
| 1215 | + | |
| 1216 | + | |
1224 | 1217 | | |
1225 | 1218 | | |
1226 | 1219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
| 652 | + | |
652 | 653 | | |
653 | 654 | | |
654 | 655 | | |
655 | | - | |
656 | 656 | | |
657 | 657 | | |
658 | 658 | | |
| |||
0 commit comments