[PATCH 0/5] i386: simplify Hyper-V enlightenments enablement

Vitaly Kuznetsov posted 5 patches 3 years, 5 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201119103221.1665171-1-vkuznets@redhat.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>
There is a newer version of this series
docs/hyperv.txt       |  8 +++++
hw/i386/x86.c         | 30 +++++++++++++++++++
include/hw/i386/x86.h |  7 +++++
target/i386/cpu.c     | 52 +++++++++++++++++++++++++++++++-
target/i386/cpu.h     |  6 +++-
target/i386/kvm.c     | 70 ++++++++++++++++++++++++++++---------------
6 files changed, 147 insertions(+), 26 deletions(-)
[PATCH 0/5] i386: simplify Hyper-V enlightenments enablement
Posted by Vitaly Kuznetsov 3 years, 5 months ago
This series is a part of the previously sent "[PATCH RFC v3 00/23] i386:
KVM: expand Hyper-V features early":
https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg02443.html

We're not ready to merge the full patch set yet because the required
KVM capability is only queued for 5.11. We can, however, extract the
part providing 'hyperv=on' option to x86 machine types which is valuable
on its own. Picking up four other patches from the original RFC to
minimize the code churn in future (x86_cpu_realizefn()).

Changes since RFCv3:
- Rename 'hyperv_features' to 'default_hyperv_features' in X86MachineClass
  [Eduardo]
- Move x86_cpu_hyperv_realize() invocation after x86_cpu_expand_features()/
  x86_cpu_filter_features() as we need to reference cpu_has_vmx().

Vitaly Kuznetsov (5):
  i386: move hyperv_vendor_id initialization to x86_cpu_realizefn()
  i386: move hyperv_interface_id initialization to x86_cpu_realizefn()
  i386: move hyperv_version_id initialization to x86_cpu_realizefn()
  i386: move hyperv_limits initialization to x86_cpu_realizefn()
  i386: provide simple 'hyperv=on' option to x86 machine types

 docs/hyperv.txt       |  8 +++++
 hw/i386/x86.c         | 30 +++++++++++++++++++
 include/hw/i386/x86.h |  7 +++++
 target/i386/cpu.c     | 52 +++++++++++++++++++++++++++++++-
 target/i386/cpu.h     |  6 +++-
 target/i386/kvm.c     | 70 ++++++++++++++++++++++++++++---------------
 6 files changed, 147 insertions(+), 26 deletions(-)

-- 
2.26.2


Re: [PATCH 0/5] i386: simplify Hyper-V enlightenments enablement
Posted by Claudio Fontana 3 years, 5 months ago
Hi Vitaly, I just wanted to raise awareness of

https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg04597.html

because if that series work is completed, you would have already the right hook to put your code in, when it comes to your hyperv-specific code for the realizefn.

Ciao ciao,

Claudio

On 11/19/20 11:32 AM, Vitaly Kuznetsov wrote:
> This series is a part of the previously sent "[PATCH RFC v3 00/23] i386:
> KVM: expand Hyper-V features early":
> https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg02443.html
> 
> We're not ready to merge the full patch set yet because the required
> KVM capability is only queued for 5.11. We can, however, extract the
> part providing 'hyperv=on' option to x86 machine types which is valuable
> on its own. Picking up four other patches from the original RFC to
> minimize the code churn in future (x86_cpu_realizefn()).
> 
> Changes since RFCv3:
> - Rename 'hyperv_features' to 'default_hyperv_features' in X86MachineClass
>   [Eduardo]
> - Move x86_cpu_hyperv_realize() invocation after x86_cpu_expand_features()/
>   x86_cpu_filter_features() as we need to reference cpu_has_vmx().
> 
> Vitaly Kuznetsov (5):
>   i386: move hyperv_vendor_id initialization to x86_cpu_realizefn()
>   i386: move hyperv_interface_id initialization to x86_cpu_realizefn()
>   i386: move hyperv_version_id initialization to x86_cpu_realizefn()
>   i386: move hyperv_limits initialization to x86_cpu_realizefn()
>   i386: provide simple 'hyperv=on' option to x86 machine types
> 
>  docs/hyperv.txt       |  8 +++++
>  hw/i386/x86.c         | 30 +++++++++++++++++++
>  include/hw/i386/x86.h |  7 +++++
>  target/i386/cpu.c     | 52 +++++++++++++++++++++++++++++++-
>  target/i386/cpu.h     |  6 +++-
>  target/i386/kvm.c     | 70 ++++++++++++++++++++++++++++---------------
>  6 files changed, 147 insertions(+), 26 deletions(-)
> 


