public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Zachary Amsden <zamsden@redhat.com>
Cc: kvm <kvm@vger.kernel.org>, Avi Kivity <avi@redhat.com>,
	Gleb Natapov <gleb@redhat.com>, Shane Wang <shane.wang@intel.com>
Subject: Re: [PATCH 1/4] Fix tboot enabled macro
Date: Wed, 26 May 2010 09:25:49 +0200	[thread overview]
Message-ID: <4BFCCCFD.20203@web.de> (raw)
In-Reply-To: <4BFC9686.9050300@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1511 bytes --]

Zachary Amsden wrote:
> 
(please post inlined - I have to copy your patch manually now)

> From 614d5fa8bba5f98fd3cb1d66d63b0b70ca98fe51 Mon Sep 17 00:00:00 2001
> From: Zachary Amsden <zamsden@redhat.com>
> Date: Fri, 14 May 2010 12:25:14 -1000
> Subject: [PATCH 1/5] Fix tboot_enabled macro; was present in 2.6.33
> 
> Signed-off-by: Zachary Amsden <zamsden@redhat.com>
> ---
>  x86/external-module-compat.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h
> index 7d793a0..09bf232 100644
> --- a/x86/external-module-compat.h
> +++ b/x86/external-module-compat.h
> @@ -770,7 +770,7 @@ static inline void hw_breakpoint_restore(void)
>  #define percpu_write(t, v)	__get_cpu_var(t) = v
>  #endif
>  
> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
>  #define tboot_enabled()		0
>  #endif

This is for CONFIG_INTEL_TXT enabled? Good point but needs to be solved
differently. tboot, the variable that is checked by the original header,
is not exported to modules. I wonder how this worked out for you...

Solution should be: hack tboot_enabled to kvm_tboot_enabled and
unconditionally define that to 0 for older kernels. If tboot is actually
enabled in hardware, KVM may not load but I'm unsure if it's OK to
assume tboot == 1 for that case or if that will cause breakages if it's
off instead - CC'ing the KVM patch author.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

  reply	other threads:[~2010-05-26  7:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-26  3:33 [PATCH 1/4] Fix tboot enabled macro Zachary Amsden
2010-05-26  7:25 ` Jan Kiszka [this message]
2010-05-26  8:38   ` Avi Kivity
2010-05-26  9:23     ` Wang, Shane
2010-05-26 10:39       ` Jan Kiszka
2010-05-27  7:21         ` Wang, Shane
2010-05-27  8:36           ` Jan Kiszka
2010-05-27  9:13             ` Wang, Shane
2010-05-27  9:23               ` Jan Kiszka
2010-05-27  9:27                 ` Wang, Shane
2010-05-27 10:15                   ` Avi Kivity
2010-05-27 18:22                     ` Cihula, Joseph
2010-05-27  7:25         ` Wang, Shane

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=4BFCCCFD.20203@web.de \
    --to=jan.kiszka@web.de \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=shane.wang@intel.com \
    --cc=zamsden@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox