From nobody Thu Sep 24 19:00:21 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1790178037; cv=none; d=zohomail.com; s=zohoarc; b=QVi4dtZVhkErQSjf0Wc6haD6bDDqDBQCROZfdYHdTxDmyzx80lj8TboOOczbc7jMcItoE8Nk4Pb08nzYE9kHoaKfS1Q0rpAVtsHBJ0LyDXWeECoMzKZrnVF5OGnC+bLM36dv/i/a4NLZ+MDPZg6wQvga3WD9kw/X8+6cU+q8i2g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1790178037; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=zRSBigR+fNtVFjx5bu3waR1j8HxydhkAAJV7I+0HM74=; b=hn/o4MJ67gesyrUknQnOAvQmTwSRYmAA+BRAMWmArzRGWRRsBgfEIBgklDN9riVQca4dide4tbzvXDsUUuVB7PGNPp0w4GhWxksNZGXlzi9wEJUHZ8MUPtm9JKY8JBgUGdayOJZpCf+XO72G+0SjM0LX9lMUmijZXoeCSiw299A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1790178037234105.8877494012138; Wed, 23 Sep 2026 08:40:37 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1430938.1653349 (Exim 4.92) (envelope-from ) id 1x9P57-0004tI-2d; Wed, 23 Sep 2026 15:40:25 +0000 Received: by outflank-mailman (output) from mailman id 1430938.1653349; Wed, 23 Sep 2026 15:40:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1x9P56-0004tB-Vr; Wed, 23 Sep 2026 15:40:24 +0000 Received: by outflank-mailman (input) for mailman id 1430938; Wed, 23 Sep 2026 15:40:23 +0000 Received: from mx.expurgate.net ([195.190.135.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1x9P55-0004t1-Qp for xen-devel@lists.xenproject.org; Wed, 23 Sep 2026 15:40:23 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1x9P55-006pms-4I for xen-devel@lists.xenproject.org; Wed, 23 Sep 2026 17:40:23 +0200 Received: from [10.42.69.12] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6ab3f2e2-8faa-0a2a0a5109dd-0a2a450ced3e-14 for ; Wed, 23 Sep 2026 17:40:23 +0200 Received: from [74.125.224.140] (helo=mail-yx2-f12.google.com) by tlsNG-d25034.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6ab3f2e5-f479-0a2a450c0019-4a7de08ccb6f-3 for ; Wed, 23 Sep 2026 17:40:22 +0200 Received: by mail-yx2-f12.google.com with SMTP id 00721157ae682-85d440939f0so12350497b3.2 for ; Wed, 23 Sep 2026 08:40:22 -0700 (PDT) Received: from StolidWingnut.axolotl-tone.ts.net ([174.80.170.224]) by smtp.gmail.com with ESMTPSA id 00721157ae682-8a465ec41acsm11211697b3.26.2026.09.23.08.40.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Sep 2026 08:40:20 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=google header.d=edera.io header.i="@edera.io" header.h="Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=edera.io; s=google; t=1790178021; x=1790782821; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=zRSBigR+fNtVFjx5bu3waR1j8HxydhkAAJV7I+0HM74=; b=ryozL9GSP7GQnj9DSEnHbw5lP8HgUd3bayjhyrtRp1VTvREKe4Q/ko/i0QkcU7jYkb 31pJ7eSFNCMrEuEqqqDr3CdhHsIFO6o0bLIgvW2C7fWhnBk6LVtvCEzMtQUF71vEI81l CajmXv+WdeC6JmCAIhb5N3M7Hu6yoJiNdqF26coeVR86+VMXK3EsnlNnmABxc1/JkpAh a13ye66ckGi4tBjdMekQ2jMiQ+rMm4FKBCbxALMi+/8nDDG7inL+Ueo0ubEpuftnuLth 9ecdtxx/54lcv96uR6PzPlsNWFyKtQGlH6TAxrm3LILuwWRGE3BTphbNHFttXOsgcQQr Jx9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790178021; x=1790782821; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=zRSBigR+fNtVFjx5bu3waR1j8HxydhkAAJV7I+0HM74=; b=iT5EejCvIGF0TT3keMnV3eqRtY0UVUoux8/4V8glQrgHZVN9xo782oeDUdJgWJXrsR WPkVIMMC+l3ieLnXl4Xi0bQ8AckLbQxnZmjYta6wP7G6Vv5nmupJCJdfEfx+103+qZJC Vvr/ya6aX+aZ3tUNT4c91M0DvVwlfsOmznv0zijg981/Ta/nfsdYSdId0fMFwURzWnMn NxavEqV44ELEbE/owbxrNM8zS/uuGb4Qi3VIX45Xg5cBY4tbflp5APXwHoLcOI63jMYM CDIgxLPsgkYtSDttsJbXv0iuqT9g6zkrdZKVPsayHNaeW3q68XE34hk3Hj5S/zCSYNGf Ys0w== X-Gm-Message-State: AFuF++mrEVzE5ZczdRSsz5Ggt/zxyhNU48kvCHS3BQOtCTUGDLBtcV+t CpWMUoVc5pCexDJkeSQnEvy7SI36paSoncmRu/W88/LGGq/34XvX/rJqqTscr7HLpQ8tYI2YBF6 Po9uFDzg= X-Gm-Gg: AYBFou0NsJo8qPFSVoIY1F0d5PhlsSHYr0J0jjSIPKhWpo/bt6phkWOADxggTzctWnl uyQ05Lg/aL28IXqYI7JSzrE8RdwG57U2PAXvBl3otVJNWBwWD9CsaPizHNI2Yr/fQgqRxkLBtkO 72yG3Kxzy7R87ZFJd+o91SZdCnxBrJbVs7PpEieyAQAuUFf2QmbA+CulzHjTKbFn5FS4vttIQrS JR1hyZqr6+BVza8lGj+R7hY6ffMmtxhQdsOk7iYkVBAoiAbeR+kFsaxBsp6FDjBVEtpGIdv7zdf qGChtgO0DXYUoe65fZ0Sql9iaWXbthO1WkMDmQXmchmJ7HqBdscmgCN9UXWvIHFB8wziubP6k6b yweiNHNj8jMbvRDhG7GRX0glKeQgg+r6dbH2WYdu3YuGU1lsx0RvY6JhS1DjjBUE84A46NBwck9 cUagoW/7zy6/7A01q4yAn06YKZafk5XjfhyE9Xb7ry4fY597itYSH0KT4cyYHga8/9C1/ftM875 Dq9fHFJl86PdFnReQm44NpLhiGFZuFZGiYuh++DGdlR/xqu6FXqTWMwom1vzEV8IdGvKll0z963 Ve479WemF4RCvcrXKg== X-Received: by 2002:a05:690c:c59c:b0:873:5bb2:6bff with SMTP id 00721157ae682-8a45b09e620mr17371697b3.41.1790178021171; Wed, 23 Sep 2026 08:40:21 -0700 (PDT) From: Benjamin Leggett To: xen-devel@lists.xenproject.org Cc: Benjamin Leggett , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [PATCH] ns16550: add the Amazon EC2 PCI serial device Date: Wed, 23 Sep 2026 11:39:33 -0400 Message-ID: <20260923153933.2024896-1-benjamin@edera.io> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260922184316.324817-1-benjamin@edera.io> References: <20260922184316.324817-1-benjamin@edera.io> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-purgate-ID: tlsNG-d25034/1790178023-022C0A5B-E2C9AA9A/0/0 X-purgate-type: clean X-purgate-size: 2288 X-ZohoMail-DKIM: pass (identity @edera.io) X-ZM-MESSAGEID: 1790178038090158500 Content-Type: text/plain; charset="utf-8" Amazon EC2 bare metal instances have no UART at the legacy I/O port 0x3f8. Their only serial port is a 16550-compatible PCI device (vendor 0x1d0f, device 0x8250) with its registers in the MMIO space of BAR 0. pci_uart_config() uses the default parameters for a device that is not in uart_config[], and those only accept an I/O BAR, so "com1=3D...,pci" cannot find this device. Add it, with the same layout that Linux uses (commit 3bfd1300abfe ("serial: 8250_pci: Add Amazon PCI serial device ID")): one port at the start of BAR 0, 1-byte registers, and the default 1.8432MHz clock. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Benjamin Leggett Acked-by: Jan Beulich --- xen/drivers/char/ns16550.c | 14 ++++++++++++++ xen/include/xen/pci_ids.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c index 120ac09d23..593d208483 100644 --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -98,6 +98,7 @@ struct ns16550_config { param_intel_lpss, param_wch_ch382, param_asix, + param_amazon, } param; }; =20 @@ -909,6 +910,13 @@ static const struct ns16550_config_param __initconst u= art_param[] =3D { .bar0 =3D true, .max_ports =3D 1, }, + [param_amazon] =3D { + .reg_width =3D 1, + .lsr_mask =3D UART_LSR_THRE, + .bar0 =3D true, + .mmio =3D true, + .max_ports =3D 1, + }, }; =20 static const struct ns16550_config __initconst uart_config[] =3D @@ -1255,6 +1263,12 @@ static const struct ns16550_config __initconst uart_= config[] =3D .dev_id =3D 0x9910, .param =3D param_asix }, + /* Amazon EC2 bare metal UART */ + { + .vendor_id =3D PCI_VENDOR_ID_AMAZON, + .dev_id =3D 0x8250, + .param =3D param_amazon + }, }; =20 static int __init diff --git a/xen/include/xen/pci_ids.h b/xen/include/xen/pci_ids.h index fd424ef55d..a17c88dcf7 100644 --- a/xen/include/xen/pci_ids.h +++ b/xen/include/xen/pci_ids.h @@ -17,6 +17,8 @@ =20 #define PCI_VENDOR_ID_WCHIC 0x1c00 =20 +#define PCI_VENDOR_ID_AMAZON 0x1d0f + #define PCI_VENDOR_ID_INTEL 0x8086 =20 #endif /* XEN_PCI_IDS_H */ --=20 2.55.0