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

2014-09-11 Thread Paolo Bonzini
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,

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

2014-09-11 Thread Paolo Bonzini
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,

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

2014-09-10 Thread Tang Chen
To make apic access page migratable, we do not pin it in memory now. When it is migrated, we should reload its physical address for all vmcses. But when we tried to do this, all vcpu will access kvm_arch->apic_access_page without any locking. This is not safe. Actually, we do not need

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

2014-09-10 Thread Tang Chen
To make apic access page migratable, we do not pin it in memory now. When it is migrated, we should reload its physical address for all vmcses. But when we tried to do this, all vcpu will access kvm_arch-apic_access_page without any locking. This is not safe. Actually, we do not need