* [PATCH RESEND v3 1/3] i386: Fix conditional CONFIG_SYNDBG enablement
2024-03-05 16:42 [PATCH RESEND v3 0/3] i386: Fix Hyper-V Gen1 guests stuck on boot with 'hv-passthrough' Vitaly Kuznetsov
@ 2024-03-05 16:42 ` Vitaly Kuznetsov
2024-03-05 16:42 ` [PATCH RESEND v3 2/3] i386: Exclude 'hv-syndbg' from 'hv-passthrough' Vitaly Kuznetsov
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Vitaly Kuznetsov @ 2024-03-05 16:42 UTC (permalink / raw)
To: qemu-devel, Paolo Bonzini
Putting HYPERV_FEAT_SYNDBG entry under "#ifdef CONFIG_SYNDBG" in
'kvm_hyperv_properties' array is wrong: as HYPERV_FEAT_SYNDBG is not
the highest feature number, the result is an empty (zeroed) entry in
the array (and not a skipped entry!). hyperv_feature_supported() is
designed to check that all CPUID bits are set but for a zeroed
feature in 'kvm_hyperv_properties' it returns 'true' so QEMU considers
HYPERV_FEAT_SYNDBG as always supported, regardless of whether KVM host
actually supports it.
To fix the issue, leave HYPERV_FEAT_SYNDBG's definition in
'kvm_hyperv_properties' array, there's nothing wrong in having it defined
even when 'CONFIG_SYNDBG' is not set. Instead, put "hv-syndbg" CPU property
under '#ifdef CONFIG_SYNDBG' to alter the existing behavior when the flag
is silently skipped in !CONFIG_SYNDBG builds.
Leave an 'assert' sentinel in hyperv_feature_supported() 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 <vkuznets@redhat.com>
---
target/i386/cpu.c | 2 ++
target/i386/kvm/kvm.c | 11 +++++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 2666ef380891..64ce7c4c8242 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -7866,8 +7866,10 @@ static Property x86_cpu_properties[] = {
HYPERV_FEAT_TLBFLUSH_DIRECT, 0),
DEFINE_PROP_ON_OFF_AUTO("hv-no-nonarch-coresharing", X86CPU,
hyperv_no_nonarch_cs, ON_OFF_AUTO_OFF),
+#ifdef CONFIG_SYNDBG
DEFINE_PROP_BIT64("hv-syndbg", X86CPU, hyperv_features,
HYPERV_FEAT_SYNDBG, 0),
+#endif
DEFINE_PROP_BOOL("hv-passthrough", X86CPU, hyperv_passthrough, false),
DEFINE_PROP_BOOL("hv-enforce-cpuid", X86CPU, hyperv_enforce_cpuid, false),
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 42970ab046fa..f067e35d35b1 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -945,7 +945,6 @@ static struct {
.bits = HV_DEPRECATING_AEOI_RECOMMENDED}
}
},
-#ifdef CONFIG_SYNDBG
[HYPERV_FEAT_SYNDBG] = {
.desc = "Enable synthetic kernel debugger channel (hv-syndbg)",
.flags = {
@@ -954,7 +953,6 @@ static struct {
},
.dependencies = BIT(HYPERV_FEAT_SYNIC) | BIT(HYPERV_FEAT_RELAXED)
},
-#endif
[HYPERV_FEAT_MSR_BITMAP] = {
.desc = "enlightened MSR-Bitmap (hv-emsr-bitmap)",
.flags = {
@@ -1206,6 +1204,13 @@ static bool hyperv_feature_supported(CPUState *cs, int feature)
uint32_t func, bits;
int i, reg;
+ /*
+ * kvm_hyperv_properties needs to define at least one CPUID flag which
+ * must be used to detect the feature, it's hard to say whether it is
+ * supported or not otherwise.
+ */
+ assert(kvm_hyperv_properties[feature].flags[0].func);
+
for (i = 0; i < ARRAY_SIZE(kvm_hyperv_properties[feature].flags); i++) {
func = kvm_hyperv_properties[feature].flags[i].func;
@@ -3388,13 +3393,11 @@ static int kvm_put_msrs(X86CPU *cpu, int level)
kvm_msr_entry_add(cpu, HV_X64_MSR_TSC_EMULATION_STATUS,
env->msr_hv_tsc_emulation_status);
}
-#ifdef CONFIG_SYNDBG
if (hyperv_feat_enabled(cpu, HYPERV_FEAT_SYNDBG) &&
has_msr_hv_syndbg_options) {
kvm_msr_entry_add(cpu, HV_X64_MSR_SYNDBG_OPTIONS,
hyperv_syndbg_query_options());
}
-#endif
}
if (hyperv_feat_enabled(cpu, HYPERV_FEAT_VAPIC)) {
kvm_msr_entry_add(cpu, HV_X64_MSR_APIC_ASSIST_PAGE,
--
2.43.2
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH RESEND v3 2/3] i386: Exclude 'hv-syndbg' from 'hv-passthrough'
2024-03-05 16:42 [PATCH RESEND v3 0/3] i386: Fix Hyper-V Gen1 guests stuck on boot with 'hv-passthrough' Vitaly Kuznetsov
2024-03-05 16:42 ` [PATCH RESEND v3 1/3] i386: Fix conditional CONFIG_SYNDBG enablement Vitaly Kuznetsov
@ 2024-03-05 16:42 ` Vitaly Kuznetsov
2024-03-05 16:42 ` [PATCH RESEND v3 3/3] docs/system: Add recommendations to Hyper-V enlightenments doc Vitaly Kuznetsov
2024-03-25 9:28 ` [PATCH RESEND v3 0/3] i386: Fix Hyper-V Gen1 guests stuck on boot with 'hv-passthrough' Vitaly Kuznetsov
3 siblings, 0 replies; 8+ messages in thread
From: Vitaly Kuznetsov @ 2024-03-05 16:42 UTC (permalink / raw)
To: qemu-devel, Paolo Bonzini
Windows with Hyper-V role enabled doesn't boot with 'hv-passthrough' when
no debugger is configured, this significantly limits the usefulness of the
feature as there's no support for subtracting Hyper-V features from CPU
flags at this moment (e.g. "-cpu host,hv-passthrough,-hv-syndbg" does not
work). While this is also theoretically fixable, 'hv-syndbg' is likely
very special and unneeded in the default set. Genuine Hyper-V doesn't seem
to enable it either.
Introduce 'skip_passthrough' flag to 'kvm_hyperv_properties' and use it as
one-off to skip 'hv-syndbg' when enabling features 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 <vkuznets@redhat.com>
---
docs/system/i386/hyperv.rst | 13 +++++++++----
target/i386/kvm/kvm.c | 7 +++++--
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/docs/system/i386/hyperv.rst b/docs/system/i386/hyperv.rst
index 2505dc4c86e0..009947e39141 100644
--- a/docs/system/i386/hyperv.rst
+++ b/docs/system/i386/hyperv.rst
@@ -262,14 +262,19 @@ Supplementary features
``hv-passthrough``
In some cases (e.g. during development) it may make sense to use QEMU in
'pass-through' mode and give Windows guests all enlightenments currently
- supported by KVM. This pass-through mode is enabled by "hv-passthrough" CPU
- flag.
+ supported by KVM.
Note: ``hv-passthrough`` flag only enables enlightenments which are known to QEMU
(have corresponding 'hv-' flag) and copies ``hv-spinlocks`` and ``hv-vendor-id``
values from KVM to QEMU. ``hv-passthrough`` overrides all other 'hv-' settings on
- the command line. Also, enabling this flag effectively prevents migration as the
- list of enabled enlightenments may differ between target and destination hosts.
+ the command line.
+
+ Note: ``hv-passthrough`` does not enable ``hv-syndbg`` which can prevent certain
+ Windows guests from booting when used without proper configuration. If needed,
+ ``hv-syndbg`` can be enabled additionally.
+
+ Note: ``hv-passthrough`` effectively prevents migration as the list of enabled
+ enlightenments may differ between target and destination hosts.
``hv-enforce-cpuid``
By default, KVM allows the guest to use all currently supported Hyper-V
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index f067e35d35b1..f01d19ad2d51 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -823,6 +823,7 @@ static struct {
uint32_t bits;
} flags[2];
uint64_t dependencies;
+ bool skip_passthrough;
} kvm_hyperv_properties[] = {
[HYPERV_FEAT_RELAXED] = {
.desc = "relaxed timing (hv-relaxed)",
@@ -951,7 +952,8 @@ static struct {
{.func = HV_CPUID_FEATURES, .reg = R_EDX,
.bits = HV_FEATURE_DEBUG_MSRS_AVAILABLE}
},
- .dependencies = BIT(HYPERV_FEAT_SYNIC) | BIT(HYPERV_FEAT_RELAXED)
+ .dependencies = BIT(HYPERV_FEAT_SYNIC) | BIT(HYPERV_FEAT_RELAXED),
+ .skip_passthrough = true,
},
[HYPERV_FEAT_MSR_BITMAP] = {
.desc = "enlightened MSR-Bitmap (hv-emsr-bitmap)",
@@ -1360,7 +1362,8 @@ bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp)
* hv_build_cpuid_leaf() uses this info to build guest CPUIDs.
*/
for (feat = 0; feat < ARRAY_SIZE(kvm_hyperv_properties); feat++) {
- if (hyperv_feature_supported(cs, feat)) {
+ if (hyperv_feature_supported(cs, feat) &&
+ !kvm_hyperv_properties[feat].skip_passthrough) {
cpu->hyperv_features |= BIT(feat);
}
}
--
2.43.2
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH RESEND v3 3/3] docs/system: Add recommendations to Hyper-V enlightenments doc
2024-03-05 16:42 [PATCH RESEND v3 0/3] i386: Fix Hyper-V Gen1 guests stuck on boot with 'hv-passthrough' Vitaly Kuznetsov
2024-03-05 16:42 ` [PATCH RESEND v3 1/3] i386: Fix conditional CONFIG_SYNDBG enablement Vitaly Kuznetsov
2024-03-05 16:42 ` [PATCH RESEND v3 2/3] i386: Exclude 'hv-syndbg' from 'hv-passthrough' Vitaly Kuznetsov
@ 2024-03-05 16:42 ` Vitaly Kuznetsov
2024-03-07 8:33 ` Zhao Liu
2024-03-25 9:28 ` [PATCH RESEND v3 0/3] i386: Fix Hyper-V Gen1 guests stuck on boot with 'hv-passthrough' Vitaly Kuznetsov
3 siblings, 1 reply; 8+ messages in thread
From: Vitaly Kuznetsov @ 2024-03-05 16:42 UTC (permalink / raw)
To: qemu-devel, Paolo Bonzini
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 <vkuznets@redhat.com>
---
docs/system/i386/hyperv.rst | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/docs/system/i386/hyperv.rst b/docs/system/i386/hyperv.rst
index 009947e39141..1c1de77feb65 100644
--- a/docs/system/i386/hyperv.rst
+++ b/docs/system/i386/hyperv.rst
@@ -283,6 +283,36 @@ Supplementary features
feature alters this behavior and only allows the guest to use exposed Hyper-V
enlightenments.
+Recommendations
+---------------
+
+To achieve the best performance of Windows and Hyper-V guests and unless there
+are any specific requirements (e.g. migration to older QEMU/KVM versions,
+emulating specific Hyper-V version, ...), it is recommended to enable all
+currently implemented Hyper-V enlightenments with the following exceptions:
+
+- ``hv-syndbg``, ``hv-passthrough``, ``hv-enforce-cpuid`` should not be enabled
+ in production configurations as these are debugging/development features.
+- ``hv-reset`` can be avoided as modern Hyper-V versions don't expose it.
+- ``hv-evmcs`` can (and should) be enabled on Intel CPUs only. While the feature
+ is only used in nested configurations (Hyper-V, WSL2), enabling it for regular
+ Windows guests should not have any negative effects.
+- ``hv-no-nonarch-coresharing`` must only be enabled if vCPUs are properly pinned
+ so no non-architectural core sharing is possible.
+- ``hv-vendor-id``, ``hv-version-id-build``, ``hv-version-id-major``,
+ ``hv-version-id-minor``, ``hv-version-id-spack``, ``hv-version-id-sbranch``,
+ ``hv-version-id-snumber`` can be left unchanged, guests are not supposed to
+ behave differently when different Hyper-V version is presented to them.
+- ``hv-crash`` must only be enabled if the crash information is consumed via
+ QAPI by higher levels of the virtualization stack. Enabling this feature
+ effectively prevents Windows from creating dumps upon crashes.
+- ``hv-reenlightenment`` can only be used on hardware which supports TSC
+ scaling or when guest migration is not needed.
+- ``hv-spinlocks`` should be set to e.g. 0xfff when host CPUs are overcommited
+ (meaning there are other scheduled tasks or guests) and can be left unchanged
+ from the default value (0xffffffff) otherwise.
+- ``hv-avic``/``hv-apicv`` should not be enabled if the hardware does not
+ support APIC virtualization (Intel APICv, AMD AVIC).
Useful links
------------
--
2.43.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH RESEND v3 3/3] docs/system: Add recommendations to Hyper-V enlightenments doc
2024-03-05 16:42 ` [PATCH RESEND v3 3/3] docs/system: Add recommendations to Hyper-V enlightenments doc Vitaly Kuznetsov
@ 2024-03-07 8:33 ` Zhao Liu
2024-03-07 9:46 ` Vitaly Kuznetsov
0 siblings, 1 reply; 8+ messages in thread
From: Zhao Liu @ 2024-03-07 8:33 UTC (permalink / raw)
To: Vitaly Kuznetsov; +Cc: qemu-devel, Paolo Bonzini
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 <vkuznets@redhat.com>
> Subject: [PATCH RESEND v3 3/3] docs/system: Add recommendations to Hyper-V
> enlightenments doc
>
> 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 <vkuznets@redhat.com>
> ---
> docs/system/i386/hyperv.rst | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/docs/system/i386/hyperv.rst b/docs/system/i386/hyperv.rst
> index 009947e39141..1c1de77feb65 100644
> --- a/docs/system/i386/hyperv.rst
> +++ b/docs/system/i386/hyperv.rst
> @@ -283,6 +283,36 @@ Supplementary features
> feature alters this behavior and only allows the guest to use exposed Hyper-V
> enlightenments.
>
> +Recommendations
> +---------------
This guide is very helpful!
> +To achieve the best performance of Windows and Hyper-V guests and unless there
> +are any specific requirements (e.g. migration to older QEMU/KVM versions,
> +emulating specific Hyper-V version, ...), it is recommended to enable all
> +currently implemented Hyper-V enlightenments with the following exceptions:
> +
> +- ``hv-syndbg``, ``hv-passthrough``, ``hv-enforce-cpuid`` should not be enabled
> + in production configurations as these are debugging/development features.
> +- ``hv-reset`` can be avoided as modern Hyper-V versions don't expose it.
Does the "Hyper-V versions" means Hyper-V guest version or Microsoft's Hyper-V
hypervisor version? It would be better to clarify Hyper-V guest and
Hyper-v hypervisor.
And it would be better to have a clear version number.
> +- ``hv-evmcs`` can (and should) be enabled on Intel CPUs only. While the feature
> + is only used in nested configurations (Hyper-V, WSL2), enabling it for regular
> + Windows guests should not have any negative effects.
> +- ``hv-no-nonarch-coresharing`` must only be enabled if vCPUs are properly pinned
> + so no non-architectural core sharing is possible.
> +- ``hv-vendor-id``, ``hv-version-id-build``, ``hv-version-id-major``,
> + ``hv-version-id-minor``, ``hv-version-id-spack``, ``hv-version-id-sbranch``,
> + ``hv-version-id-snumber`` can be left unchanged, guests are not supposed to
> + behave differently when different Hyper-V version is presented to them.
> +- ``hv-crash`` must only be enabled if the crash information is consumed via
> + QAPI by higher levels of the virtualization stack. Enabling this feature
> + effectively prevents Windows from creating dumps upon crashes.
> +- ``hv-reenlightenment`` can only be used on hardware which supports TSC
> + scaling or when guest migration is not needed.
> +- ``hv-spinlocks`` should be set to e.g. 0xfff when host CPUs are overcommited
> + (meaning there are other scheduled tasks or guests) and can be left unchanged
> + from the default value (0xffffffff) otherwise.
> +- ``hv-avic``/``hv-apicv`` should not be enabled if the hardware does not
> + support APIC virtualization (Intel APICv, AMD AVIC).
>
It's also better to add blank lines between paragraphs above.
BTW, may I ask another Windows question? I understand that Windows such
as Windows 10 and later is already a virtualized architecture with
built-in Hyper-V to run root partation.
So is it true that booting Windows VM via KVM + QEMU is running Windows
Guest in L2? Or what is the relationship between Hyper-V within Windows
and Hyper-V enlightenments with QEMU + KVM?
Thanks,
Zhao
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH RESEND v3 3/3] docs/system: Add recommendations to Hyper-V enlightenments doc
2024-03-07 8:33 ` Zhao Liu
@ 2024-03-07 9:46 ` Vitaly Kuznetsov
2024-03-07 13:24 ` Zhao Liu
0 siblings, 1 reply; 8+ messages in thread
From: Vitaly Kuznetsov @ 2024-03-07 9:46 UTC (permalink / raw)
To: Zhao Liu; +Cc: qemu-devel, Paolo Bonzini
Zhao Liu <zhao1.liu@intel.com> 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 <vkuznets@redhat.com>
>> Subject: [PATCH RESEND v3 3/3] docs/system: Add recommendations to Hyper-V
>> enlightenments doc
>>
>> 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 <vkuznets@redhat.com>
>> ---
>> docs/system/i386/hyperv.rst | 30 ++++++++++++++++++++++++++++++
>> 1 file changed, 30 insertions(+)
>>
>> diff --git a/docs/system/i386/hyperv.rst b/docs/system/i386/hyperv.rst
>> index 009947e39141..1c1de77feb65 100644
>> --- a/docs/system/i386/hyperv.rst
>> +++ b/docs/system/i386/hyperv.rst
>> @@ -283,6 +283,36 @@ Supplementary features
>> feature alters this behavior and only allows the guest to use exposed Hyper-V
>> enlightenments.
>>
>> +Recommendations
>> +---------------
>
> This guide is very helpful!
>
>> +To achieve the best performance of Windows and Hyper-V guests and unless there
>> +are any specific requirements (e.g. migration to older QEMU/KVM versions,
>> +emulating specific Hyper-V version, ...), it is recommended to enable all
>> +currently implemented Hyper-V enlightenments with the following exceptions:
>> +
>> +- ``hv-syndbg``, ``hv-passthrough``, ``hv-enforce-cpuid`` should not be enabled
>> + in production configurations as these are debugging/development features.
>> +- ``hv-reset`` can be avoided as modern Hyper-V versions don't expose it.
>
> Does the "Hyper-V versions" means Hyper-V guest version or Microsoft's Hyper-V
> hypervisor version?
> It would be better to clarify Hyper-V guest and Hyper-v hypervisor.
>
> And it would be better to have a clear version number.
This is about QEMU/KVM emulating certain Hyper-V version, not about
guest Hyper-V version. To be honest, I'm not sure what was the last
version of Hyper-V which was exposing HV_SYSTEM_RESET_RECOMMENDED. I
don't have anything older that WS2016 around now and the bit is not
there. If I'm not mistaken, it was already missing in 2012R2. I would
appreciate if anyone has more precise historical info to add here.
>
>> +- ``hv-evmcs`` can (and should) be enabled on Intel CPUs only. While the feature
>> + is only used in nested configurations (Hyper-V, WSL2), enabling it for regular
>> + Windows guests should not have any negative effects.
>> +- ``hv-no-nonarch-coresharing`` must only be enabled if vCPUs are properly pinned
>> + so no non-architectural core sharing is possible.
>> +- ``hv-vendor-id``, ``hv-version-id-build``, ``hv-version-id-major``,
>> + ``hv-version-id-minor``, ``hv-version-id-spack``, ``hv-version-id-sbranch``,
>> + ``hv-version-id-snumber`` can be left unchanged, guests are not supposed to
>> + behave differently when different Hyper-V version is presented to them.
>> +- ``hv-crash`` must only be enabled if the crash information is consumed via
>> + QAPI by higher levels of the virtualization stack. Enabling this feature
>> + effectively prevents Windows from creating dumps upon crashes.
>> +- ``hv-reenlightenment`` can only be used on hardware which supports TSC
>> + scaling or when guest migration is not needed.
>> +- ``hv-spinlocks`` should be set to e.g. 0xfff when host CPUs are overcommited
>> + (meaning there are other scheduled tasks or guests) and can be left unchanged
>> + from the default value (0xffffffff) otherwise.
>> +- ``hv-avic``/``hv-apicv`` should not be enabled if the hardware does not
>> + support APIC virtualization (Intel APICv, AMD AVIC).
>>
>
> It's also better to add blank lines between paragraphs above.
Np, if I am to re-send this I'll add these (hope it's not an acceptance
blocker, we can always do a follow-up).
>
> BTW, may I ask another Windows question? I understand that Windows such
> as Windows 10 and later is already a virtualized architecture with
> built-in Hyper-V to run root partation.
>
> So is it true that booting Windows VM via KVM + QEMU is running Windows
> Guest in L2? Or what is the relationship between Hyper-V within Windows
> and Hyper-V enlightenments with QEMU + KVM?
Hyper-V is a role you can enable in various Windows versions, both
server and client. When enabled, you get a hypervisor (which is called
'Microsoft Hypervisor' as I was told) and your Windows becomes the root
partition (similar to Xen Dom0). In case you run this on KVM, Windows
becomes L2. Hyper-V enlightenments provided by KVM/QEMU are consumed by
the hypervisor then.
Note: Hyper-V role is optional, in many cases Windows guests run without
it (no Hyper-V VMs, no WSL2, ...) and thus consume KVM's Hyper-V
enlightenments directly, no nested virt involved.
--
Vitaly
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH RESEND v3 3/3] docs/system: Add recommendations to Hyper-V enlightenments doc
2024-03-07 9:46 ` Vitaly Kuznetsov
@ 2024-03-07 13:24 ` Zhao Liu
0 siblings, 0 replies; 8+ messages in thread
From: Zhao Liu @ 2024-03-07 13:24 UTC (permalink / raw)
To: Vitaly Kuznetsov; +Cc: qemu-devel, Paolo Bonzini
> Hyper-V is a role you can enable in various Windows versions, both
> server and client. When enabled, you get a hypervisor (which is called
> 'Microsoft Hypervisor' as I was told) and your Windows becomes the root
> partition (similar to Xen Dom0). In case you run this on KVM, Windows
> becomes L2. Hyper-V enlightenments provided by KVM/QEMU are consumed by
> the hypervisor then.
>
> Note: Hyper-V role is optional, in many cases Windows guests run without
> it (no Hyper-V VMs, no WSL2, ...) and thus consume KVM's Hyper-V
> enlightenments directly, no nested virt involved.
Thanks much for your explanation!
Regards,
Zhao
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH RESEND v3 0/3] i386: Fix Hyper-V Gen1 guests stuck on boot with 'hv-passthrough'
2024-03-05 16:42 [PATCH RESEND v3 0/3] i386: Fix Hyper-V Gen1 guests stuck on boot with 'hv-passthrough' Vitaly Kuznetsov
` (2 preceding siblings ...)
2024-03-05 16:42 ` [PATCH RESEND v3 3/3] docs/system: Add recommendations to Hyper-V enlightenments doc Vitaly Kuznetsov
@ 2024-03-25 9:28 ` Vitaly Kuznetsov
3 siblings, 0 replies; 8+ messages in thread
From: Vitaly Kuznetsov @ 2024-03-25 9:28 UTC (permalink / raw)
To: qemu-devel, Paolo Bonzini
Vitaly Kuznetsov <vkuznets@redhat.com> 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
> 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 issues:
> - 'hv-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 (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/hyperv.rst | 43 +++++++++++++++++++++++++++++++++----
> target/i386/cpu.c | 2 ++
> target/i386/kvm/kvm.c | 18 ++++++++++------
> 3 files changed, 53 insertions(+), 10 deletions(-)
--
Vitaly
^ permalink raw reply [flat|nested] 8+ messages in thread