All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel@lists.xenproject.org, Tim Deegan <tim@xen.org>
Subject: Re: [PATCH v2 1/4] xen: make logdirty and iommu mutually exclusive
Date: Thu, 24 Apr 2014 09:36:55 +0200	[thread overview]
Message-ID: <5358BF17.1030801@citrix.com> (raw)
In-Reply-To: <5357A9F9020000780000B491@nat28.tlf.novell.com>

On 23/04/14 11:54, Jan Beulich wrote:
>>>> On 23.04.14 at 10:16, <roger.pau@citrix.com> wrote:
>> --- a/xen/arch/x86/mm/hap/hap.c
>> +++ b/xen/arch/x86/mm/hap/hap.c
>> @@ -175,6 +175,15 @@ out:
>>   */
>>  static int hap_enable_log_dirty(struct domain *d, bool_t log_global)
>>  {
>> +
>> +    if ( iommu_enabled && need_iommu(d) && log_global )
> 
> need_iommu() implies iommu_enabled, and hence checking only the
> former ought to be sufficient.
> 
> Also, why do you do this here and in shadow code rather than in
> paging_log_dirty_enable()?

Sight... yes, much better place. Will change it in next version.

>> --- a/xen/drivers/passthrough/iommu.c
>> +++ b/xen/drivers/passthrough/iommu.c
>> @@ -292,7 +292,8 @@ static int assign_device(struct domain *d, u16 seg, u8 
>> bus, u8 devfn)
>>       * enabled for this domain */
>>      if ( unlikely(!need_iommu(d) &&
>>              (d->arch.hvm_domain.mem_sharing_enabled ||
>> -             d->mem_event->paging.ring_page)) )
>> +             d->mem_event->paging.ring_page ||
>> +             paging_mode_log_dirty(d))) )
> 
> I'm afraid that would return true also for non-global log dirty mode.
> This patch series
> http://lists.xenproject.org/archives/html/xen-devel/2014-04/msg02750.html
> (patch 1) introduces a way to know whether global mode is enabled
> - maybe you should base your series on top of that one?

Sure, this series are already on top of Mukesh p2m cleanup patches, I
don't mind rebasing it on top of your series also.

Roger.

  reply	other threads:[~2014-04-24  7:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-23  8:16 [PATCH v2 0/4] Fix grant map/unmap with auto-translated guests Roger Pau Monne
2014-04-23  8:16 ` [PATCH v2 1/4] xen: make logdirty and iommu mutually exclusive Roger Pau Monne
2014-04-23  9:54   ` Jan Beulich
2014-04-24  7:36     ` Roger Pau Monné [this message]
2014-04-24 11:57       ` Roger Pau Monné
2014-04-24 11:50   ` Tim Deegan
2014-04-23  8:16 ` [PATCH v2 2/4] iommu: set correct IOMMU entries when iommu_hap_pt_share == 0 Roger Pau Monne
2014-04-23  9:56   ` Jan Beulich
2014-04-24 11:52   ` Tim Deegan
2014-05-08 18:38   ` Konrad Rzeszutek Wilk
2014-04-23  8:16 ` [PATCH v2 3/4] amd-iommu: disable iommu_hap_pt_share with AMD IOMMUs Roger Pau Monne
2014-04-23  9:57   ` Jan Beulich
2014-04-23 10:04     ` Roger Pau Monné
2014-04-23 10:51       ` Jan Beulich
2014-04-23 14:31         ` Roger Pau Monné
2014-04-23 14:35           ` Jan Beulich
2014-04-23  8:16 ` [PATCH v2 4/4] xen: expose that grant table mappings update the IOMMU Roger Pau Monne
2014-04-23 10:00   ` Jan Beulich
2014-04-24  7:43     ` Roger Pau Monné
2014-04-24  8:23       ` Jan Beulich
2014-05-08 18:39         ` Konrad Rzeszutek Wilk
2014-05-09  6:32           ` Jan Beulich

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=5358BF17.1030801@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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.