On 24.01.2024 18:29, Roger Pau Monne wrote:
> --- a/xen/arch/x86/hvm/io.c
> +++ b/xen/arch/x86/hvm/io.c
> @@ -369,6 +369,22 @@ bool vpci_is_mmcfg_address(const struct domain *d, 
> paddr_t addr)
>      return vpci_mmcfg_find(d, addr);
>  }
>  
> +int __hwdom_init vpci_subtract_mmcfg(const struct domain *d, struct rangeset 
> *r)
> +{
> +    const struct hvm_mmcfg *mmcfg;
> +
> +    list_for_each_entry ( mmcfg, &d->arch.hvm.mmcfg_regions, next )
> +    {
> +        int rc = rangeset_remove_range(r, PFN_DOWN(mmcfg->addr),
> +                                       PFN_DOWN(mmcfg->addr + mmcfg->size - 
> 1));

Along the lines of this, ...

> --- a/xen/arch/x86/setup.c
> +++ b/xen/arch/x86/setup.c
> @@ -2138,6 +2138,54 @@ int __hwdom_init xen_in_range(unsigned long mfn)
>      return 0;
>  }
>  
> +int __hwdom_init remove_xen_ranges(struct rangeset *r)
> +{
> +    paddr_t start, end;
> +    int rc;
> +
> +    /* S3 resume code (and other real mode trampoline code) */
> +    rc = rangeset_remove_range(r, PFN_DOWN(bootsym_phys(trampoline_start)),
> +                               PFN_DOWN(bootsym_phys(trampoline_end)) - 1);

... did you perhaps mean

                               PFN_DOWN(bootsym_phys(trampoline_end) - 1));

here (and then similarly below, except there the difference is benign I
think, for the labels being page-aligned)?

Jan

Reply via email to