From: Tianyu Lan
The "next" variable is redundant in hv_get_next_write_location().
This patch is to remove it and return write_index directly.
Signed-off-by: Tianyu Lan
---
drivers/hv/ring_buffer.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/hv/ring_buffer.c
From: Tianyu Lan
Some hv_get/set** helper functions in ring_buffer code are
only called once or not used. This patch is to clear up these codes.
Signed-off-by: Tianyu Lan
---
Change since v1:
Clear up more hv_get/set** functions.
---
drivers/hv/ring_buffer.c | 49 --
From: Lan Tianyu
This patch is to initialize ept_pointer to INVALID_PAGE and check it
before flushing ept tlb. If ept_pointer is invalid, bypass the flush
request.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/vmx.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git
From: Lan Tianyu
Fix max line length problem.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/vmx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 6577ec8cbb0f..2356118ea440 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@
From: Lan Tianyu
This patch is to move tlb flush in kvm_set_pte_rmapp() to
kvm_mmu_notifier_change_pte() in order to avoid redundant tlb flush.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 8 ++--
virt/kvm/kvm_main.c | 5 -
2 files changed, 6 insertions(+), 7 deletions(-)
diff
From: Lan Tianyu
This patch is to flush tlb directly in the kvm_set_pte_rmapp()
and return 0.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 3b0f60e88f54..64bd848f021e 100644
--- a/arch/x86
From: Lan Tianyu
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
---
Change since v4:
Move operation of setting flush_tlb out of for loop.
---
arch/x86/kv
From: Lan Tianyu
The patch is to make kvm_set_spte_hva() return int and caller can
check return value to determine flush tlb or not.
Signed-off-by: Lan Tianyu
---
arch/arm/include/asm/kvm_host.h | 2 +-
arch/arm64/include/asm/kvm_host.h | 2 +-
arch/mips/include/asm/kvm_host.h| 2 +-
From: 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 | 31 +--
arch/x86/kvm/paging_tmpl.h | 3 ++-
2 files chang
From: Lan Tianyu
Hyper-V provides HvFlushGuestAddressList() hypercall to flush EPT tlb
with specified ranges. This patch is to add the hypercall support.
Reviewed-by: Michael Kelley
Signed-off-by: Lan Tianyu
---
Change sincd v4:
- Expose function hyperv_fill_flush_guest_mapping_list()
From: Lan Tianyu
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 flus
From: Lan Tianyu
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"
From: Lan Tianyu
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/nest
From: Lan Tianyu
This patch is to register tlb_remote_flush_with_range callback with
hv tlb range flush interface.
Signed-off-by: Lan Tianyu
---
Change since v4:
- Use new function kvm_fill_hv_flush_list_func() to fill flush
request.
Change since v3:
- Merge Vitaly's don'
From: Lan Tianyu
This patch is to add wrapper functions for tlb_remote_flush_with_range
callback and flush tlb directly in kvm_mmu_zap_collapsible_spte().
kvm_mmu_zap_collapsible_spte() returns flush request to the
slot_handle_leaf() and the latter does flush on demand. When
range flush is availa
From: Lan Tianyu
The "ret" is initialized to be ENOTSUPP. The return value of
__hv_remote_flush_tlb_with_range() will be Or with "ret" when ept
table potiners are mismatched. This will cause return ENOTSUPP even if
flush tlb successfully. This patch is to fix the issue and set
"ret" to 0.
Fix: a
From: Lan Tianyu
This patchset is to introduce hv ept tlb range list flush function
support in the KVM MMU component. Flushing ept tlbs of several address
range can be done via single hypercall and new list flush function is
used in the kvm_mmu_commit_zap_page() and FNAME(sync_page). This patchse
From: Lan Tianyu
Add parameter offset to specify start position to add flush ranges in
guest address list of struct hv_guest_mapping_flush_list.
Signed-off-by: Lan Tianyu
---
arch/x86/hyperv/nested.c| 4 ++--
arch/x86/include/asm/mshyperv.h | 2 +-
arch/x86/kvm/vmx/vmx.c | 2 +
From: Lan Tianyu
Populate ranges on the flush list into struct hv_guest_mapping_flush_list
when flush list is available in the struct kvm_tlb_range.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/vmx/vmx.c | 18 --
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/arch
From: Lan Tianyu
This patch is to flush tlb via flush list function.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/paging_tmpl.h | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index 833e8855bbc9..866ccd
From: Lan Tianyu
This patch is to introduce tlb flush with range list interface and use
struct kvm_mmu_page as list entry. Use flush list function in the
kvm_mmu_commit_zap_page().
Signed-off-by: Lan Tianyu
---
arch/x86/include/asm/kvm_host.h | 7 +++
arch/x86/kvm/mmu.c | 24
From: Lan Tianyu
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
From: Lan Tianyu
This patch is to add flush parameter for kvm_aga_hva() and inside code
can check whether tlb flush is necessary when associated sptes are changed.
The platform may just flush affected address tlbs instead of entire
table's.
Signed-off-by: Lan Tianyu
---
arch/arm/include/asm/kv
From: Lan Tianyu
This patch is to flush tlb in the kvm_mmu_write_protect_pt_masked() when
tlb range flush is available and make kvm_mmu_write_protect_pt_masked()
return flush request.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 25 ++---
1 file changed, 18 insertions
From: Lan Tianyu
This patch is to flush tlb directly in the kvm_mmu_slot_gfn_write_protect()
when range flush is available.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index d3272c5066ea..6d4f
From: Lan Tianyu
The dirty bits have already been checked in the previous check of
"dirty_bitmap" and mask must be non-zero value at this point.
Signed-off-by: Lan Tianyu
---
virt/kvm/kvm_main.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/virt/kvm/kvm_main.c b/v
From: Lan Tianyu
This patch is to flush tlb in the kvm_age_rmapp() when tlb range flush
is available and flush request is true.
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 a5728f51bf7d
From: Lan Tianyu
This patch is to make kvm_arch_mmu_enable_log_dirty_pt_masked() return value
and caller can use it to determine whether tlb flush is necessary.
kvm_get_dirty_log_protect() and kvm_clear_dirty_log_protect() use the return
value of kvm_arch_mmu_enable_log_dirty_pt_masked() to popul
From: Lan Tianyu
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
---
Change since v4:
Move operation of setting flush_tlb out of for loop.
---
arch/x86/kv
From: Lan Tianyu
This patch is to flush tlb directly in the kvm_set_pte_rmapp()
and return 0.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index b13b419166c4..39e0e2572710 100644
--- a/arch/x86
From: Lan Tianyu
This patch is to move tlb flush in kvm_set_pte_rmapp() to
kvm_mmu_notifier_change_pte() in order to avoid redundant tlb flush.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 8 ++--
virt/kvm/kvm_main.c | 5 -
2 files changed, 6 insertions(+), 7 deletions(-)
diff
From: Lan Tianyu
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 ins
From: Lan Tianyu
This patch is to add wrapper functions for tlb_remote_flush_with_range
callback.
Signed-off-by: Lan Tianyu
---
Change sicne V3:
Remove code of updating "tlbs_dirty"
Change since V2:
Fix comment in the kvm_flush_remote_tlbs_with_range()
---
arch/x86/kvm/mmu.c | 40
From: Lan Tianyu
This patch is to move tlb flush in kvm_set_pte_rmapp() to
kvm_mmu_notifier_change_pte() in order to avoid redundant tlb flush.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 8 ++--
virt/kvm/kvm_main.c | 5 -
2 files changed, 6 insertions(+), 7 deletions(-)
diff
From: Lan Tianyu
This patch is to flush tlb directly in the kvm_set_pte_rmapp()
and return 0.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 5d3a180c57e2..f3742ff4ec18 100644
--- a/arch/x86
From: Lan Tianyu
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/
From: Lan Tianyu
Hyper-V provides HvFlushGuestAddressList() hypercall to flush EPT tlb
with specified ranges. This patch is to add the hypercall support.
Reviewed-by: Michael Kelley
Signed-off-by: Lan Tianyu
---
Change since v2:
Fix some coding style issues
- Move HV_MAX_FLUSH_P
From: Lan Tianyu
This patch is to register tlb_remote_flush_with_range callback with
hv tlb range flush interface.
Signed-off-by: Lan Tianyu
---
Change since v3:
Merge Vitaly's don't pass EPT configuration info to
vmx_hv_remote_flush_tlb() fix.
Change since v1:
Pass flush range w
From: Lan Tianyu
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 dele
From: Lan Tianyu
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
From: Lan Tianyu
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(-)
d
From: Lan Tianyu
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
From: Lan Tianyu
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/nest
From: Lan Tianyu
The max flush rep count of HvFlushGuestPhysicalAddressList hypercall
is equal with how many entries of union hv_gpa_page_range can be populated
into the input parameter page. The origin code lacks parenthesis around
PAGE_SIZE - 2 * sizeof(u64). This patch is to fix it.
Cc:
Fixs
From: Lan Tianyu
The max flush rep count of HvFlushGuestPhysicalAddressList hypercall
is equal with how many entries of union hv_gpa_page_range can be populated
into the input parameter page. The origin code lacks parenthesis around
PAGE_SIZE - 2 * sizeof(u64). This patch is to fix it.
Cc:
Fixe
From: Lan Tianyu
On the bare metal, enabling X2APIC mode requires interrupt remapping
function which helps to deliver irq to cpu with 32-bit APIC ID.
Hyper-V doesn't provide interrupt remapping function so far and Hyper-V
MSI protocol already supports to deliver interrupt to the CPU whose
virtual
From: Lan Tianyu
This patch is to add Hyper-V IOMMU driver file into Hyper-V CORE and
DRIVERS scope.
Reviewed-by: Michael Kelley
Signed-off-by: Lan Tianyu
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 9f64f8d..5fb6306 100644
--- a/MAINTAIN
From: Lan Tianyu
On the bare metal, enabling X2APIC mode requires interrupt remapping
function which helps to deliver irq to cpu with 32-bit APIC ID.
Hyper-V doesn't provide interrupt remapping function so far and Hyper-V
MSI protocol already supports to deliver interrupt to the CPU whose
virtual
From: Lan Tianyu
Hyper-V doesn't provide irq remapping for IO-APIC. To enable x2apic,
set x2apic destination mode to physcial mode when x2apic is available
and Hyper-V IOMMU driver makes sure cpus assigned with IO-APIC irqs have
8-bit APIC id.
Reviewed-by: Thomas Gleixner
Reviewed-by: Michael K
From: Lan Tianyu
Add parameter offset to specify start position to add flush ranges in
guest address list of struct hv_guest_mapping_flush_list.
Signed-off-by: Lan Tianyu
---
Update "offset" parameter's type of hyperv_fill_flush_guest_mapping_list()
arch/x86/hyperv/nested.c| 4 ++--
a
From: Lan Tianyu
Populate ranges on the flush list into struct hv_guest_mapping_flush_list
when flush list is available in the struct kvm_tlb_range.
Signed-off-by: Lan Tianyu
---
Update:
- Add check of return value "offset" in the
kvm_fill_hv_flush_list_func()
Change since v2:
From: Lan Tianyu
On the bare metal, enabling X2APIC mode requires interrupt remapping
function which helps to deliver irq to cpu with 32-bit APIC ID.
Hyper-V doesn't provide interrupt remapping function so far and Hyper-V
MSI protocol already supports to deliver interrupt to the CPU whose
virtual
From: Lan Tianyu
Hyper-V doesn't provide irq remapping for IO-APIC. To enable x2apic,
set x2apic destination mode to physcial mode when x2apic is available
and Hyper-V IOMMU driver makes sure cpus assigned with IO-APIC irqs have
8-bit APIC id.
Reviewed-by: Thomas Gleixner
Reviewed-by: Michael K
From: Lan Tianyu
On the bare metal, enabling X2APIC mode requires interrupt remapping
function which helps to deliver irq to cpu with 32-bit APIC ID.
Hyper-V doesn't provide interrupt remapping function so far and Hyper-V
MSI protocol already supports to deliver interrupt to the CPU whose
virtual
From: Lan Tianyu
This patch is to add Hyper-V IOMMU driver file into Hyper-V CORE and
DRIVERS scope.
Reviewed-by: Michael Kelley
Signed-off-by: Lan Tianyu
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 9f64f8d..5fb6306 100644
--- a/MAINTAIN
From: Lan Tianyu
On the bare metal, enabling X2APIC mode requires interrupt remapping
function which helps to deliver irq to cpu with 32-bit APIC ID.
Hyper-V doesn't provide interrupt remapping function so far and Hyper-V
MSI protocol already supports to deliver interrupt to the CPU whose
virtual
From: Lan Tianyu
On the bare metal, enabling X2APIC mode requires interrupt remapping
function which helps to deliver irq to cpu with 32-bit APIC ID.
Hyper-V doesn't provide interrupt remapping function so far and Hyper-V
MSI protocol already supports to deliver interrupt to the CPU whose
virtual
From: Lan Tianyu
Hyper-V doesn't provide irq remapping for IO-APIC. To enable x2apic,
set x2apic destination mode to physcial mode when x2apic is available
and Hyper-V IOMMU driver makes sure cpus assigned with IO-APIC irqs have
8-bit APIC id.
Reviewed-by: Thomas Gleixner
Signed-off-by: Lan Tia
From: Lan Tianyu
This patch is to add Hyper-V IOMMU driver file into Hyper-V CORE and
DRIVERS scope.
Signed-off-by: Lan Tianyu
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 9f64f8d..5fb6306 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -701
From: Tianyu Lan
fill_gva_list() populates gva list and adds offset
HV_TLB_FLUSH_UNIT(0x100) to variable "cur"
in the each loop. When diff between "end" and "cur" is
less than HV_TLB_FLUSH_UNIT, the gva entry should
be the last one and the loop should be end.
If cur is equal or greater than
From: Tianyu Lan
Both Hyper-V tsc page and Hyper-V tsc MSR code use variable
hv_sched_clock_offset for their sched clock callback and so
define the variable regardless of CONFIG_HYPERV_TSCPAGE setting.
Signed-off-by: Tianyu Lan
---
This patch is based on the top of
"git.kernel.org/pub/scm/linu
From: Vitaly Kuznetsov
Hyper-V provides direct tlb flush function which helps
L1 Hypervisor to handle Hyper-V tlb flush request from
L2 guest. Add the function support for VMX.
Signed-off-by: Vitaly Kuznetsov
Signed-off-by: Tianyu Lan
---
Change since v3:
- Update changlog
Change since
From: Tianyu Lan
Hyper-V direct tlb flush function should be enabled for
guest that only uses Hyper-V hypercall. User space
hypervisor(e.g, Qemu) can disable KVM identification in
CPUID and just exposes Hyper-V identification to make
sure the precondition. Add new KVM capability KVM_CAP_
HYPERV_D
From: Tianyu Lan
When the 'start' parameter is >= 0xFF00 on 32-bit
systems, or >= 0x'FF00 on 64-bit systems,
fill_gva_list gets into an infinite loop. With such inputs,
'cur' overflows after adding HV_TLB_FLUSH_UNIT and always
compares as less than end. Memory is filled with gu
From: Tianyu Lan
hv_setup_sched_clock() references pv_ops and this should
be under CONFIG_PARAVIRT=Y. Fix it.
Signed-off-by: Tianyu Lan
---
This patch is based on git://git.kernel.org/pub/scm/linux/
kernel/git/tip/tip.git timers/core.
arch/x86/kernel/cpu/mshyperv.c | 2 ++
1 file changed, 2 i
From: Tianyu Lan
If size of offline memory region passed to offline_pages() is
not aligned with PAGES_PER_SECTION, memory section will be set
to offline in the offline_mem_sections() with some pages of
memory section online. Fix it, Update memory section status after
marking offline pages as "res
From: Tianyu Lan
When release mem region, old mem region may be splited to
two regions. Current allocate new struct resource for high
end mem region but not move child resources whose ranges are
in the high end range to new resource. When adjust old mem
region's range, adjust_resource() detects c
From: Vitaly Kuznetsov
This patch is to enable Hyper-V direct tlb flush function
for vmx.
Signed-off-by: Vitaly Kuznetsov
Signed-off-by: Tianyu Lan
---
Change since v2:
- Move hv assist page(hv_pa_pg) from struct kvm to struct kvm_hv.
---
arch/x86/include/asm/hyperv-tlfs.h | 4
From: Tianyu Lan
Hyper-V guests use the default native_sched_clock() in pv_ops.time.sched_clock
on x86. But native_sched_clock() directly uses the raw TSC value, which
can be discontinuous in a Hyper-V VM. Add the generic hv_setup_sched_clock()
to set the sched clock function appropriately. O
From: Tianyu Lan
Hyper-V guests use the default native_sched_clock() in pv_ops.time.sched_clock
on x86. But native_sched_clock() directly uses the raw TSC value, which
can be discontinuous in a Hyper-V VM. Add the generic hv_setup_sched_clock()
to set the sched clock function appropriately. On x
From: Tianyu Lan
This is to prepare to add Hyper-V sched clock callback and move
Hyper-V reference TSC initialization much earlier in the boot
process when timestamp is 0. So no discontinuity is observed
when pv_ops.time.sched_clock to calculate its offset. This earlier
initialization requires th
From: Lan Tianyu
On the bare metal, enabling X2APIC mode requires interrupt remapping
function which helps to deliver irq to cpu with 32-bit APIC ID.
Hyper-V doesn't provide interrupt remapping function so far and Hyper-V
MSI protocol already supports to deliver interrupt to the CPU whose
virtual
From: Lan Tianyu
Hyper-V doesn't provide irq remapping for IO-APIC. To enable x2apic,
set x2apic destination mode to physcial mode when x2apic is available
and Hyper-V IOMMU driver makes sure cpus assigned with IO-APIC irqs have
8-bit APIC id.
Signed-off-by: Lan Tianyu
---
Change since v2:
From: Lan Tianyu
On the bare metal, enabling X2APIC mode requires interrupt remapping
function which helps to deliver irq to cpu with 32-bit APIC ID.
Hyper-V doesn't provide interrupt remapping function so far and Hyper-V
MSI protocol already supports to deliver interrupt to the CPU whose
virtual
From: Lan Tianyu
This patch is to add Hyper-V IOMMU driver file into Hyper-V CORE and
DRIVERS scope.
Signed-off-by: Lan Tianyu
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 9f64f8d..5fb6306 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -701
From: Lan Tianyu
This patchset is to introduce hv ept tlb range list flush function
support in the KVM MMU component. Flushing ept tlbs of several address
range can be done via single hypercall and new list flush function is
used in the kvm_mmu_commit_zap_page() and FNAME(sync_page). This patchse
From: Lan Tianyu
This patchset is to introduce hv ept tlb range list flush function
support in the KVM MMU component. Flushing ept tlbs of several address
range can be done via single hypercall and new list flush function is
used in the kvm_mmu_commit_zap_page() and FNAME(sync_page). This patchse
From: Lan Tianyu
Add parameter offset to specify start position to add flush ranges in
guest address list of struct hv_guest_mapping_flush_list.
Signed-off-by: Lan Tianyu
---
arch/x86/hyperv/nested.c| 4 ++--
arch/x86/include/asm/mshyperv.h | 2 +-
arch/x86/kvm/vmx/vmx.c | 2 +-
From: Lan Tianyu
This patch is to add last_level in the struct kvm_mmu_page. When build
flush tlb range list, last_level will be used to identify whehter the
page should be added into list.
Signed-off-by: Lan Tianyu
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/mmu.c | 3
From: Lan Tianyu
This patch is to add kvm_get_memslot() to get struct kvm_memory_slot
via slot it and remove redundant codes. The function will also be used
in the following changes.
Signed-off-by: Lan Tianyu
---
include/linux/kvm_host.h | 1 +
virt/kvm/kvm_main.c | 45 ++
From: Lan Tianyu
This patch is to add flush parameter for kvm_aga_hva() and move tlb
flush from kvm_mmu_notifier_clear_flush_young() to kvm_age_hva().
kvm_age_hva() can check whether tlb flush is necessary when
return value young is more than 0. Flush tlb if both conditions
are met.
Signed-off-b
From: Lan Tianyu
This patch is to flush tlb via flush list function. Put
page into flush list when return value of set_spte()
includes flag SET_SPTE_NEED_REMOTE_TLB_FLUSH. kvm_flush_remote_
tlbs_with_list() checks whether the flush list is empty
or not. It also checks whether range tlb flush is a
From: Lan Tianyu
This patch is to use tlb range flush to flush memslot's in the
kvm_vm_ioctl_get/clear_dirty_log() instead of flushing tlbs
of entire ept page table when range flush is available.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 8 +---
arch/x86/kvm/mmu.h | 7 +++
a
From: Lan Tianyu
This patch is to flush tlb directly in the kvm_mmu_slot_gfn_write_protect()
when range flush is available.
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index d57574b49823..6b5e
From: Lan Tianyu
This patch is to introduce tlb flush with range list interface and use
struct kvm_mmu_page as list entry. Use flush list function in the
kvm_mmu_commit_zap_page().
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/mmu.c | 25 -
1 file changed, 24 insertions(+)
From: Lan Tianyu
Populate ranges on the flush list into struct hv_guest_mapping_flush_list
when flush list is available in the struct kvm_tlb_range.
Signed-off-by: Lan Tianyu
---
Change since v1:
Make flush list as a "hlist" instead of a "list" in order to
keep struct kvm_mmu_pag
From: Lan Tianyu
The value of "dirty_bitmap[i]" is already check before setting its value
to mask. The following check of "mask" is redundant. The check of "mask" was
introduced by commit 58d2930f4ee3(("KVM: Eliminate extra function calls in
kvm_get_dirty_log_protect()"). This patch is to revert
From: Lan Tianyu
On the bare metal, enabling X2APIC mode requires interrupt remapping
function which helps to deliver irq to cpu with 32-bit APIC ID.
Hyper-V doesn't provide interrupt remapping function so far and Hyper-V
MSI protocol already supports to deliver interrupt to the CPU whose
virtual
From: Lan Tianyu
On the bare metal, enabling X2APIC mode requires interrupt remapping
function which helps to deliver irq to cpu with 32-bit APIC ID.
Hyper-V doesn't provide interrupt remapping function so far and Hyper-V
MSI protocol already supports to deliver interrupt to the CPU whose
virtual
From: Lan Tianyu
Hyper-V doesn't provide irq remapping for IO-APIC. To enable x2apic,
set x2apic destination mode to physcial mode when x2apic is available
and Hyper-V IOMMU driver makes sure cpus assigned with IO-APIC irqs have
8-bit APIC id.
Signed-off-by: Lan Tianyu
---
Change since v1:
From: Lan Tianyu
This patch is to add Hyper-V IOMMU driver file into Hyper-V CORE and
DRIVERS scope.
Signed-off-by: Lan Tianyu
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 9f64f8d..5fb6306 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -701
From: Vitaly Kuznetsov
This patch is to enable Hyper-V direct tlb flush function
for vmx.
Signed-off-by: Vitaly Kuznetsov
Signed-off-by: Tianyu Lan
---
arch/x86/include/asm/hyperv-tlfs.h | 4
arch/x86/kvm/vmx/evmcs.h | 2 ++
arch/x86/kvm/vmx/vmx.c | 38 +++
From: Tianyu Lan
This patchset is to add Hyper-V direct tlb support in KVM. Hyper-V
in L0 can delegate L1 hypervisor to handle tlb flush request from
L2 guest when direct tlb flush is enabled in L1.
Patch 2 introduces new cap KVM_CAP_HYPERV_DIRECT_TLBFLUSH to enable
feature from user space. User
From: Tianyu Lan
Hyper-V guests use the default native_sched_clock() in pv_ops.time.sched_clock
on x86. But native_sched_clock() directly uses the raw TSC value, which
can be discontinuous in a Hyper-V VM. Add the generic hv_setup_sched_clock()
to set the sched clock function appropriately. On
From: Tianyu Lan
Prepare to add Hyper-V sched clock callback and move Hyper-V
Reference TSC initialization much earlier in the boot process. Earlier
initialization is needed so that it happens while the timestamp value
is still 0 and no discontinuity in the timestamp will occur when
pv_ops.time.
From: Tianyu Lan
Hyper-V guests use the default native_sched_clock() in pv_ops.time.sched_clock
on x86. But native_sched_clock() directly uses the raw TSC value, which
can be discontinuous in a Hyper-V VM. Add the generic hv_setup_sched_clock()
to set the sched clock function appropriately. On x
From: Vitaly Kuznetsov
This patch is to enable Hyper-V direct tlb flush function
for VMX.
Signed-off-by: Vitaly Kuznetsov
Signed-off-by: Tianyu Lan
---
arch/x86/include/asm/hyperv-tlfs.h | 16 +++-
arch/x86/kvm/vmx/evmcs.h | 2 ++
arch/x86/kvm/vmx/vmx.c | 38
From: Lan Tianyu
The max flush rep count of HvFlushGuestPhysicalAddressList hypercall
is equal with how many entries of union hv_gpa_page_range can be populated
into the input parameter page. The origin code lacks parenthesis around
PAGE_SIZE - 2 * sizeof(u64). This patch is to fix it.
Cc:
Fixs
From: Lan Tianyu
This patchset is to introduce hv ept tlb range list flush function
support in the KVM MMU component. Flushing ept tlbs of several address
range can be done via single hypercall and new list flush function is
used in the kvm_mmu_commit_zap_page() and FNAME(sync_page). This patchse
From: Lan Tianyu
This patch is to use range flush to flush tlbs of input struct
kvm_mmu_page in the sync_page(). If range flush is not available,
kvm_flush_remote_tlbs_with_address() will call kvm_flush_remote_tlbs().
Signed-off-by: Lan Tianyu
---
arch/x86/kvm/paging_tmpl.h | 5 +++--
1 file c
1 - 100 of 115 matches
Mail list logo