update CH to v28.0, kernel-mshv to v5.15.80 (#4436)

* Update ch to 28.0

* Update kernel-mshv to 5.15.80, generate initrd in /boot/efi for kernel-mshv

* Add license verified to initramfs

* Add comment inline initramfs
This commit is contained in:
Neha Agarwal 2022-12-13 16:12:50 -08:00 коммит произвёл GitHub
Родитель 84c060f474
Коммит 43fe686e98
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 36 добавлений и 83 удалений

Просмотреть файл

@ -1,65 +0,0 @@
From 653498214d5bad6a2baa1f276d6e346ad697f53b Mon Sep 17 00:00:00 2001
From: Muminul Islam <muislam@microsoft.com>
Date: Mon, 24 Oct 2022 16:58:44 -0700
Subject: [PATCH] mshv: Don't use same function signature as KVM
Function xfer_to_guest_mode_handle_work renamed to
mshv_xfer_to_guest_mode_handle_work. Otherwise
it causes `multiple definition of __crc_xfer_to_guest_mode_handle_work`
error.
Signed-off-by: Muminul Islam <muislam@microsoft.com>
---
drivers/hv/mshv.h | 2 +-
drivers/hv/mshv_main.c | 2 +-
drivers/hv/xfer_to_guest.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/hv/mshv.h b/drivers/hv/mshv.h
index ad3400509003..d8c48379d818 100644
--- a/drivers/hv/mshv.h
+++ b/drivers/hv/mshv.h
@@ -37,7 +37,7 @@
/ sizeof(union hv_gpa_page_access_state))
extern struct mshv mshv;
-int xfer_to_guest_mode_handle_work(unsigned long ti_work);
+int mshv_xfer_to_guest_mode_handle_work(unsigned long ti_work);
void mshv_isr(void);
int mshv_synic_init(unsigned int cpu);
diff --git a/drivers/hv/mshv_main.c b/drivers/hv/mshv_main.c
index c9e61935958b..87cb44a5145c 100644
--- a/drivers/hv/mshv_main.c
+++ b/drivers/hv/mshv_main.c
@@ -345,7 +345,7 @@ mshv_run_vp_with_root_scheduler(struct mshv_vp *vp, void __user *ret_message)
local_irq_restore(irq_flags);
preempt_enable();
- ret = xfer_to_guest_mode_handle_work(ti_work);
+ ret = mshv_xfer_to_guest_mode_handle_work(ti_work);
preempt_disable();
diff --git a/drivers/hv/xfer_to_guest.c b/drivers/hv/xfer_to_guest.c
index 19d4a16264c2..20c5261ce21b 100644
--- a/drivers/hv/xfer_to_guest.c
+++ b/drivers/hv/xfer_to_guest.c
@@ -11,7 +11,7 @@
#include <linux/tracehook.h>
/* Invoke with preemption and interrupt enabled */
-int xfer_to_guest_mode_handle_work(unsigned long ti_work)
+int mshv_xfer_to_guest_mode_handle_work(unsigned long ti_work)
{
if (ti_work & _TIF_NOTIFY_SIGNAL)
tracehook_notify_signal();
@@ -27,4 +27,4 @@ int xfer_to_guest_mode_handle_work(unsigned long ti_work)
return 0;
}
-EXPORT_SYMBOL_GPL(xfer_to_guest_mode_handle_work);
+EXPORT_SYMBOL_GPL(mshv_xfer_to_guest_mode_handle_work);
--
2.25.1

Просмотреть файл

@ -1,7 +1,7 @@
{
"Signatures": {
"config": "e652c672401fa5742b0591964d73c7f241a34a737dcaf4b2b2021b5eb3e2b3ca",
"kernel-mshv-5.15.72.mshv2.tar.gz": "594c73d2df786387fab8801239e3a527dcf19109eb7a70cddc754bafe63926d0",
"kernel-mshv-5.15.80.mshv2.tar.gz": "d5cb470fdecf692a00eac64bdb4b4f7cb2e9ca729f321f242cc6104896d0f0c8",
"cbl-mariner-ca-20211013.pem": "5ef124b0924cb1047c111a0ecff1ae11e6ad7cac8d1d9b40f98f99334121f0b0"
}
}

