svm: Introduces AVIC per-VM ID
commit5ea11f2b31b83bd3c05357e6bec20f598e00705a
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Tue, 23 Aug 2016 18:52:41 +0000 (23 13:52 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 8 Sep 2016 10:57:20 +0000 (8 12:57 +0200)
treefd2f595fbac1d779f6764c4447c4457c30099a5c
parent9ac7e3e815060efdc86b6d12448200e3c3597e01
svm: Introduces AVIC per-VM ID

Introduces per-VM AVIC ID and helper functions to manage the IDs.
Currently, the ID will be used to implement 32-bit AVIC IOMMU GA tag.

The ID is 24-bit one-based indexing value, and is managed via helper
functions to get the next ID, or to free an ID once a VM is destroyed.
There should be no ID conflict for any active VMs.

Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm.c