Closed LouXiaoxuan closed 10 months ago
It looks like the kernel on which you are building qemu isn't new enough to support the latest version of qemu. Can you try building and installing just the kernel first (including the header files) and then trying to building qemu after rebooting into the new kernel?
Thanks for your prompt response. Currently, I removed __DECLARE_FLEX_ARRAY from the qemu/linux-headers/asm-x86/kvm.h:
union {
struct kvm_vmx_nested_state_data vmx[0];
struct kvm_svm_nested_state_data svm[0];
//__DECLARE_FLEX_ARRAY(struct kvm_vmx_nested_state_data, vmx);
//__DECLARE_FLEX_ARRAY(struct kvm_svm_nested_state_data, svm);
} data;
After that, the qemu can be built correctly, even the backwards-compatability seems to be lost.
Using build.sh to build and install qemu under the branch of "snp-latest" is failed. This is the error message:
After checking the code of qemu branch "snp-latest", I found that __DECLARE_FLEX_ARRAY used in qemu/linux-headers/asm-x86/kvm.h is not declared in whole project.
How can I solve this problem?