xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Zhenzhong Duan <zhenzhong.duan@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Xen-Devel <xen-devel@lists.xen.org>,
	Shane Wang <shane.wang@intel.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Srinivas REDDY Eeda <srinivas.eeda@oracle.com>,
	Gang Wei <gang.wei@intel.com>
Subject: Re: [PATCH 2/2] x86/dmar: zap DMAR signature for dom0 once in TBOOT case
Date: Mon, 20 Aug 2018 16:40:08 +0800	[thread overview]
Message-ID: <eb563e2c-6f64-b553-595e-1cd0e875faf7@oracle.com> (raw)
In-Reply-To: <5B7A7C2702000078001DFCDF@prv1-mh.provo.novell.com>

On 2018/8/20 16:30, Jan Beulich wrote:
>>>> On 20.08.18 at 05:32, <zhenzhong.duan@oracle.com> wrote:
>> When TBOOT enabled, acpi_parse_dmar() zap a copy of DMAR table rather
>> than the real table, so make it controled by config option based on the
>> fact that we already have done the real zapping in tboot_parse_dmar_table().
> 
> Is this just a cosmetic change, or is there any harm done by the extra
> zapping?
Cosmetic change, I feel it isn't necessory to zap a copy of DMAR table 
which is freed later.

Thanks
Zhenzhong
> 
>> As said above, acpi_parse_dmar() doesn't zaps APCI DMAR signature in
>> real TXT heap table, fix the stale comments.
>>
>> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
>> ---
>>   xen/arch/x86/tboot.c               |    3 +--
>>   xen/drivers/passthrough/vtd/dmar.c |    2 ++
>>   2 files changed, 3 insertions(+), 2 deletions(-)
> 
> You've again failed to Cc maintainers (included now).
> 
> Jan
> 
>> --- a/xen/arch/x86/tboot.c
>> +++ b/xen/arch/x86/tboot.c
>> @@ -490,8 +490,7 @@ int __init tboot_parse_dmar_table(acpi_table_handler dmar_handler)
>>       rc = dmar_handler(dmar_table);
>>       xfree(dmar_table);
>>   
>> -    /* acpi_parse_dmar() zaps APCI DMAR signature in TXT heap table */
>> -    /* but dom0 will read real table, so must zap it there too */
>> +    /* Dom0 will read real DMAR table, so must zap it there */
>>       acpi_dmar_zap();
>>   
>>       return rc;
>> --- a/xen/drivers/passthrough/vtd/dmar.c
>> +++ b/xen/drivers/passthrough/vtd/dmar.c
>> @@ -866,8 +866,10 @@ static int __init acpi_parse_dmar(struct acpi_table_header *table)
>>       }
>>   
>>   out:
>> +#ifndef CONFIG_TBOOT
>>       /* Zap ACPI DMAR signature to prevent dom0 using vt-d HW. */
>>       acpi_dmar_zap();
>> +#endif
>>       return ret;
>>   }
>>   
> 
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-08-20  8:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-20  3:32 [PATCH 2/2] x86/dmar: zap DMAR signature for dom0 once in TBOOT case Zhenzhong Duan
2018-08-20  8:30 ` Jan Beulich
2018-08-20  8:40   ` Zhenzhong Duan [this message]
2018-08-20  8:44     ` Jan Beulich
2018-08-20  8:44   ` Andrew Cooper
2018-08-20  8:58     ` Zhenzhong Duan

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=eb563e2c-6f64-b553-595e-1cd0e875faf7@oracle.com \
    --to=zhenzhong.duan@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=gang.wei@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=shane.wang@intel.com \
    --cc=srinivas.eeda@oracle.com \
    --cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).