From mboxrd@z Thu Jan 1 00:00:00 1970 From: Masaki Kimura Subject: Re: Re: Oracle RAC in libvirt+KVM environment Date: Tue, 27 Aug 2013 19:29:57 +0900 Message-ID: <521C7FA5.5040401@hitachi.com> References: <20130814140232.GC28039@stefanha-thinkpad.redhat.com> <5211FD0D.5040409@redhat.com> <521329D3.8030907@redhat.com> <521341EA.4010404@redhat.com> <521349B0.60103@redhat.com> <52135C67.20202@redhat.com> <521483D1.7040803@redhat.com> <1377078058.32763.37.camel@haakon3.risingtidesystems.com> <5215D3AE.7050409@redhat.com> Reply-To: masaki.kimura.kz@hitachi.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Paolo Bonzini , "Nicholas A. Bellinger" , Stefan Hajnoczi , Don Koch , libvirt-users , kvm@vger.kernel.org To: Timon Wang Return-path: Received: from mailxx.hitachi.co.jp ([133.145.228.50]:41765 "EHLO mailxx.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752847Ab3H0KcP (ORCPT ); Tue, 27 Aug 2013 06:32:15 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: >> I found that scsicmd can't pass all the scsi3_test but the result of >> sg_inq is the same as it in the host. >> >> I am absolutely confused about this situation. Am I missed some >> information about it? I guess this is caused by the lack of capability. Please check if enough capability was added to kvm process by the following steps. 1. Check the pid of kvm process. # ps -C qemu-system-x86_64 -o pid= 5177 2. Check the capability for the process. # getpcaps 5177 Capabilities for `5177': = cap_sys_rawio+i In my fedora19 environment, as seen in above, only cap_sys_rawio+i was added with rawio='yes'. Even though, cap_sys_rawio+ep is required to pass-through SCSI Reservation from the guest. Note that I succeeded to pass-through SCSI Reservation with the following steps in my environment, not a Windows guest though. 1. Stop the guest. 2. Add CAP_SYS_RAWIO(effective, permitted) to qemu-kvm. # setcap cap_sys_rawio=ep /usr/bin/qemu-system-x86_64 3. Start the guest. However, I don't think this is the right way to workaround it, because it gives cap_sys_rawio+ep to all the kvm processes executed from this binary. I believe following patches, which are not merged yet, are trying to solve this problem in a different approach. - [PATCH v3 part2] Add per-device sysfs knob to enable unrestricted, unprivileged SG_IO https://lkml.org/lkml/2013/5/23/294 - [RFC PATCH 0/4] SG_IO filtering via sysfs and minimal whitelist https://lkml.org/lkml/2013/5/27/230 Any comments on this? Masaki