Просмотреть файл

@ -10,8 +10,8 @@
Summary: Mariner kernel that has MSHV Host support
Name: kernel-mshv
Version: 5.15.72.mshv2
Release: 2%{?dist}
Version: 5.15.80.mshv2
Release: 1%{?dist}
License: GPLv2
URL: https://github.com/microsoft/CBL-Mariner-Linux-Kernel
Group: Development/Tools
@ -20,7 +20,6 @@ Distribution: Mariner
Source0: %{_mariner_sources_url}/%{name}-%{version}.tar.gz
Source1: config
Source2: cbl-mariner-ca-20211013.pem
Patch0: 0001-mshv-Don-t-use-same-function-signature-as-KVM.patch
ExclusiveArch: x86_64
BuildRequires: audit-devel
BuildRequires: bash
@ -181,7 +180,7 @@ echo "initrd generation of kernel %{uname_r} will be triggered later" >&2
%triggerun -- initramfs
rm -rf %{_localstatedir}/lib/rpm-state/initramfs/pending/%{uname_r}
rm -rf /boot/initrd.img-%{uname_r}
rm -rf /boot/efi/initrd.img-%{uname_r}
echo "initrd of kernel %{uname_r} removed" >&2
%postun
@ -238,7 +237,11 @@ ln -sf linux-%{uname_r}.cfg /boot/mariner.cfg
%{_includedir}/perf/perf_dlfilter.h
%changelog
* Mon Dec 5 2022 Saul Paredes <saulparedes@microsoft.com> - 5.15.72.mshv2-2
* Fri Dec 09 2022 Neha Agarwal <nehaagarwal@microsoft.com> - 5.15.80.mshv2-1
- Update to v5.15.80.mshv2.
- Update initramfs triggerun to remove initrd from /boot/efi
* Mon Dec 05 2022 Saul Paredes <saulparedes@microsoft.com> - 5.15.72.mshv2-2
- Enable transparent hugepage
* Thu Oct 27 2022 Neha Agarwal <nehaagarwal@microsoft.com> - 5.15.72.mshv2-1

Просмотреть файл

@ -1,7 +1,7 @@
{
"Signatures": {
"cloud-hypervisor-27.0.60-cargo.tar.gz": "a54b75004a41b531178f38f82a5a337a64649bd026e92c0c3b403dd055fe664f",
"cloud-hypervisor-27.0.60.tar.gz": "3675e6ad82c1a1604a1c3b29d8551f4f03c32a4b7f3789a7523482fa555ffb03",
"cloud-hypervisor-28.0-cargo.tar.gz": "caa7a53edb22326df4ab9594deaaa7a686324cf80f76bce65b0a86a4b524a15e",
"cloud-hypervisor-28.0.tar.gz": "c04bd4b511a142bec8fb97181b121d8d0623c16188867e860502e936cb751948",
"config.toml": "e823c53144d9c88262f033560e988e2431a2f0b4a815ff0be8740f0c0bb9312c"
}
}

Просмотреть файл

