From: Avi Kivity <avi@qumranet.com>
To: Amit Shah <amit.shah@qumranet.com>
Cc: Ben-Ami Yassour <benami@il.ibm.com>,
kvm@vger.kernel.org, Muli Ben-Yehuda <muli@il.ibm.com>,
weidong.han@intel.com, "Kay, Allen M" <allen.m.kay@intel.com>
Subject: Re: [PATCH 2/2] KVM: Device assignemnt with VT-d
Date: Sat, 23 Aug 2008 12:28:50 +0300 [thread overview]
Message-ID: <48AFD852.8040604@qumranet.com> (raw)
In-Reply-To: <200808231427.42578.amit.shah@qumranet.com>
Amit Shah wrote:
> * On Friday 22 Aug 2008 23:48:42 Avi Kivity wrote:
>
>> Amit Shah wrote:
>>
>>> diff --git a/include/linux/kvm.h b/include/linux/kvm.h
>>> index d9ef7d3..2956e35 100644
>>> --- a/include/linux/kvm.h
>>> +++ b/include/linux/kvm.h
>>> @@ -495,4 +495,6 @@ struct kvm_assigned_irq {
>>> __u32 flags;
>>> };
>>>
>>> +#define KVM_DEV_ASSIGN_USE_VTD (1 << 1)
>>> +
>>> #endif
>>>
>> (1 >> 0)?
>>
>
> I kept the 1st field reserved for no particular implementation in mind as of
> now.
>
>
Why?
>> This is a userspace inteface, so use a generic name like iommu. We also
>> need a KVM_CAP so userspace can check whether an iommu is present or not.
>>
>
> We could have multiple hardware IOMMU implementations, like Intel's VT-d and
> AMD's IOMMU.
>
>
Not in userspace. Userspace sees either iommu or no iommu; it doesn't
care about the iommu model.
> Also, is KVM_CAP_foo needed for this? This is the only #define that'll be used
> and we can simply do something like
>
> #ifdef KVM_DEV_ASSIGN_USE_VTD
> flags |= KVM_DEV_ASSIGN_USE_VTD
> #endif
>
> ?
>
That only detects if the headers have the flag, not if the kernel
actually supports it (and whether there is an iommu in the host). We
need run-time detection.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
next prev parent reply other threads:[~2008-08-23 9:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-07 14:14 [PATCH 1/2] VT-d: changes to support KVM Ben-Ami Yassour
2008-08-07 14:14 ` [PATCH 2/2] KVM: Device assignemnt with VT-d Ben-Ami Yassour
2008-08-07 14:19 ` Patch-set description Ben-Ami Yassour
2008-08-13 9:38 ` [PATCH 2/2] KVM: Device assignemnt with VT-d Yang, Sheng
2008-08-13 9:46 ` Avi Kivity
2008-08-13 10:20 ` Yang, Sheng
2008-08-21 6:43 ` Amit Shah
2008-08-21 11:05 ` Ben-Ami Yassour
2008-08-21 13:46 ` Amit Shah
2008-08-22 7:44 ` Amit Shah
2008-08-22 18:18 ` Avi Kivity
2008-08-23 8:57 ` Amit Shah
2008-08-23 9:28 ` Avi Kivity [this message]
2008-08-23 9:43 ` Amit Shah
2008-08-24 10:00 ` Avi Kivity
2008-08-25 5:49 ` Han, Weidong
2008-08-26 7:32 ` Amit Shah
2008-08-26 8:25 ` Avi Kivity
2008-08-13 9:21 ` [PATCH 1/2] VT-d: changes to support KVM Yang, Sheng
2008-08-13 9:21 ` Avi Kivity
-- strict thread matches above, loose matches on Subject: below --
2008-08-21 11:10 VT-d support for device assignment Ben-Ami Yassour
2008-08-21 11:10 ` [PATCH 1/2] VT-d: changes to support KVM Ben-Ami Yassour
2008-08-21 11:10 ` [PATCH 2/2] KVM: Device assignemnt with VT-d Ben-Ami Yassour
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=48AFD852.8040604@qumranet.com \
--to=avi@qumranet.com \
--cc=allen.m.kay@intel.com \
--cc=amit.shah@qumranet.com \
--cc=benami@il.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=muli@il.ibm.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