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 tangc...@cn.fujitsu.com
---
arch/x86/include/asm/numa.h | 1 +
arch/x86/kvm/vmx.c | 5 +
arch/x86/kvm/x86.c | 1 +
arch/x86/mm/numa.c
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 pagetable
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
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
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
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
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
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
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
(). 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 pagetable when
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
+++
(). 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 pagetable when
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
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
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 request
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
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
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 vcpu
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 pagetable
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
. ;)
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 tss_addr
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.
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 request
-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/mmu.c | 11 +++
arch/x86/kvm/svm.c | 6 ++
arch/x86/kvm/vmx.c | 8 +++-
arch/x86/kvm/x86.c
-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 access page address
. 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 tangc...@cn.fujitsu.com
---
arch/x86/kvm/vmx.c | 3 ++-
arch/x86/kvm/x86.c | 2 --
2 files changed, 2 insertions
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 tangc...@cn.fujitsu.com
---
include/linux/kvm_host.h | 1 +
virt/kvm/kvm_main.c
-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 tangc...@cn.fujitsu.com
---
arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/vmx.c | 25 +++--
2 files
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 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
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 identity
-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 tangc...@cn.fujitsu.com
---
arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/vmx.c | 25 +++--
2 files
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 pinned
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,
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 two
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
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 address
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 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
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
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
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
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 b8bf47d..6ab4f87 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
], 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 struct kvm_arch.
kvm: Make
-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 | 8 +++-
arch/x86/kvm/x86.c | 17 +++--
include/linux
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 tangc...@cn.fujitsu.com
---
include/linux/kvm_host.h | 1 +
virt/kvm/kvm_main.c
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 | 37 +
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 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
-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
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
-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
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
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
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
...@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
-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
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
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
-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)
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
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
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
...@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
-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
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
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
-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
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
-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
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
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
-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
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
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
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
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
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 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
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
...@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
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
-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
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
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 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
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/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
Hi Wanpeng,
I think I have totally missed this thread.
I opened lockdep and RCU debug, and tried on 3.18-rc1. But I didn't get
the warning.
My steps are:
1. Use numactl to bind a qemu process to node1.
2. Offline all node1 memory. And the qemu process is still running.
Would you please tell
Thanks for the sharing. Will do more tests. :)
On 11/14/2014 07:39 AM, Wanpeng Li wrote:
Hi Tang,
On Tue, Nov 11, 2014 at 01:35:29PM +0800, Tang Chen wrote:
Hi Wanpeng,
Sorry for the late.
I think I have totally missed this thread.
I opened lockdep and RCU debug, and tried on 3.18-rc1
98 matches
Mail list logo