mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
kvm: add kvm_device_supported() helper function
This can be used when probing whether KVM support specific device. Here, a raw vmfd is used. Signed-off-by: Peter Xu <peterx@redhat.com> Acked-by: Sergey Fedorov <serge.fdrv@gmail.com> Message-id: 1458788142-17509-4-git-send-email-peterx@redhat.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
2f340e9c24
commit
29039acf58
2 changed files with 24 additions and 0 deletions
|
@ -306,6 +306,15 @@ void kvm_device_access(int fd, int group, uint64_t attr,
|
|||
*/
|
||||
int kvm_create_device(KVMState *s, uint64_t type, bool test);
|
||||
|
||||
/**
|
||||
* kvm_device_supported - probe whether KVM supports specific device
|
||||
*
|
||||
* @vmfd: The fd handler for VM
|
||||
* @type: type of device
|
||||
*
|
||||
* @return: true if supported, otherwise false.
|
||||
*/
|
||||
bool kvm_device_supported(int vmfd, uint64_t type);
|
||||
|
||||
/* Arch specific hooks */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue