11 Commits
Author SHA1 Message Date
Wei, Gang 8254d9de11 x86: add a new SMP bring up way for tboot case
From: Wei, Gang <gang.wei@intel.com>

tboot may be trying to put APs waiting in MWAIT loops before launching
Xen. Xen could check the new flag field in v6 tboot shared page for the
hint. If TB_FLAG_AP_WAKE_SUPPORT bit in flag field is set, Xen BSP have
to write the monitored memory(g_tboot_shared->ap_wake_trigger) to bring
APs out of MWAIT loops. The sipi vector should be written in
g_tboot_shared->ap_wake_addr before waking up APs.

Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Gang Wei <gang.wei@intel.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
2012-01-11 10:34:45 +01:00
Gang Wei 7e2b3b4d38 x86/tboot: fix some coding style issues in tboot.c
Signed-off-by: Gang Wei <gang.wei@intel.com>
Acked-by:  Joseph Cihula <joseph.cihula@intel.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-01-02 12:43:07 +00:00
Gang Wei 1968cdf218 Update the maitainer list for Intel(R) TXT
Signed-off-by: Gang Wei <gang.wei@intel.com>
2012-01-02 12:42:15 +00:00
Gang Wei f12ee53315 X86: Add a delay between INIT & SIPIs for tboot AP bring-up in X2APIC case
Without this delay, Xen could not bring APs up while working with
TXT/tboot, because tboot needs some time in APs to handle INIT before
becoming ready for receiving SIPIs (this delay was removed as part of
c/s 23724 by Tim Deegan).

Signed-off-by: Gang Wei <gang.wei@intel.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
2011-12-29 10:07:54 +00:00
Wei Gang 1a048a1d9e x86: add volatile prefix for cpuid asm clauses
cpuid results are possible to be changed now. For example, changing
CR4.OSXSAVE bit or setting MSR XCR_XFEATURE_ENABLED_MASK may change
XSAVE related cpuid leave return values.

The volatile prefix is required to avoid the second cpuid calls
following some possible changing operations being optimized in
incorrect way by compiler.

The sample bug is in xsave_init while debug=3Dn. The second call to
cpuid_count() may be optimized and lead to a BUG_ON case while compare
xsave_cntxt_size with ebx.

Signed-off-by: Wei Gang <gang.wei@intel.com>
2011-03-14 17:04:42 +00:00
Wei Gang b99358eeb3 tools: gtracestate: fix several problems
Fixed problems include:
  * previously just print out a error instead of help info
    while running without cmdline parameters.
  * -u & -n lead to Segmentation fault.
  * -c and then use default ranges, the default ranges is not
        50us... but 50000/tsc2us....

Signed-off-by: Wei Gang <gang.wei@intel.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-03-03 18:51:13 +00:00
Wei Gang 3af87a7ece x86: add strictly sanity check for XSAVE/XRSTOR
Replace most checks on cpu_has_xsave with checks on new fn
xsave_enabled(), do additional sanity checks in the new fn.

Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Keir Fraser <keir.xen@gmail.com>
2011-02-21 09:11:57 +00:00
Wei Gang f2cc804445 x86: Fix S3 resume for HPET MSI IRQ case
Jan Beulich found that for S3 resume on platforms without ARAT feature
but with MSI capable HPET, request_irq() will be called in
hpet_setup_msi_irq() for irq already setup(no release_irq() called
during S3 suspend), so that always falling back to using
legacy_hpet_event.

Fix it by conditional calling request_irq() for 4.1. Planned to split
the S3 resume path from booting path post 4.1, as Jan suggested.

Signed-off-by: Wei Gang <gang.wei@intel.com>
Acked-by: Jan Beulich <jbeulich@novell.com>
2011-02-14 10:41:12 +00:00
Wei Gang aa479ce9d1 x86: reduce magic number usage in XSAVE code
Signed-off-by: Wei Gang <gang.wei@intel.com>
2011-02-09 08:58:11 +00:00
Wei Gang 56bcfc196f x86: Fix pirq teardown on domain destruction.
The privilege check in unmap_domain_pirq() fails since the teardown
completes in RCU (idle domain) context. We can remove the check since
it is covered in physdev_op() already, which is the only potentially
unprivileged caller.

Signed-off-by: Wei Gang <gang.wei@intel.com>
2011-01-26 08:54:12 +00:00
Wei Gang 3b45ec8c70 tools/ocaml: fix a typo in xc_lib.c:xc_domain_set_vpt_align
Fix a typo in xc_lib.c.

Signed-off-by: Wei Gang <gang.wei@intel.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-10 18:16:07 +00:00