[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/8] i386/kvm: implement 'hv-all' pass-through m
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [PATCH 4/8] i386/kvm: implement 'hv-all' pass-through mode |
Date: |
Fri, 29 Mar 2019 15:35:16 +0000 |
User-agent: |
Mutt/1.11.3 (2019-02-01) |
* Vitaly Kuznetsov (address@hidden) wrote:
> In many case we just want to give Windows guests all currently supported
> Hyper-V enlightenments and that's where this new mode may come handy. We
> pass through what was returned by KVM_GET_SUPPORTED_HV_CPUID.
>
> hv_cpuid_check_and_set() is modified to also set cpu->hyperv_* flags as
> we may want to check them later (and we actually do for hv_runtime,
> hv_synic,...).
>
> 'hv-all' is a development only feature, a migration blocker is added to
> prevent issues while migrating between hosts with different feature sets.
>
> Signed-off-by: Vitaly Kuznetsov <address@hidden>
> ---
> docs/hyperv.txt | 10 ++++
> target/i386/cpu.c | 1 +
> target/i386/cpu.h | 1 +
> target/i386/kvm.c | 148 +++++++++++++++++++++++++++++++++++++---------
> 4 files changed, 132 insertions(+), 28 deletions(-)
>
> diff --git a/docs/hyperv.txt b/docs/hyperv.txt
> index 397f2517b8..d1299aba81 100644
> --- a/docs/hyperv.txt
> +++ b/docs/hyperv.txt
> @@ -174,6 +174,16 @@ without the feature to find out if enabling it is
> beneficial.
> Requires: hv-vapic
>
>
> +4. Development features
> +========================
> +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-all" CPU flag.
> +Note: enabling this flag effectively prevents migration as supported features
> +may differ between target and destination.
> +Note: "hv-all" doesn't include 'hv-evmcs', it needs to be enabled explicitly.
> +
> +
<snip>
> + if (cpu->hyperv_all && hv_all_mig_blocker == NULL) {
> + error_setg(&hv_all_mig_blocker,
> + "'hv-all' CPU flag prevents migration, use explicit set
> of "
> + "hv-* flags instead");
> + ret = migrate_add_blocker(hv_all_mig_blocker, &local_err);
> + if (local_err) {
> + error_report_err(local_err);
> + error_free(hv_all_mig_blocker);
> + return ret;
> + }
> + }
Yep, that's probably safest; although if you recorded the features used
in the migration stream you could check for those on the destination and
if they mismatch complain then.
Dave
> if (cpu->hyperv_vpindex && !hv_vpindex_settable) {
> /*
> * the kernel doesn't support setting vp_index; assert that its value
> --
> 2.20.1
>
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK
- [Qemu-devel] [PATCH 0/8] i386/kvm/hyper-v: refactor and implement 'hv-stimer-direct' and 'hv-all' enlightenments, Vitaly Kuznetsov, 2019/03/29
- [Qemu-devel] [PATCH 8/8] i386/kvm: add support for Direct Mode for Hyper-V synthetic timers, Vitaly Kuznetsov, 2019/03/29
- [Qemu-devel] [PATCH 6/8] i386/kvm: hv-stimer requires hv-time and hv-synic, Vitaly Kuznetsov, 2019/03/29
- [Qemu-devel] [PATCH 1/8] i386/kvm: add support for KVM_GET_SUPPORTED_HV_CPUID, Vitaly Kuznetsov, 2019/03/29
- [Qemu-devel] [PATCH 4/8] i386/kvm: implement 'hv-all' pass-through mode, Vitaly Kuznetsov, 2019/03/29
- Re: [Qemu-devel] [PATCH 4/8] i386/kvm: implement 'hv-all' pass-through mode,
Dr. David Alan Gilbert <=
- [Qemu-devel] [PATCH 2/8] i386/kvm: move Hyper-V CPUID filling to hyperv_handle_properties(), Vitaly Kuznetsov, 2019/03/29
- [Qemu-devel] [PATCH 3/8] i386/kvm: document existing Hyper-V enlightenments, Vitaly Kuznetsov, 2019/03/29
- [Qemu-devel] [PATCH 5/8] i386/kvm: hv-evmcs requires hv-vapic, Vitaly Kuznetsov, 2019/03/29
- [Qemu-devel] [PATCH 7/8] i386/kvm: hv-tlbflush/ipi require hv-vpindex, Vitaly Kuznetsov, 2019/03/29