Skip to contentSkip to conversation

docs: remove a special character to avoid html creation error.

PATCH In review Yi Sun 3 participants 11 messages Aug 4, 2017 – Aug 7, 2017

lore
Share & tools
lore

Yi Sun

author
#0 lore raw

PATCH 1/2 docs: remove a special character to avoid html creation error.

The '®' (a special character) may cause html document creation failure. So remove it from the feature document.

---
 docs/features/intel_psr_cat_cdp.pandoc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
docs/features/intel_psr_cat_cdp.pandoc +5 -2
index acf877b..04fb256 100644
@@ -1,5 +1,5 @@
 % Intel Cache Allocation Technology and Code and Data Prioritization Features
-% Revision 1.15
+% Revision 1.16
 
 \clearpage
 
@@ -438,7 +438,7 @@ N/A
 
 # References
 
-"INTEL� RESOURCE DIRECTOR TECHNOLOGY (INTEL� RDT) ALLOCATION FEATURES" [Intel� 64 and IA-32 Architectures Software Developer Manuals, vol3](http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html)
+"INTEL RESOURCE DIRECTOR TECHNOLOGY (INTEL RDT) ALLOCATION FEATURES" [Intel 64 and IA-32 Architectures Software Developer Manuals, vol3](http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html)
 
 # History
 
@@ -468,4 +468,7 @@ Date       Revision Version  Notes
                              1. Fix a typo.
 2017-08-01 1.15     Xen 4.10 Changes:
                              1. Add 'alt_type' in 'feat_props' structure.
+2017-08-04 1.16     Xen 4.10 Changes:
+                             1. Remove special character which may cause
+                                html creation failure.
 ---------- -------- -------- -------------------------------------------
Signature · 1 line
1.9.1

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#1 lore raw

PATCH 2/2 x86: remove an ASSERT to avoid crash when destroy a domain.

In 'psr_free_cos', we should not use 'ASSERT(socket_info)' because the 'socket_info' is allocated only if 'psr' boot parameter is set. So remove it and use 'psr_alloc_feat_enabled' to check if 'socket_info' is valid or not to avoid crash.

---
 xen/arch/x86/psr.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
