All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amit Shah <amit.shah@redhat.com>
To: kvm-ia64@vger.kernel.org
Subject: Re: [PATCH 2/8]kvm: Moving device_assignment logic to kvm_main.c
Date: Fri, 03 Oct 2008 07:21:54 +0000	[thread overview]
Message-ID: <200810031239.54863.amit.shah@redhat.com> (raw)
In-Reply-To: <42DFA526FC41B1429CE7279EF83C6BDC01A53DF4@pdsmsx415.ccr.corp.intel.com>

* On Monday 29 Sep 2008 10:56:29 Zhang, Xiantao wrote:
> From: Xiantao Zhang <xiantao.zhang@intel.com>
> Date: Sat, 27 Sep 2008 10:59:36 +0800
> Subject: [PATCH] kvm: Moving device_assignment logic to kvm_main.c
>
> To share with other archs, this patch moves device_assignment
> logic to common parts.
> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>

> diff --git a/include/linux/kvm.h b/include/linux/kvm.h
> index 4269be1..9acf34a 100644
> --- a/include/linux/kvm.h
> +++ b/include/linux/kvm.h
> @@ -383,7 +383,9 @@ struct kvm_trace_rec {
>  #define KVM_CAP_MP_STATE 14
>  #define KVM_CAP_COALESCED_MMIO 15
>  #define KVM_CAP_SYNC_MMU 16  /* Changes to host mmap are reflected in
> guest */
> +#ifdef CONFIG_X86
>  #define KVM_CAP_DEVICE_ASSIGNMENT 17
> +#endif

I didn't see this changed to also accomodate IA64 in the patchset.

>  /*
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index 73b7c52..10c1146 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -281,6 +281,7 @@ void kvm_free_physmem(struct kvm *kvm);
>
>  struct  kvm *kvm_arch_create_vm(void);
>  void kvm_arch_destroy_vm(struct kvm *kvm);
> +void kvm_free_all_assigned_devices(struct kvm *kvm);
>
>  int kvm_cpu_get_interrupt(struct kvm_vcpu *v);
>  int kvm_cpu_has_interrupt(struct kvm_vcpu *v);
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 6cf0427..59e08a4 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -51,6 +51,12 @@
>  #include "coalesced_mmio.h"
>  #endif
>
> +#ifdef KVM_CAP_DEVICE_ASSIGNMENT
> +#include <linux/pci.h>
> +#include <linux/interrupt.h>
> +#include "irq.h"
> +#endif
> +
>  MODULE_AUTHOR("Qumranet");
>  MODULE_LICENSE("GPL");
>
> @@ -71,6 +77,240 @@ static long kvm_vcpu_ioctl(struct file *file,
> unsigned int ioctl,
>
>  bool kvm_rebooting;
>
> +#ifdef KVM_CAP_DEVICE_ASSIGNMENT

Since you're doing this, you should also put the kvm_free_all_assigned_devices 
in the #ifdef for x86.

WARNING: multiple messages have this Message-ID (diff)
From: Amit Shah <amit.shah@redhat.com>
To: "Zhang, Xiantao" <xiantao.zhang@intel.com>
Cc: kvm@vger.kernel.org, kvm-ia64@vger.kernel.org, avi@redhat.com
Subject: Re: [PATCH 2/8]kvm: Moving device_assignment logic to kvm_main.c
Date: Fri, 3 Oct 2008 12:39:54 +0530	[thread overview]
Message-ID: <200810031239.54863.amit.shah@redhat.com> (raw)
In-Reply-To: <42DFA526FC41B1429CE7279EF83C6BDC01A53DF4@pdsmsx415.ccr.corp.intel.com>

* On Monday 29 Sep 2008 10:56:29 Zhang, Xiantao wrote:
> From: Xiantao Zhang <xiantao.zhang@intel.com>
> Date: Sat, 27 Sep 2008 10:59:36 +0800
> Subject: [PATCH] kvm: Moving device_assignment logic to kvm_main.c
>
> To share with other archs, this patch moves device_assignment
> logic to common parts.
> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>

> diff --git a/include/linux/kvm.h b/include/linux/kvm.h
> index 4269be1..9acf34a 100644
> --- a/include/linux/kvm.h
> +++ b/include/linux/kvm.h
> @@ -383,7 +383,9 @@ struct kvm_trace_rec {
>  #define KVM_CAP_MP_STATE 14
>  #define KVM_CAP_COALESCED_MMIO 15
>  #define KVM_CAP_SYNC_MMU 16  /* Changes to host mmap are reflected in
> guest */
> +#ifdef CONFIG_X86
>  #define KVM_CAP_DEVICE_ASSIGNMENT 17
> +#endif

I didn't see this changed to also accomodate IA64 in the patchset.

>  /*
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index 73b7c52..10c1146 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -281,6 +281,7 @@ void kvm_free_physmem(struct kvm *kvm);
>
>  struct  kvm *kvm_arch_create_vm(void);
>  void kvm_arch_destroy_vm(struct kvm *kvm);
> +void kvm_free_all_assigned_devices(struct kvm *kvm);
>
>  int kvm_cpu_get_interrupt(struct kvm_vcpu *v);
>  int kvm_cpu_has_interrupt(struct kvm_vcpu *v);
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 6cf0427..59e08a4 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -51,6 +51,12 @@
>  #include "coalesced_mmio.h"
>  #endif
>
> +#ifdef KVM_CAP_DEVICE_ASSIGNMENT
> +#include <linux/pci.h>
> +#include <linux/interrupt.h>
> +#include "irq.h"
> +#endif
> +
>  MODULE_AUTHOR("Qumranet");
>  MODULE_LICENSE("GPL");
>
> @@ -71,6 +77,240 @@ static long kvm_vcpu_ioctl(struct file *file,
> unsigned int ioctl,
>
>  bool kvm_rebooting;
>
> +#ifdef KVM_CAP_DEVICE_ASSIGNMENT

Since you're doing this, you should also put the kvm_free_all_assigned_devices 
in the #ifdef for x86.

  reply	other threads:[~2008-10-03  7:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-29  5:26 [PATCH 2/8]kvm: Moving device_assignment logic to kvm_main.c Zhang, Xiantao
2008-09-29  5:26 ` Zhang, Xiantao
2008-10-03  7:09 ` Amit Shah [this message]
2008-10-03  7:21   ` Amit Shah
2008-10-03  7:32 ` Zhang, Xiantao
2008-10-03  7:32   ` Zhang, Xiantao
2008-10-03  7:42   ` Amit Shah
2008-10-03  7:54     ` Amit Shah
2008-10-03 14:04 ` Zhang, Xiantao
2008-10-03 14:04   ` Zhang, Xiantao
2008-10-03 14:12   ` Amit Shah
2008-10-03 14:24     ` Amit Shah
2008-10-05  9:39 ` Avi Kivity
2008-10-05  9:39   ` Avi Kivity
2008-10-06  3:15 ` Zhang, Xiantao
2008-10-06  3:15   ` Zhang, Xiantao
2008-10-07 13:16 ` Avi Kivity
2008-10-07 13:16   ` Avi Kivity
2008-10-07 23:52 ` Zhang, Xiantao
2008-10-07 23:52   ` Zhang, Xiantao

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=200810031239.54863.amit.shah@redhat.com \
    --to=amit.shah@redhat.com \
    --cc=kvm-ia64@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.