From: Muli Ben-Yehuda <muli@il.ibm.com>
To: "Kay, Allen M" <allen.m.kay@intel.com>
Cc: kvm@vger.kernel.org, Amit Shah <amit.shah@qumranet.com>,
Ben-Ami Yassour1 <BENAMI@il.ibm.com>,
Avi Kivity <avik@qumranet.com>,
Anthony Liguori <anthony@codemonkey.ws>,
Chris Wright <chrisw@redhat.com>,
"Han, Weidong" <weidong.han@intel.com>
Subject: Re: [PATCH 0/4][VTD] kvm vt-d support kernel changes
Date: Thu, 12 Jun 2008 15:08:03 +0300 [thread overview]
Message-ID: <20080612120803.GK7468@il.ibm.com> (raw)
In-Reply-To: <1FE6DD409037234FAB833C420AA843EC0188380B@orsmsx424.amr.corp.intel.com>
On Tue, Jun 10, 2008 at 12:45:30PM -0700, Kay, Allen M wrote:
> Muli,
>
> The userpsace branch is located at:
>
> git.kernel.org/pub/scm/linux/kernel/git/amit/kvm-userspace.git vtd
>
> I forgot to send out the userspace patch last night. :-)
Thanks Allen. I am trying to get the latest rev to work with the irq
injection method rather than irq chip. Amit's latest code overloads
KVM_ASSIGN_PCI_PT_DEV to inform the host kernel of guest IRQ changes,
so we either need something like the attachd patch to not map the
guest multiple times, or we need to introduce
KVM_PCI_PT_DEV_IRQ_CHANGE in additino to KVM_ASSIGN_PCI_PT_DEV.
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 1b50ba3..2d61375 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -305,6 +305,14 @@ static int kvm_vm_ioctl_pci_pt_dev(struct kvm *kvm,
goto out_free;
}
}
+
+ if (kvm_intel_iommu_found()) {
+ r = kvm_iommu_map_guest(kvm, pci_pt_dev);
+ if (r)
+ goto out_free;
+ }
+
write_lock_irqsave(&kvm_pci_pt_lock, flags);
INIT_WORK(&match->pt_dev.int_work.work, kvm_pci_pt_work_fn);
@@ -1962,11 +1970,6 @@ long kvm_arch_vm_ioctl(struct file *filp,
r = kvm_vm_ioctl_pci_pt_dev(kvm, &pci_pt_dev);
if (r)
goto out;
- if (kvm_intel_iommu_found()) {
- r = kvm_iommu_map_guest(kvm, &pci_pt_dev);
- if (r)
- goto out;
- }
break;
}
case KVM_GET_PIT: {
Cheers,
Muli
next prev parent reply other threads:[~2008-06-12 12:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-10 0:39 [PATCH 0/4][VTD] kvm vt-d support kernel changes Kay, Allen M
2008-06-10 12:53 ` Muli Ben-Yehuda
2008-06-10 19:45 ` Kay, Allen M
2008-06-12 12:08 ` Muli Ben-Yehuda [this message]
2008-06-20 18:00 ` Avi Kivity
2008-06-21 3:33 ` Han, Weidong
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=20080612120803.GK7468@il.ibm.com \
--to=muli@il.ibm.com \
--cc=BENAMI@il.ibm.com \
--cc=allen.m.kay@intel.com \
--cc=amit.shah@qumranet.com \
--cc=anthony@codemonkey.ws \
--cc=avik@qumranet.com \
--cc=chrisw@redhat.com \
--cc=kvm@vger.kernel.org \
--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