qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: "Andreas Färber" <afaerber@suse.de>, "Jan Kiszka" <jan.kiszka@web.de>
Cc: kvm@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>,
	Alexey Kardashevskiy <aik@ozlabs.ru>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	qemu-devel@nongnu.org,
	Alex Williamson <alex.williamson@redhat.com>,
	qemu-ppc <qemu-ppc@nongnu.org>, Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment
Date: Tue, 28 Aug 2012 07:57:53 -0500	[thread overview]
Message-ID: <87k3wjyy0e.fsf@codemonkey.ws> (raw)
In-Reply-To: <503B62F4.9070500@suse.de>

Andreas Färber <afaerber@suse.de> writes:

> Hi,
>
> Am 27.08.2012 08:28, schrieb Jan Kiszka:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>> 
>> This adds PCI device assignment for i386 targets using the classic KVM
>> interfaces. This version is 100% identical to what is being maintained
>> in qemu-kvm for several years and is supported by libvirt as well. It is
>> expected to remain relevant for another couple of years until kernels
>> without full-features and performance-wise equivalent VFIO support are
>> obsolete.
>> 
>> A refactoring to-do that should be done in-tree is to model MSI and
>> MSI-X support via the generic PCI layer, similar to what VFIO is already
>> doing for MSI-X. This should improve the correctness and clean up the
>> code from duplicate logic.
>> 
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>  hw/kvm/Makefile.objs |    2 +-
>>  hw/kvm/pci-assign.c  | 1929 ++++++++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 1930 insertions(+), 1 deletions(-)
>>  create mode 100644 hw/kvm/pci-assign.c
> [...]
>> diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c
>> new file mode 100644
>> index 0000000..9cce02c
>> --- /dev/null
>> +++ b/hw/kvm/pci-assign.c
>> @@ -0,0 +1,1929 @@
>> +/*
>> + * Copyright (c) 2007, Neocleus Corporation.
>> + *
>> + * This program is free software; you can redistribute it and/or modify it
>> + * under the terms and conditions of the GNU General Public License,
>> + * version 2, as published by the Free Software Foundation.
>
> The downside of accepting this into qemu.git is that it gets us a huge
> blob of GPLv2-only code without history of contributors for GPLv2+
> relicensing...

That is 100% okay.

Regards,

Anthony Liguori

>
>> + *
>> + * This program is distributed in the hope it will be useful, but WITHOUT
>> + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
>> + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
>> + * more details.
>> + *
>> + * You should have received a copy of the GNU General Public License along with
>> + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
>> + * Place - Suite 330, Boston, MA 02111-1307 USA.
>
> (Expect the usual GNU address reminder here.)
>
>> + *
>> + *
>> + *  Assign a PCI device from the host to a guest VM.
>> + *
>> + *  Adapted for KVM by Qumranet.
>> + *
>> + *  Copyright (c) 2007, Neocleus, Alex Novik (alex@neocleus.com)
>> + *  Copyright (c) 2007, Neocleus, Guy Zana (guy@neocleus.com)
>> + *  Copyright (C) 2008, Qumranet, Amit Shah (amit.shah@qumranet.com)
>> + *  Copyright (C) 2008, Red Hat, Amit Shah (amit.shah@redhat.com)
>> + *  Copyright (C) 2008, IBM, Muli Ben-Yehuda (muli@il.ibm.com)
>> + */
>> +#include <stdio.h>
>> +#include <unistd.h>
>> +#include <sys/io.h>
>> +#include <sys/mman.h>
>> +#include <sys/types.h>
>> +#include <sys/stat.h>
>> +#include "hw/hw.h"
>> +#include "hw/pc.h"
>> +#include "qemu-error.h"
>> +#include "console.h"
>> +#include "hw/loader.h"
>> +#include "monitor.h"
>> +#include "range.h"
>> +#include "sysemu.h"
>> +#include "hw/pci.h"
>> +#include "hw/msi.h"
>
>> +#include "kvm_i386.h"
>
> Am I correct to understand we compile this only for i386 / x86_64?
> (apic.o in kvm/Makefile.objs hints in that direction) You may want to
> update the description in the comment above accordingly, also mentioning
> that this is some deprecated backwards-compatibility thing.
>
> Regards,
> Andreas
>
> -- 
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2012-08-28 12:58 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-27  6:28 [Qemu-devel] [PATCH 0/4] uq/master: Add classic PCI device assignment Jan Kiszka
2012-08-27  6:28 ` [Qemu-devel] [PATCH 1/4] kvm: Introduce kvm_irqchip_update_msi_route Jan Kiszka
2012-08-27  6:28 ` [Qemu-devel] [PATCH 2/4] kvm: Introduce kvm_has_intx_set_mask Jan Kiszka
2012-08-27  6:28 ` [Qemu-devel] [PATCH 3/4] kvm: i386: Add services required for PCI device assignment Jan Kiszka
2012-08-27  6:28 ` [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic " Jan Kiszka
2012-08-27 12:07   ` Andreas Färber
2012-08-27 12:15     ` Jan Kiszka
2012-08-28 21:26       ` Peter Maydell
2012-08-29  8:47         ` Jan Kiszka
2012-08-29  8:49           ` Peter Maydell
2012-08-29  8:50             ` Jan Kiszka
2012-09-03 15:59             ` Avi Kivity
2012-09-04  3:31               ` Alex Williamson
2012-08-28 12:57     ` Anthony Liguori [this message]
2012-08-29 14:08       ` Andreas Färber
2012-08-29 18:32         ` Anthony Liguori
2012-09-04 21:00         ` Anthony Liguori
2012-09-05 15:26           ` Avi Kivity
2012-09-05 15:29             ` Michael S. Tsirkin
2012-09-05 15:41             ` Anthony Liguori
2012-09-05 15:52               ` Avi Kivity
2012-09-05 19:04               ` Blue Swirl
2012-09-05 19:22                 ` Anthony Liguori
2012-09-05 19:38                   ` Blue Swirl
2012-09-05 20:46                     ` Anthony Liguori
2012-09-10 15:33                       ` Andreas Färber
2012-09-06  3:42                     ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2012-09-08  7:54                       ` Blue Swirl
2012-09-05 19:24                 ` [Qemu-devel] " Eric Blake
2012-09-05 19:43                   ` Blue Swirl
2012-09-06  8:44                 ` Avi Kivity
2012-09-08  8:06                   ` Blue Swirl
2012-09-08  9:28                     ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2012-09-08 10:16                       ` Blue Swirl
2012-09-08 12:13                         ` Alexander Graf
2012-09-08 12:30                           ` Blue Swirl
2012-09-08 14:59                             ` Alexander Graf
2012-08-27 18:56   ` [Qemu-devel] " Blue Swirl
2012-08-27 19:01     ` Michael S. Tsirkin
2012-08-27 19:06       ` Blue Swirl
2012-08-28  0:30     ` Jan Kiszka
2012-09-03 16:06       ` Avi Kivity
2012-08-28  7:35     ` Michael Tokarev
2012-08-28 17:01       ` Blue Swirl
2012-08-28 17:28         ` Michael S. Tsirkin
2012-08-28 17:38           ` Blue Swirl
2012-08-28 19:31             ` Anthony Liguori
2012-08-28 19:49               ` malc
2012-08-28 20:06               ` Blue Swirl
2012-08-28 21:51                 ` Anthony Liguori
2012-09-01  9:20                   ` Blue Swirl
2012-08-29  8:27               ` Markus Armbruster
2012-09-03 16:14                 ` Avi Kivity
2012-09-03 19:32                   ` Blue Swirl
2012-09-04  8:32                     ` Avi Kivity
2012-09-04 19:27                       ` Blue Swirl
2012-09-04 21:28                         ` Michael S. Tsirkin
2012-09-05 19:09                           ` Blue Swirl
2012-08-28 11:02   ` [Qemu-devel] [PATCH v2 " Jan Kiszka
2012-08-28 21:49     ` Michael S. Tsirkin
2012-08-29  8:44       ` Jan Kiszka
2012-08-29 10:35         ` Michael S. Tsirkin
2012-08-30 18:30     ` [Qemu-devel] [PATCH v3 " Jan Kiszka
2012-09-06  8:44       ` Jan Kiszka
2012-09-06  8:49         ` Michael S. Tsirkin
2012-09-06 16:06         ` Andreas Färber
2012-09-06 16:16           ` Jan Kiszka
2012-09-08  7:55           ` Blue Swirl
2012-09-09 14:13         ` Avi Kivity
2012-09-10  9:26           ` Jan Kiszka
2012-09-10 12:30             ` Avi Kivity
2012-08-28 15:04   ` [Qemu-devel] [PATCH " Michael S. Tsirkin
2012-08-29 10:50     ` Jan Kiszka

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=87k3wjyy0e.fsf@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=afaerber@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=alex.williamson@redhat.com \
    --cc=avi@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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).