xen/arch/x86/psr.c +1 -3
index 7d9fa26..13c0daa 100644
@@ -1294,9 +1294,7 @@ static void psr_free_cos(struct domain *d)
 {
     unsigned int socket, cos;
 
-    ASSERT(socket_info);
-
-    if ( !d->arch.psr_cos_ids )
+    if ( !d->arch.psr_cos_ids || !psr_alloc_feat_enabled() )
         return;
 
     /* Domain is destroyed so its cos_ref should be decreased. */
Signature · 7 lines
1.9.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Tested-by Acked-by on v1 1/2
#10 lore raw
In reply to Yi Sun
Quoted 2 lines · Yi Sun

The '®' (a special character) may cause html document creation failure. So remove it from the feature document.

Not sure how you tested it but the original error was found by pandoc.

Quoted 2 lines

Change looks good:

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw

Re: [Patch for staging 2/2] x86: remove an ASSERT to avoid crash when destroy a domain.

In reply to Yi Sun

xen/arch/x86/psr.c static void psr_free_cos(struct domain *d) · line 1298

Quoted 12 lines
Quoted 1 line
Quoted 1 line

Yi Sun <[email protected]> 08/04/17 11:45 AM >>>

xen/arch/x86/psr.c +1 -3
@@ -1294,9 +1294,7 @@ static void psr_free_cos(struct domain *d)
 {
 unsigned int socket, cos;
 
- ASSERT(socket_info);
-
-    if ( !d->arch.psr_cos_ids )
+    if ( !d->arch.psr_cos_ids || !psr_alloc_feat_enabled() )
 return;

Isn't it rather that you want to move the ASSERT() past this check? I don't see why you need both checks, as d->arch.psr_cos_ids is only being allocated if psr_alloc_feat_enabled() returns true.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#3 lore raw

PATCH 1/1 x86: remove an ASSERT to avoid crash when destroy a domain.

In reply to Yi Sun

In 'psr_free_cos', we should not use 'ASSERT(socket_info)' because the 'socket_info' is allocated only if 'psr' boot parameter is set. So remove it and use 'psr_alloc_feat_enabled' to check if 'socket_info' is valid or not to avoid crash.

---
 xen/arch/x86/psr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/x86/psr.c +2 -2
index 7d9fa26..9ce8f17 100644
@@ -1294,11 +1294,11 @@ static void psr_free_cos(struct domain *d)
 {
     unsigned int socket, cos;
 
-    ASSERT(socket_info);
-
     if ( !d->arch.psr_cos_ids )
         return;
 
+    ASSERT(socket_info);
+
     /* Domain is destroyed so its cos_ref should be decreased. */
     for ( socket = 0; socket < nr_sockets; socket++ )
     {
Signature · 7 lines
1.9.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#4 lore raw

Re: [PATCH] x86: remove an ASSERT to avoid crash when destroy a domain.

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Yi Sun <[email protected]> 08/05/17 3:42 AM >>>

In 'psr_free_cos', we should not use 'ASSERT(socket_info)' because the 'socket_info' is allocated only if 'psr' boot parameter is set. So remove it and use 'psr_alloc_feat_enabled' to check if 'socket_info' is valid or not to avoid crash.

Title and description are no longer in line with the actual change.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#5 lore raw

Re: [PATCH] x86: remove an ASSERT to avoid crash when destroy a domain.

Quoted 8 lines · Jan Beulich
Quoted 5 lines
Quoted 1 line
Quoted 1 line

Yi Sun <[email protected]> 08/05/17 3:42 AM >>>

In 'psr_free_cos', we should not use 'ASSERT(socket_info)' because the 'socket_info' is allocated only if 'psr' boot parameter is set. So remove it and use 'psr_alloc_feat_enabled' to check if 'socket_info' is valid or not to avoid crash.

Title and description are no longer in line with the actual change.

Oh, sorry, my fault, too hurried to change these.

Quoted 1 line

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#6 lore raw

PATCH 2/2 x86: adjust place of an ASSERT to avoid crash when destroy a domain.

In reply to Yi Sun

In 'psr_free_cos', we should not use 'ASSERT(socket_info)' at the beginning because the 'socket_info' is allocated only if 'psr' boot parameter is set. So adjust its place to avoid crash.

---
 xen/arch/x86/psr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/x86/psr.c +2 -2
index 7d9fa26..9ce8f17 100644
@@ -1294,11 +1294,11 @@ static void psr_free_cos(struct domain *d)
 {
     unsigned int socket, cos;
 
-    ASSERT(socket_info);
-
     if ( !d->arch.psr_cos_ids )
         return;
 
+    ASSERT(socket_info);
+
     /* Domain is destroyed so its cos_ref should be decreased. */
     for ( socket = 0; socket < nr_sockets; socket++ )
     {
Signature · 7 lines
1.9.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Reviewed-by on v1 2/2
#7 lore raw

Re: [Patch for staging 2/2] x86: adjust place of an ASSERT to avoid crash when destroy a domain.

Quoted 6 lines
Quoted 1 line
Quoted 1 line

Yi Sun <[email protected]> 08/07/17 4:07 AM >>>

In 'psr_free_cos', we should not use 'ASSERT(socket_info)' at the beginning because the 'socket_info' is allocated only if 'psr' boot parameter is set. So adjust its place to avoid crash.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#8 lore raw

Re: [Patch for staging 2/2] x86: adjust place of an ASSERT to avoid crash when destroy a domain.

In reply to Yi Sun

Can we see about committing this patch as soon as possible? This is blocking osstest pushgate.

Quoted 35 lines · Yi Sun

In 'psr_free_cos', we should not use 'ASSERT(socket_info)' at the beginning because the 'socket_info' is allocated only if 'psr' boot parameter is set. So adjust its place to avoid crash.

---
 xen/arch/x86/psr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/x86/psr.c +2 -2
index 7d9fa26..9ce8f17 100644
@@ -1294,11 +1294,11 @@ static void psr_free_cos(struct domain *d)
 {
     unsigned int socket, cos;
 
-    ASSERT(socket_info);
-
     if ( !d->arch.psr_cos_ids )
         return;
 
+    ASSERT(socket_info);
+
     /* Domain is destroyed so its cos_ref should be decreased. */
     for ( socket = 0; socket < nr_sockets; socket++ )
     {
Signature · 7 lines
1.9.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#9 lore raw

Re: [Patch for staging 2/2] x86: adjust place of an ASSERT to avoid crash when destroy a domain.

Quoted 2 lines · Wei Liu

Can we see about committing this patch as soon as possible? This is blocking osstest pushgate.

Andrew prodded me on irc to commit this patch. I have done so, along with the doc patch.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel