Node 3 MemUsed: 0 kB
..
We have to populate some zones before onlining memory, otherwise no memory
could be onlined.
So when onlining pages, we should also check if zone->pageset is pointing to
boot_pageset.
Signed-off-by: Gu Zheng
Signed-off-by: Tang Chen
---
include/
emUsed: 0 kB
..
This patch-set fixes them.
Tang Chen (2):
mem-hotplug: Reset node managed pages when hot-adding a new pgdat.
mem-hotplug: Fix wrong check for zone->pageset initialization in
online_pages().
include/linux/bootmem.h | 1 +
include/linux/mm.h |
On 09/25/2014 09:43 PM, Paolo Bonzini wrote:
Il 25/09/2014 10:19, Tang Chen ha scritto:
Hi Paolo,
I'd like to help to test the patches.
Would you please tell me what is the best way to test this patch-set ?
How did _you_ test the patches?...
I just added "-cpu xxx,-x2apic"
04:20 PM, Paolo Bonzini wrote:
Il 24/09/2014 09:57, Tang Chen ha scritto:
ept identity pagetable and apic access page in kvm are pinned in memory.
As a result, they cannot be migrated/hot-removed.
But actually they don't need to be pinned in memory.
[For ept identity page]
Just do not pin it.
On 09/24/2014 04:20 PM, Paolo Bonzini wrote:
Il 24/09/2014 09:57, Tang Chen ha scritto:
ept identity pagetable and apic access page in kvm are pinned in memory.
As a result, they cannot be migrated/hot-removed.
But actually they don't need to be pinned in memory.
[For ept identity page]
success, -errno on failure.
Signed-off-by: Tang Chen
---
arch/x86/kvm/vmx.c | 31 +++
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 4fb84ad..72a0470 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
Since different architectures need different handling, we will add some arch
specific
code later. The code may need to make cpu requests outside kvm_main.c, so make
it
non-static and rename it to kvm_make_all_cpus_request().
Reviewed-by: Paolo Bonzini
Signed-off-by: Tang Chen
---
include
v
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/kvm/vmx.c | 17 ++---
arch/x86/kvm/x86.c | 16 ++--
3 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/in
to check if we are in L2 and if L1 prepares an
non-shared apic access page for L2. We do this in
vmx_set_apic_access_page_addr()
when trying to set new apic access page's hpa like this:
if (!is_guest_mode(vcpu) ||
!(vmx->nested.current_vmcs12->secondary_vm_exec_control &a
s in the next L2->L1 exit.
This patch handles 3).
In L0->L2 entry, L2's vmcs will be updated in prepare_vmcs02() called by
nested_vm_run(). So we need to do nothing.
In L2->L1 exit, this patch requests apic access page reload in L2->L1 vmexit.
Reviewed-by: Paolo Bonzini
Sign
s in the next L2->L1 exit.
This patch force a L1->L0 exit or L2->L0 exit when shared apic access page is
migrated using mmu notifier. Since apic access page is only used on intel x86,
this is arch specific code.
Signed-off-by: Tang Chen
---
arch/arm/include/asm/kvm_host.h | 5 +
m_arch->ept_identity_pagetable is removed, ept identity pagetable page
is no longer pinned in memory. And it can be migrated/hot-removed.
Signed-off-by: Tang Chen
Reviewed-by: Gleb Natapov
---
arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/vmx.c
ved useless set_apic_access_page_addr() hook for svm.
Tang Chen (8):
kvm: Use APIC_DEFAULT_PHYS_BASE macro as the apic access page address.
kvm: Remove ept_identity_pagetable from struct kvm_arch.
kvm: Make init_rmode_identity_map() return 0 on success.
kvm, mem-hotplug: Reload L1's api
We have APIC_DEFAULT_PHYS_BASE defined as 0xfee0, which is also the address
of
apic access page. So use this macro.
Signed-off-by: Tang Chen
Reviewed-by: Gleb Natapov
---
arch/x86/kvm/svm.c | 3 ++-
arch/x86/kvm/vmx.c | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff
On 09/24/2014 03:08 PM, Jan Kiszka wrote:
On 2014-09-24 04:09, Tang Chen wrote:
Hi Paolo,
I'm not sure if this patch is following your comment. Please review.
And all the other comments are followed. If this patch is OK, I'll
send v8 soon.
Thanks.
We are handling "L1 and L2
Hi Paolo,
I'm not sure if this patch is following your comment. Please review.
And all the other comments are followed. If this patch is OK, I'll
send v8 soon.
Thanks.
We are handling "L1 and L2 share one apic access page" situation when migrating
apic access page. We should do some handling w
success, -errno on failure.
Signed-off-by: Tang Chen
---
arch/x86/kvm/vmx.c | 31 +++
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 4fb84ad..72a0470 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
are in L2 and if L2's secondary
exec virtualzed apic accesses is enabled.
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/svm.c | 6 ++
arch/x86/kvm/vmx.c | 6 ++
arch/x86/kvm/x86.c | 23 +++
in
m_arch->ept_identity_pagetable is removed, ept identity pagetable page
is no longer pinned in memory. And it can be migrated/hot-removed.
Signed-off-by: Tang Chen
Reviewed-by: Gleb Natapov
---
arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/vmx.c
We have APIC_DEFAULT_PHYS_BASE defined as 0xfee0, which is also the address
of
apic access page. So use this macro.
Signed-off-by: Tang Chen
Reviewed-by: Gleb Natapov
---
arch/x86/kvm/svm.c | 3 ++-
arch/x86/kvm/vmx.c | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff
s in the next L2->L1 exit.
This patch handles 3).
In L0->L2 entry, L2's vmcs will be updated in prepare_vmcs02() called by
nested_vm_run(). So we need to do nothing.
In L2->L1 exit, this patch requests apic access page reload in L2->L1 vmexit.
Signed-off-by: Tang Chen
-
v
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/kvm/vmx.c | 15 +--
arch/x86/kvm/x86.c | 16 +++-
3 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/in
Since different architectures need different handling, we will add some arch
specific
code later. The code may need to make cpu requests outside kvm_main.c, so make
it
non-static and rename it to kvm_make_all_cpus_request().
Signed-off-by: Tang Chen
---
include/linux/kvm_host.h | 1 +
virt
s in the next L2->L1 exit.
This patch force a L1->L0 exit or L2->L0 exit when shared apic access page is
migrated using mmu notifier. Since apic access page is only used on intel x86,
this is arch specific code.
Signed-off-by: Tang Chen
---
arch/x86/kvm/x86.c | 11
condary
exec virtualzed apic accesses is enabled.
This patch adds an interface to check if L2's secondary exec virtualzed apic
accesses is enabled, because vmx cannot be accessed outside vmx.c.
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/svm.c
t in mmu notifier.
Tang Chen (9):
kvm: Use APIC_DEFAULT_PHYS_BASE macro as the apic access page address.
kvm: Remove ept_identity_pagetable from struct kvm_arch.
kvm: Make init_rmode_identity_map() return 0 on success.
kvm: Add interface to check if secondary exec virtualzed apic accesse
On 09/16/2014 07:24 PM, Paolo Bonzini wrote:
Il 16/09/2014 12:42, Tang Chen ha scritto:
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 33712fb..0df82c1 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -210,6 +210,11 @@ void kvm_make_scan_ioapic_request(struct kvm
success, -errno on failure.
Signed-off-by: Tang Chen
---
arch/x86/kvm/vmx.c | 31 +++
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 4fb84ad..72a0470 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
We have APIC_DEFAULT_PHYS_BASE defined as 0xfee0, which is also the address
of
apic access page. So use this macro.
Signed-off-by: Tang Chen
Reviewed-by: Gleb Natapov
---
arch/x86/kvm/svm.c | 3 ++-
arch/x86/kvm/vmx.c | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff
v
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/kvm/vmx.c | 15 +--
arch/x86/kvm/x86.c | 15 +--
3 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/in
address
for
all L2 vmcs. And this patch requests apic access page reload in L2->L1 vmexit.
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/vmx.c | 6 ++
arch/x86/kvm/x86.c | 3 ++-
3 files changed, 9 insertions(+), 1 deletion(-)
m_arch->ept_identity_pagetable is removed, ept identity pagetable page
is no longer pinned in memory. And it can be migrated/hot-removed.
Signed-off-by: Tang Chen
Reviewed-by: Gleb Natapov
---
arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/vmx.c
patch 7 since we are not able to handle the situation in
nested vm.
Tang Chen (6):
kvm: Use APIC_DEFAULT_PHYS_BASE macro as the apic access page address.
kvm: Remove ept_identity_pagetable from struct kvm_arch.
kvm: Make init_rmode_identity_map() return 0 on success.
kvm, mem-hotplug: R
->arch.apic_access_page to the new page.
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/svm.c | 6 ++
arch/x86/kvm/vmx.c | 6 ++
arch/x86/kvm/x86.c | 15 +++
include/linux/kvm_host.h|
success, -errno on failure.
Signed-off-by: Tang Chen
---
arch/x86/kvm/vmx.c | 25 +++--
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 953d529..63c4c3e 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
Just like we removed kvm_arch->apic_access_page, nested_vmx->apic_access_page
becomes useless for the same reason. This patch removes
nested_vmx->apic_access_page,
and use gfn_to_page() to pin it in memory when we need it, and unpin it after
then.
Signed-off-by: Tang Chen
---
arc
m_arch->ept_identity_pagetable is removed, ept identity pagetable page
is no longer pinned in memory. And it can be migrated/hot-removed.
Signed-off-by: Tang Chen
Reviewed-by: Gleb Natapov
---
arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/vmx.c
We have APIC_DEFAULT_PHYS_BASE defined as 0xfee0, which is also the address
of
apic access page. So use this macro.
Signed-off-by: Tang Chen
Reviewed-by: Gleb Natapov
---
arch/x86/kvm/svm.c | 3 ++-
arch/x86/kvm/vmx.c | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff
. Patch 7/7: Remove nested_vmx->apic_access_page.
Tang Chen (7):
kvm: Use APIC_DEFAULT_PHYS_BASE macro as the apic access page address.
kvm: Remove ept_identity_pagetable from struct kvm_arch.
kvm: Make init_rmode_identity_map() return 0 on success.
kvm, mem-hotplug: Reload L1'
->arch.apic_access_page to the new page.
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/svm.c | 6 ++
arch/x86/kvm/vmx.c | 6 ++
arch/x86/kvm/x86.c | 15 +++
include/linux/kvm_host.h|
address
for
all L2 vmcs. And this patch requests apic access page reload in L2->L1 vmexit.
Signed-off-by: Tang Chen
---
arch/x86/kvm/vmx.c | 7 +++
virt/kvm/kvm_main.c | 1 +
2 files changed, 8 insertions(+)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index da6d55d..e7704b2 10
v
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/kvm/vmx.c | 32 +---
arch/x86/kvm/x86.c | 15 +--
3 files changed, 35 insertions(+), 14 deletions(-)
diff --git a/arch/x86/include/asm/kvm_host.h b
success, -errno on failure.
Signed-off-by: Tang Chen
---
arch/x86/kvm/vmx.c | 25 +++--
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 953d529..63c4c3e 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
m_arch->ept_identity_pagetable is removed, ept identity pagetable page
is no longer pinned in memory. And it can be migrated/hot-removed.
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/vmx.c | 50 -
other pages in memory, if user uses nested
vm, memory hot-remove will not work.
Change log v3 -> v4:
1. The original patch 6 is now patch 5. ( by Jan Kiszka )
2. The original patch 1 is now patch 6 since we should unpin apic access page
at the very last moment.
Tang Chen (6):
->arch.apic_access_page to the new page.
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/svm.c | 6 ++
arch/x86/kvm/vmx.c | 6 ++
arch/x86/kvm/x86.c | 15 +++
include/linux/kvm_host.h|
address
for
all L2 vmcs. And this patch requests apic access page reload in L2->L1 vmexit.
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/svm.c | 6 ++
arch/x86/kvm/vmx.c | 32
arch/x86/kvm/
We have APIC_DEFAULT_PHYS_BASE defined as 0xfee0, which is also the address
of
apic access page. So use this macro.
Signed-off-by: Tang Chen
---
arch/x86/kvm/svm.c | 3 ++-
arch/x86/kvm/vmx.c | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/svm.c b
gfn_to_page() will finally call hva_to_pfn() to get the pfn, and pin the page
in memory by calling GUP functions. This function unpins the page.
After this patch, acpi access page is able to be migrated.
Signed-off-by: Tang Chen
---
arch/x86/kvm/vmx.c | 2 +-
arch/x86/kvm/x86.c
rted-by: Xishi Qiu
Signed-off-by: Tang Chen
---
mm/memblock.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mm/memblock.c b/mm/memblock.c
index 6d2f219..70fad0c 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -192,8 +192,7 @@ phys_addr_t __init_memblock
memblock_find_
This patch fixes this problem by checking if acpi_device->handler is NULL in
acpi_scan_hot_remove().
Signed-off-by: Tang Chen
---
drivers/acpi/scan.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index f775fa0..aae0ce0 100644
->arch.apic_access_page to the new page.
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/svm.c | 6 ++
arch/x86/kvm/vmx.c | 8 +++-
arch/x86/kvm/x86.c | 17 +++--
include/linux/kvm_host.h|
IC_PAGE_RELOAD request.
3. In [PATCH 5/5], add set_apic_access_page_addr() for svm.
Tang Chen (6):
kvm: Add gfn_to_page_no_pin() to translate gfn to page without
pinning.
kvm: Use APIC_DEFAULT_PHYS_BASE macro as the apic access page address.
kvm: Remove ept_identity_pagetable from
success, -errno on failure.
Signed-off-by: Tang Chen
---
arch/x86/kvm/vmx.c | 25 +++--
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index b8bf47d..6ab4f87 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
m_arch->ept_identity_pagetable is removed, ept identity pagetable page
is no longer pinned in memory. And it can be migrated/hot-removed.
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/vmx.c | 50 -
gfn_to_page() will finally call hva_to_pfn() to get the pfn, and pin the page
in memory by calling GUP functions. This function unpins the page.
Will be used by the followed patches.
Signed-off-by: Tang Chen
---
include/linux/kvm_host.h | 1 +
virt/kvm/kvm_main.c | 17
We have APIC_DEFAULT_PHYS_BASE defined as 0xfee0, which is also the address
of
apic access page. So use this macro.
Signed-off-by: Tang Chen
---
arch/x86/kvm/svm.c | 3 ++-
arch/x86/kvm/vmx.c | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/svm.c b
address
for
all L2 vmcs. And this patch requests apic access page reload in L2->L1 vmexit.
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/svm.c | 6 ++
arch/x86/kvm/vmx.c | 37 ++
Hi Gleb,
On 07/17/2014 09:57 PM, Gleb Natapov wrote:
On Thu, Jul 17, 2014 at 09:34:20PM +0800, Tang Chen wrote:
Hi Gleb,
On 07/15/2014 08:40 PM, Gleb Natapov wrote:
..
And yes, we have the problem you said here. We can migrate the page while L2
vm is running.
So I think we should
Hi Gleb,
On 07/15/2014 08:40 PM, Gleb Natapov wrote:
..
And yes, we have the problem you said here. We can migrate the page while L2
vm is running.
So I think we should enforce L2 vm to exit to L1. Right ?
We can request APIC_ACCESS_ADDR reload during L2->L1 vmexit emulation, so
if APIC_A
Hi Gleb,
Sorry for the delay. Please see below.
On 07/15/2014 10:40 PM, Gleb Natapov wrote:
..
We can request APIC_ACCESS_ADDR reload during L2->L1 vmexit emulation, so
if APIC_ACCESS_ADDR changes while L2 is running it will be reloaded for L1 too.
apic pages for L2 and L1 are not the
On 07/15/2014 08:40 PM, Gleb Natapov wrote:
On Tue, Jul 15, 2014 at 08:28:22PM +0800, Tang Chen wrote:
On 07/15/2014 08:09 PM, Gleb Natapov wrote:
On Tue, Jul 15, 2014 at 01:52:40PM +0200, Jan Kiszka wrote:
..
I cannot follow your concerns yet. Specifically, how should
APIC_ACCESS_ADDR
On 07/15/2014 08:09 PM, Gleb Natapov wrote:
On Tue, Jul 15, 2014 at 01:52:40PM +0200, Jan Kiszka wrote:
..
I cannot follow your concerns yet. Specifically, how should
APIC_ACCESS_ADDR (the VMCS field, right?) change while L2 is running? We
currently pin/unpin on L1->L2/L2->L1, respectively
On 07/15/2014 07:52 PM, Jan Kiszka wrote:
On 2014-07-14 16:58, Gleb Natapov wrote:
..
+ struct page *page = gfn_to_page_no_pin(vcpu->kvm,
+ APIC_DEFAULT_PHYS_BASE>> PAGE_SHIFT);
If you do not use kvm->arch.apic_access_page to get current addres
On 07/14/2014 10:27 PM, Gleb Natapov wrote:
..
if (likely(kvm->arch.ept_identity_pagetable_done))
return 1;
- ret = 0;
identity_map_pfn = kvm->arch.ept_identity_map_addr>> PAGE_SHIFT;
+
+ mutex_lock(&kvm->slots_lock);
Why move this out of alloc_i
Hi Gleb,
Please see below.
On 07/12/2014 03:44 PM, Gleb Natapov wrote:
On Wed, Jul 09, 2014 at 10:08:03AM +0800, Tang Chen wrote:
kvm_arch->ept_identity_pagetable holds the ept identity pagetable page. But
it is never used to refer to the page at all.
In vcpu initialization, it indicates
Hi Gleb,
Thanks for the reply. Please see below.
On 07/12/2014 04:04 PM, Gleb Natapov wrote:
On Tue, Jul 08, 2014 at 09:01:32PM +0800, Tang Chen wrote:
apic access page is pinned in memory. As a result, it cannot be
migrated/hot-removed.
Actually, it is not necessary to be pinned.
The hpa
hi Gleb, Marcelo, Nadav,
Would you please help to review these patches ?
Thanks. :)
On 07/08/2014 09:01 PM, Tang Chen wrote:
ept identity pagetable and apic access page in kvm are pinned in memory.
As a result, they cannot be migrated/hot-removed.
But actually they don't need to be pinn
rch->ept_identity_pagetable_done is enough to tell if the ept
identity pagetable is initialized. So we can remove ept_identity_pagetable.
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/vmx.c | 25 +++--
2 files changed, 11 inse
On 07/08/2014 09:01 PM, Tang Chen wrote:
kvm_arch->ept_identity_pagetable holds the ept identity pagetable page. But
it is never used to refer to the page at all.
In vcpu initialization, it indicates two things:
1. indicates if ept page is allocated
2. indicates if a memory slot for ident
On 07/08/2014 09:01 PM, Tang Chen wrote:
ept identity pagetable and apic access page in kvm are pinned in memory.
As a result, they cannot be migrated/hot-removed.
But actually they don't need to be pinned in memory.
[For ept identity page]
Just do not pin it. When it is migrated, guest
page. And in the next ept
violation, the new page will be found by ept violation handler.
This patch just unpin the ept identity page because it is not necessary.
Signed-off-by: Tang Chen
---
arch/x86/kvm/vmx.c | 3 ++-
arch/x86/kvm/x86.c | 2 --
2 files changed, 2 insertions(+), 3 deletions(-)
We have APIC_DEFAULT_PHYS_BASE defined as 0xfee0, which is also the address
of
apic access page. So use this macro.
Signed-off-by: Tang Chen
---
arch/x86/kvm/svm.c | 3 ++-
arch/x86/kvm/vmx.c | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/svm.c b
rch->ept_identity_pagetable_done is enough to tell if the ept
identity pagetable is initialized. So we can remove ept_identity_pagetable.
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/vmx.c | 25 +++--
2 files changed, 11 inse
->arch.apic_access_page to the new page.
Signed-off-by: Tang Chen
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/mmu.c | 11 +++
arch/x86/kvm/svm.c | 6 ++
arch/x86/kvm/vmx.c | 8 +++-
arch/x86/kvm/x86.c |
gfn_to_page() will finally call hva_to_pfn() to get the pfn, and pin the page
in memory by calling GUP functions. This function unpins the page.
Will be used by the followed patches.
Signed-off-by: Tang Chen
---
include/linux/kvm_host.h | 1 +
virt/kvm/kvm_main.c | 17
kvm_arch->ept_identity_pagetable.
2. In [PATCH 3/5], only introduce KVM_REQ_APIC_PAGE_RELOAD request.
3. In [PATCH 3/5], add set_apic_access_page_addr() for svm.
Tang Chen (5):
kvm: Add gfn_to_page_no_pin() to translate gfn to page without
pinning.
kvm: Use APIC_DEFAULT_PHYS_BASE macro as the apic
Hi Wanpeng,
On 07/07/2014 06:35 PM, Wanpeng Li wrote:
On Wed, Jul 02, 2014 at 05:00:37PM +0800, Tang Chen wrote:
apic access page is pinned in memory, and as a result it cannot be
migrated/hot-removed.
Actually it doesn't need to be pinned in memory.
This patch introduces a new vcpu re
Hi Nadav,
Thanks for the reply, please see below.
On 07/07/2014 08:10 PM, Nadav Amit wrote:
On 7/7/14, 2:54 PM, Gleb Natapov wrote:
On Mon, Jul 07, 2014 at 02:42:27PM +0300, Nadav Amit wrote:
Tang,
Running some (unrelated) tests I see that KVM does not handle APIC base
relocation correctly.
tomorrow. ;)
Thanks.
On 07/04/2014 06:13 PM, Gleb Natapov wrote:
On Fri, Jul 04, 2014 at 10:18:25AM +0800, Tang Chen wrote:
Hi Gleb,
Thanks for the advices. Please see below.
On 07/03/2014 09:55 PM, Gleb Natapov wrote:
..
@@ -575,6 +575,7 @@ struct kvm_arch {
unsigned int
Hi Gleb,
Thanks for all the advices. Please see below.
On 07/04/2014 06:13 PM, Gleb Natapov wrote:
..
+static void vmx_set_apic_access_page_addr(struct kvm *kvm, hpa_t hpa)
+{
+ if (vm_need_virtualize_apic_accesses(kvm))
This shouldn't even been called if apic access page is not supp
Hi Gleb,
On 07/03/2014 02:04 PM, Gleb Natapov wrote:
On Thu, Jul 03, 2014 at 09:17:59AM +0800, Tang Chen wrote:
Hi Gleb,
On 07/02/2014 05:00 PM, Tang Chen wrote:
Hi Gleb, Marcelo,
Please help to review this patch-set.
NOTE: This patch-set doesn't work properly.
ept identity pagetabl
Hi Gleb,
On 07/03/2014 12:34 AM, Gleb Natapov wrote:
On Wed, Jul 02, 2014 at 05:00:36PM +0800, Tang Chen wrote:
ept identity pagetable is pinned in memory, and as a result it cannot be
migrated/hot-removed.
But actually it doesn't need to be pinned in memory.
This patch introduces a new
Hi Gleb,
Thanks for the advices. Please see below.
On 07/03/2014 09:55 PM, Gleb Natapov wrote:
..
@@ -575,6 +575,7 @@ struct kvm_arch {
unsigned int tss_addr;
struct page *apic_access_page;
+ bool apic_access_page_migrated;
Better have two requests KVM_REQ_APIC_PAGE_
Hi Gleb,
Thanks for the advices. Please see below.
On 07/03/2014 09:55 PM, Gleb Natapov wrote:
..
@@ -575,6 +575,7 @@ struct kvm_arch {
unsigned int tss_addr;
struct page *apic_access_page;
+ bool apic_access_page_migrated;
Better have two requests KVM_REQ_APIC_PAGE_
On 07/03/2014 12:34 AM, Gleb Natapov wrote:
On Wed, Jul 02, 2014 at 05:00:36PM +0800, Tang Chen wrote:
ept identity pagetable is pinned in memory, and as a result it cannot be
migrated/hot-removed.
But actually it doesn't need to be pinned in memory.
This patch introduces a new vcpu re
On 07/03/2014 12:24 AM, Gleb Natapov wrote:
On Wed, Jul 02, 2014 at 05:00:35PM +0800, Tang Chen wrote:
Define guest phys_addr of apic access page.
---
arch/x86/include/asm/vmx.h | 2 +-
arch/x86/kvm/svm.c | 3 ++-
arch/x86/kvm/vmx.c | 7 ---
3 files changed, 7
Hi Gleb,
On 07/02/2014 05:00 PM, Tang Chen wrote:
Hi Gleb, Marcelo,
Please help to review this patch-set.
NOTE: This patch-set doesn't work properly.
ept identity pagetable and apic access page in kvm are pinned in memory.
As a result, they cannot be migrated/hot-removed.
But actually
age(). And reset it to new page's host physical
address in tdp_page_fault(). But it seems that guest will access apic page
directly by the host physical address.
Tang Chen (4):
kvm: Add gfn_to_page_no_pin()
kvm: Add macro VMX_APIC_ACCESS_PAGE_ADDR
kvm, memory-hotplug: Update ept identity
ept identity pagetable is pinned in memory, and as a result it cannot be
migrated/hot-removed.
But actually it doesn't need to be pinned in memory.
This patch introduces a new vcpu request: KVM_REQ_MIGRATE_EPT to reset ept
indetity pagetable related variable. This request will be made when
kvm_mm
Used by the followed patches.
---
include/linux/kvm_host.h | 1 +
virt/kvm/kvm_main.c | 17 -
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index ec4e3bd..7c58d9d 100644
--- a/include/linux/kvm_host.h
+++ b/
Define guest phys_addr of apic access page.
---
arch/x86/include/asm/vmx.h | 2 +-
arch/x86/kvm/svm.c | 3 ++-
arch/x86/kvm/vmx.c | 7 ---
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h
index 7004d21..c4672
apic access page is pinned in memory, and as a result it cannot be
migrated/hot-removed.
Actually it doesn't need to be pinned in memory.
This patch introduces a new vcpu request: KVM_REQ_MIGRATE_EPT. This requet
will be made when kvm_mmu_notifier_invalidate_page() is called when the page
is unma
age(). And reset it to new page's host physical
address in tdp_page_fault(). But it seems that guest will access apic page
directly by the host physical address.
Tang Chen (4):
kvm: Add gfn_to_page_no_pin()
kvm: Add macro VMX_APIC_ACCESS_PAGE_ADDR
kvm, memory-hotplug: Update ept identity
Hi Gleb,
On 06/30/2014 02:00 PM, Gleb Natapov wrote:
On Mon, Jun 30, 2014 at 09:45:32AM +0800, Tang Chen wrote:
On 06/21/2014 04:39 AM, Marcelo Tosatti wrote:
On Fri, Jun 20, 2014 at 05:31:46PM -0300, Marcelo Tosatti wrote:
IIRC your shadow page pinning patch series support flushing of ptes
On 06/21/2014 04:39 AM, Marcelo Tosatti wrote:
On Fri, Jun 20, 2014 at 05:31:46PM -0300, Marcelo Tosatti wrote:
IIRC your shadow page pinning patch series support flushing of ptes
by mmu notifier by forcing MMU reload and, as a result, faulting in of
pinned pages during next entry. Your patch s
Hi Marcelo, Gleb,
Sorry for the delayed reply and thanks for the advices.
On 06/21/2014 04:39 AM, Marcelo Tosatti wrote:
On Fri, Jun 20, 2014 at 05:31:46PM -0300, Marcelo Tosatti wrote:
IIRC your shadow page pinning patch series support flushing of ptes
by mmu notifier by forcing MMU reload an
Hi Marcelo,
Thanks for your reply. Please see below.
On 06/20/2014 03:00 AM, Marcelo Tosatti wrote:
..
Remove pinning is preferable. In fact looks like for identity pagetable
it should be trivial, just don't pin. APIC access page is a little bit
more complicated since its physical address n
Hi Gleb,
Thanks for the quick reply. Please see below.
On 06/18/2014 02:12 PM, Gleb Natapov wrote:
On Wed, Jun 18, 2014 at 01:50:00PM +0800, Tang Chen wrote:
[Questions]
And by the way, would you guys please answer the following questions for me ?
1. What's the ept identity pagetabl
allocated in qemu userspace.
Can we allocate it in kernel space ?
4. If I want to migrate these two pages, what do you think is the best way ?
Thanks.
Signed-off-by: Tang Chen
---
arch/x86/include/asm/numa.h | 1 +
arch/x86/kvm/vmx.c | 5 +
arch/x86/kvm/x86.c
101 - 200 of 1031 matches
Mail list logo