hvm/mtrr: remove unnecessary is_hvm_domain check
PATCH 1/1 hvm/mtrr: remove unnecessary is_hvm_domain check
epte_get_entry_emt will only be called for HVM domains, so the is_hvm_domain check is unnecessary. It's a remnant of PVHv1.
Shouldn't result in any functional change.
Signed-off-by Roger Pau Monné <[email protected]>
--- xen/arch/x86/hvm/mtrr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
xen/arch/x86/hvm/mtrr.c +2 -4
@@ -851,10 +851,8 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,if ( gmtrr_mtype == -EADDRNOTAVAIL )return -1 ; - gmtrr_mtype =is_hvm_domain (d) && v ? -get_mtrr_type (&v->arch.hvm.mtrr, - gfn <<PAGE_SHIFT , order) : -MTRR_TYPE_WRBACK ; + gmtrr_mtype = v ?get_mtrr_type (&v->arch.hvm.mtrr, gfn <<PAGE_SHIFT , order) + :MTRR_TYPE_WRBACK ; hmtrr_mtype =get_mtrr_type (&mtrr_state,mfn_x (mfn) <<PAGE_SHIFT , order);if ( gmtrr_mtype <0 || hmtrr_mtype <0 )return -1 ;
Signature · 1 line
2.30.1
Quoted 6 lines · Roger Pau Monne
epte_get_entry_emtwill only be called for HVM domains, so theis_hvm_domaincheck is unnecessary. It's a remnant of PVHv1.Shouldn't result in any functional change.
Signed-off-by Roger Pau Monné <[email protected]>
Reviewed-by Jan Beulich <[email protected]>