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

Re: [PATCH v2 2/3] xen/uart: be more careful with changes to the PCI command register


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 30 Mar 2026 11:57:32 +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=d/spZ7bUzzZXh1IwnaF8NBSOaFQlR5NAV/f+qjpJJuU=; b=J8hqWXHerI1qVUHMqO1h07TVlIInPxA7lXXcNCgrrboQFrgi9fyyRMfr7e5N5X3+4rOk7mNPbgFP/MavVr7om4cfhxkbko9zKIjIemQqT1leDrdWIaIsda6XXnrWdjgR62BzB1nEQQUil2cB0lH0cQNzLXy0qp4PB4uMv4EF6LirsVVxPv0qolO+MF+z+YO8m5oFZCWCTm7fkA5pd4aeBHPnNaHLp3YkL1/Hehg81nGRlMf8tchPYSDfH0n9Hk/F5H5o5aftcaUN3w7JyOm6gGKT/LEifjVvDkq9nYHtufeGjkBTdfsMxhGpRr0HxoMhRC4r55h1E1dvXpuNG24SFg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yvEtOwVBUlZu7A119Soj8xvd7Mf5lEy85A/vYife9dN96oZcmMk2R+pygR1B4HbQRi8NEdVd6GYlDZQGCKffKDbGFWhg1A4zP/cWMAz2AXz5xCbfJzjIjtBOVtiXOWFMXmC80ErA+4vrhWGh9doz+RcFhv88PfkVEYhLNtt5oviMIInnvd54cX2G5/0e2gDyfKzJWPY5sOJZHNKZX0AMPw+9ogjrlhtCJONBmkr42BGw/hnzKQh7XBBj5+FquhiijYdldP6+rUwVVFZAeJuLgJbgg2fgOoHW0WN/ZMoOnnaqUOdeuGfMB4/1deRr6qcxYv7mJxVo3yCcNqGXu1PNdA==
  • 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: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 30 Mar 2026 09:57:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Mar 30, 2026 at 11:09:10AM +0200, Jan Beulich wrote:
> On 30.03.2026 11:06, Roger Pau Monné wrote:
> > On Mon, Mar 30, 2026 at 10:00:05AM +0200, Jan Beulich wrote:
> >> On 27.03.2026 14:54, Roger Pau Monne wrote:
> >>> Read the existing PCI command register and only add the required bits to
> >>> it, as to avoid clearing bits that might be possibly set by the firmware
> >>> already, which might put the device into a non-working state.
> >>>
> >>> Fixes: f2ff5d6628b3 ("ns16550: enable PCI serial card usage")
> >>> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> >>
> >> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> >>
> >> I would have preferred if the description mentioned the particular case,
> >> turning this more into a workaround than an apparent bugfix. 
> > 
> > It turns out that the console does seem to work fine, even with memory
> > decoding disabled on the device (as expected).  I've updated the
> > firmware in the meantime, so I'm unsure whether that update has
> > changed the behavior of the device, or it simply was some other
> > instability that was causing the issue in the past.  This SOL AMT
> > device is not reliable at all I'm afraid.
> > 
> >> As mentioned,
> >> us driving the device generally means we're free to do whatever we want to
> >> the command register, as long as resulting device state is consistent
> >> overall (or else we may indeed have a non-working device). Having to keep
> >> memory decoding enabled in order for I/O ports to function is pretty
> >> clearly a bug in the device, and hence us "violating" that requirement
> >> isn't really o bug of ours.
> > 
> > I think given the fragility of some of those SOL devices it's best to
> > limit the number of bits Xen changes, as to having a bigger chances of
> > getting output working.
> 
> That's okay(ish); I merely would wish the patch description was less
> suggesting that Xen was actually buggy.

What about if I change the title to:

xen/uart: avoid clearing PCI command register bits set by the firmware

I think that's clearer and less blameful?

Thanks, Roger.



 


Rackspace

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