()). Remove the redundant part.
Suggested-by: Roman Kagan
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/kvm/hyperv.c | 36 +++-
1 file changed, 3 insertions(+), 33 deletions(-)
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index e6a2a085644a..0a16a77e6ac3
Vitaly Kuznetsov writes:
> /* Define virtual processor assist page structure. */
> struct hv_vp_assist_page {
> @@ -519,7 +519,7 @@ struct hv_vp_assist_page {
> __u64 nested_enlightenments_control[2];
> __u32 enlighten_vmentry;
> __u64 current_nested_vmcs;
&
this. 'struct hv_vp_assist_page'
and 'struct hv_enlightened_vmcs' need to be properly padded to support the
change.
Suggested-by: Nadav Amit
Signed-off-by: Vitaly Kuznetsov
Acked-by: Thomas Gleixner
Acked-by: Nadav Amit
Reviewed-by: Michael Kelley
---
- Changes since
Jim Mattson writes:
> On Tue, Oct 16, 2018 at 9:50 AM Vitaly Kuznetsov wrote:
>>
>> +
>> + vmx->nested.hv_evmcs = kmap(vmx->nested.hv_evmcs_page);
>
> Are you sure that directly mapping guest memory isn't going to lead to
> time-of-check
Paolo Bonzini writes:
> On 17/12/18 11:30, Vitaly Kuznetsov wrote:
>>> Queued, thanks. I moved this above the direct EOI series so that
>>> KVM_CAP_HYPERV_STIMER_DIRECT need not exist at any point of the history.
>>>
>> Thanks! Just to make sure (and t
d-off-by: Vitaly Kuznetsov
---
arch/x86/kvm/svm.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 2acb42b74a51..dfdf7d0b7f88 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -5845,6 +5845,13 @@ static bool svm_cpu_has_accelerate
xit reason: 8 (SHUTDOWN),
it is not obvious which particular stage failed. Add the info.
Signed-off-by: Vitaly Kuznetsov
---
tools/testing/selftests/kvm/x86_64/evmcs_test.c | 4 ++--
tools/testing/selftests/kvm/x86_64/state_test.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --
reconfiguration is
needed")
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/kvm/svm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index b78c691adea2..38821b0b78da 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -2923
Paolo Bonzini writes:
>
> Queued, thanks. I moved this above the direct EOI series so that
> KVM_CAP_HYPERV_STIMER_DIRECT need not exist at any point of the history.
>
Thanks! Just to make sure (and to conclude our discussion with Roman):
with your Qemu maintainer hat on, do you agree with the
Roman Kagan writes:
> On Mon, Nov 26, 2018 at 04:47:31PM +0100, Vitaly Kuznetsov wrote:
>> Turns out Hyper-V on KVM (as of 2016) will only use synthetic timers
>> if direct mode is available. With direct mode we notify the guest by
>> asserting APIC irq instead of se
Roman Kagan writes:
> On Mon, Dec 10, 2018 at 01:54:18PM +0100, Vitaly Kuznetsov wrote:
>> Roman Kagan writes:
>> > Just noticed that the patch seems to assume that "direct" timers are
>> > allowed to use any vectors including 0-15. I guess this is incorrec
nd removes recently added KVM_CAP_HYPERV_STIMER_DIRECT before it's
too late.
Vitaly Kuznetsov (7):
x86/hyper-v: Do some housekeeping in hyperv-tlfs.h
x86/hyper-v: Drop HV_X64_CONFIGURE_PROFILER definition
x86/kvm/hyper-v: Introduce nested_get_evmcs_version() helper
x86/kvm/hyper-v: Introduce KVM_GET_SUPPOR
The upcoming KVM_GET_SUPPORTED_HV_CPUID ioctl will need to return
Enlightened VMCS version in HYPERV_CPUID_NESTED_FEATURES.EAX when
it was enabled.
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/svm.c | 7 +++
arch/x86/kvm/vmx.c
Signed-off-by: Vitaly Kuznetsov
Reviewed-by: Michael Kelley
---
arch/x86/include/asm/hyperv-tlfs.h | 186 ++---
arch/x86/kvm/hyperv.c | 4 +-
2 files changed, 93 insertions(+), 97 deletions(-)
diff --git a/arch/x86/include/asm/hyperv-tlfs.h
b/arch/x86/
Add a simple (and stupid) hyperv_cpuid test: check that we got the
expected number of entries with and without Enlightened VMCS enabled
and that all currently reserved fields are zeroed.
Signed-off-by: Vitaly Kuznetsov
---
Changes since v1:
- Check for -E2BIG
---
tools/testing/selftests/kvm
sect with KVM's (e.g. 0x4000,
0x4001) and we would probably confuse userspace in case we decide to
return these twice.
KVM_CAP_HYPERV_CPUID's number is interim: we're intended to drop
KVM_CAP_HYPERV_STIMER_DIRECT and use its number instead.
Suggested-by: Paolo Bonzini
Signed-of
In case we want to test failing ioctls we need an option to not
fail. Following _vcpu_run() precedent implement _vcpu_ioctl().
Signed-off-by: Vitaly Kuznetsov
---
tools/testing/selftests/kvm/include/kvm_util.h | 2 ++
tools/testing/selftests/kvm/lib/kvm_util.c | 14 --
2 files
BIT(13) in HYPERV_CPUID_FEATURES.EBX is described as "ConfigureProfiler" in
TLFS v4.0 but starting 5.0 it is replaced with 'Reserved'. As we don't
currently us it in kernel it can just be dropped.
Signed-off-by: Vitaly Kuznetsov
Reviewed-by: Michael Kelley
---
ar
The newly introduced KVM_GET_SUPPORTED_HV_CPUID covers Direct Mode stimers
feature so we can drop KVM_CAP_HYPERV_STIMER_DIRECT and reuse its number.
Signed-off-by: Vitaly Kuznetsov
---
- This patch only makes sense befor 4.21 merge window, disregard if it
doesn't make it in time.
---
arc
k...@linuxonhyperv.com writes:
> +
> +static inline u64 hv_read_tsc_page_tsc(const struct ms_hyperv_tsc_page
> *tsc_pg,
> +u64 *cur_tsc)
> +{
> + u64 scale, offset;
> + u32 sequence;
> +
> + /*
> + * The protocol for reading Hyper-V TSC
Roman Kagan writes:
> On Mon, Dec 10, 2018 at 06:21:56PM +0100, Vitaly Kuznetsov wrote:
>> +
>> +Currently, the following list of CPUID leaves are returned:
>> + HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS
>> + HYPERV_CPUID_INTERFACE
>> + HYPERV_CPUID_V
Roman Kagan writes:
> On Tue, Dec 11, 2018 at 02:28:14PM +0100, Vitaly Kuznetsov wrote:
>> Roman Kagan writes:
>>
>> > On Mon, Dec 10, 2018 at 06:21:56PM +0100, Vitaly Kuznetsov wrote:
>>
>> >> +
>> >> +Curr
cess error: RDMSR from 0xc90 at rIP:
0x88c5bba3 (native_read_msr+0x3/0x30)
The issue should definitely get fixed on AWS side. We can, however, simply
workaround this in Linux and live happily after.
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/kernel/cpu/intel_rdt.c | 3 ++-
1 file
Borislav Petkov writes:
> On Thu, Dec 20, 2018 at 02:40:46PM +0100, Vitaly Kuznetsov wrote:
>> It was found that AWS x1 instances (Xen-based) lack xen.git commit
>> 1f1d183d4900 (x86/HVM: don't give the wrong impression of WRMSR succeeding)
>> and because of that
Radim Krčmář writes:
> 2018-12-19 12:06+0100, Vitaly Kuznetsov:
>> AMD doesn't seem to implement MSR_IA32_MCG_EXT_CTL and svm code in kvm
>> knows nothing about it, however, this MSR is among emulated_msrs and
>> thus returned with KVM_GET_MSR_INDEX_LIST. The cons
David Hildenbrand writes:
> On 04.01.19 15:19, Vitaly Kuznetsov wrote:
>> Hyper-V memory hotplug protocol has 2M granularity and in Linux x86 we use
>> 128M. To deal with it we implement partial section onlining by registering
>> custom page onlining callback (hv_online_page
Sasha Levin writes:
> On Mon, Jan 07, 2019 at 02:44:30PM +0100, Vitaly Kuznetsov wrote:
>>P.S. I still think about bringing mem_hotplug_begin()/done() to
>>hv_balloon but that's going to be a separate discussion, here I want to
>>have a small fix backportable to stable
ending and we do NMI
injection upon entry so it got delivered to L1 instead of L2.
It seems that VMX code solves the same issue in prepare_vmcs12(), this was
introduced with code refactoring in commit 5f3d5799974b ("KVM: nVMX: Rework
event injection and recovery").
Signed-off-by: Vital
David Hildenbrand writes:
> On 07.01.19 14:44, Vitaly Kuznetsov wrote:
>> David Hildenbrand writes:
>>
...
>>> On 04.01.19 15:19, Vitaly Kuznetsov wrote:
>>>>if (start_pfn > has->start_pfn &&
>>>>
ds inspecting
struct pages and checks sections instead. But in Hyper-V balloon driver we
do PageReserved(pfn_to_page()) check and this is now wrong.
Switch to checking online_section_nr() instead.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_balloon.c | 10 ++
1 file changed
oot caches; the improved hit rate is not very important for
single vCPU performance, but it avoids contention on the mmu_lock for
many vCPUs.
On the nested CPUID benchmark, with 16 vCPUs, an L2->L1->L2 vmexit
goes from 42k to 26k cycles.
Signed-off-by: Vitaly Kuznetsov
Reviewed-by: Sea
kvm_init_shadow_ept_mmu() doesn't set get_pdptr() hook and is this
not a problem just because MMU context is already initialized and this
hook points to kvm_pdptr_read(). As we're intended to use a dedicated
MMU for shadow EPT MMU set this hook explicitly.
Signed-off-by: Vitaly Kuznets
really needed. This spares us about 1000 cpu cycles on nested vmexit.
Brief look at SVM makes me think it can be optimized the exact same way,
I'll do this in a separate series.
Paolo Bonzini (1):
x86/kvm/mmu: get rid of redundant kvm_mmu_setup()
Vitaly Kuznetsov (8):
x86/kvm/mmu: ma
Add an option to specify which MMU root we want to free. This will
be used when nested and non-nested MMUs for L1 are split.
Signed-off-by: Vitaly Kuznetsov
Signed-off-by: Paolo Bonzini
Reviewed-by: Sean Christopherson
---
arch/x86/include/asm/kvm_host.h | 3 ++-
arch/x86/kvm/mmu.c
As a preparation to full MMU split between L1 and L2 make vcpu->arch.mmu
a pointer to the currently used mmu. For now, this is always
vcpu->arch.root_mmu. No functional change.
Signed-off-by: Vitaly Kuznetsov
Signed-off-by: Paolo Bonzini
Reviewed-by: Sean Christopherson
---
arch/x86/i
MMU re-initialization is expensive, in particular,
update_permission_bitmask() and update_pkru_bitmask() are.
Cache the data used to setup shadow EPT MMU and avoid full re-init when
it is unchanged.
Signed-off-by: Vitaly Kuznetsov
Sean Christopherson
---
Changes since v3:
- Use '!!'
In preparation to MMU reconfiguration avoidance we need a space to
cache source data. As this partially intersects with kvm_mmu_page_role,
create 64bit sized union kvm_mmu_role holding both base and extended data.
No functional change.
Signed-off-by: Vitaly Kuznetsov
Reviewed-by: Sean
MMU reconfiguration in init_kvm_tdp_mmu()/kvm_init_shadow_mmu() can be
avoided if the source data used to configure it didn't change; enhance
MMU extended role with the required fields and consolidate common code in
kvm_calc_mmu_role_common().
Signed-off-by: Vitaly Kuznetsov
Reviewed-by:
From: Paolo Bonzini
Just inline the contents into the sole caller, kvm_init_mmu is now
public.
Suggested-by: Vitaly Kuznetsov
Signed-off-by: Paolo Bonzini
Reviewed-by: Sean Christopherson
---
arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/mmu.c | 12
arch/x86
We don't use root page role for nested_mmu, however, optimizing out
re-initialization in case nothing changed is still valuable as this
is done for every nested vmentry.
Signed-off-by: Vitaly Kuznetsov
Reviewed-by: Sean Christopherson
---
arch/x86/kvm/mmu.c | 6 ++
1 file chang
Paolo Bonzini writes:
> On 13/09/2018 19:05, Vitaly Kuznetsov wrote:
>> It is perfectly valid for a guest to do VMXON and not do VMPTRLD. This
>> state needs to be preserved on migration.
>>
>> Signed-off-by: Vitaly Kuznetsov
>
> Please cover this in state-tes
id
loop in WS2016 with Hyper-V role on KVM: 15200 cycles -> 13700 cycles).
Ladi Prosek (1):
KVM: hyperv: define VP assist page helpers
Vitaly Kuznetsov (12):
KVM: VMX: refactor evmcs_sanitize_exec_ctrls()
KVM: nVMX: add KVM_CAP_HYPERV_ENLIGHTENED_VMCS capability
KVM: nVMX: add enlighten
From: Ladi Prosek
The state related to the VP assist page is still managed by the LAPIC
code in the pv_eoi field.
Signed-off-by: Ladi Prosek
Signed-off-by: Vitaly Kuznetsov
Reviewed-by: Liran Alon
---
arch/x86/kvm/hyperv.c | 23 +--
arch/x86/kvm/hyperv.h | 4
arch
Split off EVMCS1_UNSUPPORTED_* macros so we can re-use them when
enabling Enlightened VMCS for Hyper-V on KVM.
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/kvm/vmx.c | 108 -
1 file changed, 47 insertions(+), 61 deletions(-)
diff --git a/arch/x86/kvm
KVM_CAP_HYPERV_ENLIGHTENED_VMCS. The version is to
be advertised to the nested hypervisor, currently done via a cpuid
leaf for Hyper-V.
Suggested-by: Ladi Prosek
Signed-off-by: Vitaly Kuznetsov
Reviewed-by: Liran Alon
---
arch/x86/include/asm/kvm_host.h | 3 +++
arch/x86/kvm/svm.c | 9
arch/x86
Adds hv_evmcs pointer and implement copy_enlightened_to_vmcs12() and
copy_enlightened_to_vmcs12().
prepare_vmcs02()/prepare_vmcs02_full() separation is not valid for
Enlightened VMCS, do full sync for now.
Suggested-by: Ladi Prosek
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/kvm/vmx.c | 440
tened VMCS structure for the current L2 guest permanently mapped
from struct nested_vmx instead of mapping it every time.
Suggested-by: Ladi Prosek
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/kvm/vmx.c | 115 ++---
1 file changed, 108 insertions(+), 7 deletion
-dependent (and
a bit ugly).
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/kvm/vmx.c | 118 +
1 file changed, 65 insertions(+), 53 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index cfb44acd4291..0b665c74fadc 100644
--- a/arch/x86
d-off-by: Vitaly Kuznetsov
---
arch/x86/kvm/lapic.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 79358fd6a71c..3cd227ff807f 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -2647,14 +2647,2
VP assist pages may hold valuable data which needs to be preserved across
migration. Clean PV EOI portion of the data on init, the guest is
responsible for making sure there's no garbage in the rest.
This will be used for nVMX migration, eVMCS address needs to be preserved.
Signed-off-by: V
It is perfectly valid for a guest to do VMXON and not do VMPTRLD. This
state needs to be preserved on migration.
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/kvm/vmx.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
Split prepare_for_vmx_operation() into prepare_for_vmx_operation() and
load_vmcs() so we can inject GUEST_SYNC() in between.
Signed-off-by: Vitaly Kuznetsov
---
.../selftests/kvm/include/x86_64/vmx.h| 1 +
tools/testing/selftests/kvm/lib/x86_64/vmx.c | 5 +
.../testing/selftests
Add support for get/set of nested state when Enlightened VMCS is in use.
A new KVM_STATE_NESTED_EVMCS flag to indicate eVMCS on the vCPU was enabled
is added.
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/include/uapi/asm/kvm.h | 1 +
arch/x86/kvm/vmx.c | 78
Pick up the latest kvm.h definitions.
Signed-off-by: Vitaly Kuznetsov
---
tools/include/uapi/linux/kvm.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h
index 07548de5c988..a67ea86edb0b 100644
--- a/tools/include/uapi
Modify test library and add eVMCS test. This includes nVMX save/restore
testing.
Signed-off-by: Vitaly Kuznetsov
---
tools/testing/selftests/kvm/Makefile |1 +
tools/testing/selftests/kvm/include/evmcs.h | 1098 +
.../selftests/kvm/include/x86_64/vmx.h
Call Trace:
? __schedule+0x1fe/0x7e0
schedule+0x28/0x80
suspend_devices_and_enter+0x4ac/0x750
pm_suspend+0x2c0/0x310
Register a PM notifier to disable the detector on suspend and re-enable
back on wakeup.
Signed-off-by: Vitaly Kuznetsov
---
Changes since v2:
- Resurrect 'v1' as ze
Call Trace:
? __schedule+0x1fe/0x7e0
schedule+0x28/0x80
suspend_devices_and_enter+0x4ac/0x750
pm_suspend+0x2c0/0x310
Register a PM notifier to disable the detector on suspend and re-enable
back on wakeup.
Signed-off-by: Vitaly Kuznetsov
---
Changes since v3:
- Handle PM_RESTORE_PREPARE/PM_
Paolo Bonzini writes:
> On 16/10/2018 18:50, Vitaly Kuznetsov wrote:
>> +if (!hv_evmcs || !(hv_evmcs->hv_clean_fields &
>> + HV_VMX_ENLIGHTENED_CLEAN_FIELD_GUEST_GRP2)) {
>> +vmcs_write16(GUEST_CS_SELECTO
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.
>
> Signed-off-by: Lan Tianyu
> ---
> arch/x86/kvm/vmx.c | 16 +---
> 1 file
"Rafael J. Wysocki" writes:
> On Mon, Sep 24, 2018 at 11:24 AM Jiri Kosina wrote:
>>
>> On Wed, 12 Sep 2018, Vitaly Kuznetsov wrote:
>>
>> > It makes little sense but still possible to put Hyper-V guests into
>> > suspend-to-idle state. To wake t
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 chec
ot;
So apparently, Hyper-V doesn't expect us to pass naked EPTP, only PML4
pointer should be used. Strip off EPT configuration information before
calling into vmx_hv_remote_flush_tlb().
Fixes: 877ad952be3d ("KVM: vmx: Add tlb_remote_flush callback support")
Signed-off-by: Vital
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. I bisected the issue to the commit 877ad952be3d ("KVM: vmx: Add
>> tlb_remote_flush ca
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 Kuznetsov
>> > wrote:
>> >>
>> >> I'm observing random crashes in multi-vCP
kernel test robot writes:
> [31mFAIL[0m vmx_EPT_AD_disabled (19 tests, 1 unexpected failures)
It seems the test is buggy: MMIO access is tested by reading ACPI
version from 0xfee00030 without putting APIC to xAPIC mode first. I'll
double check and send a patch to kvm-unit-test in case my guess i
Paolo Bonzini writes:
> On 17/10/2018 19:08, Jim Mattson wrote:
>> I believe that ESXi reads GUEST_CS_AR_BYTES on every VM-exit to
>> determine code size.
>
> Which makes me wonder, maybe we should add GUEST_SS_AR_BYTES which is
> where the CPL lives. But then your tests from last year didn't fi
ten.
Suggested-by: Paolo Bonzini
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/kvm/vmx.c | 10 +-
arch/x86/kvm/vmx_shadow_fields.h | 5 +
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index abeeb45d1c33..641a65b306
Paolo Bonzini writes:
> On 22/08/2018 12:18, Vitaly Kuznetsov wrote:
>> VP_INDEX almost always matches VCPU id and get_vcpu_by_vpidx() is fast,
>> use it instead of traversing full vCPU list every time.
>
> ... but if it doesn't, the algorithm is now quadratic, isn
MMU re-initialization is expensive, in particular,
update_permission_bitmask() and update_pkru_bitmask() are.
Cache the data used to setup shadow EPT MMU and avoid full re-init when
it is unchanged.
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/include/asm/kvm_host.h | 14 +++
arch/x86
and checking if MMU reset
is really needed. This spares us about 1000 cpu cycles on nested vmexit.
Brief look at SVM makes me think it can be optimized the exact same way.
I'll do this in a separate series if nobody objects.
Paolo Bonzini (1):
x86/kvm/mmu: get rid of redundant kvm_mmu_setu
oot caches; the improved hit rate is not very important for
single vCPU performance, but it avoids contention on the mmu_lock for
many vCPUs.
On the nested CPUID benchmark, with 16 vCPUs, an L2->L1->L2 vmexit
goes from 42k to 26k cycles.
Signed-off-by: Vitaly Kuznetsov
Signed-off-b
kvm_init_shadow_ept_mmu() doesn't set get_pdptr() hook and is this
not a problem just because MMU context is already initialized and this
hook points to kvm_pdptr_read(). As we're intended to use a dedicated
MMU for shadow EPT MMU set this hook explicitly.
Signed-off-by: Vitaly Kuznets
In preparation to MMU reconfiguration avoidance we need a space to
cache source data. As this partially intersects with kvm_mmu_page_role,
create 64bit sized union kvm_mmu_role holding both base_role and
extended data. No functional change.
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/include
As a preparation to full MMU split between L1 and L2 make vcpu->arch.mmu
a pointer to the currently used mmu. For now, this is always
vcpu->arch.root_mmu. No functional change.
Signed-off-by: Vitaly Kuznetsov
Signed-off-by: Paolo Bonzini
---
arch/x86/include/asm/kvm_host.h | 5 +-
ar
MMU reconfiguration in init_kvm_tdp_mmu()/kvm_init_shadow_mmu() can be
avoided if the source data used to configure it didn't change; enhance
kvm_mmu_scache with the required fields and consolidate common code in
kvm_calc_mmu_role_common().
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/in
We don't use root page role for nested_mmu, however, optimizing out
re-initialization in case nothing changed is still valuable as this
is done for every nested vmentry.
Signed-off-by: Vitaly Kuznetsov
---
arch/x86/kvm/mmu.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/x8
From: Paolo Bonzini
Just inline the contents into the sole caller, kvm_init_mmu is now
public.
Suggested-by: Vitaly Kuznetsov
Signed-off-by: Paolo Bonzini
---
arch/x86/include/asm/kvm_host.h | 1 -
arch/x86/kvm/mmu.c | 7 ---
arch/x86/kvm/x86.c | 2 +-
3 files
Add an option to specify which MMU root we want to free. This will
be used when nested and non-nested MMUs for L1 are split.
Signed-off-by: Vitaly Kuznetsov
Signed-off-by: Paolo Bonzini
---
arch/x86/include/asm/kvm_host.h | 3 ++-
arch/x86/kvm/mmu.c | 9 +
arch/x86/kvm
e can add it back later once the
> license is cleared up.
>
> Reported-by: Prarit Bhargava
> Cc: Christoph Hellwig
> Cc: Vitaly Kuznetsov
FWIW,
Reviewed-by: Vitaly Kuznetsov
> Cc: jsch...@samba.org
> Signed-off-by: Greg Kroah-Hartman
> ---
> .../device_dr
Yan Zhao writes:
> On Fri, Aug 30, 2024 at 03:47:11PM +0200, Vitaly Kuznetsov wrote:
>> Gerd Hoffmann writes:
>>
>> >> Necroposting!
>> >>
>> >> Turns out that this change broke "bochs-display" driver in QEMU even
>> >
Sean Christopherson writes:
> On Mon, Sep 02, 2024, Vitaly Kuznetsov wrote:
>> FWIW, I use QEMU-9.0 from the same C10S (qemu-kvm-9.0.0-7.el10.x86_64)
>> but I don't think it matters in this case. My CPU is "Intel(R) Xeon(R)
>> Silver 4410Y".
>
> Has
Vitaly Kuznetsov writes:
> Sean Christopherson writes:
>
>> On Mon, Sep 02, 2024, Vitaly Kuznetsov wrote:
>>> FWIW, I use QEMU-9.0 from the same C10S (qemu-kvm-9.0.0-7.el10.x86_64)
>>> but I don't think it matters in this case. My CPU is "Intel(R) Xeon(R
Vineeth Pillai writes:
> On 4/16/2021 4:36 AM, Vitaly Kuznetsov wrote:
>>
>>> struct kvm_vm_stat {
>>> diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
>>> index 58fa8c029867..614b4448a028 100644
>>> --- a/arch/x86/kvm/hyperv.c
>>
Saurabh Sengar writes:
> For non VTL platforms vtl is always 0, and there is no need of
> get_vtl function. For VTL platforms get_vtl should always succeed
> and should return the correct VTL.
>
> Signed-off-by: Saurabh Sengar
> ---
> arch/x86/hyperv/hv_init.c | 8 +---
> 1 file changed, 5
Stephen Rothwell writes:
> Hi all,
>
> In commit
>
> fa26d0c778b4 ("ACPI: processor: Fix build when CONFIG_ACPI_PROCESSOR=m")
>
> Fixes tag
>
> Fixes: 8c182bd7 ("CPI: processor: Fix CPU0 wakeup in
> acpi_idle_play_dead()")
"A" in "ACPI" seems to be missing
>
> has these problem(s):
>
>
Vineeth Pillai writes:
> Detect nested features exposed by Hyper-V if SVM is enabled.
>
> Signed-off-by: Vineeth Pillai
> ---
> arch/x86/kernel/cpu/mshyperv.c | 10 +-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/
Vineeth Pillai writes:
> Currently the remote TLB flush logic is specific to VMX.
> Move it to a common place so that SVM can use it as well.
>
> Signed-off-by: Vineeth Pillai
> ---
> arch/x86/include/asm/kvm_host.h | 15 +
> arch/x86/kvm/hyperv.c | 89
Vineeth Pillai writes:
> Enable remote TLB flush for SVM.
>
> Signed-off-by: Vineeth Pillai
> ---
> arch/x86/kvm/svm/svm.c | 35 +++
> 1 file changed, 35 insertions(+)
>
> diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
> index baee91c1e936..6287cab6
Vineeth Pillai writes:
> Enlightened MSR-Bitmap as per TLFS:
>
> "The L1 hypervisor may collaborate with the L0 hypervisor to make MSR
> accesses more efficient. It can enable enlightened MSR bitmaps by setting
> the corresponding field in the enlightened VMCS to 1. When enabled, L0
> hype
Vineeth Pillai writes:
> From Hyper-V TLFS:
> "The hypervisor exposes hypercalls (HvFlushVirtualAddressSpace,
> HvFlushVirtualAddressSpaceEx, HvFlushVirtualAddressList, and
> HvFlushVirtualAddressListEx) that allow operating systems to more
> efficiently manage the virtual TLB. The L1 hype
Siddharth Chandrasekaran writes:
> Hyper-V supports the use of XMM registers to perform fast hypercalls.
> This allows guests to take advantage of the improved performance of the
> fast hypercall interface even though a hypercall may require more than
> (the current maximum of) two input register
Siddharth Chandrasekaran writes:
> Now that all extant hypercalls that can use XMM registers (based on
> spec) for input/outputs are patched to support them, we can start
> advertising this feature to guests.
>
> Cc: Alexander Graf
> Cc: Evgeny Iakovlev
> Signed-off-by: Siddharth Chandrasekaran
Paolo Bonzini writes:
> On 08/04/21 14:01, Vitaly Kuznetsov wrote:
>>
>> Also, we can probably defer kvm_hv_hypercall_read_xmm() until we know
>> how many regs we actually need to not read them all (we will always
>> need xmm[0] I guess so we can as well read it her
Siddharth Chandrasekaran writes:
> On Thu, Apr 08, 2021 at 02:05:53PM +0200, Vitaly Kuznetsov wrote:
>> Siddharth Chandrasekaran writes:
>>
>> > Now that all extant hypercalls that can use XMM registers (based on
>> > spec) for input/outputs are patc
Siddharth Chandrasekaran writes:
> On Thu, Apr 08, 2021 at 04:44:23PM +0200, Vitaly Kuznetsov wrote:
>> CAUTION: This email originated from outside of the organization. Do not
>> click links or open attachments unless you can confirm the sender and know
>>
Siddharth Chandrasekaran writes:
> On Thu, Apr 08, 2021 at 04:30:18PM +, Wei Liu wrote:
>> On Thu, Apr 08, 2021 at 05:54:43PM +0200, Siddharth Chandrasekaran wrote:
>> > On Thu, Apr 08, 2021 at 05:48:19PM +0200, Paolo Bonzini wrote:
>> > > On 08/04/21 17:40, Siddharth Chandrasekaran wrote:
>>
Dexuan Cui writes:
> Currently IPv6-only-injection doesn't work because the daemon doesn't parse
> any IPv6 information at all once it finds the dhcp_enabled flag is true.
>
> But according to the Hyper-v host team, the flag is only for IPv4.
> In the case the host only injects 1 IPv6 address, th
flush_op is unambiguously defined by feature_flush:
REQ_FUA | REQ_FLUSH -> BLKIF_OP_WRITE_BARRIER
REQ_FLUSH -> BLKIF_OP_FLUSH_DISKCACHE
0 -> 0
and thus can be removed. This is just a cleanup.
The patch was suggested by Boris Ostrovsky.
Signed-off-by: Vitaly Kuznetsov
--
'
in hv_start_fcopy()"
Vitaly Kuznetsov (5):
Tools: hv: add mising fcopyd to the Makefile
Tools: hv: remove unused bytes_written from kvp_update_file()
Tools: hv: address compiler warnings for hv_kvp_daemon.c
Tools: hv: address compiler warnings for hv_fcopy_daemon.c
Tools: h
’ set but not used
[-Wunused-but-set-variable]
Remove bytes_written completely.
Signed-off-by: Vitaly Kuznetsov
---
tools/hv/hv_kvp_daemon.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index 6a6432a..5a274ca 100644
401 - 500 of 2616 matches
Mail list logo