lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130320105657.GC3889@redhat.com>
Date:	Wed, 20 Mar 2013 12:56:58 +0200
From:	Gleb Natapov <gleb@...hat.com>
To:	Paolo Bonzini <pbonzini@...hat.com>
Cc:	linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Subject: Re: [PATCH] x86: let userspace inject interrupts into the local APIC

On Tue, Mar 19, 2013 at 09:22:33PM +0100, Paolo Bonzini wrote:
> Il 19/03/2013 19:50, Gleb Natapov ha scritto:
> > On Tue, Mar 19, 2013 at 07:39:24PM +0100, Paolo Bonzini wrote:
> >> Il 19/03/2013 19:13, Gleb Natapov ha scritto:
> >>>>> There is no way for userspace to inject interrupts into a VCPU's
> >>>>> local APIC, which is important in order to inject INITs coming from
> >>>>> the chipset.  KVM_INTERRUPT is currently disabled when the in-kernel
> >>>>> local APIC is used, so we can repurpose it.  The shorthand destination
> >>>>> field must contain APIC_DEST_SELF, which has a double effect: first,
> >>>>> the ICR2 register is not used and the 32-bit field of KVM_INTERRUPT is
> >>>>> enough; second, it ensures that the valid range of the irq field is
> >>>>> distinct in the userspace-APIC and kernel-APIC cases.
> >>>>>
> >>> Init coming from triggering INIT# line should not be modeled as INIT coming from
> >>> APIC.
> >>
> >> Then Jan's patch was wrong, and INIT should not have been an apic event
> >> (perhaps SIPI should).
> >>
> > If it goes through APIC it is.
> 
> Ok, I'll extract KVM_APIC_INIT handling into a separate function and
> call it synchronously from KVM_INTERRUPT, with irq = -1
> (KVM_INTERRUPT_INIT, similar to PPC's values of irq).
> KVM_INTERRUPT_INIT will be accessible even with in-kernel irqchip.
> 
Why should it be accessible with in-kernel irqchip? The only valid value
for mp_state is RUNNING with userspace irqchip. We even validate it in
kvm_arch_vcpu_ioctl_set_mpstate() now.

> >>> In fact INIT cannot be send using SELF shorthand.
> >>
> >> Where does the SDM say that?
> >>
> > Table 10-3.
> 
> Yeah, table 10-6 and 10-7 here.
> 
Hmm, somebody needs to update SDM. Mine is from January 2013.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