[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/EPT: minor local variable adjustment in ept_set_entry()
commit 0faa6ef54af330867d836e99d34e8dc1e622b54f Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Tue Apr 13 10:18:08 2021 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Apr 13 10:18:08 2021 +0200 x86/EPT: minor local variable adjustment in ept_set_entry() Not having direct_mmio (used only once anyway) as a local variable gets the epte_get_entry_emt() invocation here in better sync with the other ones. While at it also reduce ipat's scope. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx> --- xen/arch/x86/mm/p2m-ept.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c index 23d411f01d..a3beaf91e2 100644 --- a/xen/arch/x86/mm/p2m-ept.c +++ b/xen/arch/x86/mm/p2m-ept.c @@ -677,8 +677,6 @@ ept_set_entry(struct p2m_domain *p2m, gfn_t gfn_, mfn_t mfn, unsigned long fn_mask = !mfn_eq(mfn, INVALID_MFN) ? (gfn | mfn_x(mfn)) : gfn; int ret, rc = 0; bool_t entry_written = 0; - bool_t direct_mmio = (p2mt == p2m_mmio_direct); - uint8_t ipat = 0; bool_t need_modify_vtd_table = 1; bool_t vtd_pte_present = 0; unsigned int iommu_flags = p2m_get_iommu_flags(p2mt, mfn); @@ -790,8 +788,10 @@ ept_set_entry(struct p2m_domain *p2m, gfn_t gfn_, mfn_t mfn, if ( mfn_valid(mfn) || p2m_allows_invalid_mfn(p2mt) ) { + uint8_t ipat = 0; int emt = epte_get_entry_emt(p2m->domain, gfn, mfn, - i * EPT_TABLE_ORDER, &ipat, direct_mmio); + i * EPT_TABLE_ORDER, &ipat, + p2mt == p2m_mmio_direct); if ( emt >= 0 ) new_entry.emt = emt; -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |