Re: [PATCH] kvm: Inject #GP on invalid writes to x2APIC registers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >  arch/x86/kvm/lapic.c | 9 +++++++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> > index 76fb00921203..96e300acf70a 100644
> > --- a/arch/x86/kvm/lapic.c
> > +++ b/arch/x86/kvm/lapic.c
> > @@ -2126,13 +2126,15 @@ int kvm_lapic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val)
> >                       ret = 1;
> >               break;
> >
> > -     case APIC_SELF_IPI:
> > -             if (apic_x2apic_mode(apic)) {
> > +     case APIC_SELF_IPI: {
>
> Braces on the case statement are unnecessary (and confusing).

I guess the original patch defined an intermediate case-local var. I
agree, the case braces can be removed in this version.

Also, thanks for upstreaming this, Venkatesh! I read through Sean's
feedback, and it is all fine with me.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux