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

Re: [PATCH v3 03/24] arm/vuart: add hwdom prefix to UART emulator


  • To: <dmukhin@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Mon, 27 Jan 2025 17:58:06 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=ford.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=6k4DeMismfzkqkCW0o6yQxdPhpIslPeKiYHO5MWffsI=; b=h9Jmfy1DoEpBe2/t+MwYHc0cpl0oMs1x2daGxGz7eSRwUjOYS1wQgU6Q2DGkZ8b/UioXQLvaCoY54YduSEb9g/9jKbyEyhVPiIKe1icRE+yI8Tt7LytFOK2GbxTueGwx76YjqKyPbQBlLtJZ5PDmEKcrLe+zm91qPnAruclP+m0i4qyKkPXbnYNizHLes2Shhe7w6tgTYlPSQrLjyQaPXTRHgYSU0MTMM+mRn0TTsyc6ihS0jpVawM6SVmWarHilwhPFXvxdTINvZh3cDhrQUdspL5g5+bKBxmF6Nw1nCB97ip9mG8um8E2WjJXx13TzGVlKqUenV/diN1e1LXlGsA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XUuDqzaB0Zi2V6w0DABju2xfmlmuidoLoWkB8w7kqmKSRF2xUkdMe3zdl7KMmqORYFELORdeBhnHMvwtwuzGpt9QwYuxANWIbLJqt0R+QSq4A43ipAfIUtB3eXzHvixaf8LNwoRx9U6hUa2ZccuW+zJp6WsXO3nSv1eyzAJNfJv5X34lSHEsOJPJkiT0wAQ1/1VMSsMRchl9j1vd9R+1F+c6b6vWvaELyeWao+5ws7X5lDXQgUmOEQnaO2O2OFh15m8q+fzCwjpcIOcd4TI8ZixqT7ljm+MLUrNulMe9D3PpZE7oz0yPXY/Me18Vzf6+ednzd/TU3uk6RLSht7UIhQ==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 27 Jan 2025 23:33:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2025-01-03 20:58, Denis Mukhin via B4 Relay wrote:
From: Denis Mukhin <dmukhin@xxxxxxxx>

Using "vuart" in UART emulator designed for hardware domain debugging
is confusing in generic Arm code (e.g. vpl011 is also "vuart").
Fix that by adding hwdom prefix to all symbols in arm/vuart.c.

Also, remove domain_has_vuart() from arm/vuart.c since it is not needed.

Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx>

diff --git a/xen/arch/arm/vuart.c b/xen/arch/arm/vuart.c
index 
98a65b99385a2a119725bab8634ed7cf9d926d68..23e05dba3a5617863f6c08f085c358f2cf32a292
 100644
--- a/xen/arch/arm/vuart.c
+++ b/xen/arch/arm/vuart.c

@@ -66,15 +64,12 @@ int domain_vuart_init(struct domain *d)
      return 0;
  }
-void domain_vuart_free(struct domain *d)
+void hwdom_vuart_free(struct domain *d)
  {
-    if ( !domain_has_vuart(d) )
-        return;
-
-    xfree(d->arch.vuart.buf);
+    XFREE(d->arch.vuart.buf);

I guess the code before and now both relied on struct domain being zero-initialized. You've made the free depend on the actual buffer instead of info as a proxy.

Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>

Regards,
Jason




 


Rackspace

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