Re: [PATCH 0/5] i386: simplify Hyper-V enlightenments enablement
Posted by Vitaly Kuznetsov 3 years, 5 months ago
Claudio Fontana <cfontana@suse.de> writes:

> Hi Vitaly, I just wanted to raise awareness of
>
> https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg04597.html
>
> because if that series work is completed, you would have already the
> right hook to put your code in, when it comes to your hyperv-specific
> code for the realizefn.

Hi Claudio,

thanks for letting me know! I'll take a look but at first glance it
would just be a code movement. Hope your series gets merged soon, at
least before my bug 'i386: KVM: expand Hyper-V features early"' is
coming (will be submitting it after 5.11-rc1 kernel upstream) so we
minimize the code churn.

>
> Ciao ciao,
>
> Claudio
>
> On 11/19/20 11:32 AM, Vitaly Kuznetsov wrote:
>> This series is a part of the previously sent "[PATCH RFC v3 00/23] i386:
>> KVM: expand Hyper-V features early":
>> https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg02443.html
>> 
>> We're not ready to merge the full patch set yet because the required
>> KVM capability is only queued for 5.11. We can, however, extract the
>> part providing 'hyperv=on' option to x86 machine types which is valuable
>> on its own. Picking up four other patches from the original RFC to
>> minimize the code churn in future (x86_cpu_realizefn()).
>> 
>> Changes since RFCv3:
>> - Rename 'hyperv_features' to 'default_hyperv_features' in X86MachineClass
>>   [Eduardo]
>> - Move x86_cpu_hyperv_realize() invocation after x86_cpu_expand_features()/
>>   x86_cpu_filter_features() as we need to reference cpu_has_vmx().
>> 
>> Vitaly Kuznetsov (5):
>>   i386: move hyperv_vendor_id initialization to x86_cpu_realizefn()
>>   i386: move hyperv_interface_id initialization to x86_cpu_realizefn()
>>   i386: move hyperv_version_id initialization to x86_cpu_realizefn()
>>   i386: move hyperv_limits initialization to x86_cpu_realizefn()
>>   i386: provide simple 'hyperv=on' option to x86 machine types
>> 
>>  docs/hyperv.txt       |  8 +++++
>>  hw/i386/x86.c         | 30 +++++++++++++++++++
>>  include/hw/i386/x86.h |  7 +++++
>>  target/i386/cpu.c     | 52 +++++++++++++++++++++++++++++++-
>>  target/i386/cpu.h     |  6 +++-
>>  target/i386/kvm.c     | 70 ++++++++++++++++++++++++++++---------------
>>  6 files changed, 147 insertions(+), 26 deletions(-)
>> 
>

-- 
Vitaly


Re: [PATCH 0/5] i386: simplify Hyper-V enlightenments enablement
Posted by Eduardo Habkost 3 years, 4 months ago
On Thu, Nov 19, 2020 at 11:32:16AM +0100, Vitaly Kuznetsov wrote:
> This series is a part of the previously sent "[PATCH RFC v3 00/23] i386:
> KVM: expand Hyper-V features early":
> https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg02443.html
> 
> We're not ready to merge the full patch set yet because the required
> KVM capability is only queued for 5.11. We can, however, extract the
> part providing 'hyperv=on' option to x86 machine types which is valuable
> on its own. Picking up four other patches from the original RFC to
> minimize the code churn in future (x86_cpu_realizefn()).
> 
> Changes since RFCv3:
> - Rename 'hyperv_features' to 'default_hyperv_features' in X86MachineClass
>   [Eduardo]
> - Move x86_cpu_hyperv_realize() invocation after x86_cpu_expand_features()/
>   x86_cpu_filter_features() as we need to reference cpu_has_vmx().
> 
> Vitaly Kuznetsov (5):
>   i386: move hyperv_vendor_id initialization to x86_cpu_realizefn()
>   i386: move hyperv_interface_id initialization to x86_cpu_realizefn()
>   i386: move hyperv_version_id initialization to x86_cpu_realizefn()
>   i386: move hyperv_limits initialization to x86_cpu_realizefn()
>   i386: provide simple 'hyperv=on' option to x86 machine types

Queued, thanks!

-- 
Eduardo