Re: [PATCH v5 6/7] kvm, mem-hotplug: Unpin and remove kvm_arch->apic_access_page.

Paolo Bonzini
2014-09-11T09:35:06Z

Il 11/09/2014 07:38, Tang Chen ha scritto:
> + if (vm_need_virtualize_apic_accesses(vmx->vcpu.kvm)) {
> + struct page *page = gfn_to_page(vmx->vcpu.kvm,
> + APIC_DEFAULT_PHYS_BASE >> PAGE_SHIFT);
> + vmcs_write64(APIC_ACCESS_ADDR, page_to_phys(page));
> + /*
> + * Do not pin apic access page in memory so that memory
> + * hotplug process is able to migrate it.
> + */
> + put_page(page);
> + }

Please reuse vcpu_reload_apic_access_page here, too.

Paolo