Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Am 27.08.2012 08:28, schrieb Jan Kiszka:
> From: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
> 
> 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@xxxxxxxxxxx>
> ---
>  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...

> + *
> + * 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@xxxxxxxxxxxx)
> + *  Copyright (c) 2007, Neocleus, Guy Zana (guy@xxxxxxxxxxxx)
> + *  Copyright (C) 2008, Qumranet, Amit Shah (amit.shah@xxxxxxxxxxxx)
> + *  Copyright (C) 2008, Red Hat, Amit Shah (amit.shah@xxxxxxxxxx)
> + *  Copyright (C) 2008, IBM, Muli Ben-Yehuda (muli@xxxxxxxxxx)
> + */
> +#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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux