diff mbox series

[RFC,8/8] svm: Allow AVIC with in-kernel irqchip mode

Message ID 20190204144128.9489-9-suravee.suthikulpanit@amd.com (mailing list archive)
State New, archived
Headers show
Series KVM: x86: svm: Enabling AVIC with in kernel irqchip | expand

Commit Message

Suthikulpanit, Suravee Feb. 4, 2019, 2:42 p.m. UTC
Once the IRQ ack notifier for in-kernel PIT is no longer required
and run-time AVIC activate/deactivate is supported, we can remove
the kernel irqchip split mode requirement for AVIC.

Hence, remove the check for irqchip split mode when enabling AVIC.

Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
---
 arch/x86/kvm/svm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alex Williamson Feb. 5, 2019, 6:34 p.m. UTC | #1
On Mon, 4 Feb 2019 14:42:32 +0000
"Suthikulpanit, Suravee" <Suravee.Suthikulpanit@amd.com> wrote:

> Once the IRQ ack notifier for in-kernel PIT is no longer required
> and run-time AVIC activate/deactivate is supported, we can remove
> the kernel irqchip split mode requirement for AVIC.
> 
> Hence, remove the check for irqchip split mode when enabling AVIC.

Yay!  Could we also at this point make avic enabled by default or are
there remaining incompatibilities?  Thanks,

Alex


> Cc: Radim Krčmář <rkrcmar@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> ---
>  arch/x86/kvm/svm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> index 580ab40ba207..24dfa6a93711 100644
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
> @@ -5157,7 +5157,7 @@ static void svm_set_virtual_apic_mode(struct kvm_vcpu *vcpu)
>  
>  static bool svm_get_enable_apicv(struct kvm_vcpu *vcpu)
>  {
> -	return avic && irqchip_split(vcpu->kvm);
> +	return avic;
>  }
>  
>  static void svm_hwapic_irr_update(struct kvm_vcpu *vcpu, int max_irr)
Suthikulpanit, Suravee Feb. 6, 2019, 11:20 a.m. UTC | #2
Alex,

On 2/6/19 1:34 AM, Alex Williamson wrote:
> On Mon, 4 Feb 2019 14:42:32 +0000
> "Suthikulpanit, Suravee"<Suravee.Suthikulpanit@amd.com>  wrote:
> 
>> Once the IRQ ack notifier for in-kernel PIT is no longer required
>> and run-time AVIC activate/deactivate is supported, we can remove
>> the kernel irqchip split mode requirement for AVIC.
>>
>> Hence, remove the check for irqchip split mode when enabling AVIC.
> Yay!  Could we also at this point make avic enabled by default or are
> there remaining incompatibilities?  Thanks,

I'm looking into that next. I would need to ensure that enabling
AVIC would not cause issues with other features.

Suravee
Maxim Levitsky June 15, 2019, 2:28 p.m. UTC | #3
On Wed, 2019-02-06 at 11:20 +0000, Suthikulpanit, Suravee wrote:
> Alex,
> 
> On 2/6/19 1:34 AM, Alex Williamson wrote:
> > On Mon, 4 Feb 2019 14:42:32 +0000
> > "Suthikulpanit, Suravee"<Suravee.Suthikulpanit@amd.com>  wrote:
> > 
> > > Once the IRQ ack notifier for in-kernel PIT is no longer required
> > > and run-time AVIC activate/deactivate is supported, we can remove
> > > the kernel irqchip split mode requirement for AVIC.
> > > 
> > > Hence, remove the check for irqchip split mode when enabling AVIC.
> > 
> > Yay!  Could we also at this point make avic enabled by default or are
> > there remaining incompatibilities?  Thanks,
> 
> I'm looking into that next. I would need to ensure that enabling
> AVIC would not cause issues with other features.
> 
> Suravee

Hi!

Do you have any update on the state of this patch? 
I kind of stumbled on it accidently, while
trying to understand why AVIC is only enabled in the split irqchip mode.

Best regards,
	Maxim Levitsky
Suthikulpanit, Suravee June 18, 2019, 2:34 p.m. UTC | #4
Hi,

On 6/15/19 9:28 AM, Maxim Levitsky wrote:
> On Wed, 2019-02-06 at 11:20 +0000, Suthikulpanit, Suravee wrote:
>> Alex,
>>
>> On 2/6/19 1:34 AM, Alex Williamson wrote:
>>> On Mon, 4 Feb 2019 14:42:32 +0000
>>> "Suthikulpanit, Suravee"<Suravee.Suthikulpanit@amd.com>  wrote:
>>>
>>>> Once the IRQ ack notifier for in-kernel PIT is no longer required
>>>> and run-time AVIC activate/deactivate is supported, we can remove
>>>> the kernel irqchip split mode requirement for AVIC.
>>>>
>>>> Hence, remove the check for irqchip split mode when enabling AVIC.
>>>
>>> Yay!  Could we also at this point make avic enabled by default or are
>>> there remaining incompatibilities?  Thanks,
>>
>> I'm looking into that next. I would need to ensure that enabling
>> AVIC would not cause issues with other features.
>>
>> Suravee
> 
> Hi!
> 
> Do you have any update on the state of this patch?
> I kind of stumbled on it accidently, while
> trying to understand why AVIC is only enabled in the split irqchip mode.

I'm still working on this and testing the series.
I'll post this soon.

Thanks,
Suravee

> Best regards,
> 	Maxim Levitsky
>
diff mbox series

Patch

diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 580ab40ba207..24dfa6a93711 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -5157,7 +5157,7 @@  static void svm_set_virtual_apic_mode(struct kvm_vcpu *vcpu)
 
 static bool svm_get_enable_apicv(struct kvm_vcpu *vcpu)
 {
-	return avic && irqchip_split(vcpu->kvm);
+	return avic;
 }
 
 static void svm_hwapic_irr_update(struct kvm_vcpu *vcpu, int max_irr)