* [PATCH] KVM: Drop CONFIG_DMAR dependency around kvm_iommu_map_pages
@ 2010-10-18 13:38 Jan Kiszka
2010-10-18 13:48 ` Roedel, Joerg
0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2010-10-18 13:38 UTC (permalink / raw)
To: Avi Kivity, Marcelo Tosatti; +Cc: kvm, Joerg Roedel
We also have to call kvm_iommu_map_pages for CONFIG_AMD_IOMMU. So drop
the dependency on Intel IOMMU, kvm_iommu_map_pages will be a nop anyway
if CONFIG_IOMMU_API is not defined.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
virt/kvm/kvm_main.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 1aeeb7f..ac326de 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -705,14 +705,12 @@ skip_lpage:
if (r)
goto out_free;
-#ifdef CONFIG_DMAR
/* map the pages in iommu page table */
if (npages) {
r = kvm_iommu_map_pages(kvm, &new);
if (r)
goto out_free;
}
-#endif
r = -ENOMEM;
slots = kzalloc(sizeof(struct kvm_memslots), GFP_KERNEL);
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: Drop CONFIG_DMAR dependency around kvm_iommu_map_pages
2010-10-18 13:38 [PATCH] KVM: Drop CONFIG_DMAR dependency around kvm_iommu_map_pages Jan Kiszka
@ 2010-10-18 13:48 ` Roedel, Joerg
2010-10-18 14:34 ` Jan Kiszka
0 siblings, 1 reply; 5+ messages in thread
From: Roedel, Joerg @ 2010-10-18 13:48 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Avi Kivity, Marcelo Tosatti, kvm
On Mon, Oct 18, 2010 at 09:38:40AM -0400, Jan Kiszka wrote:
> We also have to call kvm_iommu_map_pages for CONFIG_AMD_IOMMU. So drop
> the dependency on Intel IOMMU, kvm_iommu_map_pages will be a nop anyway
> if CONFIG_IOMMU_API is not defined.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Joerg Roedel <joerg.roedel@amd.com>
Is this also a -stable candidate?
> ---
> virt/kvm/kvm_main.c | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 1aeeb7f..ac326de 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -705,14 +705,12 @@ skip_lpage:
> if (r)
> goto out_free;
>
> -#ifdef CONFIG_DMAR
> /* map the pages in iommu page table */
> if (npages) {
> r = kvm_iommu_map_pages(kvm, &new);
> if (r)
> goto out_free;
> }
> -#endif
>
> r = -ENOMEM;
> slots = kzalloc(sizeof(struct kvm_memslots), GFP_KERNEL);
> --
> 1.7.1
>
--
AMD Operating System Research Center
Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: Drop CONFIG_DMAR dependency around kvm_iommu_map_pages
2010-10-18 13:48 ` Roedel, Joerg
@ 2010-10-18 14:34 ` Jan Kiszka
2010-10-18 14:55 ` Roedel, Joerg
0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2010-10-18 14:34 UTC (permalink / raw)
To: Roedel, Joerg; +Cc: Avi Kivity, Marcelo Tosatti, kvm
Am 18.10.2010 15:48, Roedel, Joerg wrote:
> On Mon, Oct 18, 2010 at 09:38:40AM -0400, Jan Kiszka wrote:
>> We also have to call kvm_iommu_map_pages for CONFIG_AMD_IOMMU. So drop
>> the dependency on Intel IOMMU, kvm_iommu_map_pages will be a nop anyway
>> if CONFIG_IOMMU_API is not defined.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>
> Acked-by: Joerg Roedel <joerg.roedel@amd.com>
>
> Is this also a -stable candidate?
I can't seriously judge as I was not able to test its effect on real
hardware.
The patch seems to apply (with mechanical adjustments) down to 2.6.32.
If it is considered for stable, it will also take [1] to avoid build
breakage without CONFIG_IOMMU_API.
Jan
[1] http://thread.gmane.org/gmane.comp.emulators.kvm.devel/60954
>
>> ---
>> virt/kvm/kvm_main.c | 2 --
>> 1 files changed, 0 insertions(+), 2 deletions(-)
>>
>> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
>> index 1aeeb7f..ac326de 100644
>> --- a/virt/kvm/kvm_main.c
>> +++ b/virt/kvm/kvm_main.c
>> @@ -705,14 +705,12 @@ skip_lpage:
>> if (r)
>> goto out_free;
>>
>> -#ifdef CONFIG_DMAR
>> /* map the pages in iommu page table */
>> if (npages) {
>> r = kvm_iommu_map_pages(kvm, &new);
>> if (r)
>> goto out_free;
>> }
>> -#endif
>>
>> r = -ENOMEM;
>> slots = kzalloc(sizeof(struct kvm_memslots), GFP_KERNEL);
>> --
>> 1.7.1
>>
>
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: Drop CONFIG_DMAR dependency around kvm_iommu_map_pages
2010-10-18 14:34 ` Jan Kiszka
@ 2010-10-18 14:55 ` Roedel, Joerg
2010-10-19 12:58 ` Marcelo Tosatti
0 siblings, 1 reply; 5+ messages in thread
From: Roedel, Joerg @ 2010-10-18 14:55 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Avi Kivity, Marcelo Tosatti, kvm
On Mon, Oct 18, 2010 at 10:34:01AM -0400, Jan Kiszka wrote:
> Am 18.10.2010 15:48, Roedel, Joerg wrote:
> > On Mon, Oct 18, 2010 at 09:38:40AM -0400, Jan Kiszka wrote:
> >> We also have to call kvm_iommu_map_pages for CONFIG_AMD_IOMMU. So drop
> >> the dependency on Intel IOMMU, kvm_iommu_map_pages will be a nop anyway
> >> if CONFIG_IOMMU_API is not defined.
> >>
> >> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >
> > Acked-by: Joerg Roedel <joerg.roedel@amd.com>
> >
> > Is this also a -stable candidate?
>
> I can't seriously judge as I was not able to test its effect on real
> hardware.
>
> The patch seems to apply (with mechanical adjustments) down to 2.6.32.
> If it is considered for stable, it will also take [1] to avoid build
> breakage without CONFIG_IOMMU_API.
>
> Jan
>
> [1] http://thread.gmane.org/gmane.comp.emulators.kvm.devel/60954
Looks trivial enough. I would consider both patches as -stable material.
Joerg
--
AMD Operating System Research Center
Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: Drop CONFIG_DMAR dependency around kvm_iommu_map_pages
2010-10-18 14:55 ` Roedel, Joerg
@ 2010-10-19 12:58 ` Marcelo Tosatti
0 siblings, 0 replies; 5+ messages in thread
From: Marcelo Tosatti @ 2010-10-19 12:58 UTC (permalink / raw)
To: Roedel, Joerg; +Cc: Jan Kiszka, Avi Kivity, kvm
On Mon, Oct 18, 2010 at 04:55:57PM +0200, Roedel, Joerg wrote:
> On Mon, Oct 18, 2010 at 10:34:01AM -0400, Jan Kiszka wrote:
> > Am 18.10.2010 15:48, Roedel, Joerg wrote:
> > > On Mon, Oct 18, 2010 at 09:38:40AM -0400, Jan Kiszka wrote:
> > >> We also have to call kvm_iommu_map_pages for CONFIG_AMD_IOMMU. So drop
> > >> the dependency on Intel IOMMU, kvm_iommu_map_pages will be a nop anyway
> > >> if CONFIG_IOMMU_API is not defined.
> > >>
> > >> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> > >
> > > Acked-by: Joerg Roedel <joerg.roedel@amd.com>
> > >
> > > Is this also a -stable candidate?
> >
> > I can't seriously judge as I was not able to test its effect on real
> > hardware.
> >
> > The patch seems to apply (with mechanical adjustments) down to 2.6.32.
> > If it is considered for stable, it will also take [1] to avoid build
> > breakage without CONFIG_IOMMU_API.
> >
> > Jan
> >
> > [1] http://thread.gmane.org/gmane.comp.emulators.kvm.devel/60954
>
> Looks trivial enough. I would consider both patches as -stable material.
>
> Joerg
Applied both with stable tag, thanks Jan.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-10-19 13:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-18 13:38 [PATCH] KVM: Drop CONFIG_DMAR dependency around kvm_iommu_map_pages Jan Kiszka
2010-10-18 13:48 ` Roedel, Joerg
2010-10-18 14:34 ` Jan Kiszka
2010-10-18 14:55 ` Roedel, Joerg
2010-10-19 12:58 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox