direct-io.hg

view patches/linux-2.6.16.29/x86-elfnote-as-preprocessor-macro.patch @ 11750:d845c9522d9e

[HVM][SVM] Check if SVM is disabled by the BIOS before enabling it.

Newer BIOS implementations will be able to disable the SVM feature,
although an additional test of an MSR (VMCR 0xC0010114 bit 4) is
necessary (set equals disabled). Bit 4 of MSR 0xc0010114 returns 0
(SVM enabled) on machines with older BIOS' without the SVM disable
feature support.

Signed-off-by: Wei Huang <wei.huang2@amd.com>=20
Signed-off-by: Tom Woller <thomas.woller@amd.com>=20
author kfraser@localhost.localdomain
date Thu Oct 12 16:12:10 2006 +0100 (2006-10-12)
parents 041be3f6b38e
children
line source
1 diff -pruN ../orig-linux-2.6.16.29/include/linux/elfnote.h ./include/linux/elfnote.h
2 --- ../orig-linux-2.6.16.29/include/linux/elfnote.h 2006-09-19 14:06:10.000000000 +0100
3 +++ ./include/linux/elfnote.h 2006-09-19 14:06:20.000000000 +0100
4 @@ -31,22 +31,24 @@
5 /*
6 * Generate a structure with the same shape as Elf{32,64}_Nhdr (which
7 * turn out to be the same size and shape), followed by the name and
8 - * desc data with appropriate padding. The 'desc' argument includes
9 - * the assembler pseudo op defining the type of the data: .asciz
10 - * "hello, world"
11 + * desc data with appropriate padding. The 'desctype' argument is the
12 + * assembler pseudo op defining the type of the data e.g. .asciz while
13 + * 'descdata' is the data itself e.g. "hello, world".
14 + *
15 + * e.g. ELFNOTE(XYZCo, 42, .asciz, "forty-two")
16 + * ELFNOTE(XYZCo, 12, .long, 0xdeadbeef)
17 */
18 -.macro ELFNOTE name type desc:vararg
19 -.pushsection ".note.\name"
20 - .align 4
21 - .long 2f - 1f /* namesz */
22 - .long 4f - 3f /* descsz */
23 - .long \type
24 -1:.asciz "\name"
25 -2:.align 4
26 -3:\desc
27 -4:.align 4
28 -.popsection
29 -.endm
30 +#define ELFNOTE(name, type, desctype, descdata) \
31 +.pushsection .note.name ; \
32 + .align 4 ; \
33 + .long 2f - 1f /* namesz */ ; \
34 + .long 4f - 3f /* descsz */ ; \
35 + .long type ; \
36 +1:.asciz "name" ; \
37 +2:.align 4 ; \
38 +3:desctype descdata ; \
39 +4:.align 4 ; \
40 +.popsection ;
41 #else /* !__ASSEMBLER__ */
42 #include <linux/elf.h>
43 /*