All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir@xen.org>
To: Jan Beulich <JBeulich@novell.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] x86-64: don't allow wrmsr to MSR_FAM10H_MMIO_CONF_BASE when Xen itself is using it
Date: Mon, 10 Jan 2011 08:54:02 +0000	[thread overview]
Message-ID: <C95079AA.29F59%keir@xen.org> (raw)
In-Reply-To: <4D26D88F020000780002AEEA@vpn.id2.novell.com>

Applied, thanks. Is similar needed in 4.0-testing? It doesn't trivially
backport since 4.0-testing does not have other of your patches which also
serves to make variable pci_probe non-static.

 -- Keir

On 07/01/2011 08:10, "Jan Beulich" <JBeulich@novell.com> wrote:

> Signed-off-by: Jan Beulich <jbeulich@novell.com>
> 
> --- a/xen/arch/x86/traps.c
> +++ b/xen/arch/x86/traps.c
> @@ -1695,6 +1695,10 @@ static int is_cpufreq_controller(struct
>              (d->domain_id == 0));
>  }
>  
> +#ifdef CONFIG_X86_64
> +#include "x86_64/mmconfig.h"
> +#endif
> +
>  static int emulate_privileged_op(struct cpu_user_regs *regs)
>  {
>      struct vcpu *v = current;
> @@ -2289,7 +2293,14 @@ static int emulate_privileged_op(struct
>                  goto fail;
>              if ( !IS_PRIV(v->domain) )
>                  break;
> -            if ( (rdmsr_safe(MSR_FAM10H_MMIO_CONF_BASE, val) != 0) ||
> +            if ( (rdmsr_safe(MSR_FAM10H_MMIO_CONF_BASE, val) != 0) )
> +                goto fail;
> +            if (
> +#ifdef CONFIG_X86_64
> +                 (pci_probe & PCI_PROBE_MMCONF) &&
> +                 (pci_probe & PCI_CHECK_ENABLE_AMD_MMCONF) ?
> +                 val != msr_content :
> +#endif
>                   ((val ^ msr_content) &
>                    ~( FAM10H_MMIO_CONF_ENABLE |
>                      (FAM10H_MMIO_CONF_BUSRANGE_MASK <<
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

  reply	other threads:[~2011-01-10  8:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-07  8:10 [PATCH] x86-64: don't allow wrmsr to MSR_FAM10H_MMIO_CONF_BASE when Xen itself is using it Jan Beulich
2011-01-10  8:54 ` Keir Fraser [this message]
2011-01-10  9:07   ` 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=C95079AA.29F59%keir@xen.org \
    --to=keir@xen.org \
    --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.