All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <amc96@srcf.net>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Xen-devel <xen-devel@lists.xenproject.org>
Cc: "Jan Beulich" <JBeulich@suse.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>
Subject: Re: [PATCH v2 3/4] x86/cpuid: Introduce dom0-cpuid command line option
Date: Thu, 16 Dec 2021 11:56:44 +0000	[thread overview]
Message-ID: <948d4e68-5c8d-77c7-7ec1-56908248b185@srcf.net> (raw)
In-Reply-To: <20211215222115.6829-4-andrew.cooper3@citrix.com>

On 15/12/2021 22:21, Andrew Cooper wrote:
> diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
> index e11f5a3c9a6b..83a80ba6de70 100644
> --- a/xen/arch/x86/cpuid.c
> +++ b/xen/arch/x86/cpuid.c
> @@ -116,6 +116,23 @@ static int __init parse_xen_cpuid(const char *s)
>  }
>  custom_param("cpuid", parse_xen_cpuid);
>  
> +static bool __initdata dom0_cpuid_cmdline;
> +static uint32_t __initdata dom0_enable_feat[FSCAPINTS];
> +static uint32_t __initdata dom0_disable_feat[FSCAPINTS];
> +
> +static void __init _parse_dom0_cpuid(unsigned int feat, bool val)
> +{
> +    __set_bit(feat, val ? dom0_enable_feat : dom0_disable_feat);

Based on Jan's observation in v1, I've folded this delta in:

diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index 83a80ba6de70..39baeae9a6cd 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -122,7 +122,8 @@ static uint32_t __initdata dom0_disable_feat[FSCAPINTS];
 
 static void __init _parse_dom0_cpuid(unsigned int feat, bool val)
 {
-    __set_bit(feat, val ? dom0_enable_feat : dom0_disable_feat);
+    __set_bit  (feat, val ? dom0_enable_feat  : dom0_disable_feat);
+    __clear_bit(feat, val ? dom0_disable_feat : dom0_enable_feat );
 }
 
 static int __init parse_dom0_cpuid(const char *s)

~Andrew


  reply	other threads:[~2021-12-16 11:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 22:21 [PATCH v2 0/4] x86/cpuid: Introduce dom0-cpuid= Andrew Cooper
2021-12-15 22:21 ` [PATCH v2 1/4] x86/cpuid: Split dom0 handling out of init_domain_cpuid_policy() Andrew Cooper
2021-12-16 16:38   ` Jan Beulich
2021-12-16 16:41     ` Andrew Cooper
2021-12-16 16:51       ` Jan Beulich
2021-12-16 16:54         ` Andrew Cooper
2021-12-15 22:21 ` [PATCH v2 2/4] x86/cpuid: Factor common parsing out of parse_xen_cpuid() Andrew Cooper
2021-12-16 16:41   ` Jan Beulich
2021-12-16 16:47     ` Andrew Cooper
2021-12-15 22:21 ` [PATCH v2 3/4] x86/cpuid: Introduce dom0-cpuid command line option Andrew Cooper
2021-12-16 11:56   ` Andrew Cooper [this message]
2021-12-16 16:46     ` Jan Beulich
2021-12-16 16:45   ` Jan Beulich
2021-12-15 22:21 ` [PATCH v2 4/4] x86/cpuid: Advertise SERIALIZE by default to guests Andrew Cooper
2021-12-16 16:48   ` Jan Beulich

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=948d4e68-5c8d-77c7-7ec1-56908248b185@srcf.net \
    --to=amc96@srcf.net \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@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.