From: David Vrabel <david.vrabel@citrix.com>
To: Jonathan Creekmore <jonathan.creekmore@gmail.com>,
xen-devel@lists.xenproject.org
Cc: andrew.cooper3@citrix.com, keir@xen.org, david.vrabel@citrix.com,
jbeulich@suse.com
Subject: Re: [PATCH] x86: wrap kexec feature with CONFIG_KEXEC
Date: Thu, 27 Aug 2015 16:27:19 +0100 [thread overview]
Message-ID: <55DF2C57.8030100@citrix.com> (raw)
In-Reply-To: <1440686870-19104-1-git-send-email-jonathan.creekmore@gmail.com>
On 27/08/15 15:47, Jonathan Creekmore wrote:
> Add the appropriate #if checks around the kexec code in the x86 codebase
> so that the feature can actually be turned off by the flag instead of
> always required to be enabled on x86.
What's your use case for this?
I think you should consider providing empty stub functions for !KEXEC
instead of all the #ifdefs.
> --- a/xen/drivers/passthrough/vtd/dmar.h
> +++ b/xen/drivers/passthrough/vtd/dmar.h
> @@ -108,6 +108,7 @@ struct acpi_atsr_unit *acpi_find_matched_atsr_unit(const struct pci_dev *);
>
> #define DMAR_OPERATION_TIMEOUT MILLISECS(1000)
>
> +#ifdef CONFIG_KEXEC
> #define IOMMU_WAIT_OP(iommu, offset, op, cond, sts) \
> do { \
> s_time_t start_time = NOW(); \
> @@ -125,6 +126,22 @@ do { \
> cpu_relax(); \
> } \
> } while (0)
> +#else
> +#define IOMMU_WAIT_OP(iommu, offset, op, cond, sts) \
> +do { \
> + s_time_t start_time = NOW(); \
> + while (1) { \
> + sts = op(iommu->reg, offset); \
> + if ( cond ) \
> + break; \
> + if ( NOW() > start_time + DMAR_OPERATION_TIMEOUT ) { \
> + panic("%s:%d:%s: DMAR hardware is malfunctional", \
> + __FILE__, __LINE__, __func__); \
> + } \
> + cpu_relax(); \
> + } \
> +} while (0)
> +#endif
This is particular might be best done by making kexecing a static const
variable equal to 0 in the !KEXEC case.
> --- a/xen/include/asm-x86/config.h
> +++ b/xen/include/asm-x86/config.h
> @@ -1,6 +1,6 @@
> /******************************************************************************
> * config.h
> - *
> + *
> * A Linux-style configuration list.
> */
Stray whitespace change.
David
next prev parent reply other threads:[~2015-08-27 15:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-27 14:47 [PATCH] x86: wrap kexec feature with CONFIG_KEXEC Jonathan Creekmore
2015-08-27 15:22 ` Jan Beulich
2015-08-27 15:22 ` Andrew Cooper
2015-08-27 15:34 ` Jan Beulich
2015-08-27 15:39 ` Andrew Cooper
2015-08-27 15:27 ` David Vrabel [this message]
2015-08-27 15:35 ` Jan Beulich
2015-08-27 15:44 ` Jonathan Creekmore
2015-09-01 10:36 ` Ian Campbell
2015-09-01 10:44 ` Andrew Cooper
2015-09-01 10:54 ` Jan Beulich
2015-09-01 10:59 ` Andrew Cooper
2015-09-01 14:29 ` Jonathan Creekmore
2015-09-01 15:00 ` Jan Beulich
2015-09-01 17:55 ` Jonathan Creekmore
2015-09-02 6:53 ` Jan Beulich
2015-09-02 10:00 ` Andrew Cooper
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=55DF2C57.8030100@citrix.com \
--to=david.vrabel@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=jonathan.creekmore@gmail.com \
--cc=keir@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.