From: Amit Shah <amit.shah@qumranet.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: muli@il.ibm.com, kvm@vger.kernel.org, weidong.han@intel.com,
allen.m.kay@intel.com, qemu-devel@nongnu.org, benami@il.ibm.com,
Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [Qemu-devel] Re: [PATCH 1/1] KVM/userspace: Support for assigning PCI devices to guests
Date: Thu, 28 Aug 2008 18:55:28 +0530 [thread overview]
Message-ID: <200808281855.28832.amit.shah@qumranet.com> (raw)
In-Reply-To: <48B6A405.2060108@codemonkey.ws>
Hi Anthony,
* On Thursday 28 Aug 2008 18:41:33 Anthony Liguori wrote:
> Amit Shah wrote:
> >> This patch is too big on it's on. It should be split into logical
> >> parts.
> >
> > However, it just adds device assignment support and does nothing else. I
> > don't see a way of splitting this any more.
>
> The libkvm changes can go in there own patch. The changes necessary to
> piix_pci can get in their own patch. If you get creative, it's probably
> possible to split up device-assignment.c too.
Frankly, what purpose would it serve? There's only one call site for the
functions in libkvm which are only ever going to be used by the device
assignment code. piix_pci I can agree; they could be shared by others so it
can be split.
> > As you noticed, it's quite different. They have a lot more code in there.
> > (3k+ lines vs 600 lines). I guess most of it went away when we realised
> > we didn't need all that. Also, I noticed most of the code there is not in
> > the qemu style.
>
> What are you looking at? In my version of xen-unstable, I see
> pass-through.c at 694 lines. It's all in the right style too.
I got the xen-unstable hg tree and am looking at tools/ioemu/pass-through.[ch]
> >> We try to avoid open coding calls to libkvm functions directly within
> >> QEMU. At the least, it should be wrapped with an if (kvm_enabled()).
> >
> > With the direct-mmio patch, we just start depending on KVM. Ben-Ami, is
> > there a chance you can keep the MMIO-via-userspace method supported as
> > well for non-kvm hosts?
>
> Open-coding calls to libkvm functions breaks the build when not using
> KVM. They all need qemu-kvm.c wrappers.
Of course, that comment's taken. I'm just wondering if Ben-Ami can redo the
patch so that non-kvm guests can work as well.
> > From your other mail:
> >> Where did this come from originally? It's completely different from
> >> what is in xen-unstable. What's in xen-unstable is actually a lot nicer
> >> IMHO.
> >
> > Nicer in what way?
> >
> > I think the original code was picked up from before the time it was
> > merged in Xen.
>
> It's in the right style, it avoids layering violations (there are no
> direct calls to the piix device within the code). At some point in
Please point me to the code you're looking at.
> time, both KVM and Xen are going to live in the upstream QEMU tree so
> this code will have to be shared. Since we're basing our code off what
> appears to be older Xen code, I think rebasing it to the latest bits
> makes sense.
Definitely we should work together and have a common codebase. Also, the
version I have is based on something that was pre-xen; so it's possible all
the layering work happened later.
Let me see the version you have before I qemu-ify this code.
Thanks,
Amit
next prev parent reply other threads:[~2008-08-28 13:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1219764544-29764-1-git-send-email-amit.shah@qumranet.com>
[not found] ` <1219764544-29764-2-git-send-email-amit.shah@qumranet.com>
2008-08-27 13:50 ` [Qemu-devel] Re: [PATCH 1/1] KVM/userspace: Support for assigning PCI devices to guests Anthony Liguori
2008-08-27 14:02 ` Anthony Liguori
2008-08-27 14:20 ` Ian Jackson
2008-08-28 11:50 ` Amit Shah
2008-08-28 11:48 ` Amit Shah
2008-08-28 13:11 ` Anthony Liguori
2008-08-28 13:25 ` Amit Shah [this message]
2008-08-28 16:37 ` Ian Jackson
2008-08-29 16:54 ` Amit Shah
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=200808281855.28832.amit.shah@qumranet.com \
--to=amit.shah@qumranet.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=allen.m.kay@intel.com \
--cc=anthony@codemonkey.ws \
--cc=benami@il.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=muli@il.ibm.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).