Prev: ARM: includecheck fix for mach-at91/board-sam9m10g45ek.c
Next: 2.6.33: Intel DP55KG - USB still not fixed: USBDEVFS_CONTROL failed cmd usbhid-ups rqt 161 rq 1 len 4 ret -110
From: H. Peter Anvin on 7 Mar 2010 19:10 On 03/07/2010 01:04 AM, Avi Kivity wrote: > > The setjmp/longjmp implementation should definitely live in arch/*/lib, > even if kvm is the only user. > Obviously. -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Eric W. Biederman on 8 Mar 2010 18:20 Avi Kivity <avi(a)redhat.com> writes: > On 03/02/2010 09:28 AM, Gleb Natapov wrote: >> On Mon, Mar 01, 2010 at 02:13:32PM -0500, john cooper wrote: >> >>> Gleb Natapov wrote: >>> >>> >>>> Think about what happens if in the middle of >>>> instruction emulation some data from device emulated in userspace is >>>> needed. Emulator should be able to tell KVM that exit to userspace is >>>> needed and restart instruction emulation when data is available. >>>> >>> setjmp/longjmp are useful constructs in general but >>> IME are better suited for infrequent exceptions vs. >>> routine usage. >>> >> Exception condition during instruction emulation _is_ >> infrequent. > > Well, with mmio you'd expect it to happen every read access. Of course if you are hitting that kind of case very often you don't want to do the emulation in the kernel but in userspace so you don't have to take the context switch overhead and everything else. I know running emulations in userspace was for dosemu the difference between a 16 color ega emulation on X that was unusable to one that was good enough to play video games like wolfenstein and doom. Eric -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Gleb Natapov on 9 Mar 2010 01:30
On Mon, Mar 08, 2010 at 03:11:49PM -0800, Eric W. Biederman wrote: > Avi Kivity <avi(a)redhat.com> writes: > > > On 03/02/2010 09:28 AM, Gleb Natapov wrote: > >> On Mon, Mar 01, 2010 at 02:13:32PM -0500, john cooper wrote: > >> > >>> Gleb Natapov wrote: > >>> > >>> > >>>> Think about what happens if in the middle of > >>>> instruction emulation some data from device emulated in userspace is > >>>> needed. Emulator should be able to tell KVM that exit to userspace is > >>>> needed and restart instruction emulation when data is available. > >>>> > >>> setjmp/longjmp are useful constructs in general but > >>> IME are better suited for infrequent exceptions vs. > >>> routine usage. > >>> > >> Exception condition during instruction emulation _is_ > >> infrequent. > > > > Well, with mmio you'd expect it to happen every read access. > > Of course if you are hitting that kind of case very often > you don't want to do the emulation in the kernel but > in userspace so you don't have to take the context switch > overhead and everything else. > The devices that do mmio most often are already in the kernel to avoid exit to usesrapce on each access. And mmio may be the most frequent cause of emulation, but not the only one. > I know running emulations in userspace was for dosemu > the difference between a 16 color ega emulation on X > that was unusable to one that was good enough to play video > games like wolfenstein and doom. > > Eric -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |