On 04/05/2015 17:37, Radim Krčmář wrote:
> 2015-04-30 13:36+0200, Paolo Bonzini:
>> This patch includes changes to the external API for SMM support.
>> All the changes are predicated by the availability of a new
>> capability, KVM_CAP_X86_SMM, which is added at the end of the
>> patch series.
>>
>> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
>> ---
>> diff --git a/Documentation/virtual/kvm/api.txt 
>> b/Documentation/virtual/kvm/api.txt
>> @@ -820,11 +820,19 @@ struct kvm_vcpu_events {
>>      } nmi;
>>      __u32 sipi_vector;
>>      __u32 flags;
>> +    struct {
>> +            __u8 smm;
> 
> 34.3.1 Entering SMM:
>   Subsequent SMI requests are not acknowledged while the processor is in
>   SMM. The first SMI interrupt request that occurs while the processor
>   is in SMM (that is, after SMM has been acknowledged to external
>   hardware) is latched and serviced when the processor exits SMM with
>   the RSM instruction. The processor will latch only one SMI while in
>   SMM.
> 
> The final code doesn't handle pending SMI's at all, so we'll need to
> store it somewhere and expose to userspace here.

Right, and I can add this to the slow path I already have for SMM exits:

+               if (ctxt->emul_flags != vcpu->arch.hflags) {
+                       vcpu->arch.hflags = ctxt->emul_flags;
+                       kvm_mmu_reset_context(vcpu);
+               }

Paolo

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to