From: Lan Tianyu
This patch is to convert internal debug macros to dynamic debug function
and remove module's debug param.
Signed-off-by: Lan Tianyu
---
drivers/pci/hotplug/acpiphp_ibm.c | 56 ---
1 file changed, 23 insertions(+), 33 deletions(-)
diff --git
From: Lan Tianyu
This patch is to use pr_debug/info/warn/err to replace acpiphp debug
functions and remove module's debug param.
Signed-off-by: Lan Tianyu
---
drivers/pci/hotplug/acpiphp.h | 10 --
drivers/pci/hotplug/acpiphp_core.c | 35 +--
driver
From: Lan Tianyu
The cpufreq_set_policy() has been removed by commit 632786c. So remove
related comment.
Signed-off-by: Lan Tianyu
---
Update: miss signed-off due to using my new script. Sorry for nosiy.
drivers/cpufreq/cpufreq.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers
From: Lan Tianyu
The cpufreq_set_policy() has been removed by commit 632786c. So remove
related comment.
---
drivers/cpufreq/cpufreq.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 5c75e31..a504313 100644
--- a/drivers/cpufreq/
From: Lan Tianyu
In the cpufreq_policy_restore(), policy before system suspend is read from
from percpu's cpufreq_cpu_data_fallback. It's read operation rather than
write operation. So convert write lock to read lock
Signed-off-by: Lan Tianyu
---
drivers/cpufreq/cpufreq.c | 4 ++--
1 file chan
From: Lan Tianyu
cpufreq_set_policy() has been changed to origin __cpufreq_set_policy()
and policy->lock has been converted to rewrite lock by commit 5a01f2.
So remove the comment.
Acked-by: Viresh Kumar
Signed-off-by: Lan Tianyu
---
This patch is based on patch "cpufreq: rename __cpufreq_set_
The patch 1-2 are to clean up EC/Button drivers' code.
The patch 3 is to correct the process of abnormal param for gpe sysfs attribute.
drivers/acpi/button.c | 9 +++--
drivers/acpi/ec.c | 49 -
drivers/acpi/sysfs.c | 9 +++--
3 files
From: Lan Tianyu
Input layer provides input_set_capability() to set input device's event
related bits. This patch is to use it to replace origin code.
Signed-off-by: Lan Tianyu
---
drivers/acpi/button.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/b
From: Lan Tianyu
This patch is to convert all printks in the ec driver to pr_debug/info/err
and define pr_fmt macro to replace PREFIX.
Signed-off-by: Lan Tianyu
---
drivers/acpi/ec.c | 49 -
1 file changed, 24 insertions(+), 25 deletions(-)
diff
From: Lan Tianyu
According to design, gpe's sysfs attribute should accept "disable", "enable",
"clear" and integer number as params. Current code checks "disable",
"enable" and "clear" first. If the param didn't belong to previous kinds,
pass the param to strtoul as a string of integer number and
This patchset is to remove AC/Battery directories and alarm file under
/proc/acpi
drivers/acpi/Kconfig | 17 --
drivers/acpi/Makefile| 1 -
drivers/acpi/ac.c| 128 +
drivers/acpi/battery.c
From: Lan Tianyu
The battery's proc directory isn't useded and remove it.
Signed-off-by: Lan Tianyu
---
drivers/acpi/battery.c | 328 +
1 file changed, 1 insertion(+), 327 deletions(-)
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
From: Lan Tianyu
AC's proc directory is not used and so remove it. Prepare for removing
/proc/acpi directory.
Signed-off-by: Lan Tianyu
---
drivers/acpi/ac.c | 128 +-
1 file changed, 2 insertions(+), 126 deletions(-)
diff --git a/drivers/ac
From: Lan Tianyu
SBS's proc directory isn't useded and so remove it. Prepare for removing
/proc/acpi directory.
Signed-off-by: Lan Tianyu
---
drivers/acpi/sbs.c | 325 +
1 file changed, 4 insertions(+), 321 deletions(-)
diff --git a/drivers/
From: Lan Tianyu
Alarm proc file provides the info and control of RTC-CMOS alarm and
RTC CMOS driver provides wakealarm sysfs attribute for the same
purpose. The alarm file isn't compiled into kernel when RTC CMOS
driver is selected. The driver is default to be selected for x86
platform. So alarm
From: Lan Tianyu
There is no user of cm_sbs.c and CONFIG_ACPI_PROCFS_POWER. So remove
them. Prepare for removing /proc/acpi
Signed-off-by: Lan Tianyu
---
drivers/acpi/Kconfig | 17
drivers/acpi/Makefile | 1 -
drivers/acpi/cm_sbs.c | 105 ---
Hi Stephen:
Thanks for fix. I will discuss with maintainer about how to deal with
the issue.
On 8/6/2018 1:12 PM, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the kvm tree got a conflict in:
>
>arch/x86/include/asm/trace/hyperv.h
>
> between commit:
>
>58e
Hyper-V supports a pv hypercall HvFlushGuestPhysicalAddressSpace to
flush nested VM address space mapping in l1 hypervisor and it's to
reduce overhead of flushing ept tlb among vcpus. This patch is to
implement it.
Signed-off-by: Lan Tianyu
---
arch/x86/hyperv/Makefile | 2 +-
arch/x8
This patch is to add hyperv_nested_flush_guest_mapping support to trace
hvFlushGuestPhysicalAddressSpace hypercall.
Signed-off-by: Lan Tianyu
---
arch/x86/hyperv/nested.c| 3 +++
arch/x86/include/asm/trace/hyperv.h | 14 ++
2 files changed, 17 insertions(+)
diff --git a
Register tlb_remote_flush callback for vmx when hyperv capability of
nested guest mapping flush is detected. The interface can help to
reduce overhead when flush ept table among vcpus for nested VM. The
tradition way is to send IPIs to all affected vcpus and executes
INVEPT on each vcpus. It will t
Hyper-V provides a para-virtualization hypercall
HvFlushGuestPhysicalAddressSpace
to flush nested VM address space mapping in l1 hypervisor and it's to reduce
overhead
of flushing ept tlb among vcpus. The tradition way is to send IPIs to all
affected
vcpus and executes INVEPT on each vcpus. It w
This patch is to provide a way for platforms to register hv tlb remote
flush callback and this helps to optimize operation of tlb flush
among vcpus for nested virtualization case.
Signed-off-by: Lan Tianyu
---
Change since v2:
Rename kvm_arch_hv_flush_remote_tlb with kvm_arch_flush_remote_
On 7/19/2018 4:57 PM, Paolo Bonzini wrote:
> On 19/07/2018 10:39, Tianyu Lan wrote:
>> Hyper-V provides a para-virtualization hypercall
>> HvFlushGuestPhysicalAddressSpace
>> to flush nested VM address space mapping in l1 hypervisor and it's to reduce
>> overh
On 7/19/2018 8:05 PM, Thomas Gleixner wrote:
> On Thu, 19 Jul 2018, Tianyu Lan wrote:
>> @@ -0,0 +1,64 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +
>> +/*
>> + * Hyper-V nested virtualization code.
>> + *
>> + * Copyright (C) 2018, Micr
Hyper-V supports a pv hypercall HvFlushGuestPhysicalAddressSpace to
flush nested VM address space mapping in l1 hypervisor and it's to
reduce overhead of flushing ept tlb among vcpus. This patch is to
implement it.
Signed-off-by: Lan Tianyu
---
Change since v3
Remove GPL boilerplate.
ar
This patch is to avoid compilation warning when CONFIG_HYPERV isn't enabled.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/vmx.c | 84 +++---
1 file changed, 42 insertions(+), 42 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index
On 7/23/2018 3:39 PM, Wanpeng Li wrote:
> On Fri, 20 Jul 2018 at 16:32, Paolo Bonzini wrote:
>>
>> On 20/07/2018 05:58, KY Srinivasan wrote:
>>>
>>>
>>>> -----Original Message-
>>>> From: Tianyu Lan
>>>> Sent: Thursday, Jul
X86_CR4_OSXSAVE check belongs to sregs check and so move into
kvm_valid_sregs().
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/x86.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 153564db7980..5c9acdbb2020 100644
--- a/arch
mmu_set_spte() flushes remote tlbs for drop_parent_pte/drop_spte()
and set_spte() separately. This may introduce redundant flush. This
patch is to combine these flushes and check flush request after
calling set_spte().
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 7 ---
1 file changed,
Hi Junaid:
Thanks for your review.
On 7/25/2018 10:26 AM, Junaid Shahid wrote:
> On 07/24/2018 07:35 AM, Paolo Bonzini wrote:
>> On 24/07/2018 10:17, Tianyu Lan wrote:
>>> mmu_set_spte() flushes remote tlbs for drop_parent_pte/drop_spte()
>>> and set_spte() sep
On Thu, Jan 25, 2018 at 12:37 AM, Stephen Hemminger
wrote:
> On Wed, 24 Jan 2018 14:21:30 +0800
> lantianyu1...@gmail.com wrote:
>
>> From: Tianyu Lan
>>
>> The "next" variable is redundant in hv_get_next_write_location().
>> This patch is t
rčmář
Signed-off-by: Tianyu Lan
---
Change since v1:
Rename title and fix change log.
---
arch/x86/kvm/x86.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 1cec2c6..c53298d 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/
deassign path before they are used
in assign path. The other data maybe used in deassign path before
initialization. Syzbot test hit such case. Add mutx between
kvm_irqfd_assign() and kvm_irqfd_deassign() can fix such issue. Will
send patch to fix it.
On 12/16/2017 12:53 PM, Tianyu Lan wrote:
I re
-off-by: Tianyu Lan
---
arch/x86/kvm/x86.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 1cec2c6..c53298d 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -7496,13 +7496,13 @@ EXPORT_SYMBOL_GPL(kvm_task_switch
-off-by: Tianyu Lan
---
Sorry for noise. Missed kvm maillist.
arch/x86/kvm/x86.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 1cec2c6..c53298d 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -7496,13 +7496,13
On 4/12/2018 11:25 PM, Vitaly Kuznetsov wrote:
> Enlightened MSR-Bitmap is a natural extension of Enlightened VMCS:
> Hyper-V Top Level Functional Specification states:
>
> "The L1 hypervisor may collaborate with the L0 hypervisor to make MSR
> accesses more efficient. It can enable enlightened MS
Hi Radim:
Thanks for your review.
On 3/9/2018 12:15 AM, rkrc...@redhat.com wrote:
> 2018-02-27 06:57+0000, Tianyu Lan:
>> From: Lan Tianyu
>>
>> This patch is to check sreg value first and then load vcpu in order
>> to avoid redundant loading/putting vcpu.
>
X86_CR4_OSXSAVE check belongs to sregs check and so move into kvm_valid_sregs().
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/x86.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 6c81df9..82845cb 100644
--- a/arch/x86/kvm/x
Originally, flush tlb is done by slot_handle_level_range(). This patch
is to flush tlb directly in the kvm_zap_gfn_range() when range
flush is available.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/arch/x8
For nested memory virtualization, Hyper-v doesn't set write-protect
L1 hypervisor EPT page directory and page table node to track changes
while it relies on guest to tell it changes via HvFlushGuestAddressLlist
hypercall. HvFlushGuestAddressLlist hypercall provides a way to flush
EPT page table wi
Add flush range call back in the kvm_x86_ops and platform can use it
to register its associated function. The parameter "kvm_tlb_range"
accepts a single range and flush list which contains a list of ranges.
Signed-off-by: Lan Tianyu
---
Change since v1:
Change "end_gfn" to "pages" to aviod
kvm_mmu_zap_collapsible_spte() returns flush request to the
slot_handle_leaf() and the latter does flush on demand. When
range flush is available, make kvm_mmu_zap_collapsible_spte()
to flush tlb with range directly to avoid returning range back
to slot_handle_leaf().
Signed-off-by: Lan Tianyu
--
Hyper-V provides HvFlushGuestAddressList() hypercall to flush EPT tlb
with specified ranges. This patch is to add the hypercall support.
Signed-off-by: Lan Tianyu
---
Change since v2:
Fix some coding style issues
- Move HV_MAX_FLUSH_PAGES and HV_MAX_FLUSH_REP_COUNT to
hyperv
This patch is to replace kvm_flush_remote_tlbs() with kvm_flush_
remote_tlbs_with_address() in some functions without logic change.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 33 ++---
arch/x86/kvm/paging_tmpl.h | 3 ++-
2 files changed, 24 insertions
If ept table pointers are mismatched, flushing tlb for each vcpus via
hv flush interface still helps to reduce vmexits which are triggered
by IPI and INEPT emulation.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/vmx.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --gi
This patch is to trace log in the hyperv_nested_flush_
guest_mapping_range().
Signed-off-by: Lan Tianyu
---
arch/x86/hyperv/nested.c| 1 +
arch/x86/include/asm/trace/hyperv.h | 14 ++
2 files changed, 15 insertions(+)
diff --git a/arch/x86/hyperv/nested.c b/arch/x86/hyp
This patch is to register tlb_remote_flush_with_range callback with
hv tlb range flush interface.
Signed-off-by: Lan Tianyu
---
Change since v1:
Pass flush range with new hyper-v tlb flush struct rather
than KVM tlb flush struct.
---
arch/x86/kvm/vmx.c | 58 +++
It's necessary to check whether mmu page is last or large page when add
mmu page into flush list. "spte" is needed for such check and so add
spte point in the struct kvm_mmu_page.
Signed-off-by: Lan Tianyu
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/mmu.c | 5 +
arch
This patch is to use range list flush function in the
mmu_sync_children(), kvm_mmu_commit_zap_page() and
FNAME(sync_page)().
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 26 +++---
arch/x86/kvm/paging_tmpl.h | 5 -
2 files changed, 27 insertions(+), 4 delet
PV EPT tlb flush function will accept a list of flush ranges and
use struct kvm_mmu_page as the list entry.
Signed-off-by: Lan Tianyu
---
arch/x86/include/asm/kvm_host.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index a6
This patch is to flush tlb directly in the kvm_handle_hva_range()
when range flush is available.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index d10d8423e8d6..877edae0401f 100644
--- a/arch/
This patch is to add wrapper functions for tlb_remote_flush_with_range
callback.
Signed-off-by: Lan Tianyu
---
Change since V2:
Fix comment in the kvm_flush_remote_tlbs_with_range()
---
arch/x86/kvm/mmu.c | 48
1 file changed, 48 insertions
On 9/27/2018 12:16 PM, Michael Kelley (EOSG) wrote:
> From: Tianyu Lan Sent: Wednesday, September 26, 2018 8:50 PM
>>
>> Hyper-V provides HvFlushGuestAddressList() hypercall to flush EPT tlb
>> with specified ranges. This patch is to add the hypercall support.
>>
&
is_external_interrupt() is not used now and so remove it.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/vmx.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 70e1f916bfc9..619307b3e6bb 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@
Hyper-V provides a para-virtualization hypercall
HvFlushGuestPhysicalAddressSpace
to flush nested VM address space mapping in l1 hypervisor and it's to reduce
overhead
of flushing ept tlb among vcpus. The tradition way is to send IPIs to all
affected
vcpus and executes INVEPT on each vcpus. It w
Hyper-V supports a pv hypercall HvFlushGuestPhysicalAddressSpace to
flush nested VM address space mapping in l1 hypervisor and it's to
reduce overhead of flushing ept tlb among vcpus. This patch is to
implement it.
Signed-off-by: Lan Tianyu
---
arch/x86/hyperv/Makefile | 2 +-
arch/x8
Register tlb_remote_flush callback for vmcs when hyperv capability of
nested guest mapping flush is detected. The interface can help to
reduce overhead when flush ept table among vcpus for nested VM. The
tradition way is to send IPIs to all affected vcpus and executes
INVEPT on each vcpus. It will
This patch is to provide a way for platforms to register tlb remote
flush callback and this helps to optimize operation of tlb flush
among vcpus for nested virtualization case.
Signed-off-by: Lan Tianyu
---
arch/x86/include/asm/kvm_host.h | 1 +
virt/kvm/kvm_main.c | 12 +++-
This patch is to check ept table pointer of each cpus when set ept
tables and store identical ept table pointer if all ept table pointers
of single VM are same. This is for support of para-virt ept flush
hypercall.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/vmx.c | 31 +++
Hyper-V provides a para-virtualization hypercall
HvFlushGuestPhysicalAddressSpace
to flush nested VM address space mapping in l1 hypervisor and it's to reduce
overhead
of flushing ept tlb among vcpus. The tradition way is to send IPIs to all
affected
vcpus and executes INVEPT on each vcpus. It w
Hyper-V supports a pv hypercall HvFlushGuestPhysicalAddressSpace to
flush nested VM address space mapping in l1 hypervisor and it's to
reduce overhead of flushing ept tlb among vcpus. This patch is to
implement it.
Signed-off-by: Lan Tianyu
---
arch/x86/hyperv/Makefile | 2 +-
arch/x8
This patch is to provide a way for platforms to register hv tlb remote
flush callback and this helps to optimize operation of tlb flush
among vcpus for nested virtualization case.
Signed-off-by: Lan Tianyu
---
Change since v1:
Add kvm_arch_hv_flush_remote_tlb() to avoid compilation issue
f
This patch is to check ept table pointer of each cpus when set ept
tables and store identical ept table pointer if all ept table pointers
of single VM are same. This is for support of para-virt ept flush
hypercall.
Signed-off-by: Lan Tianyu
---
Change since v1:
Replace identical_ept_pointe
This patch is to add hyperv_nested_flush_guest_mapping support to trace
hvFlushGuestPhysicalAddressSpace hypercall.
Signed-off-by: Lan Tianyu
---
arch/x86/hyperv/nested.c| 3 +++
arch/x86/include/asm/trace/hyperv.h | 14 ++
2 files changed, 17 insertions(+)
diff --git a
Register tlb_remote_flush callback for vmx when hyperv capability of
nested guest mapping flush is detected. The interface can help to
reduce overhead when flush ept table among vcpus for nested VM. The
tradition way is to send IPIs to all affected vcpus and executes
INVEPT on each vcpus. It will t
Hi Michael:
Thanks for your review.
On 7/11/2018 5:29 AM, Michael Kelley (EOSG) wrote:
> From: Tianyu Lan Monday, July 9, 2018 2:03 AM
>> Hyper-V supports a pv hypercall HvFlushGuestPhysicalAddressSpace to
>> flush nested VM address space mapping in l1 hypervisor and it
Hi Vitaly:
Thanks for your review.
On 7/2/2018 11:09 PM, Vitaly Kuznetsov wrote:
> Tianyu Lan writes:
>
>> This patch is to check ept table pointer of each cpus when set ept
>> tables and store identical ept table pointer if all ept table pointers
>> of single
Hi Sean:
Thank for your review.
On 7/3/2018 1:29 AM, Sean Christopherson wrote:
> On Mon, Jul 02, 2018 at 02:17:29PM +0000, Tianyu Lan wrote:
>> This patch is to check ept table pointer of each cpus when set ept
>> tables and store identical ept table pointer if all ept
Hi Vitaly:
Thanks for your review.
On 6/12/2018 11:12 PM, Vitaly Kuznetsov wrote:
> Tianyu Lan writes:
>
>> Register tlb_remote_flush callback for vmcs when hyperv capability of
>> nested guest mapping flush is detected. The interface can help to reduce
>> overh
On 6/14/2018 6:33 PM, Vitaly Kuznetsov wrote:
> Tianyu Lan writes:
>
>> On 6/12/2018 11:12 PM, Vitaly Kuznetsov wrote:
>>> Tianyu Lan writes:
>>>
>>>>
>>>> +static int vmx_remote_flush_tlb(struct kvm *kvm)
>>>> +{
>&
OK. Thanks for suggestion and will update in the next version.
>
> > Signed-off-by: Lan Tianyu
>
> For the powerpc bits:
>
> Acked-by: Paul Mackerras
--
Best regards
Tianyu Lan
; @@ -11614,6 +11621,8 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm
> > *kvm, unsigned int id)
> > vmx->pi_desc.nv = POSTED_INTR_VECTOR;
> > vmx->pi_desc.sn = 1;
> >
> > + vmx->ept_pointer = INVALID_PAGE;
> > +
> > return &vmx->vcpu;
> >
> > free_vmcs:
> >
>
--
Best regards
Tianyu Lan
platforms still need the
flush in the
kvm_mmu_notifier_clear_flush_young(). I think it's better to separate
flush request and
"young" from return value of kvm_age_hva(). New flush parameter I
added in the patch 10
can be changed to a pointer and kvm_age_hva() can use it to return
flush request.
--
Best regards
Tianyu Lan
kvm);
> > + kvm_flush_remote_tlbs_with_list(vcpu->kvm, &flush_list);
>
> This is a bit confusing and potentially fragile. It's not obvious that
> kvm_flush_remote_tlbs_with_list() is guaranteed to call
> kvm_flush_remote_tlbs() when kvm_available_flush_tlb_with_range() is
> false, and you're relying on the kvm_flush_remote_tlbs_with_list() call
> chain to never optimize away the empty list case. Rechecking
> kvm_available_flush_tlb_with_range() isn't expensive.
That makes sense. Will update. Thanks.
>
> >
> > return nr_present;
> > }
> > --
> > 2.14.4
> >
--
Best regards
Tianyu Lan
Hi Paolo:
Thanks for your review.
On Tue, Jan 8, 2019 at 12:31 AM Paolo Bonzini wrote:
>
> On 07/01/19 04:42, Tianyu Lan wrote:
> >> I'm assuming you're
> >> clearing young to avoid the flush in kvm_mmu_notifier_clear_flush_young(),
> >&g
Hi Vitaly:
Thanks for your review.
On 11/6/2018 11:50 PM, Vitaly Kuznetsov wrote:
ltyker...@gmail.com writes:
From: Lan Tianyu
This patch is to initialize ept_pointer to INVALID_PAGE and check it
before flushing ept tlb. If ept_pointer is invalidated, bypass the flush
request.
Signe
On 11/7/2018 6:49 PM, Vitaly Kuznetsov wrote:
Tianyu Lan writes:
Hi Vitaly:
Thanks for your review.
On 11/6/2018 11:50 PM, Vitaly Kuznetsov wrote:
ltyker...@gmail.com writes:
From: Lan Tianyu
This patch is to initialize ept_pointer to INVALID_PAGE and check it
before flushing
SS_SPACE hypercall needs the address of
> the
> +* base of EPT PML4 table, strip off EPT configuration information.
> +*/
> ret = hyperv_flush_guest_mapping(
> - to_vmx(kvm_get_vcpu(kvm, 0))->ept_pointer);
> + to_vmx(kvm_get_vcpu(kvm, 0))->ept_pointer &
> PAGE_MASK);
>
> out:
> spin_unlock(&to_kvm_vmx(kvm)->ept_pointer_lock);
> --
> 2.17.1
>
--
Best regards
Tianyu Lan
On Thu, Oct 11, 2018 at 8:18 PM Vitaly Kuznetsov wrote:
>
> Tianyu Lan writes:
>
> > On Thu, Oct 11, 2018 at 6:32 PM Vitaly Kuznetsov
> > wrote:
> >>
> >> I'm observing random crashes in multi-vCPU L2 guests running on KVM on
> >> Hyper-V.
On Thu, Oct 11, 2018 at 9:00 PM Vitaly Kuznetsov wrote:
>
> Tianyu Lan writes:
>
> > On Thu, Oct 11, 2018 at 8:18 PM Vitaly Kuznetsov
> > wrote:
> >>
> >> Tianyu Lan writes:
> >>
> >> > On Thu, Oct 11, 2018 at 6:32 PM Vitaly Ku
gt; }
> > }
> >
> > + if (flush && kvm_available_flush_tlb_with_range())
> > + kvm_flush_remote_tlbs_with_address(kvm, gfn_start,
> > + gfn_end - gfn_start + 1);
> > +
>
> ... and this can be just if (flush), because if flush_tlb is true then
> slot_handle_level_range always returns false.
OK. Will update.
--
Best regards
Tianyu Lan
Hi Paolo:
Thanks for your review. Sorry for later response due to holiday.
On Mon, Oct 1, 2018 at 11:26 PM Paolo Bonzini wrote:
>
> On 27/09/2018 05:48, Tianyu Lan wrote:
> > +
> > + if (range && kvm_x86_ops-&g
Add flush range call back in the kvm_x86_ops and platform can use it
to register its associated function. The parameter "kvm_tlb_range"
accepts a single range and flush list which contains a list of ranges.
Signed-off-by: Lan Tianyu
---
Change since v1:
Change "end_gfn" to "pages" to aviod
This patch is to add wrapper functions for tlb_remote_flush_with_range
callback.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 48
1 file changed, 48 insertions(+)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index c67f09086378..ac3b
Originally, flush tlb is done by slot_handle_level_range(). This patch
is to flush tlb directly in the kvm_zap_gfn_range() when range
flush is available.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/arch/x8
For nested memory virtualization, Hyper-v doesn't set write-protect
L1 hypervisor EPT page directory and page table node to track changes
while it relies on guest to tell it changes via HvFlushGuestAddressLlist
hypercall. HvFlushGuestAddressLlist hypercall provides a way to flush
EPT page table
kvm_mmu_zap_collapsible_spte() returns flush request to the
slot_handle_leaf() and the latter does flush on demand. When
range flush is available, make kvm_mmu_zap_collapsible_spte()
to flush tlb with range directly to avoid returning range back
to slot_handle_leaf().
Signed-off-by: Lan Tianyu
--
This patch is to replace kvm_flush_remote_tlbs() with kvm_flush_
remote_tlbs_with_address() in some functions without logic change.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 33 ++---
arch/x86/kvm/paging_tmpl.h | 3 ++-
2 files changed, 24 insertions
This patch is to flush tlb directly in the kvm_handle_hva_range()
when range flush is available.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 822e170881a4..dfd2a0710417 100644
--- a/arch/
Hyper-V provides HvFlushGuestAddressList() hypercall to flush EPT tlb
with specified ranges. This patch is to add the hypercall support.
Signed-off-by: Lan Tianyu
---
Change since v1:
Add hyperv tlb flush struct to avoid use kvm tlb flush struct
in the hyperv file.
---
arch/x86/hyperv/nes
This patch is to trace log in the hyperv_nested_flush_
guest_mapping_range().
Signed-off-by: Lan Tianyu
---
arch/x86/hyperv/nested.c| 1 +
arch/x86/include/asm/trace/hyperv.h | 14 ++
2 files changed, 15 insertions(+)
diff --git a/arch/x86/hyperv/nested.c b/arch/x86/hyp
If ept table pointers are mismatched, flushing tlb for each vcpus via
hv flush interface still helps to reduce vmexits which are triggered
by IPI and INEPT emulation.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/vmx.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --gi
It's necessary to check whether mmu page is last or large page when add
mmu page into flush list. "spte" is needed for such check and so add
spte point in the struct kvm_mmu_page.
Signed-off-by: Lan Tianyu
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/mmu.c | 5 +
arch
This patch is to register tlb_remote_flush_with_range callback with
hv tlb range flush interface.
Signed-off-by: Lan Tianyu
---
Change since v1:
Pass flush range with new hyper-v tlb flush struct rather
than KVM tlb flush struct.
---
arch/x86/kvm/vmx.c | 58 +++
This patch is to use range list flush function in the
mmu_sync_children(), kvm_mmu_commit_zap_page() and
FNAME(sync_page)().
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 26 +++---
arch/x86/kvm/paging_tmpl.h | 5 -
2 files changed, 27 insertions(+), 4 delet
PV EPT tlb flush function will accept a list of flush ranges and
use struct kvm_mmu_page as the list entry.
Signed-off-by: Lan Tianyu
---
arch/x86/include/asm/kvm_host.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index a6
Merge check of "sp->role.cr4_pae != !!is_pae(vcpu))" and "vcpu->
arch.mmu.sync_page(vcpu, sp) == 0". kvm_mmu_prepare_zap_page()
is called under both these conditions.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch
Hi Paolo:
Thanks for review.
On 7/18/2018 8:01 PM, Paolo Bonzini wrote:
> On 09/07/2018 11:02, Tianyu Lan wrote:
>> +/*
>> + * Call kvm_arch_hv_tlb_remote first and go back old way when
>> + * return failure.
>> + */
>> +if (
On 7/18/2018 7:59 PM, Paolo Bonzini wrote:
> On 09/07/2018 11:02, Tianyu Lan wrote:
>> +static void check_ept_pointer(struct kvm_vcpu *vcpu, u64 eptp)
>> +{
>> +struct kvm *kvm = vcpu->kvm;
>> +u64 tmp_eptp = INVALID_PAGE;
>> +int i;
>> +
Hyper-V provides a para-virtualization hypercall
HvFlushGuestPhysicalAddressSpace
to flush nested VM address space mapping in l1 hypervisor and it's to reduce
overhead
of flushing ept tlb among vcpus. The tradition way is to send IPIs to all
affected
vcpus and executes INVEPT on each vcpus. It w
1 - 100 of 232 matches
Mail list logo