public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: "Roedel, Joerg" <Joerg.Roedel@amd.com>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: Drop CONFIG_DMAR dependency around kvm_iommu_map_pages
Date: Mon, 18 Oct 2010 16:34:01 +0200	[thread overview]
Message-ID: <4CBC5AD9.209@siemens.com> (raw)
In-Reply-To: <20101018134821.GA21383@amd.com>

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

  reply	other threads:[~2010-10-18 14:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2010-10-18 14:55     ` Roedel, Joerg
2010-10-19 12:58       ` Marcelo Tosatti

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=4CBC5AD9.209@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=Joerg.Roedel@amd.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.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