[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 15/17] hvmloader: Set MCFG in ACPI table


  • To: Thierry Escande <thierry.escande@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 29 Apr 2026 14:33:09 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hIvJvTbzEKBS8m4ch60WjE2A62ME9OLbMuZVTJJhbMY=; b=nmZl0fbqwyCvvTnfYAwuuKF0MfYZoyXWXzxifl9FFUq70ykl48KfFiXwTAPFphGRI9RABgiayUh7CHRTHcTNpsl/YD/f02mk4Or/w4pq5R+RJdsNmDyyWXwFJpTJ8j+HNs4kfG761xw035q4KTwafEGZMAdV9wAweCngFrNkjoWK8hZEAhBDLgmIXyTYYAhl+OI71jpPViwseLi9f2mbT6grGwOYSQVRvNPs+Hz/OWU2Lwd5PW/DdmC2z2JWKt7x/DMmPohSEq6pYEP0mz5Yj1WI2/9l7vS7KNZOqDSD9XcKHgWf3Zj63f+xrVJwPxy6+CYlXqpEZ9xsZSyjTBaDlQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pyfM8j7btGxW3NY2LIfVdqBXKoEN00aNYgNuoac4ciGeGusq8Kk5sYhXehMuTPXN8b66O+gnn0TPOhJ6d0UIGGNA47nRD4Ie+9KFQLKLm07HsxOKJalL+bStkB7mzgO0pBJCN47c4oJMOmdYi3LbgTEyys5WZdFEArVvDg3buXwr7/0at42jUOU1XvbduHiYTverNp/RyMQ5ZjoqsxOf3T899LzpPVvFQxgnlv7BTevzKN//eybYG7R7nbPdm0NSU/mFP7pa0gV5K4foyUYbptaoCJxIQlLB+DWCh+728+gYwmtaTrOtGdYXkGbECB1VB93P3OcyoSK14UFhQJjXBw==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Wed, 29 Apr 2026 12:33:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, Mar 13, 2026 at 04:35:05PM +0000, Thierry Escande wrote:
> This patch extends hvmloader_acpi_build_tables() to detect if MMCONFIG
> is available by obtaining its base address and size from the hypercall
> HVMOP_get_ecam_space and sets the flag ACPI_HAS_MCFG in the ACPI config
> if needed.
> 
> This also sets the MMCONFIG area in E820 map using the same method.
> 
> Signed-off-by: Thierry Escande <thierry.escande@xxxxxxxxxx>
> ---
>  tools/firmware/hvmloader/e820.c | 11 +++++++++++
>  tools/firmware/hvmloader/util.c |  9 +++++++++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/tools/firmware/hvmloader/e820.c b/tools/firmware/hvmloader/e820.c
> index 86d39544e8..ff5c270f57 100644
> --- a/tools/firmware/hvmloader/e820.c
> +++ b/tools/firmware/hvmloader/e820.c
> @@ -158,6 +158,8 @@ int build_e820_table(struct e820entry *e820,
>      unsigned long acpi_mem_end = acpi_enabled ?
>          ACPI_MEMORY_DYNAMIC_START + (acpi_pages_allocated() << PAGE_SHIFT) :
>          RESERVED_MEMBASE;
> +    uint64_t mmconfig_addr;
> +    uint32_t mmconfig_size;
>  
>      if ( !lowmem_reserved_base )
>              lowmem_reserved_base = 0xA0000;
> @@ -260,6 +262,15 @@ int build_e820_table(struct e820entry *e820,
>          nr++;
>      }
>  
> +    /* mark MMCONFIG area */
> +    if ( ! hvm_get_ecam_space(&mmconfig_addr, &mmconfig_size) )
             ^ extra space

However, having to query the hypervisor for something that has been
set by hvmloader itself seems very inefficient.  Just store the values
in global variables so they can be consumed from here?

Same for the usage below.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.