Message ID | 20231122102808.1763303-1-andrew.cooper3@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86/mm: Fix up bad bool conversion in ept_set_entry() | expand |
On 22.11.2023 11:28, Andrew Cooper wrote: > This accidentally turned a 1 into false. > > Noticed by Coverity. > > Reported-by: Jan Beulich <JBeulich@suse.com> > Fixes: de577618c285 ("x86/treewide: Switch bool_t to bool") > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c index 227bdf7c2433..f83610cb8cd8 100644 --- a/xen/arch/x86/mm/p2m-ept.c +++ b/xen/arch/x86/mm/p2m-ept.c @@ -803,7 +803,7 @@ ept_set_entry(struct p2m_domain *p2m, gfn_t gfn_, mfn_t mfn, bool need_modify_vtd_table = true; bool vtd_pte_present = false; unsigned int iommu_flags = p2m_get_iommu_flags(p2mt, p2ma, mfn); - bool needs_sync = false; + bool needs_sync = true; ept_entry_t old_entry = { .epte = 0 }; ept_entry_t new_entry = { .epte = 0 }; struct ept_data *ept = &p2m->ept;
This accidentally turned a 1 into false. Noticed by Coverity. Reported-by: Jan Beulich <JBeulich@suse.com> Fixes: de577618c285 ("x86/treewide: Switch bool_t to bool") Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> --- CC: Jan Beulich <JBeulich@suse.com> CC: Roger Pau Monné <roger.pau@citrix.com> CC: Wei Liu <wl@xen.org> --- xen/arch/x86/mm/p2m-ept.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 10081c2dc571775b538bb00982606a39832ad7e3