]> git.proxmox.com Git - mirror_qemu.git/commit - target/i386/cpu.c
hyperv: add header with protocol definitions
authorRoman Kagan <rkagan@virtuozzo.com>
Thu, 13 Jul 2017 20:15:21 +0000 (23:15 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 19 Sep 2017 14:20:49 +0000 (16:20 +0200)
commit5e95381260e668a3a02aff5485401788b41b3050
treed5c0aa8d42c9d6996a01b55db95352f6f1688c7e
parent6c69dfb67e84747cf071958594d939e845dfcc0c
hyperv: add header with protocol definitions

The definitions for Hyper-V emulation are currently taken from a header
imported from the Linux kernel.

However, as these describe a third-party protocol rather than a kernel
API, it probably wasn't a good idea to publish it in the kernel uapi.

This patch introduces a header that provides all the necessary
definitions, superseding the one coming from the kernel.

The new header supports (temporary) coexistence with the kernel one.
The constants explicitly named in the Hyper-V specification (e.g. msr
numbers) are defined in a non-conflicting way.  Other constants and
types have got new names.

While at this, the protocol data structures are defined in a more
conventional way, without bitfields, enums, and excessive unions.

The code using this stuff is adjusted, too; it can now be built both
with and without the kernel header in the tree.

Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
Message-Id: <20170713201522.13765-2-rkagan@virtuozzo.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/cpu.c
target/i386/cpu.h
target/i386/hyperv-proto.h [new file with mode: 0644]
target/i386/hyperv.c
target/i386/kvm.c
target/i386/machine.c