KVM: VMX: Move private memory slot position
PCI device assignment would map guest MMIO spaces as separate slot, so it is possible that the device has more than 2 MMIO spaces and overwrite current private memslot. The patch move private memory slot to the top of userspace visible memory slots. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
@@ -2513,7 +2513,7 @@ static int vmx_set_tss_addr(struct kvm *kvm, unsigned int addr)
|
||||
{
|
||||
int ret;
|
||||
struct kvm_userspace_memory_region tss_mem = {
|
||||
.slot = 8,
|
||||
.slot = TSS_PRIVATE_MEMSLOT,
|
||||
.guest_phys_addr = addr,
|
||||
.memory_size = PAGE_SIZE * 3,
|
||||
.flags = 0,
|
||||
|
Reference in New Issue
Block a user