Date: Thu, 20 Oct 2022 11:43:23 +0100 From: Andrew Turner <andrew@fubar.geek.nz> To: Souradeep Chakrabarti <schakrabarti@microsoft.com> Cc: Warner Losh <imp@bsdimp.com>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, Wei Hu <weh@microsoft.com> Subject: Re: [EXTERNAL] allocating IRQ mentioned in _CRS of ACPI Message-ID: <F4CD9D0B-980D-40E5-B17B-A1D87B46EA3C@fubar.geek.nz> In-Reply-To: <PSAP153MB0536D3DC3F8C7E37CC121C2ECC2B9@PSAP153MB0536.APCP153.PROD.OUTLOOK.COM> References: <PSAP153MB053667A618629ACFFDCEDCBFCC249@PSAP153MB0536.APCP153.PROD.OUTLOOK.COM> <PSAP153MB053698CAD8CB5439C99355B4CC249@PSAP153MB0536.APCP153.PROD.OUTLOOK.COM> <PSAP153MB053688DD7E9B60CE5AEB17A6CC289@PSAP153MB0536.APCP153.PROD.OUTLOOK.COM> <CANCZdfotdfuwK1t7efmh%2B_jNxjEJj4UmdrWhTVmUktZC9auzEQ@mail.gmail.com> <PSAP153MB0536D3DC3F8C7E37CC121C2ECC2B9@PSAP153MB0536.APCP153.PROD.OUTLOOK.COM>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_8D832B57-8A2A-4CAC-96CA-1E8A51A498FD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Based on my reading of the ACPI tables, and looking how Linux handles it = I don=E2=80=99t think the vmbus_res driver should be used. If the vmbus = driver was to attach to the =E2=80=9CVMBUS" _HID it would be able to = manage the interrupt directly. Ideally acpi_syscontainer would become a proper bus, but that would need = checking that existing drivers that depend on the current behaviour = still work. Andrew > On 19 Oct 2022, at 18:51, Souradeep Chakrabarti = <schakrabarti@microsoft.com> wrote: >=20 > Hi Warner, > =20 > 1) PCI mmio resource in HID "ACPI0004", which is needed by the FreeBSD = guest for SRIOV devices. > =20 > Device (\_SB.VMOD) <-- This is currently owned by = acpi_syscontainer module on FreeBSD > { > Name (_HID, "ACPI0004" /* Module Device */) // _HID: Hardware = ID > Name (_UID, Zero) // _UID: Unique ID > Name (_CRS, ResourceTemplate () // _CRS: Current Resource = Settings > { > ... > } > CreateDWordField (_CRS, \_SB.VMOD._Y00._MIN, MIN6) // _MIN: = Minimum Base Address > CreateDWordField (_CRS, \_SB.VMOD._Y00._MAX, MAX6) // _MAX: = Maximum Base Address > CreateDWordField (_CRS, \_SB.VMOD._Y00._LEN, LEN6) // _LEN: = Length > CreateQWordField (_CRS, \_SB.VMOD._Y01._MIN, MIN7) // _MIN: = Minimum Base Address > CreateQWordField (_CRS, \_SB.VMOD._Y01._MAX, MAX7) // _MAX: = Maximum Base Address > CreateQWordField (_CRS, \_SB.VMOD._Y01._LEN, LEN7) // _LEN: = Length > Method (_INI, 0, NotSerialized) // _INI: Initialize > { > MIN6 =3D MG2B /* \MG2B */ > LEN6 =3D MG2L /* \MG2L */ > Local0 =3D MG2L /* \MG2L */ > MAX6 =3D (MIN6 + Local0--) > Local1 =3D (HMIB << 0x14) > Local2 =3D (HMIL << 0x14) > MIN7 =3D Local1 > LEN7 =3D Local2 > Local0 =3D Local2 > MAX7 =3D (MIN7 + Local0--) > } > } > =20 > 2) Vmbus IRQ resource in HID "VMBus", which is needed to get Hyper-V = vmbus interrupt to work on guests. > Device (\_SB.VMOD.VMBS) <--- currently owned by vmbus_res module on = FreeBSD > { > ... > Name (_HID, "VMBus") // _HID: Hardware ID > Name (_UID, Zero) // _UID: Unique ID > ... > Name (_CRS, ResourceTemplate () // _CRS: Current Resource = Settings > { > Interrupt (ResourceConsumer, Edge, ActiveHigh, Exclusive, = ,, ) > { > 0x00000012, > } > }) > } > =20 > <image001.png> > =20 > Today I was able to get both IRQ and MMIO allocation successful using = below snippet in vmbus: > =20 > + device_t dev =3D = devclass_get_device(devclass_find("vmbus_res"), 0); > + sc->ires =3D bus_alloc_resource_any(dev, > SYS_RES_IRQ, &sc->vector, RF_ACTIVE | RF_SHAREABLE); > =20 > =20 > Thanks & Regards, > Souradeep > =20 > From: Warner Losh <imp@bsdimp.com>=20 > Sent: Wednesday, October 19, 2022 11:09 PM > To: Souradeep Chakrabarti <schakrabarti@microsoft.com> > Cc: freebsd-hackers@freebsd.org; Wei Hu <weh@microsoft.com> > Subject: [EXTERNAL] Re: allocating IRQ mentioned in _CRS of ACPI > =20 > Sorry for the late reply... I've been busy with some things for = work... > =20 > I think you'll need to get the parent of vmbus to allow a pass through = allocation. What bus is that > currently? > =20 > Warner > =20 > On Tue, Oct 18, 2022 at 12:33 PM Souradeep Chakrabarti = <schakrabarti@microsoft.com <mailto:schakrabarti@microsoft.com>> wrote: > Hi, > It will be a great help, if someone can help here with some idea. > As it is blocking the FreeBSD on Hyper-V ARM64. >=20 > Thanks & Regards, > Souradeep >=20 > > -----Original Message----- > > From: Souradeep Chakrabarti > > Sent: Friday, October 14, 2022 1:24 PM > > To: 'Warner Losh' <imp@bsdimp.com <mailto:imp@bsdimp.com>> > > Cc: freebsd-hackers@freebsd.org = <mailto:freebsd-hackers@freebsd.org>; Wei Hu <weh@microsoft.com = <mailto:weh@microsoft.com>> > > Subject: RE: allocating IRQ mentioned in _CRS of ACPI > >=20 > > Last mail was having incorrect FreeBSD hacker alias. Replacing that = with correct > > one here. > >=20 > >=20 > > > -----Original Message----- > > > From: Souradeep Chakrabarti > > > Sent: Friday, October 14, 2022 1:19 PM > > > To: Warner Losh <imp@bsdimp.com <mailto:imp@bsdimp.com>> > > > Cc: hacker@freebsd.org <mailto:hacker@freebsd.org>; Wei Hu = <weh@microsoft.com <mailto:weh@microsoft.com>> > > > Subject: allocating IRQ mentioned in _CRS of ACPI > > > > > > Hi, > > > I would like to allocate IRQ to a device, mentioned in the _CRS of > > > that device in ACPI table. > > > I have tried with bus_alloc_resource_any(), but it is failing as = the > > > parent of that device is not owning the IRQ. > > > > > > Current ACPI topo for the device : > > > ACPI0->SB.VMOD(HID ACPI0004, has SYS_RES_MEM for MMIO in _CRS)- > > > >VMBUS( it has SYS_RES_IRQ in it's _CRS). > > > > > > How can I get here both SYS_RES_IRQ and SYS_RES_MEM allocated to = VMBUS? > > > > > > Thanks & Regards, > > > Souradeep --Apple-Mail=_8D832B57-8A2A-4CAC-96CA-1E8A51A498FD Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;" class=3D"">Based= on my reading of the ACPI tables, and looking how Linux handles it I = don=E2=80=99t think the vmbus_res driver should be used. If the vmbus = driver was to attach to the =E2=80=9CVMBUS" _HID it would be able to = manage the interrupt directly.<div class=3D""><br class=3D""></div><div = class=3D"">Ideally acpi_syscontainer would become a proper bus, but that = would need checking that existing drivers that depend on the current = behaviour still work.<br class=3D""><div class=3D""><br = class=3D""></div><div class=3D"">Andrew<br class=3D""><div><br = class=3D""><blockquote type=3D"cite" class=3D""><div class=3D"">On 19 = Oct 2022, at 18:51, Souradeep Chakrabarti <<a = href=3D"mailto:schakrabarti@microsoft.com" = class=3D"">schakrabarti@microsoft.com</a>> wrote:</div><br = class=3D"Apple-interchange-newline"><div class=3D""><meta = charset=3D"UTF-8" class=3D""><div class=3D"WordSection1" style=3D"page: = WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; = font-size: 12px; font-style: normal; font-variant-caps: normal; = font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none;"><div style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span class=3D"">Hi Warner,<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span class=3D""><o:p = class=3D""> </o:p></span></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = lang=3D"EN-US" class=3D"">1) PCI mmio resource in HID "ACPI0004", which = is needed by the FreeBSD guest for SRIOV devices.<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""><o:p class=3D""> </o:p></span></div><div style=3D"margin: = 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = lang=3D"EN-US" class=3D""> Device = (\_SB.VMOD) <-- This is currently owned by = acpi_syscontainer module on FreeBSD<o:p class=3D""></o:p></span></div><div= style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span lang=3D"EN-US" class=3D""> = {<o:p class=3D""></o:p></span></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = lang=3D"EN-US" class=3D""> = Name (_HID, "<span style=3D"background-color: yellow;" = class=3D"">ACPI0004</span>" /* Module Device */) // _HID: Hardware = ID<o:p class=3D""></o:p></span></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = lang=3D"EN-US" class=3D""> = Name (_UID, Zero) // _UID: Unique ID<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> Name (_CRS, = ResourceTemplate () // _CRS: Current Resource Settings<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> {<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> &nb= sp; ...<o:p class=3D""></o:p></span></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = lang=3D"EN-US" class=3D""> = }<o:p class=3D""></o:p></span></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = lang=3D"EN-US" class=3D""> = CreateDWordField (_CRS, \_SB.VMOD._Y00._MIN, MIN6) // _MIN: = Minimum Base Address<o:p class=3D""></o:p></span></div><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> CreateDWordField = (_CRS, \_SB.VMOD._Y00._MAX, MAX6) // _MAX: Maximum Base = Address<o:p class=3D""></o:p></span></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = lang=3D"EN-US" class=3D""> = CreateDWordField (_CRS, \_SB.VMOD._Y00._LEN, LEN6) // _LEN: = Length<o:p class=3D""></o:p></span></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = lang=3D"EN-US" class=3D""> = CreateQWordField (_CRS, \_SB.VMOD._Y01._MIN, MIN7) // _MIN: = Minimum Base Address<o:p class=3D""></o:p></span></div><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> CreateQWordField = (_CRS, \_SB.VMOD._Y01._MAX, MAX7) // _MAX: Maximum Base = Address<o:p class=3D""></o:p></span></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = lang=3D"EN-US" class=3D""> = CreateQWordField (_CRS, \_SB.VMOD._Y01._LEN, LEN7) // _LEN: = Length<o:p class=3D""></o:p></span></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = lang=3D"EN-US" class=3D""> = Method (_INI, 0, NotSerialized) // _INI: Initialize<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> {<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> &nb= sp; MIN6 =3D MG2B /* \MG2B */<o:p class=3D""></o:p></span></div><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> &nb= sp; LEN6 =3D MG2L /* \MG2L */<o:p class=3D""></o:p></span></div><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> &nb= sp; Local0 =3D MG2L /* \MG2L */<o:p class=3D""></o:p></span></div><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> &nb= sp; MAX6 =3D (MIN6 + Local0--)<o:p class=3D""></o:p></span></div><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> &nb= sp; Local1 =3D (HMIB << 0x14)<o:p class=3D""></o:p></span></div><div= style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> &nb= sp; Local2 =3D (HMIL << 0x14)<o:p class=3D""></o:p></span></div><div= style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> &nb= sp; MIN7 =3D Local1<o:p class=3D""></o:p></span></div><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> &nb= sp; LEN7 =3D Local2<o:p class=3D""></o:p></span></div><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span lang=3D"EN-US" class=3D""> = Local0 =3D Local2<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> &nb= sp; MAX7 =3D (MIN7 + Local0--)<o:p class=3D""></o:p></span></div><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> }<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> }<o:p class=3D""></o:p></span></div><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span lang=3D"EN-US" class=3D""><o:p = class=3D""> </o:p></span></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = lang=3D"EN-US" class=3D"">2) Vmbus IRQ resource in HID "VMBus", which is = needed to get Hyper-V vmbus interrupt to work on guests.<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D"">Device (\_SB.VMOD.VMBS) <--- currently owned = by vmbus_res module on FreeBSD<o:p class=3D""></o:p></span></div><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span lang=3D"EN-US" class=3D""> = {<o:p class=3D""></o:p></span></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = lang=3D"EN-US" class=3D""> = ...<o:p class=3D""></o:p></span></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = lang=3D"EN-US" class=3D""> = Name (_HID, "<span style=3D"background-color: yellow;" = class=3D"">VMBus</span>") // _HID: Hardware ID<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> Name (_UID, = Zero) // _UID: Unique ID<o:p class=3D""></o:p></span></div><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> ...<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> Name (_CRS, = ResourceTemplate () // _CRS: Current Resource Settings<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> {<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> &nb= sp; Interrupt (ResourceConsumer, Edge, ActiveHigh, Exclusive, ,, )<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> &nb= sp; {<o:p class=3D""></o:p></span></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = lang=3D"EN-US" = class=3D""> &nb= sp; 0x00000012,<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""> &nb= sp; }<o:p class=3D""></o:p></span></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = lang=3D"EN-US" class=3D""> = })<o:p class=3D""></o:p></span></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = lang=3D"EN-US" class=3D""> }<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"EN-US" = class=3D""><o:p class=3D""> </o:p></span></div><div style=3D"margin: = 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = class=3D""><span = id=3D"cid:image001.png@01D8E411.80EECBE0"><image001.png></span></spa= n><span class=3D""><o:p class=3D""></o:p></span></div><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span class=3D""><o:p = class=3D""> </o:p></span></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = class=3D"">Today I was able to get both IRQ and MMIO allocation = successful using below snippet in vmbus:<o:p = class=3D""></o:p></span></div><div style=3D"margin: 0cm; font-size: = 11pt; font-family: Calibri, sans-serif;" class=3D""><span class=3D""><o:p = class=3D""> </o:p></span></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" = class=3D"">+ device_t dev =3D = devclass_get_device(devclass_find("vmbus_res"), 0);<o:p = class=3D""></o:p></div><div style=3D"margin: 0cm; font-size: 11pt; = font-family: Calibri, sans-serif;" = class=3D"">+ sc->ires =3D = bus_alloc_resource_any(dev,<o:p class=3D""></o:p></div><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" = class=3D""> &nb= sp; SYS_RES_IRQ, &sc->vector, RF_ACTIVE | RF_SHAREABLE);<o:p = class=3D""></o:p></div><div style=3D"margin: 0cm; font-size: 11pt; = font-family: Calibri, sans-serif;" class=3D""><span class=3D""><o:p = class=3D""> </o:p></span></div><div class=3D""><div style=3D"margin: = 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span = style=3D"font-size: 12pt;" class=3D""><o:p = class=3D""> </o:p></span></div></div><div class=3D""><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span style=3D"font-size: 12pt;" class=3D"">Thanks= & Regards,<o:p class=3D""></o:p></span></div></div><div = class=3D""><div style=3D"margin: 0cm; font-size: 11pt; font-family: = Calibri, sans-serif;" class=3D""><span style=3D"font-size: 12pt;" = class=3D""> Souradeep<o:p class=3D""></o:p></span></div></div><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><span class=3D""><o:p = class=3D""> </o:p></span></div><div style=3D"border-style: none = none none solid; border-left-width: 1.5pt; border-left-color: blue; = padding: 0cm 0cm 0cm 4pt;" class=3D""><div class=3D""><div = style=3D"border-style: solid none none; border-top-width: 1pt; = border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" = class=3D""><div style=3D"margin: 0cm; font-size: 11pt; font-family: = Calibri, sans-serif;" class=3D""><b class=3D""><span lang=3D"EN-US" = class=3D"">From:</span></b><span lang=3D"EN-US" class=3D""><span = class=3D"Apple-converted-space"> </span>Warner Losh <<a = href=3D"mailto:imp@bsdimp.com" class=3D"">imp@bsdimp.com</a>><span = class=3D"Apple-converted-space"> </span><br class=3D""><b = class=3D"">Sent:</b><span = class=3D"Apple-converted-space"> </span>Wednesday, October 19, 2022 = 11:09 PM<br class=3D""><b class=3D"">To:</b><span = class=3D"Apple-converted-space"> </span>Souradeep Chakrabarti = <<a href=3D"mailto:schakrabarti@microsoft.com" = class=3D"">schakrabarti@microsoft.com</a>><br class=3D""><b = class=3D"">Cc:</b><span class=3D"Apple-converted-space"> </span><a = href=3D"mailto:freebsd-hackers@freebsd.org" = class=3D"">freebsd-hackers@freebsd.org</a>; Wei Hu <<a = href=3D"mailto:weh@microsoft.com" class=3D"">weh@microsoft.com</a>><br = class=3D""><b class=3D"">Subject:</b><span = class=3D"Apple-converted-space"> </span>[EXTERNAL] Re: allocating = IRQ mentioned in _CRS of ACPI<o:p = class=3D""></o:p></span></div></div></div><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><o:p = class=3D""> </o:p></div><div class=3D""><div class=3D""><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D"">Sorry for the late reply... I've been busy = with some things for work...<o:p class=3D""></o:p></div></div><div = class=3D""><div style=3D"margin: 0cm; font-size: 11pt; font-family: = Calibri, sans-serif;" class=3D""><o:p = class=3D""> </o:p></div></div><div class=3D""><div style=3D"margin: = 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=3D"">I = think you'll need to get the parent of vmbus to allow a pass through = allocation. What bus is that<o:p class=3D""></o:p></div></div><div = class=3D""><div style=3D"margin: 0cm; font-size: 11pt; font-family: = Calibri, sans-serif;" class=3D"">currently?<o:p = class=3D""></o:p></div></div><div class=3D""><div style=3D"margin: 0cm; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><o:p = class=3D""> </o:p></div></div><div class=3D""><div style=3D"margin: = 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" = class=3D"">Warner<o:p class=3D""></o:p></div></div><div style=3D"margin: = 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><o:p = class=3D""> </o:p></div><div class=3D""><div class=3D""><div = style=3D"margin: 0cm; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D"">On Tue, Oct 18, 2022 at 12:33 PM Souradeep = Chakrabarti <<a href=3D"mailto:schakrabarti@microsoft.com" = style=3D"color: blue; text-decoration: underline;" = class=3D"">schakrabarti@microsoft.com</a>> wrote:<o:p = class=3D""></o:p></div></div><blockquote style=3D"border-style: none = none none solid; border-left-width: 1pt; border-left-color: rgb(204, = 204, 204); padding: 0cm 0cm 0cm 6pt; margin-left: 4.8pt; margin-right: = 0cm;" class=3D""><div style=3D"margin: 0cm; font-size: 11pt; = font-family: Calibri, sans-serif;" class=3D"">Hi,<br class=3D"">It will = be a great help, if someone can help here with some idea.<br class=3D"">As= it is blocking the FreeBSD on Hyper-V ARM64.<br class=3D""><br = class=3D"">Thanks & Regards,<br class=3D"">Souradeep<br class=3D""><br= class=3D"">> -----Original Message-----<br class=3D"">> From: = Souradeep Chakrabarti<br class=3D"">> Sent: Friday, October 14, 2022 = 1:24 PM<br class=3D"">> To: 'Warner Losh' <<a = href=3D"mailto:imp@bsdimp.com" target=3D"_blank" style=3D"color: blue; = text-decoration: underline;" class=3D"">imp@bsdimp.com</a>><br = class=3D"">> Cc:<span class=3D"Apple-converted-space"> </span><a = href=3D"mailto:freebsd-hackers@freebsd.org" target=3D"_blank" = style=3D"color: blue; text-decoration: underline;" = class=3D"">freebsd-hackers@freebsd.org</a>; Wei Hu <<a = href=3D"mailto:weh@microsoft.com" target=3D"_blank" style=3D"color: = blue; text-decoration: underline;" class=3D"">weh@microsoft.com</a>><br= class=3D"">> Subject: RE: allocating IRQ mentioned in _CRS of = ACPI<br class=3D"">><span = class=3D"Apple-converted-space"> </span><br class=3D"">> Last = mail was having incorrect FreeBSD hacker alias. Replacing that with = correct<br class=3D"">> one here.<br class=3D"">><span = class=3D"Apple-converted-space"> </span><br class=3D"">><span = class=3D"Apple-converted-space"> </span><br class=3D"">> > = -----Original Message-----<br class=3D"">> > From: Souradeep = Chakrabarti<br class=3D"">> > Sent: Friday, October 14, 2022 1:19 = PM<br class=3D"">> > To: Warner Losh <<a = href=3D"mailto:imp@bsdimp.com" target=3D"_blank" style=3D"color: blue; = text-decoration: underline;" class=3D"">imp@bsdimp.com</a>><br = class=3D"">> > Cc:<span = class=3D"Apple-converted-space"> </span><a = href=3D"mailto:hacker@freebsd.org" target=3D"_blank" style=3D"color: = blue; text-decoration: underline;" class=3D"">hacker@freebsd.org</a>; = Wei Hu <<a href=3D"mailto:weh@microsoft.com" target=3D"_blank" = style=3D"color: blue; text-decoration: underline;" = class=3D"">weh@microsoft.com</a>><br class=3D"">> > Subject: = allocating IRQ mentioned in _CRS of ACPI<br class=3D"">> ><br = class=3D"">> > Hi,<br class=3D"">> > I would like to = allocate IRQ to a device, mentioned in the _CRS of<br class=3D"">> = > that device in ACPI table.<br class=3D"">> > I have tried = with bus_alloc_resource_any(), but it is failing as the<br class=3D"">>= > parent of that device is not owning the IRQ.<br class=3D"">> = ><br class=3D"">> > Current ACPI topo for the device :<br = class=3D"">> > ACPI0->SB.VMOD(HID ACPI0004, has SYS_RES_MEM for = MMIO in _CRS)-<br class=3D"">> > >VMBUS( it has SYS_RES_IRQ in = it's _CRS).<br class=3D"">> ><br class=3D"">> > How can I = get here both SYS_RES_IRQ and SYS_RES_MEM allocated to VMBUS?<br = class=3D"">> ><br class=3D"">> > Thanks & Regards,<br = class=3D"">> > = Souradeep</div></blockquote></div></div></div></div></div></blockquote></d= iv><br class=3D""></div></div></body></html>= --Apple-Mail=_8D832B57-8A2A-4CAC-96CA-1E8A51A498FD--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F4CD9D0B-980D-40E5-B17B-A1D87B46EA3C>