> 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