@ -1,18 +1,17 @@
%define using_rustup 0
%define using_musl_libc 0
%define using_vendored_crates 1
%global githubref 099cdd2
Summary: Cloud Hypervisor is an open source Virtual Machine Monitor (VMM) that runs on top of KVM.
Name: cloud-hypervisor
Version: 27.0.60
Version: 28.0
Release: 1%{?dist}
License: ASL 2.0 OR BSD-3-clause
Vendor: Microsoft Corporation
Distribution: Mariner
Group: Applications/System
URL: https://github.com/cloud-hypervisor/cloud-hypervisor
Source0: https://github.com/cloud-hypervisor/cloud-hypervisor/tarball/%{githubref}#/%{name}-%{version}.tar.gz
Source0: https://github.com/cloud-hypervisor/cloud-hypervisor/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
%if 0%{?using_vendored_crates}
# Note: the %%{name}-%%{version}-cargo.tar.gz file contains a cache created by capturing the contents downloaded into $CARGO_HOME.
# To update the cache and config.toml run:
@ -69,7 +68,7 @@ Cloud Hypervisor is an open source Virtual Machine Monitor (VMM) that runs on to
%prep
%setup -q -n %{name}-%{name}-%{githubref}
%setup -q -n %{name}-%{version}
%if 0%{?using_vendored_crates}
tar xf %{SOURCE1}
mkdir -p .cargo
@ -152,6 +151,9 @@ cargo build --release --target=%{rust_musl_target} --package vhost_user_block %{
%license LICENSE-BSD-3-Clause
%changelog
* Mon Dec 12 2022 Neha Agarwal <nehaagarwal@microsoft.com> - 28.0-1
- Update to v28.0
* Thu Oct 27 2022 Neha Agarwal <nehaagarwal@microsoft.com> - 27.0.60-1
- Update to v27.0.60

Просмотреть файл

@ -1,7 +1,7 @@
Summary: initramfs
Name: initramfs
Version: 2.0
Release: 8%{?dist}
Release: 9%{?dist}
License: Apache License
Vendor: Microsoft Corporation
Distribution: Mariner
@ -82,15 +82,22 @@ echo "initramfs (re)generation" %* >&2
#
# So in order to be compatible with kdump, we need to make sure to add the -k
# option when invoking mkinitrd with an explicit <image> and <kernel version>
#
# Move initrd generated for kernel-mshv to /boot/efi, where linuxloader expects to find it
%define file_trigger_action() \
cat > /dev/null \
if [ -f %{_localstatedir}/lib/rpm-state/initramfs/regenerate ]; then \
echo "(re)generate initramfs for all kernels," %* >&2 \
mkinitrd -q \
mv /boot/initrd.img-*mshv* /boot/efi/ \
elif [ -d %{_localstatedir}/lib/rpm-state/initramfs/pending ]; then \
for k in `ls %{_localstatedir}/lib/rpm-state/initramfs/pending/`; do \
echo "(re)generate initramfs for $k," %* >&2 \
if [[ $k == *mshv* ]]; then \
mkinitrd -q /boot/efi/initrd.img-$k $k -k \
else \
mkinitrd -q /boot/initrd.img-$k $k -k \
fi \
done; \
fi \
%removal_action
@ -99,6 +106,8 @@ fi \
echo "initramfs" %{version}-%{release} "posttrans" >&2
%removal_action
mkinitrd -q
# Move initrd generated for kernel-mshv to /boot/efi, where linuxloader expects to find it
mv /boot/initrd.img-*mshv* /boot/efi/
%postun
echo "initramfs" %{version}-%{release} "postun" >&2
@ -127,6 +136,10 @@ echo "initramfs" %{version}-%{release} "postun" >&2
%dir %{_localstatedir}/lib/initramfs/kernel
%changelog
* Mon Dec 12 2022 Neha Agarwal <nehaagarwal@microsoft.com> - 2.0-9
- Create initrd in /boot/efi for kernel-mshv.
- License verified.
* Thu Feb 04 2021 Nicolas Ontiveros <niontive@microsoft.com> - 2.0-8
- Add dracut-fips to package watch list, since it will add a dracut module

Просмотреть файл

@ -1587,8 +1587,8 @@
"type": "other",
"other": {
"name": "cloud-hypervisor",
"version": "27.0.60",
"downloadUrl": "https://github.com/cloud-hypervisor/cloud-hypervisor/tarball/099cdd2"
"version": "28.0",
"downloadUrl": "https://github.com/cloud-hypervisor/cloud-hypervisor/archive/refs/tags/v28.0.tar.gz"
}
}
},
@ -7481,8 +7481,8 @@
"type": "other",
"other": {
"name": "kernel-mshv",
"version": "5.15.72.mshv2",
"downloadUrl": "https://cblmarinerstorage.blob.core.windows.net/sources/core/kernel-mshv-5.15.72.mshv2.tar.gz"
"version": "5.15.80.mshv2",
"downloadUrl": "https://cblmarinerstorage.blob.core.windows.net/sources/core/kernel-mshv-5.15.80.mshv2.tar.gz"
}
}
},