: 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 | 1 +
mm/bootmem.c
: 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 | 1 +
mm/bootmem.c
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 guz.f...@cn.fujitsu.com
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
include/linux/mm.h | 1 +
mm
()
2. Make reset_node_managed_pages() non-static
3. Call reset_node_managed_pages() in hotadd_new_pgdat() after pgdat is
initialized
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
Signed-off-by: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com
---
include/linux/bootmem.h | 1 +
mm/bootmem.c
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" opt
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. When it i
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 option, start
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. When it is migrated, guest
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]
Just
on 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
n
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 &
SECONDARY_EXEC_VIRTUALIZE_APIC_AC
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
Signed-off-by: Tang Chen
---
arch/x86
t.
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 +
arch/arm64/include/asm/kvm_ho
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
seless 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 apic acces
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 share one
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 share one apic
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 tangc...@cn.fujitsu.com
Reviewed-by: Gleb Natapov g...@kernel.org
---
arch/x86/kvm/svm.c | 3 ++-
arch/x86/kvm/vmx.c | 6 +++---
2 files changed, 5
-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 tangc...@cn.fujitsu.com
Reviewed-by: Gleb Natapov g...@kernel.org
---
arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/vmx.c
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 apic access
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 pbonz...@redhat.com
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
arch/x86/include/asm
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 tangc...@cn.fujitsu.com
---
arch/arm/include/asm/kvm_host.h | 5 +
arch/arm64/include/asm/kvm_host.h | 5 +
arch/ia64
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
SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES))
Signed-off-by: Tang Chen tangc
...@kernel.org
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
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
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 pbonz...@redhat.com
Signed-off-by: Tang
on success, -errno on failure.
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
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
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]
Just
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
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
on 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
c 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 +++
include/linux/kvm_host.h| 1 +
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
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
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
---
arch/x86/include/asm/kvm_host.h
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
t.
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 +++
include/linux/kvm_host.h
nabled.
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 | 6 ++
arch/x86/kvm/vmx.c
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 acces
request 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
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 tangc...@cn.fujitsu.com
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/svm.c | 6 ++
arch/x86/kvm/vmx.c | 9
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 tangc...@cn.fujitsu.com
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/vmx.c
...@kernel.org
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
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
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 tangc...@cn.fujitsu.com
---
include/linux
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 tangc...@cn.fujitsu.com
---
arch/x86/kvm/x86.c | 11 +++
include/linux/kvm_host.h | 14 +-
virt/kvm
-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 tangc...@cn.fujitsu.com
Reviewed-by: Gleb Natapov g...@kernel.org
---
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 tangc...@cn.fujitsu.com
Reviewed-by: Gleb Natapov g...@kernel.org
---
arch/x86/kvm/svm.c | 3 ++-
arch/x86/kvm/vmx.c | 6 +++---
2 files changed, 5
-by: Tang Chen tangc...@cn.fujitsu.com
---
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 +++
include/linux/kvm_host.h| 1 +
5 files changed, 37 insertions
on success, -errno on failure.
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
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
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
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
on 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
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(-)
diff --g
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
h 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: Reload
->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|
original 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
-arch.apic_access_page to the new page.
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
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
-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 tangc...@cn.fujitsu.com
Reviewed-by: Gleb Natapov g...@kernel.org
---
arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/vmx.c
...@kernel.org
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
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
vmcs. And this patch requests apic access page reload in L2-L1 vmexit.
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
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
on success, -errno on failure.
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
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
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 tangc...@cn.fujitsu.com
Reviewed-by: Gleb Natapov g...@kernel.org
---
arch/x86/kvm/svm.c | 3 ++-
arch/x86/kvm/vmx.c | 6 +++---
2 files changed, 5
on 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
ch 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' apic ac
->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|
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 100644
--- a
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
...@kernel.org
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
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
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 tangc...@cn.fujitsu.com
Reviewed-by: Gleb Natapov g...@kernel.org
---
arch/x86/kvm/svm.c | 3 ++-
arch/x86/kvm/vmx.c | 6 +++---
2 files changed, 5
...@kernel.org)
3. 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
-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 tangc...@cn.fujitsu.com
Reviewed-by: Gleb Natapov g...@kernel.org
---
arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/vmx.c
-arch.apic_access_page to the new page.
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
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
vmcs. And this patch requests apic access page reload in L2-L1 vmexit.
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
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
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 tangc...@cn.fujitsu.com
on success, -errno on failure.
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
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
on 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 -
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):
kvm:
->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|
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/x86.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
---
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
-arch.apic_access_page to the new page.
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
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
vmcs. And this patch requests apic access page reload in L2-L1 vmexit.
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/svm.c | 6 ++
arch/x86/kvm/vmx.c | 32
arch/x86/kvm/x86.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 tangc...@cn.fujitsu.com
---
arch/x86/kvm/svm.c | 3 ++-
arch/x86/kvm/vmx.c | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git
on success, -errno on failure.
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
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
-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 tangc...@cn.fujitsu.com
---
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.
After this patch, acpi access page is able to be migrated.
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
arch/x86/kvm/vmx.c | 2 +-
arch
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 jan.kis...@web.de )
2. The original patch 1 is now patch 6 since we should unpin apic access page
at the very last moment.
Tang Chen (6
ishi 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_in_range_n
...@huawei.com
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com
---
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
201 - 300 of 2061 matches
Mail list logo