All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	vkuznets@redhat.com, mlevitsk@redhat.com,
	joao.m.martins@oracle.com, stable@vger.kernel.org,
	David Matlack <dmatlack@google.com>
Subject: Re: [PATCH v3] selftests: KVM: avoid failures due to reserved HyperTransport region
Date: Thu, 9 Dec 2021 22:49:01 +0000	[thread overview]
Message-ID: <YbKH3aMQ9R+fgFFG@google.com> (raw)
In-Reply-To: <20211209223040.304355-1-pbonzini@redhat.com>

On Thu, Dec 09, 2021, Paolo Bonzini wrote:
> AMD proceessors define an address range that is reserved by HyperTransport
> and causes a failure if used for guest physical addresses.  Avoid
> selftests failures by reserving those guest physical addresses; the
> rules are:
> 
> - On parts with <40 bits, its fully hidden from software.
> 
> - Before Fam17h, it was always 12G just below 1T, even if there was more
> RAM above this location.  In this case we just not use any RAM above 1T.
> 
> - On Fam17h and later, it is variable based on SME, and is either just
> below 2^48 (no encryption) or 2^43 (encryption).
> 
> Fixes: ef4c9f4f6546 ("KVM: selftests: Fix 32-bit truncation of vm_get_max_gfn()")
> Cc: stable@vger.kernel.org
> Cc: David Matlack <dmatlack@google.com>
> Reported-by: Maxim Levitsky <mlevitsk@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Message-Id: <20210805105423.412878-1-pbonzini@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-and-tested-by: Sean Christopherson <seanjc@google.com>

> +	/*
> +	 * Otherwise it's at the top of the physical address
> +	 * space, possibly reduced due to SME by bits 11:6 of
> +	 * CPUID[0x8000001f].EBX.  Use the old conservative
> +	 * value if MAXPHYADDR is not enumerated.

It'd be nice to run these out to 80 chars when you apply.

  reply	other threads:[~2021-12-09 22:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 22:30 [PATCH v3] selftests: KVM: avoid failures due to reserved HyperTransport region Paolo Bonzini
2021-12-09 22:49 ` Sean Christopherson [this message]
2021-12-14 15:07 ` Andrew Jones
2021-12-14 18:59   ` Sean Christopherson

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=YbKH3aMQ9R+fgFFG@google.com \
    --to=seanjc@google.com \
    --cc=dmatlack@google.com \
    --cc=joao.m.martins@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlevitsk@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=vkuznets@redhat.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.