From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: I/O port permission bit inheritance between threads Date: Tue, 21 May 2013 13:01:18 +0300 Message-ID: <20130521100118.GC4725@redhat.com> References: <20130520142431.5221e2d0@nehalam.linuxnetplumber.net> <20130521095030.GC7424@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Stephen Hemminger , kvm@vger.kernel.org To: Joerg Roedel Return-path: Received: from mx1.redhat.com ([209.132.183.28]:59851 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751533Ab3EUKBX (ORCPT ); Tue, 21 May 2013 06:01:23 -0400 Content-Disposition: inline In-Reply-To: <20130521095030.GC7424@8bytes.org> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, May 21, 2013 at 11:50:30AM +0200, Joerg Roedel wrote: > Hey Stephen, > > On Mon, May 20, 2013 at 02:24:31PM -0700, Stephen Hemminger wrote: > > ioperm() inheritance across threads is different in KVM then when run > > on physical hardware. The following program runs on physical hardware > > but get SEGV under KVM. > > > > It appears that the I/O permission bits are not shared between threads > > in the same way. > > Is this specific to SVM or do you see it on VMX too? My first guess > would be that the KVM instruction emulator does not check to > IO-permissions correctly, but that would affect VMX and SVM. > The program segfaults on physical hardware: # ./a.out joining waiting beeping Segmentation fault -- Gleb.