[PATCH] x86/iommu: fix wrong iterator type in arch_iommu_hwdom_init()

2023-05-09 Thread Roger Pau Monne
The 'i' iterator index stores a pdx, not a pfn, and hence the initial assignation of start (which stores a pfn) needs a conversion from pfn to pdx. Fixes: 6b4f6a31ace1 ('x86/PVH: de-duplicate mappings for first Mb of Dom0 memory') Signed-off-by: Roger Pau Monné --- xen/drivers/passthrough/x86/i

Re: [PATCH] x86/iommu: fix wrong iterator type in arch_iommu_hwdom_init()

2023-05-09 Thread Jan Beulich
On 09.05.2023 13:03, Roger Pau Monne wrote: > The 'i' iterator index stores a pdx, not a pfn, and hence the initial > assignation of start (which stores a pfn) needs a conversion from pfn > to pdx. Strictly speaking: Yes. But pdx compression skips the bottom MAX_ORDER bits, so ... > --- a/xen/dri

Re: [PATCH] x86/iommu: fix wrong iterator type in arch_iommu_hwdom_init()

2023-05-10 Thread Roger Pau Monné
On Tue, May 09, 2023 at 06:25:05PM +0200, Jan Beulich wrote: > On 09.05.2023 13:03, Roger Pau Monne wrote: > > The 'i' iterator index stores a pdx, not a pfn, and hence the initial > > assignation of start (which stores a pfn) needs a conversion from pfn > > to pdx. > > Strictly speaking: Yes. But

Re: [PATCH] x86/iommu: fix wrong iterator type in arch_iommu_hwdom_init()

2023-05-10 Thread Jan Beulich
On 10.05.2023 10:32, Roger Pau Monné wrote: > On Tue, May 09, 2023 at 06:25:05PM +0200, Jan Beulich wrote: >> On 09.05.2023 13:03, Roger Pau Monne wrote: >>> The 'i' iterator index stores a pdx, not a pfn, and hence the initial >>> assignation of start (which stores a pfn) needs a conversion from p

Re: [PATCH] x86/iommu: fix wrong iterator type in arch_iommu_hwdom_init()

2023-05-10 Thread Jan Beulich
On 10.05.2023 12:03, Jan Beulich wrote: > On 10.05.2023 10:32, Roger Pau Monné wrote: >> On Tue, May 09, 2023 at 06:25:05PM +0200, Jan Beulich wrote: >>> On 09.05.2023 13:03, Roger Pau Monne wrote: The 'i' iterator index stores a pdx, not a pfn, and hence the initial assignation of start