Re: [PATCH 14/21] KVM: x86: Software disabled APIC should still deliver NMIs

2014-12-01 Thread Radim Krčmář
2014-12-01 17:30+0100, Paolo Bonzini: > On 27/11/2014 23:26, Radim Krčmář wrote: > > We can't deliver xAPIC and x2APIC broadcasts/logical messages at the > > same time with current KVM and this patch just switches the working case > > in favour of x2APIC, which is why I didn't think it was necessar

Re: [PATCH 14/21] KVM: x86: Software disabled APIC should still deliver NMIs

2014-12-01 Thread Paolo Bonzini
On 27/11/2014 23:26, Radim Krčmář wrote: > We can't deliver xAPIC and x2APIC broadcasts/logical messages at the > same time with current KVM and this patch just switches the working case > in favour of x2APIC, which is why I didn't think it was necessary ... > (And I didn't understand why prefer

Re: [PATCH 14/21] KVM: x86: Software disabled APIC should still deliver NMIs

2014-11-27 Thread Radim Krčmář
2014-11-27 23:45+0200, Nadav Amit: > Radim Krčmář wrote: > > 2014-11-26 19:01+0200, Nadav Amit: > >> Sorry for the late and long reply, but I got an issue with the new version > >> (and my previous version as well). Indeed, the SDM states that DFR should > >> be the same for enabled CPUs, and that

Re: [PATCH 14/21] KVM: x86: Software disabled APIC should still deliver NMIs

2014-11-27 Thread Nadav Amit
Radim Krčmář wrote: > 2014-11-26 19:01+0200, Nadav Amit: >> Sorry for the late and long reply, but I got an issue with the new version >> (and my previous version as well). Indeed, the SDM states that DFR should >> be the same for enabled CPUs, and that the BIOS should get all CPUs in >> either x

Re: [PATCH 14/21] KVM: x86: Software disabled APIC should still deliver NMIs

2014-11-27 Thread Radim Krčmář
2014-11-26 19:01+0200, Nadav Amit: > Sorry for the late and long reply, but I got an issue with the new version > (and my previous version as well). Indeed, the SDM states that DFR should > be the same for enabled CPUs, and that the BIOS should get all CPUs in > either xAPIC or x2APIC. Yet, there i

Re: [PATCH 14/21] KVM: x86: Software disabled APIC should still deliver NMIs

2014-11-26 Thread Paolo Bonzini
On 26/11/2014 18:01, Nadav Amit wrote: > Paolo Bonzini wrote: > >> >> >> On 06/11/2014 17:45, Radim Krčmář wrote: >>> 2014-11-06 10:34+0100, Paolo Bonzini: On 05/11/2014 21:45, Nadav Amit wrote: > If I understand the SDM correctly, in such scenario (all APICs are > software disable

Re: [PATCH 14/21] KVM: x86: Software disabled APIC should still deliver NMIs

2014-11-26 Thread Nadav Amit
Paolo Bonzini wrote: > > > On 06/11/2014 17:45, Radim Krčmář wrote: >> 2014-11-06 10:34+0100, Paolo Bonzini: >>> On 05/11/2014 21:45, Nadav Amit wrote: If I understand the SDM correctly, in such scenario (all APICs are software disabled) the mode is left as the default - flat mode (se

Re: [PATCH 14/21] KVM: x86: Software disabled APIC should still deliver NMIs

2014-11-14 Thread Paolo Bonzini
On 06/11/2014 17:45, Radim Krčmář wrote: > 2014-11-06 10:34+0100, Paolo Bonzini: >> On 05/11/2014 21:45, Nadav Amit wrote: >>> If I understand the SDM correctly, in such scenario (all APICs are >>> software disabled) the mode is left as the default - flat mode (see > > APIC doesn't have any glob

Re: [PATCH 14/21] KVM: x86: Software disabled APIC should still deliver NMIs

2014-11-10 Thread Radim Krčmář
2014-11-10 18:35+0100, Paolo Bonzini: > On 06/11/2014 17:45, Radim Krčmář wrote: > > - } else if (kvm_apic_hw_enabled(apic)) { > > + } else if (kvm_apic_get_reg(apic, APIC_LDR)) { > > if (kvm_apic_get_reg(apic, APIC_DFR) == > >

Re: [PATCH 14/21] KVM: x86: Software disabled APIC should still deliver NMIs

2014-11-10 Thread Paolo Bonzini
On 06/11/2014 17:45, Radim Krčmář wrote: > - } else if (kvm_apic_hw_enabled(apic)) { > + } else if (kvm_apic_get_reg(apic, APIC_LDR)) { > if (kvm_apic_get_reg(apic, APIC_DFR) == > APIC_DFR_CLUSTER) {

Re: [PATCH 14/21] KVM: x86: Software disabled APIC should still deliver NMIs

2014-11-06 Thread Radim Krčmář
2014-11-06 10:34+0100, Paolo Bonzini: > On 05/11/2014 21:45, Nadav Amit wrote: > > If I understand the SDM correctly, in such scenario (all APICs are > > software disabled) the mode is left as the default - flat mode (see APIC doesn't have any global mode (it is just KVM's simplification), so when

Re: [PATCH 14/21] KVM: x86: Software disabled APIC should still deliver NMIs

2014-11-06 Thread Paolo Bonzini
On 05/11/2014 21:45, Nadav Amit wrote: > If I understand the SDM correctly, in such scenario (all APICs are > software disabled) the mode is left as the default - flat mode (see > section 10.6.2.2 "Logical Destination Mode”): "All processors that > have their APIC software enabled (using the spur

Re: [PATCH 14/21] KVM: x86: Software disabled APIC should still deliver NMIs

2014-11-05 Thread Nadav Amit
> On Nov 5, 2014, at 14:30, Paolo Bonzini wrote: > > > > On 02/11/2014 10:54, Nadav Amit wrote: >> Currently, the APIC logical map does not consider VCPUs whose local-apic is >> software-disabled. However, NMIs, INIT, etc. should still be delivered to >> such >> VCPUs. Therefore, the APIC mo

Re: [PATCH 14/21] KVM: x86: Software disabled APIC should still deliver NMIs

2014-11-05 Thread Paolo Bonzini
On 02/11/2014 10:54, Nadav Amit wrote: > Currently, the APIC logical map does not consider VCPUs whose local-apic is > software-disabled. However, NMIs, INIT, etc. should still be delivered to > such > VCPUs. Therefore, the APIC mode should first be determined, and then the map, > considering a