On 03/06/2024 15.11, Paolo Bonzini wrote:
Right now QEMU is importing arch/x86/include/uapi/asm/kvm_para.h
because it includes definitions for kvmclock and for KVM CPUID
bits.  However, other definitions for KVM hypercall values and return
codes are included in include/uapi/linux/kvm_para.h and they will be
used by SEV-SNP.

To ensure that it is possible to include both <linux/kvm_para.h> and
"standard-headers/asm-x86/kvm_para.h" without conflicts, include
linux/kvm_para.h as a portable header too, and forward linux-headers/
files to those in include/standard-headers.  Note that <linux/kvm_para.h>
will include architecture-specific definitions as well, but
"standard-headers/linux/kvm_para.h" will not because it can be used in
architecture-independent files.

This could easily be extended to other architectures, but right now
they do not need any symbol in their specific kvm_para.h files.

Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
---
  include/standard-headers/linux/kvm_para.h | 38 +++++++++++++++++++++++
  linux-headers/asm-x86/kvm_para.h          |  1 +
  linux-headers/linux/kvm_para.h            |  2 ++
  scripts/update-linux-headers.sh           | 22 ++++++++++++-
  4 files changed, 62 insertions(+), 1 deletion(-)
  create mode 100644 include/standard-headers/linux/kvm_para.h
  create mode 100644 linux-headers/asm-x86/kvm_para.h
  create mode 100644 linux-headers/linux/kvm_para.h

Reviewed-by: Thomas Huth <th...@redhat.com>



Reply via email to