Re: [PATCH v2 2/5] apic: add support for x2APIC mode

2023-04-09 Thread Bui Quang Minh
On 4/3/23 23:38, Bui Quang Minh wrote: On 4/3/23 17:27, David Woodhouse wrote: On Wed, 2023-03-29 at 22:30 +0700, Bui Quang Minh wrote: I do some more testing on my hardware, your point is correct when dest == 0x, the interrupt is delivered to all APICs regardless of their mode. To

Re: [PATCH v2 2/5] apic: add support for x2APIC mode

2023-04-03 Thread Bui Quang Minh
On 4/3/23 17:27, David Woodhouse wrote: On Wed, 2023-03-29 at 22:30 +0700, Bui Quang Minh wrote: I do some more testing on my hardware, your point is correct when dest == 0x, the interrupt is delivered to all APICs regardless of their mode. To be precisely, it only broadcasts to CPU

Re: [PATCH v2 2/5] apic: add support for x2APIC mode

2023-04-03 Thread Bui Quang Minh
On 3/30/23 15:28, Igor Mammedov wrote: On Wed, 29 Mar 2023 22:30:44 +0700 Bui Quang Minh wrote: On 3/29/23 21:53, Bui Quang Minh wrote: On 3/28/23 22:58, Bui Quang Minh wrote: On 3/27/23 23:49, David Woodhouse wrote: On Mon, 2023-03-27 at 23:35 +0700, Bui Quang Minh wrote: On 3/27/23 23:22

Re: [PATCH v2 2/5] apic: add support for x2APIC mode

2023-04-03 Thread David Woodhouse
On Wed, 2023-03-29 at 22:30 +0700, Bui Quang Minh wrote: > > > > > I do some more testing on my hardware, your point is correct when dest > > == 0x, the interrupt is delivered to all APICs regardless of > > their mode. > > To be precisely, it only broadcasts to CPUs in xAPIC mode if th

Re: [PATCH v2 2/5] apic: add support for x2APIC mode

2023-03-30 Thread Igor Mammedov
On Wed, 29 Mar 2023 22:30:44 +0700 Bui Quang Minh wrote: > On 3/29/23 21:53, Bui Quang Minh wrote: > > On 3/28/23 22:58, Bui Quang Minh wrote: > >> On 3/27/23 23:49, David Woodhouse wrote: > >>> On Mon, 2023-03-27 at 23:35 +0700, Bui Quang Minh wrote: > On 3/27/23 23:22, David Woodhous

Re: [PATCH v2 2/5] apic: add support for x2APIC mode

2023-03-29 Thread Bui Quang Minh
On 3/29/23 21:53, Bui Quang Minh wrote: On 3/28/23 22:58, Bui Quang Minh wrote: On 3/27/23 23:49, David Woodhouse wrote: On Mon, 2023-03-27 at 23:35 +0700, Bui Quang Minh wrote: On 3/27/23 23:22, David Woodhouse wrote: On Mon, 2023-03-27 at 22:45 +0700, Bui Quang Minh wrote: Maybe I'm misr

Re: [PATCH v2 2/5] apic: add support for x2APIC mode

2023-03-29 Thread Bui Quang Minh
On 3/28/23 22:58, Bui Quang Minh wrote: On 3/27/23 23:49, David Woodhouse wrote: On Mon, 2023-03-27 at 23:35 +0700, Bui Quang Minh wrote: On 3/27/23 23:22, David Woodhouse wrote: On Mon, 2023-03-27 at 22:45 +0700, Bui Quang Minh wrote: Maybe I'm misreading the patch, but to me it looks that

Re: [PATCH v2 2/5] apic: add support for x2APIC mode

2023-03-28 Thread Bui Quang Minh
On 3/27/23 23:49, David Woodhouse wrote: On Mon, 2023-03-27 at 23:35 +0700, Bui Quang Minh wrote: On 3/27/23 23:22, David Woodhouse wrote: On Mon, 2023-03-27 at 22:45 +0700, Bui Quang Minh wrote: Maybe I'm misreading the patch, but to me it looks that if (dest == 0xff) apic_get_broadcast_bit

