linux56/57-tkg: Workaround a warning (treated as error with default config) on GCC10 by initializing nr_pages_avail in virt/kvm/kvm_main.c
This commit is contained in:
parent
064d5a39df
commit
13baf8c326
@ -133,7 +133,7 @@ sha256sums=('e342b04a2aa63808ea0ef1baab28fc520bd031ef8cf93d9ee4a31d4058fcb622'
|
||||
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
|
||||
'31dc68e84aecfb7d069efb1305049122c65694676be8b955634abcf0675922a2'
|
||||
'd02bf5ca08fd610394b9d3a0c3b176d74af206f897dee826e5cbaec97bb4a4aa'
|
||||
'3a8936db7a311753e2d75650819d69366cc013008379380f11fcea092eabf92f'
|
||||
'a00a68f3689e187011d468e7112e95f7a525cc9e9369a106f02894ff37375ded'
|
||||
'7058e57fd68367b029adc77f2a82928f1433daaf02c8c279cb2d13556c8804d7'
|
||||
'c605f638d74c61861ebdc36ebd4cb8b6475eae2f6273e1ccb2bbb3e10a2ec3fe'
|
||||
'bc69d6e5ee8172b0242c8fa72d13cfe2b8d2b6601468836908a7dfe8b78a3bbb'
|
||||
|
@ -1733,3 +1733,15 @@ index 20174bed11ce..d19e1d0d56c0 100644
|
||||
return ret;
|
||||
}
|
||||
|
||||
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
|
||||
--- a/virt/kvm/kvm_main.c
|
||||
+++ b/virt/kvm/kvm_main.c
|
||||
@@ -2214,7 +2214,7 @@ static int __kvm_gfn_to_hva_cache_init(struct kvm_memslots *slots,
|
||||
gfn_t start_gfn = gpa >> PAGE_SHIFT;
|
||||
gfn_t end_gfn = (gpa + len - 1) >> PAGE_SHIFT;
|
||||
gfn_t nr_pages_needed = end_gfn - start_gfn + 1;
|
||||
- gfn_t nr_pages_avail;
|
||||
+ gfn_t nr_pages_avail = 0;
|
||||
|
||||
/* Update ghc->generation before performing any error checks. */
|
||||
ghc->generation = slots->generation;
|
||||
|
@ -126,7 +126,7 @@ sha256sums=('6bdbef0aa3e1964d84ec388ca40159753b7377291acc6293549188aea2b4d3d6'
|
||||
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
|
||||
'31dc68e84aecfb7d069efb1305049122c65694676be8b955634abcf0675922a2'
|
||||
'd02bf5ca08fd610394b9d3a0c3b176d74af206f897dee826e5cbaec97bb4a4aa'
|
||||
'4604141e95f3b30bbfac6a27bd642c5e1b616ee1292107c9cb9ebe76f261230e'
|
||||
'd469ea764ed1bbf053c80e55cf6758134b7037fca10ce0bd122530a0cce8881a'
|
||||
'7058e57fd68367b029adc77f2a82928f1433daaf02c8c279cb2d13556c8804d7'
|
||||
'62496f9ca788996181ef145f96ad26291282fcc3fb95cdc04080dcf84365be33'
|
||||
'7fd8e776209dac98627453fda754bdf9aff4a09f27cb0b3766d7983612eb3c74'
|
||||
|
@ -1445,3 +1445,15 @@ index d2fa3e9ccd97c..bd10cb02fc0ff 100644
|
||||
force_load = 1;
|
||||
if (!strcmp(str, "hwp_only"))
|
||||
|
||||
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
|
||||
--- a/virt/kvm/kvm_main.c
|
||||
+++ b/virt/kvm/kvm_main.c
|
||||
@@ -2214,7 +2214,7 @@ static int __kvm_gfn_to_hva_cache_init(struct kvm_memslots *slots,
|
||||
gfn_t start_gfn = gpa >> PAGE_SHIFT;
|
||||
gfn_t end_gfn = (gpa + len - 1) >> PAGE_SHIFT;
|
||||
gfn_t nr_pages_needed = end_gfn - start_gfn + 1;
|
||||
- gfn_t nr_pages_avail;
|
||||
+ gfn_t nr_pages_avail = 0;
|
||||
|
||||
/* Update ghc->generation before performing any error checks. */
|
||||
ghc->generation = slots->generation;
|
||||
|
Loading…
x
Reference in New Issue
Block a user