Re: [PATCH 1/4] target/i386: Fix sanity check on max APIC ID / X2APIC enablement

2022-05-13 Thread Michael S. Tsirkin
On Mon, Mar 14, 2022 at 02:25:41PM +, David Woodhouse wrote: > The check on x86ms->apic_id_limit in pc_machine_done() had two problems. > > Firstly, we need KVM to support the X2APIC API in order to allow IRQ > delivery to APICs >= 255. So we need to call/check kvm_enable_x2apic(), > which

Re: [PATCH 1/4] target/i386: Fix sanity check on max APIC ID / X2APIC enablement

2022-03-18 Thread David Woodhouse
On Fri, 2022-03-18 at 15:17 +0100, Igor Mammedov wrote: > On Thu, 17 Mar 2022 11:13:44 + David Woodhouse > wrote: > > Thus far, I didn't think anyone had been talking about a dependency on > > IOMMU. That doesn't make any sense at all. EXT_DEST_ID is perfectly > > sufficient for Linux

Re: [PATCH 1/4] target/i386: Fix sanity check on max APIC ID / X2APIC enablement

2022-03-18 Thread Igor Mammedov
On Thu, 17 Mar 2022 11:13:44 + David Woodhouse wrote: > On Thu, 2022-03-17 at 10:05 +0100, Igor Mammedov wrote: > > re-sending reply as something went wrong with headers (I suspect Daniel's > > name formatting) > > and email got bounced back. > > > > On Wed, 16 Mar 2022 14:31:33 + > >

Re: [PATCH 1/4] target/i386: Fix sanity check on max APIC ID / X2APIC enablement

2022-03-17 Thread David Woodhouse
On Thu, 2022-03-17 at 10:05 +0100, Igor Mammedov wrote: > re-sending reply as something went wrong with headers (I suspect Daniel's > name formatting) > and email got bounced back. > > On Wed, 16 Mar 2022 14:31:33 + > David Woodhouse wrote: > > > On Wed, 2022-03-16 at 12:28 +0100, Igor

Re: [PATCH 1/4] target/i386: Fix sanity check on max APIC ID / X2APIC enablement

2022-03-17 Thread Igor Mammedov
re-sending reply as something went wrong with headers (I suspect Daniel's name formatting) and email got bounced back. On Wed, 16 Mar 2022 14:31:33 + David Woodhouse wrote: > On Wed, 2022-03-16 at 12:28 +0100, Igor Mammedov wrote: > > Generally Daniel is right, as long as it's something

Re: [PATCH 1/4] target/i386: Fix sanity check on max APIC ID / X2APIC enablement

2022-03-16 Thread David Woodhouse
On Wed, 2022-03-16 at 12:28 +0100, Igor Mammedov wrote: > Generally Daniel is right, as long as it's something that what real hardware > supports. (usually it's job if upper layers which know what guest OS is used, > and can tweak config based on that knowledge). > > But it's virt only extension

Re: [PATCH 1/4] target/i386: Fix sanity check on max APIC ID / X2APIC enablement

2022-03-16 Thread Igor Mammedov
On Wed, 16 Mar 2022 06:47:48 -0400 "Michael S. Tsirkin" wrote: > On Wed, Mar 16, 2022 at 10:37:49AM +, David Woodhouse wrote: > > On Wed, 2022-03-16 at 05:56 -0400, Michael S. Tsirkin wrote: > > > On Wed, Mar 16, 2022 at 09:37:07AM +, David Woodhouse wrote: > > > > Yep, that's the

Re: [PATCH 1/4] target/i386: Fix sanity check on max APIC ID / X2APIC enablement

2022-03-16 Thread David Woodhouse
On Wed, 2022-03-16 at 05:56 -0400, Michael S. Tsirkin wrote: > On Wed, Mar 16, 2022 at 09:37:07AM +, David Woodhouse wrote: > > Yep, that's the guest operating system's choice. Not a qemu problem. > > > > Even if you have the split IRQ chip, if you boot a guest without kvm- > >

Re: [PATCH 1/4] target/i386: Fix sanity check on max APIC ID / X2APIC enablement

2022-03-16 Thread Michael S. Tsirkin
On Wed, Mar 16, 2022 at 10:37:49AM +, David Woodhouse wrote: > On Wed, 2022-03-16 at 05:56 -0400, Michael S. Tsirkin wrote: > > On Wed, Mar 16, 2022 at 09:37:07AM +, David Woodhouse wrote: > > > Yep, that's the guest operating system's choice. Not a qemu problem. > > > > > > Even if you

Re: [PATCH 1/4] target/i386: Fix sanity check on max APIC ID / X2APIC enablement

2022-03-16 Thread Michael S. Tsirkin
On Wed, Mar 16, 2022 at 09:37:07AM +, David Woodhouse wrote: > On Wed, 2022-03-16 at 10:04 +0100, Igor Mammedov wrote: > > Well, I retested with the latest upstream kernel (both guest and host), > > and adding kvm_enable_x2apic() is not sufficient as guest according > > to your patches in

Re: [PATCH 1/4] target/i386: Fix sanity check on max APIC ID / X2APIC enablement

2022-03-16 Thread David Woodhouse
On Wed, 2022-03-16 at 10:04 +0100, Igor Mammedov wrote: > Well, I retested with the latest upstream kernel (both guest and host), > and adding kvm_enable_x2apic() is not sufficient as guest according > to your patches in kernel caps max APICID at 255 unless kvm-msi-ext-dest-id > is enabled. And

Re: [PATCH 1/4] target/i386: Fix sanity check on max APIC ID / X2APIC enablement

2022-03-16 Thread Igor Mammedov
On Mon, 14 Mar 2022 14:25:41 + David Woodhouse wrote: > The check on x86ms->apic_id_limit in pc_machine_done() had two problems. > > Firstly, we need KVM to support the X2APIC API in order to allow IRQ > delivery to APICs >= 255. So we need to call/check kvm_enable_x2apic(), > which was

[PATCH 1/4] target/i386: Fix sanity check on max APIC ID / X2APIC enablement

2022-03-14 Thread David Woodhouse
The check on x86ms->apic_id_limit in pc_machine_done() had two problems. Firstly, we need KVM to support the X2APIC API in order to allow IRQ delivery to APICs >= 255. So we need to call/check kvm_enable_x2apic(), which was done elsewhere in *some* cases but not all. Secondly, microvm needs the