Re: [PATCH v2 2/5] apic: add support for x2APIC mode

2023-03-27 Thread David Woodhouse
On Mon, 2023-03-27 at 23:35 +0700, Bui Quang Minh wrote: > On 3/27/23 23:22, David Woodhouse wrote: > > On Mon, 2023-03-27 at 22:45 +0700, Bui Quang Minh wrote: > > > > > > > Maybe I'm misreading the patch, but to me it looks that > > > > if (dest == 0xff) apic_get_broadcast_bitmask() bit applies

Re: [PATCH v2 2/5] apic: add support for x2APIC mode

2023-03-27 Thread Bui Quang Minh
On 3/27/23 23:22, David Woodhouse wrote: On Mon, 2023-03-27 at 22:45 +0700, Bui Quang Minh wrote: Maybe I'm misreading the patch, but to me it looks that if (dest == 0xff) apic_get_broadcast_bitmask() bit applies even in x2apic mode? So delivering to the APIC with physical ID 255 will be misin

Re: [PATCH v2 2/5] apic: add support for x2APIC mode

2023-03-27 Thread David Woodhouse
On Mon, 2023-03-27 at 22:45 +0700, Bui Quang Minh wrote: > > > Maybe I'm misreading the patch, but to me it looks that > > if (dest == 0xff) apic_get_broadcast_bitmask() bit applies even in > > x2apic mode? So delivering to the APIC with physical ID 255 will be > > misinterpreted as a broadcast? >

Re: [PATCH v2 2/5] apic: add support for x2APIC mode

2023-03-27 Thread Bui Quang Minh
On 3/27/23 22:37, David Woodhouse wrote: On Mon, 2023-03-27 at 22:33 +0700, Bui Quang Minh wrote: +    memset(deliver_bitmask, 0x00, max_apic_words * sizeof(uint32_t)); + +    /* x2APIC broadcast id for both physical and logical (cluster) mode */ +    if (dest == 0x) { +    apic_ge

Re: [PATCH v2 2/5] apic: add support for x2APIC mode

2023-03-27 Thread David Woodhouse
On Mon, 2023-03-27 at 22:33 +0700, Bui Quang Minh wrote: > > > > +    memset(deliver_bitmask, 0x00, max_apic_words * sizeof(uint32_t)); > > > + > > > +    /* x2APIC broadcast id for both physical and logical (cluster) mode > > > */ > > > +    if (dest == 0x) { > > > +    apic_get_broa

Re: [PATCH v2 2/5] apic: add support for x2APIC mode

2023-03-27 Thread Bui Quang Minh
On 3/27/23 18:04, David Woodhouse wrote: On Sun, 2023-03-26 at 12:20 +0700, Bui Quang Minh wrote: This commit extends the APIC ID to 32-bit long and remove the 255 max APIC ID limit in userspace APIC. The array that manages local APICs is now dynamically allocated based on the max APIC ID of cre

Re: [PATCH v2 2/5] apic: add support for x2APIC mode

2023-03-27 Thread David Woodhouse
On Sun, 2023-03-26 at 12:20 +0700, Bui Quang Minh wrote: > This commit extends the APIC ID to 32-bit long and remove the 255 max APIC > ID limit in userspace APIC. The array that manages local APICs is now > dynamically allocated based on the max APIC ID of created x86 machine. > Also, new x2APIC I

[PATCH v2 2/5] apic: add support for x2APIC mode

2023-03-25 Thread Bui Quang Minh
This commit extends the APIC ID to 32-bit long and remove the 255 max APIC ID limit in userspace APIC. The array that manages local APICs is now dynamically allocated based on the max APIC ID of created x86 machine. Also, new x2APIC IPI destination determination scheme, self IPI and x2APIC mode reg