All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Cc: mst@redhat.com, anisinha@redhat.com, pbonzini@redhat.com,
	marcandre.lureau@redhat.com, marcel.apfelbaum@gmail.com,
	qemu-devel@nongnu.org
Subject: Re: [PATCH 4/5] hw/char/serial-isa.c: declare IRQ as shared in ACPI IRQ descriptor
Date: Tue, 10 Mar 2026 13:41:27 +0100	[thread overview]
Message-ID: <20260310134127.5c1e5976@imammedo> (raw)
In-Reply-To: <4fc1a28b-36e3-4d1a-8de7-3c703b589a44@nutanix.com>

On Mon, 9 Mar 2026 12:24:47 +0000
Mark Cave-Ayland <mark.caveayland@nutanix.com> wrote:

> On 05/03/2026 12:49, Igor Mammedov wrote:
> 
> > On Wed, 4 Mar 2026 14:36:14 +0000
> > Mark Cave-Ayland <mark.caveayland@nutanix.com> wrote:
> >   
> >> On 04/03/2026 11:22, Igor Mammedov wrote:
> >>  
> >>> On Fri, 27 Feb 2026 13:44:58 +0000
> >>> Mark Cave-Ayland <mark.caveayland@nutanix.com> wrote:
> >>>      
> >>>>   From Windows 8.1 onwards ISA serial IRQs cannot be shared when ACPI Revision
> >>>> 5.0 is used in the FACP table. The reason for this is that if a 2-byte IRQ
> >>>> Descriptor is used then the interrupt is considered to be high true, edge
> >>>> sensitive, non-shareable. Since legacy serial ports COM1/3 and COM2/4 share
> >>>> an IRQ then if more than 2 serial ports are added, Windows indicates a
> >>>> conflict in Device Manager and these combinations cannot be used together.
> >>>>
> >>>> Add a new 3-byte IRQ Descriptor to the _CRS resource indicating that the
> >>>> ISA serial IRQ is low true, edge sensitive and shareable, along with a
> >>>> corresponding _PRS resource so that the legacy serial ports also appear
> >>>> at a fixed address. This enables all 4 legacy serial ports to be used in
> >>>> Windows without conflict.  
> >>>
> >>> What happens if we just replace aml_irq_no_flags() with aml_irq()
> >>> (without compat knob and _PRS)
> >>>
> >>> wrt _PRS could you elaborate some more why it's needed and what happens
> >>> if it doesn't exists?  
> >>
> >> Good question. I based the implementation on the technote from Microchip
> >> at https://urldefense.proofpoint.com/v2/url?u=https-3A__ww1.microchip.com_downloads_en_DeviceDoc_00001879A.pdf&d=DwICAg&c=s883GpUCOChKOHiocYtGcg&r=c23RpsaH4D2MKyD3EPJTDa0BAxz6tV8aUJqVSoytEiY&m=Nx9ld5Tg6QCayccyKhC9WQbm1DwiJT2Ja3jlwtlv8RkPFaZcU_oTHCkJZetgQLfd&s=k-ubK6tfBDM7A3BN_S3lNy3s-SJGR0fU9O5oj-GWF3A&e=  and
> >> found that it worked fine here on Windows 11.
> >>
> >> My concern from deviating from the document would be that any changes
> >> would work fine on Windows 11, but then fail on older versions of Windows.
> >>
> >> I can try and locate a copy of Windows 8.1 internally if you still think
> >> that is worth pursuing?  
> > 
> > with _CRS present, I don't think we need _PRS especially in absence of _SRS
> > and means to actually changes used IRQs/IO.
> > 
> > What I'd like to avoid is adding not needed code and compat logic
> > if it's possible.
> > The later unfortunately achievable only by tedious testing of
> > the change with older Windows versions (the older it is,
> > the more loose spec interperetation).  
> 
> I've done some more experiments with both Windows 8.1 and Windows 11, 
> and I can confirm that the _PRS isn't needed for Device Manager to 
> detect and configure the serial ports for both OSs.
> 
> However it seems that indicating a shared interrupt with aml_irq() *IS* 
> required for Device Manager to detect all 4 serial ports without conflict.
> 
> I think it would be fine to unconditionally replace aml_irq_no_flags() 
> with aml_irq() in this case, however since the ACPI tables visible to 
> the guest OS will have changed, wouldn't this still require a machine 
> compatibility property? Or do we not care because Windows will almost 
> certainly insist on a reboot for changes to legacy hardware regardless.

usually we do not do compat for ACPItables changes,
unless it introduces breaking change.
drawback of such approach is that sometimes we have to fix it afterwards
in stable when an issue is found.
But on positive side we won't drown out in compat kobs.

considering it is not default config and was broken before,
fixing it without compat knob should be fine.
 
> 
> ATB,
> 
> Mark.
> 



  reply	other threads:[~2026-03-10 12:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-27 13:44 [PATCH 0/5] isa-serial: acpi: declare shared IRQs for COM1/3 and COM2/4 Mark Cave-Ayland
2026-02-27 13:44 ` [PATCH 1/5] hw/acpi/aml-build.c: add aml_irq() representing the 3-byte IRQ descriptor Mark Cave-Ayland
2026-02-27 13:44 ` [PATCH 2/5] hw/acpi/aml-build.c: add AML functions for StartDependentFn/EndDependentFn Mark Cave-Ayland
2026-02-27 13:44 ` [PATCH 3/5] tests/acpi: allow DSDT acpi table changes Mark Cave-Ayland
2026-02-27 13:44 ` [PATCH 4/5] hw/char/serial-isa.c: declare IRQ as shared in ACPI IRQ descriptor Mark Cave-Ayland
2026-03-04 11:22   ` Igor Mammedov
2026-03-04 14:36     ` Mark Cave-Ayland
2026-03-05 12:49       ` Igor Mammedov
2026-03-09 12:24         ` Mark Cave-Ayland
2026-03-10 12:41           ` Igor Mammedov [this message]
2026-02-27 13:44 ` [PATCH 5/5] tests: data: update x86 ACPI tables Mark Cave-Ayland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260310134127.5c1e5976@imammedo \
    --to=imammedo@redhat.com \
    --cc=anisinha@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mark.caveayland@nutanix.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.