Re: [PATCH v2 1/8] hw/i386/intel_iommu: vtd_slpte_nonzero_rsvd(): assert no overflow

2023-09-26 Thread Peter Maydell
On Tue, 26 Sept 2023 at 21:15, Vladimir Sementsov-Ogievskiy wrote: > > We support only 3- and 4-level page-tables, which is firstly checked in > vtd_decide_config(), then setup in vtd_init(). Than level fields are > checked by vtd_is_level_supported(). > > So here we can't have level out from 1..4

[PATCH v2 1/8] hw/i386/intel_iommu: vtd_slpte_nonzero_rsvd(): assert no overflow

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
We support only 3- and 4-level page-tables, which is firstly checked in vtd_decide_config(), then setup in vtd_init(). Than level fields are checked by vtd_is_level_supported(). So here we can't have level out from 1..4 inclusive range. Let's assert it. That also explains Coverity that we are not