From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ian Campbell <Ian.Campbell@eu.citrix.com>
Cc: Jan,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Beulich <JBeulich@novell.com>
Subject: Re: [PATCH 7 of 7] KEXEC: correctly revert x2apic state when kexecing [Reformatted, v2]
Date: Wed, 15 Jun 2011 17:03:59 +0100 [thread overview]
Message-ID: <4DF8D7EF.8050208@citrix.com> (raw)
In-Reply-To: <1308153010.17937.212.camel@zakaz.uk.xensource.com>
[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]
On 15/06/11 16:50, Ian Campbell wrote:
> On Wed, 2011-06-15 at 16:41 +0100, Andrew Cooper wrote:
>> Tweaked the patch to prevent IOMMU_WAIT_OP panicking on the kexec path.
>> Unfortunately, this has to rely on the kexecing variable.
>>
>> As with the other hacks in this patch, I cant see a better way of
>> solving the problem.
>>
>
>> @@ -99,8 +100,9 @@ do {
>> if ( cond ) \
>> break; \
>> if ( NOW() > start_time + DMAR_OPERATION_TIMEOUT ) \
>> - panic("%s:%d:%s: DMAR hardware is malfunctional\n", \
>> - __FILE__, __LINE__, __func__); \
>> + if ( !kexecing ) \
>> + panic("%s:%d:%s: DMAR hardware is malfunctional\n",\
>> + __FILE__, __LINE__, __func__); \
>> cpu_relax(); \
>> } \
>> } while (0)
> I think you want an "else break" here to cause it to struggle onwards
> rather than the infinite loop you get otherwise.
>
> Ian
Yep - Fixed and reformatted against staging again.
--
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com
[-- Attachment #2: kexec-prevent-panic.patch --]
[-- Type: text/x-patch, Size: 1540 bytes --]
KEXEC: prevent panic on the kexec path when talking to the DMAR hardware
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff -r 23c068b10923 xen/drivers/passthrough/vtd/dmar.h
--- a/xen/drivers/passthrough/vtd/dmar.h Wed Jun 15 16:16:41 2011 +0100
+++ b/xen/drivers/passthrough/vtd/dmar.h Wed Jun 15 16:57:39 2011 +0100
@@ -23,6 +23,7 @@
#include <xen/list.h>
#include <xen/iommu.h>
+#include <xen/kexec.h>
/* This one is for interrupt remapping */
struct acpi_ioapic_unit {
@@ -98,9 +99,13 @@ do {
sts = op(iommu->reg, offset); \
if ( cond ) \
break; \
- if ( NOW() > start_time + DMAR_OPERATION_TIMEOUT ) \
- panic("%s:%d:%s: DMAR hardware is malfunctional\n", \
- __FILE__, __LINE__, __func__); \
+ if ( NOW() > start_time + DMAR_OPERATION_TIMEOUT ) { \
+ if ( !kexecing ) \
+ panic("%s:%d:%s: DMAR hardware is malfunctional\n",\
+ __FILE__, __LINE__, __func__); \
+ else \
+ break; \
+ } \
cpu_relax(); \
} \
} while (0)
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
prev parent reply other threads:[~2011-06-15 16:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-15 9:26 [PATCH 7 of 7] KEXEC: correctly revert x2apic state when kexecing Jan Beulich
2011-06-15 9:40 ` Andrew Cooper
2011-06-15 10:14 ` Jan Beulich
2011-06-15 10:36 ` Andrew Cooper
2011-06-15 10:44 ` Jan Beulich
2011-06-15 11:59 ` Andrew Cooper
2011-06-15 15:41 ` [PATCH 7 of 7] KEXEC: correctly revert x2apic state when kexecing [Reformatted] Andrew Cooper
2011-06-15 15:50 ` Ian Campbell
2011-06-15 16:03 ` Andrew Cooper [this message]
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=4DF8D7EF.8050208@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@eu.citrix.com \
--cc=JBeulich@novell.com \
--cc=xen-devel@lists.xensource.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 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.