x86: convert BUG_ON()s to WARN_ON()s in read_descriptor()
PATCH 1/1 x86: convert BUG_ON()s to WARN_ON()s in read_descriptor()
In the light of AMD erratum #700, and given that these checks happen for debugging purposes only and also only in debug builds of the hypervisor, make the failures non-fatal.
xen/arch/x86/traps.c +2 -2
@@ -1544,11 +1544,11 @@ static int read_descriptor(unsigned int asmvolatile ("larl %2,%0 ; setz %1" :"=r" (a),"=qm" (valid) :"rm" (sel)); -BUG_ON (valid && ((a &0x00f0ff00 ) != *ar)); +WARN_ON (valid && ((a &0x00f0ff00 ) != *ar)); asmvolatile ("lsll %2,%0 ; setz %1" :"=r" (l),"=qm" (valid) :"rm" (sel)); - BUG_ON(valid && (l != *limit)); + WARN_ON(valid && (l != *limit)); }#endif }
x86: convert BUG_ON()s to WARN_ON()s in read_descriptor()
In the light of AMD erratum #700, and given that these checks happen for debugging purposes only and also only in debug builds of the hypervisor, make the failures non-fatal.
xen/arch/x86/traps.c +2 -2
@@ -1544,11 +1544,11 @@ static int read_descriptor(unsigned int asmvolatile ("larl %2,%0 ; setz %1" :"=r" (a),"=qm" (valid) :"rm" (sel)); -BUG_ON (valid && ((a &0x00f0ff00 ) != *ar)); +WARN_ON (valid && ((a &0x00f0ff00 ) != *ar)); asmvolatile ("lsll %2,%0 ; setz %1" :"=r" (l),"=qm" (valid) :"rm" (sel)); - BUG_ON(valid && (l != *limit)); + WARN_ON(valid && (l != *limit)); }#endif }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 5 lines · Jan Beulich
In the light of AMD erratum #700, and given that these checks happen for debugging purposes only and also only in debug builds of the hypervisor, make the failures non-fatal.
Signed-off-by Jan Beulich <[email protected]>
Is this erratum published?
Quoted 23 lines
xen/arch/x86/traps.c +2
-2@@ -1544,11 +1544,11 @@ static int read_descriptor(unsigned int asmvolatile ("larl %2,%0 ; setz %1" :"=r" (a),"=qm" (valid) :"rm" (sel)); -BUG_ON (valid && ((a &0x00f0ff00 ) != *ar)); +WARN_ON (valid && ((a &0x00f0ff00 ) != *ar)); asmvolatile ("lsll %2,%0 ; setz %1" :"=r" (l),"=qm" (valid) :"rm" (sel)); - BUG_ON(valid && (l != *limit)); + WARN_ON(valid && (l != *limit)); }#endif }_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 10 lines
Quoted 1 line
Quoted 1 line · Keir Fraser
Quoted 5 lines · Jan Beulich
In the light of AMD erratum #700, and given that these checks happen for debugging purposes only and also only in debug builds of the hypervisor, make the failures non-fatal.
Signed-off-by Jan Beulich <[email protected]>Is this erratum published?
Yes, it is in their most recent public revision guide.
Jan
Quoted 23 lines
Quoted 23 lines
xen/arch/x86/traps.c +2
-2@@ -1544,11 +1544,11 @@ static int read_descriptor(unsigned int asmvolatile ("larl %2,%0 ; setz %1" :"=r" (a),"=qm" (valid) :"rm" (sel)); -BUG_ON (valid && ((a &0x00f0ff00 ) != *ar)); +WARN_ON (valid && ((a &0x00f0ff00 ) != *ar)); asmvolatile ("lsll %2,%0 ; setz %1" :"=r" (l),"=qm" (valid) :"rm" (sel)); - BUG_ON(valid && (l != *limit)); + WARN_ON(valid && (l != *limit)); }#endif }_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 7 lines · Jan Beulich
Quoted 7 lines
Quoted 1 line
Quoted 1 line · Keir Fraser
Quoted 4 lines · Jan Beulich
In the light of AMD erratum #700, and given that these checks happen for debugging purposes only and also only in debug builds of the hypervisor, make the failures non-fatal.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Jan Beulich <[email protected]>Is this erratum published?
Yes, it is in their most recent public revision guide.
Do you have a link? I can't find a published erratum > #686.
-- Keir
Quoted 28 lines
Jan
Quoted 23 lines
Quoted 23 lines
xen/arch/x86/traps.c +2
-2@@ -1544,11 +1544,11 @@ static int read_descriptor(unsigned int asmvolatile ("larl %2,%0 ; setz %1" :"=r" (a),"=qm" (valid) :"rm" (sel)); -BUG_ON (valid && ((a &0x00f0ff00 ) != *ar)); +WARN_ON (valid && ((a &0x00f0ff00 ) != *ar)); asmvolatile ("lsll %2,%0 ; setz %1" :"=r" (l),"=qm" (valid) :"rm" (sel)); - BUG_ON(valid && (l != *limit)); + WARN_ON(valid && (l != *limit)); }#endif }_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 3 lines · Jan Beulich
In the light of AMD erratum #700, and given that these checks happen for debugging purposes only and also only in debug builds of the hypervisor, make the failures non-fatal.
I think the changeset comment should have a brief description of erratum #700. I also some reference should be made in a comment above the first WARN_ON, explaining why they are now WARN_Ons (again, with reference to #700 and its symptoms).
Apart from that:
Quoted 25 lines
Signed-off-by Jan Beulich <[email protected]>xen/arch/x86/traps.c +2
-2@@ -1544,11 +1544,11 @@ static int read_descriptor(unsigned int asmvolatile ("larl %2,%0 ; setz %1" :"=r" (a),"=qm" (valid) :"rm" (sel)); -BUG_ON (valid && ((a &0x00f0ff00 ) != *ar)); +WARN_ON (valid && ((a &0x00f0ff00 ) != *ar)); asmvolatile ("lsll %2,%0 ; setz %1" :"=r" (l),"=qm" (valid) :"rm" (sel)); - BUG_ON(valid && (l != *limit)); + WARN_ON(valid && (l != *limit)); }#endif }_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 9 lines
Quoted 1 line
Quoted 1 line · Keir Fraser
Quoted 3 lines · Jan Beulich
In the light of AMD erratum #700, and given that these checks happen for debugging purposes only and also only in debug builds of the hypervisor, make the failures non-fatal.
I think the changeset comment should have a brief description of erratum #700.
I'd do this, but ...
Quoted 3 lines
I also some reference should be made in a comment above the first
WARN_ON, explaining why they are nowWARN_Ons(again, with reference to #700 and its symptoms).
... I now think that these should never have been BUG_ON()s in the first place (despite probably having been the one who introduced them).
Additionally, on a second look, check_descriptor() would not allow any of the affected selector types to be installed into a descriptor table, and we clearly don't put in any such descriptors ourselves, so from the perspective of the erratum we're okay without the patch.
So if you prefer them to stay BUG_ON(), I think I'll just withdraw the patch.
Jan
Quoted 28 lines
Apart from that:
Acked-by Keir Fraser <[email protected]>Quoted 25 lines
Signed-off-by Jan Beulich <[email protected]>xen/arch/x86/traps.c +2
-2@@ -1544,11 +1544,11 @@ static int read_descriptor(unsigned int asmvolatile ("larl %2,%0 ; setz %1" :"=r" (a),"=qm" (valid) :"rm" (sel)); -BUG_ON (valid && ((a &0x00f0ff00 ) != *ar)); +WARN_ON (valid && ((a &0x00f0ff00 ) != *ar)); asmvolatile ("lsll %2,%0 ; setz %1" :"=r" (l),"=qm" (valid) :"rm" (sel)); - BUG_ON(valid && (l != *limit)); + WARN_ON(valid && (l != *limit)); }#endif }_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 20 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · Keir Fraser
Quoted 3 lines · Jan Beulich
In the light of AMD erratum #700, and given that these checks happen for debugging purposes only and also only in debug builds of the hypervisor, make the failures non-fatal.
I think the changeset comment should have a brief description of erratum #700.
I'd do this, but ...
Quoted 3 lines
I also some reference should be made in a comment above the first
WARN_ON, explaining why they are nowWARN_Ons(again, with reference to #700 and its symptoms).... I now think that these should never have been BUG_ON()s in the first place (despite probably having been the one who introduced them).
Quoted 7 lines
Additionally, on a second look,
check_descriptor()would not allow any of the affected selector types to be installed into a descriptor table, and we clearly don't put in any such descriptors ourselves, so from the perspective of the erratum we're okay without the patch.So if you prefer them to stay
BUG_ON(), I think I'll just withdraw the patch.
If the erratum cannot affect us then they may as well stay as BUG_ON and we sidestep the whole thing.
-- Keir
Quoted 33 lines
Jan
Quoted 28 lines
Apart from that:
Acked-by Keir Fraser <[email protected]>Quoted 25 lines
Signed-off-by Jan Beulich <[email protected]>xen/arch/x86/traps.c +2
-2@@ -1544,11 +1544,11 @@ static int read_descriptor(unsigned int asmvolatile ("larl %2,%0 ; setz %1" :"=r" (a),"=qm" (valid) :"rm" (sel)); -BUG_ON (valid && ((a &0x00f0ff00 ) != *ar)); +WARN_ON (valid && ((a &0x00f0ff00 ) != *ar)); asmvolatile ("lsll %2,%0 ; setz %1" :"=r" (l),"=qm" (valid) :"rm" (sel)); - BUG_ON(valid && (l != *limit)); + WARN_ON(valid && (l != *limit)); }#endif }_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hi Keir,
The public errata doc has been updated. You can find Erratum 700 info using the following steps:
1. Go to http://support.amd.com/us/psearch/Pages/psearch.aspx?type=2.7
2. Search with Product Type = "Processor", Product = "Any", Keyword = "Revision Guide".
3. Click on Technical Documents tab and 33610 is the one you are looking for.
Hope this helps...
-Wei
Quoted 70 lines · Keir Fraser
Quoted 17 lines · Jan Beulich
Quoted 8 lines
Quoted 1 line
Quoted 1 line · Keir Fraser
Quoted 3 lines · Jan Beulich
In the light of AMD erratum #700, and given that these checks happen for debugging purposes only and also only in debug builds of the hypervisor, make the failures non-fatal.
I think the changeset comment should have a brief description of erratum #700.
I'd do this, but ...
Quoted 3 lines
I also some reference should be made in a comment above the first
WARN_ON, explaining why they are nowWARN_Ons(again, with reference to #700 and its symptoms).... I now think that these should never have been BUG_ON()s in the first place (despite probably having been the one who introduced them).
Quoted 7 lines
Additionally, on a second look,
check_descriptor()would not allow any of the affected selector types to be installed into a descriptor table, and we clearly don't put in any such descriptors ourselves, so from the perspective of the erratum we're okay without the patch.So if you prefer them to stay
BUG_ON(), I think I'll just withdraw the patch.If the erratum cannot affect us then they may as well stay as
BUG_ONand we sidestep the whole thing.-- Keir
Quoted 26 lines
Jan
Quoted 24 lines
Apart from that:
Acked-by Keir Fraser<[email protected]>Quoted 21 lines
Signed-off-by Jan Beulich<[email protected]>xen/arch/x86/traps.c +2
-2@@ -1544,11 +1544,11 @@ static int read_descriptor(unsigned int asmvolatile ("larl %2,%0 ; setz %1" :"=r" (a),"=qm" (valid) :"rm" (sel)); -BUG_ON (valid&& ((a&0x00f0ff00 ) != *ar)); +WARN_ON (valid&& ((a&0x00f0ff00 ) != *ar)); asmvolatile ("lsll %2,%0 ; setz %1" :"=r" (l),"=qm" (valid) :"rm" (sel)); - BUG_ON(valid&& (l != *limit)); + WARN_ON(valid&& (l != *limit)); }#endif }Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel