From: Avi Kivity <avi@redhat.com>
To: "Han, Weidong" <weidong.han@intel.com>
Cc: "'kvm@vger.kernel.org'" <kvm@vger.kernel.org>,
"Kay, Allen M" <allen.m.kay@intel.com>,
"Yang, Sheng" <sheng.yang@intel.com>
Subject: Re: [PATCH 1/4] KVM: support VT-d device hotplug
Date: Mon, 17 Nov 2008 16:05:49 +0200 [thread overview]
Message-ID: <49217A3D.709@redhat.com> (raw)
In-Reply-To: <715D42877B251141A38726ABF5CABF2C018BE64D7E@pdsmsx503.ccr.corp.intel.com>
Han, Weidong wrote:
> Avi Kivity wrote:
>
>> Han, Weidong wrote:
>>
>>>> Need a KVM_CAP_ to indicate this is available.
>>>>
>>>>
>>>>
>>> KVM_ASSIGN_PCI_DEVICE and KVM_ASSIGN_IRQ don't need a KVM_CAP_xxx.
>>> Why do you need it for KVM_DEASSIGN_PCI_DEVICE?
>>>
>>>
>>>
>> #define KVM_CAP_DEVICE_ASSIGNMENT 17
>>
>
> Do you mean add it like that:
>
> #ifdef KVM_CAP_DEVICE_ASSIGNMENT
> #define KVM_ASSIGN_PCI_DEVICE _IOR(KVMIO, 0x69, \
> struct kvm_assigned_pci_dev)
> #define KVM_ASSIGN_IRQ _IOR(KVMIO, 0x70, \
> struct kvm_assigned_irq)
> #define KVM_DEASSIGN_PCI_DEVICE _IOR(KVMIO, 0x71, \
> struct kvm_assigned_pci_dev)
> #endif
>
No, sorry for being unclear. KVM_CAP_DEVICE_ASSIGNMENT already exists
in kvm.h
This is how KVM_CAP_ works:
- kvm.h defines KVM_CAP_DEVICE_ASSIGNMENT
- userspace compiles device assignment code only if it sees
KVM_CAP_DEVICE_ASSIGNMENT in kvm.h
- kvm.ko returns nonzero to ioctl(KVM_CHECK_EXTENSION,
KVM_CAP_DEVICE_ASSIGNMENT) if it supports device assignment (recent
enough module, iommu found)
- userspace runs device assignment code only if above ioctl passes
We need something similar to deassignment, since it didn't arrive at the
same time as assignment.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2008-11-17 14:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-14 9:23 [PATCH 1/4] KVM: support VT-d device hotplug Han, Weidong
2008-11-16 8:05 ` Avi Kivity
2008-11-17 9:16 ` Han, Weidong
2008-11-17 10:28 ` Avi Kivity
2008-11-17 13:31 ` Han, Weidong
2008-11-17 14:05 ` Avi Kivity [this message]
2008-11-17 14:21 ` Han, Weidong
2008-11-17 14:48 ` Avi Kivity
2008-11-18 3:31 ` Han, Weidong
2008-11-18 12:40 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49217A3D.709@redhat.com \
--to=avi@redhat.com \
--cc=allen.m.kay@intel.com \
--cc=kvm@vger.kernel.org \
--cc=sheng.yang@intel.com \
--cc=weidong.han@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox