Re: [PATCH] i386: Fix KVM_CAP_ADJUST_CLOCK capability check

2022-10-07 Thread Vitaly Kuznetsov
Vitaly Kuznetsov writes: > Vitaly Kuznetsov writes: > >> KVM commit c68dc1b577ea ("KVM: x86: Report host tsc and realtime values in >> KVM_GET_CLOCK") broke migration of certain workloads, e.g. Win11 + WSL2 >> guest reboots immediately after migration. KVM, how

Re: [PATCH] i386: Fix KVM_CAP_ADJUST_CLOCK capability check

2022-10-07 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > Hi, a similar patch is now in. > Indeed, commit c4ef867f2949bf2a2ae18a4e27cf1a34bbc8aecb Author: Ray Zhang Date: Thu Sep 22 18:05:23 2022 +0800 target/i386/kvm: fix kvmclock_current_nsec: Assertion `time.tsc_timestamp <= migration_tsc' failed solves the

[PATCH RFC v1 0/2] i386: KVM: Fix 'system_reset' failures when vCPU is in VMX root operation

2022-08-10 Thread Vitaly Kuznetsov
by avoiding vmx_is_valid_cr4() check from __set_sregs2() and hoping that someone will check for the resulting inconsistency later. I don't quite like this option so I didn't explore it in depth. Vitaly Kuznetsov (2): i386: reset KVM nested state upon CPU reset i386: reorder kvm_put_sregs2

[PATCH RFC v1 2/2] i386: reorder kvm_put_sregs2() and kvm_put_nested_state() when vCPU is reset

2022-08-10 Thread Vitaly Kuznetsov
(kvm_arch_reset_vcpu() -> kvm_init_nested_state()), calling kvm_put_nested_state() before kvm_put_sregs2() is OK, this will ensure that vCPU is *not* in VMX root opertaion. Signed-off-by: Vitaly Kuznetsov --- target/i386/kvm/kvm.c | 20 ++-- 1 file changed, 18 insertions(+)

[PATCH RFC v1 1/2] i386: reset KVM nested state upon CPU reset

2022-08-10 Thread Vitaly Kuznetsov
Make sure env->nested_state is cleaned up when a vCPU is reset, it may be stale after an incoming migration, kvm_arch_put_registers() may end up failing or putting vCPU in a weird state. Signed-off-by: Vitaly Kuznetsov --- target/i386/kvm/kvm.c | 37 +++-- 1 f

Re: [PATCH RFC v1 2/2] i386: reorder kvm_put_sregs2() and kvm_put_nested_state() when vCPU is reset

2022-08-10 Thread Vitaly Kuznetsov
Maxim Levitsky writes: > On Wed, 2022-08-10 at 16:00 +0200, Vitaly Kuznetsov wrote: >> Setting nested state upon migration needs to happen after kvm_put_sregs2() >> to e.g. have EFER.SVME set. This, however, doesn't work for vCPU reset: >> when vCPU is in VMX root opera

Re: Expose support for HyperV features via QMP

2023-02-09 Thread Vitaly Kuznetsov
M_GET_SUPPORTED_HV_CPUID >> ioctl) for HyperV >> features. >> Apologies in advance if i misunderstood something. >> Thanks for Ccing me. Hyper-V features should appear in QMP since commit 071ce4b03becf9e2df6b758fde9609be8ddf56f1 Author: Vitaly Kuznetsov Date

[PATCH 0/2] i386: Fix Hyper-V Gen1 guests stuck on boot with 'hv-passthrough'

2023-06-12 Thread Vitaly Kuznetsov
' and this is undesired. - 'hv-syndbg's support by KVM is detected incorrectly when !CONFIG_SYNDBG. Fix both issues; exclude 'hv-syndbg' from 'hv-passthrough' and don't allow to turn on 'hv-syndbg' for !CONFIG_SYNDBG builds. Vitaly Kuznetsov (2): i386: Fix conditional CONFIG_SYNDBG enablement i386

[PATCH 2/2] i386: Exclude 'hv-syndbg' from 'hv-passthrough'

2023-06-12 Thread Vitaly Kuznetsov
res in 'hv-passthrough' mode. Note, "-cpu host,hv-passthrough,hv-syndbg" can still be used if needed. As both 'hv-passthrough' and 'hv-syndbg' are debug features, the change should not have any effect on production environments. Signed-off-by: Vitaly Kuznetsov --- docs/system/

[PATCH 1/2] i386: Fix conditional CONFIG_SYNDBG enablement

2023-06-12 Thread Vitaly Kuznetsov
ported() making sure there are no 'holes' or improperly defined features in 'kvm_hyperv_properties'. Fixes: d8701185f40c ("hw: hyperv: Initial commit for Synthetic Debugging device") Signed-off-by: Vitaly Kuznetsov --- target/i386/cpu.c | 2 ++ target/i386/kvm/kvm.c | 11 +

Re: [PATCH 0/2] i386: Fix Hyper-V Gen1 guests stuck on boot with 'hv-passthrough'

2023-07-28 Thread Vitaly Kuznetsov
Vitaly Kuznetsov writes: > Vitaly Kuznetsov writes: > >> Hyper-V Gen1 guests are getting stuck on boot when 'hv-passthrough' is >> used. While 'hv-passthrough' is a debug only feature, this significantly >> limit its usefullness. While debugging the problem, I fou

Re: [PATCH 0/2] i386: Fix Hyper-V Gen1 guests stuck on boot with 'hv-passthrough'

2023-06-27 Thread Vitaly Kuznetsov
Vitaly Kuznetsov writes: > Hyper-V Gen1 guests are getting stuck on boot when 'hv-passthrough' is > used. While 'hv-passthrough' is a debug only feature, this significantly > limit its usefullness. While debugging the problem, I found that there are > two loosely connected iss

Re: [PATCH] target/i386/kvm: call kvm_put_vcpu_events() before kvm_put_nested_state()

2024-01-16 Thread Vitaly Kuznetsov
ukata wrote: >> >> Hi all, appreciate any comments or feedbacks on the patch. >> >> Thanks, >> Eiichi >> >>> On Nov 1, 2023, at 23:04, Vitaly Kuznetsov wrote: >>> >>> Eiichi Tsukata writes: >>> >>>> F

[PATCH] docs/system: Add recommendations to Hyper-V enlightenments doc

2023-11-15 Thread Vitaly Kuznetsov
While hyperv.rst already has all currently implemented Hyper-V enlightenments documented, it may be unclear what is the recommended set to achieve the best result. Add the corresponding section to the doc. Signed-off-by: Vitaly Kuznetsov --- docs/system/i386/hyperv.rst | 30

[PATCH RESEND v2 2/2] i386: Exclude 'hv-syndbg' from 'hv-passthrough'

2023-11-15 Thread Vitaly Kuznetsov
res in 'hv-passthrough' mode. Note, "-cpu host,hv-passthrough,hv-syndbg" can still be used if needed. As both 'hv-passthrough' and 'hv-syndbg' are debug features, the change should not have any effect on production environments. Signed-off-by: Vitaly Kuznetsov --- docs/system/

[PATCH RESEND v2 1/2] i386: Fix conditional CONFIG_SYNDBG enablement

2023-11-15 Thread Vitaly Kuznetsov
ported() making sure there are no 'holes' or improperly defined features in 'kvm_hyperv_properties'. Fixes: d8701185f40c ("hw: hyperv: Initial commit for Synthetic Debugging device") Signed-off-by: Vitaly Kuznetsov --- target/i386/cpu.c | 2 ++ target/i386/kvm/kvm.c | 11 +

[PATCH RESEND v2 0/2] i386: Fix Hyper-V Gen1 guests stuck on boot with 'hv-passthrough'

2023-11-15 Thread Vitaly Kuznetsov
-passthrough' enables 'hv-syndbg' and this is undesired. - 'hv-syndbg's support by KVM is detected incorrectly when !CONFIG_SYNDBG. Fix both issues; exclude 'hv-syndbg' from 'hv-passthrough' and don't allow to turn on 'hv-syndbg' for !CONFIG_SYNDBG builds. Vitaly Kuznetsov (2): i386: Fix

Re: [PATCH RESEND v3 3/3] docs/system: Add recommendations to Hyper-V enlightenments doc

2024-03-07 Thread Vitaly Kuznetsov
Zhao Liu writes: > Hi Vitaly, > > On Tue, Mar 05, 2024 at 05:42:04PM +0100, Vitaly Kuznetsov wrote: >> Date: Tue, 5 Mar 2024 17:42:04 +0100 >> From: Vitaly Kuznetsov >> Subject: [PATCH RESEND v3 3/3] docs/system: Add recommendations to Hyper-V >> enlighten

Re: [PATCH RESEND v3 0/3] i386: Fix Hyper-V Gen1 guests stuck on boot with 'hv-passthrough'

2024-03-25 Thread Vitaly Kuznetsov
Vitaly Kuznetsov writes: > Changes since 'RESEND v2': > - Included 'docs/system: Add recommendations to Hyper-V enlightenments doc' > in the set as it also requires a "RESEND") Ping) > > Hyper-V Gen1 guests are getting stuck on boot when 'hv-passthrough' is >

[PATCH RESEND v3 1/3] i386: Fix conditional CONFIG_SYNDBG enablement

2024-03-05 Thread Vitaly Kuznetsov
ported() making sure there are no 'holes' or improperly defined features in 'kvm_hyperv_properties'. Fixes: d8701185f40c ("hw: hyperv: Initial commit for Synthetic Debugging device") Signed-off-by: Vitaly Kuznetsov --- target/i386/cpu.c | 2 ++ target/i386/kvm/kvm.c | 11 +

[PATCH RESEND v3 3/3] docs/system: Add recommendations to Hyper-V enlightenments doc

2024-03-05 Thread Vitaly Kuznetsov
While hyperv.rst already has all currently implemented Hyper-V enlightenments documented, it may be unclear what is the recommended set to achieve the best result. Add the corresponding section to the doc. Signed-off-by: Vitaly Kuznetsov --- docs/system/i386/hyperv.rst | 30

[PATCH RESEND v3 0/3] i386: Fix Hyper-V Gen1 guests stuck on boot with 'hv-passthrough'

2024-03-05 Thread Vitaly Kuznetsov
assthrough' and don't allow to turn on 'hv-syndbg' for !CONFIG_SYNDBG builds. Vitaly Kuznetsov (3): i386: Fix conditional CONFIG_SYNDBG enablement i386: Exclude 'hv-syndbg' from 'hv-passthrough' docs/system: Add recommendations to Hyper-V enlightenments doc docs/system/i386/hyper

[PATCH RESEND v3 2/3] i386: Exclude 'hv-syndbg' from 'hv-passthrough'

2024-03-05 Thread Vitaly Kuznetsov
res in 'hv-passthrough' mode. Note, "-cpu host,hv-passthrough,hv-syndbg" can still be used if needed. As both 'hv-passthrough' and 'hv-syndbg' are debug features, the change should not have any effect on production environments. Signed-off-by: Vitaly Kuznetsov --- docs/system/

<    1   2   3   4   5   6