[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 36/63] scripts/update-linux-headers: Add setup_data.h to import li
From: |
Paolo Bonzini |
Subject: |
[PULL 36/63] scripts/update-linux-headers: Add setup_data.h to import list |
Date: |
Tue, 23 Apr 2024 17:09:24 +0200 |
From: Michael Roth <michael.roth@amd.com>
Data structures like struct setup_data have been moved to a separate
setup_data.h header which bootparam.h relies on. Add setup_data.h to
the cp_portable() list and sync it along with the other header files.
Note that currently struct setup_data is stripped away as part of
generating bootparam.h, but that handling is no currently needed for
setup_data.h since it doesn't pull in many external
headers/dependencies. However, QEMU currently redefines struct
setup_data in hw/i386/x86.c, so that will need to be removed as part of
any header update that pulls in the new setup_data.h to avoid build
bisect breakage.
Because <asm/setup_data.h> is the first architecture specific #include
in include/standard-headers/, add a new sed substitution to rewrite
asm/ include to the standard-headers/asm-* subdirectory for the current
architecture.
And while at it, remove asm-generic/kvm_para.h from the list of
allowed includes: it does not have a matching substitution, and therefore
it would not be possible to use it on non-Linux systems where there is
no /usr/include/asm-generic/ directory.
Signed-off-by: Michael Roth <michael.roth@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
scripts/update-linux-headers.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
index a0006eec6fd..d48856f9e24 100755
--- a/scripts/update-linux-headers.sh
+++ b/scripts/update-linux-headers.sh
@@ -61,7 +61,7 @@ cp_portable() {
-e 'linux/const' \
-e 'linux/kernel' \
-e 'linux/sysinfo' \
- -e 'asm-generic/kvm_para' \
+ -e 'asm/setup_data.h' \
> /dev/null
then
echo "Unexpected #include in input file $f".
@@ -77,6 +77,7 @@ cp_portable() {
-e 's/__be\([0-9][0-9]*\)/uint\1_t/g' \
-e 's/"\(input-event-codes\.h\)"/"standard-headers\/linux\/\1"/' \
-e 's/<linux\/\([^>]*\)>/"standard-headers\/linux\/\1"/' \
+ -e 's/<asm\/\([^>]*\)>/"standard-headers\/asm-'$arch'\/\1"/' \
-e 's/__bitwise//' \
-e 's/__attribute__((packed))/QEMU_PACKED/' \
-e 's/__inline__/inline/' \
@@ -155,11 +156,14 @@ for arch in $ARCHLIST; do
"$tmpdir/include/asm/bootparam.h" > "$tmpdir/bootparam.h"
cp_portable "$tmpdir/bootparam.h" \
"$output/include/standard-headers/asm-$arch"
+ cp_portable "$tmpdir/include/asm/setup_data.h" \
+ "$output/standard-headers/asm-x86"
fi
if [ $arch = riscv ]; then
cp "$tmpdir/include/asm/ptrace.h" "$output/linux-headers/asm-riscv/"
fi
done
+arch=
rm -rf "$output/linux-headers/linux"
mkdir -p "$output/linux-headers/linux"
--
2.44.0
- [PULL 27/63] target/i386: Add new CPU model SierraForest, (continued)
- [PULL 27/63] target/i386: Add new CPU model SierraForest, Paolo Bonzini, 2024/04/23
- [PULL 33/63] i386/sev: Switch to use confidential_guest_kvm_init(), Paolo Bonzini, 2024/04/23
- [PULL 32/63] confidential guest support: Add kvm_init() and kvm_reset() in class, Paolo Bonzini, 2024/04/23
- [PULL 19/63] vga: optimize computation of dirty memory region, Paolo Bonzini, 2024/04/23
- [PULL 17/63] stubs: include stubs only if needed, Paolo Bonzini, 2024/04/23
- [PULL 21/63] kvm: use configs/ definition to conditionalize debug support, Paolo Bonzini, 2024/04/23
- [PULL 34/63] ppc/pef: switch to use confidential_guest_kvm_init/reset(), Paolo Bonzini, 2024/04/23
- [PULL 10/63] hw/usb: move stubs out of stubs/, Paolo Bonzini, 2024/04/23
- [PULL 11/63] hw/virtio: move stubs out of stubs/, Paolo Bonzini, 2024/04/23
- [PULL 29/63] pci-host/q35: Move PAM initialization above SMRAM initialization, Paolo Bonzini, 2024/04/23
- [PULL 36/63] scripts/update-linux-headers: Add setup_data.h to import list,
Paolo Bonzini <=
- [PULL 56/63] kvm/tdx: Don't complain when converting vMMIO region to shared, Paolo Bonzini, 2024/04/23
- [PULL 58/63] target/i386/host-cpu: Consolidate the use of warn_report_once(), Paolo Bonzini, 2024/04/23
- [PULL 41/63] KVM: remove kvm_arch_cpu_check_are_resettable, Paolo Bonzini, 2024/04/23
- [PULL 37/63] scripts/update-linux-headers: Add bits.h to file imports, Paolo Bonzini, 2024/04/23
- [PULL 44/63] target/i386: SEV: use KVM_SEV_INIT2 if possible, Paolo Bonzini, 2024/04/23
- [PULL 45/63] i386/sev: Add 'legacy-vm-type' parameter for SEV guest objects, Paolo Bonzini, 2024/04/23
- [PULL 46/63] hw/i386/sev: Use legacy SEV VM types for older machine types, Paolo Bonzini, 2024/04/23
- [PULL 50/63] kvm: Enable KVM_SET_USER_MEMORY_REGION2 for memslot, Paolo Bonzini, 2024/04/23
- [PULL 49/63] RAMBlock: Add support of KVM private guest memfd, Paolo Bonzini, 2024/04/23
- [PULL 51/63] kvm/memory: Make memory type private by default if it has guest memfd backend, Paolo Bonzini, 2024/04/23