<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/include, branch linux-2.6.30.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.30.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.30.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-10-05T15:27:52Z</updated>
<entry>
<title>KVM: VMX: Check cpl before emulating debug register access</title>
<updated>2009-10-05T15:27:52Z</updated>
<author>
<name>Avi Kivity</name>
</author>
<published>2009-09-18T23:07:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0373fc0c209db541ec115700fbdb50e85b774a02'/>
<id>urn:sha1:0373fc0c209db541ec115700fbdb50e85b774a02</id>
<content type='text'>
(cherry picked from commit 0a79b009525b160081d75cef5dbf45817956acf2)

Debug registers may only be accessed from cpl 0.  Unfortunately, vmx will
code to emulate the instruction even though it was issued from guest
userspace, possibly leading to an unexpected trap later.

Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>x86/i386: Make sure stack-protector segment base is cache aligned</title>
<updated>2009-09-24T15:27:21Z</updated>
<author>
<name>Jeremy Fitzhardinge</name>
</author>
<published>2009-09-03T19:27:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0863b5e00d32b9adaf93226c893918af297b74f3'/>
<id>urn:sha1:0863b5e00d32b9adaf93226c893918af297b74f3</id>
<content type='text'>
commit 1ea0d14e480c245683927eecc03a70faf06e80c8 upstream.

The Intel Optimization Reference Guide says:

	In Intel Atom microarchitecture, the address generation unit
	assumes that the segment base will be 0 by default. Non-zero
	segment base will cause load and store operations to experience
	a delay.
		- If the segment base isn't aligned to a cache line
		  boundary, the max throughput of memory operations is
		  reduced to one [e]very 9 cycles.
	[...]
	Assembly/Compiler Coding Rule 15. (H impact, ML generality)
	For Intel Atom processors, use segments with base set to 0
	whenever possible; avoid non-zero segment base address that is
	not aligned to cache line boundary at all cost.

We can't avoid having a non-zero base for the stack-protector
segment, but we can make it cache-aligned.

Signed-off-by: Jeremy Fitzhardinge &lt;jeremy.fitzhardinge@citrix.com&gt;
LKML-Reference: &lt;4AA01893.6000507@goop.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>KVM: MMU: Use different shadows when EFER.NXE changes</title>
<updated>2009-09-09T03:33:31Z</updated>
<author>
<name>Avi Kivity</name>
</author>
<published>2009-08-03T17:57:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c108bfdf0859f16788c15d289b0eed1bfd8363e'/>
<id>urn:sha1:2c108bfdf0859f16788c15d289b0eed1bfd8363e</id>
<content type='text'>
(cherry picked from commit 9645bb56b31a1b70ab9e470387b5264cafc04aa9)

A pte that is shadowed when the guest EFER.NXE=1 is not valid when
EFER.NXE=0; if bit 63 is set, the pte should cause a fault, and since the
shadow EFER always has NX enabled, this won't happen.

Fix by using a different shadow page table for different EFER.NXE bits.  This
allows vcpus to run correctly with different values of EFER.NXE, and for
transitions on this bit to be handled correctly without requiring a full
flush.

Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>KVM: Deal with interrupt shadow state for emulated instructions</title>
<updated>2009-09-09T03:33:31Z</updated>
<author>
<name>Glauber Costa</name>
</author>
<published>2009-08-03T17:57:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9661bf29e0bcfb17f64a4145bb283d3ab53c0971'/>
<id>urn:sha1:9661bf29e0bcfb17f64a4145bb283d3ab53c0971</id>
<content type='text'>
(cherry picked from commit 310b5d306c1aee7ebe32f702c0e33e7988d50646)

We currently unblock shadow interrupt state when we skip an instruction,
but failing to do so when we actually emulate one. This blocks interrupts
in key instruction blocks, in particular sti; hlt; sequences

If the instruction emulated is an sti, we have to block shadow interrupts.
The same goes for mov ss. pop ss also needs it, but we don't currently
emulate it.

Without this patch, I cannot boot gpxe option roms at vmx machines.
This is described at https://bugzilla.redhat.com/show_bug.cgi?id=494469

Signed-off-by: Glauber Costa &lt;glommer@redhat.com&gt;
CC: H. Peter Anvin &lt;hpa@zytor.com&gt;
CC: Gleb Natapov &lt;gleb@redhat.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>KVM: Introduce {set/get}_interrupt_shadow()</title>
<updated>2009-09-09T03:33:30Z</updated>
<author>
<name>Glauber Costa</name>
</author>
<published>2009-08-03T17:57:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d4a81389f6643898ecd2f7f5976fd59f37d65e54'/>
<id>urn:sha1:d4a81389f6643898ecd2f7f5976fd59f37d65e54</id>
<content type='text'>
This patch introduces set/get_interrupt_shadow(), that does exactly
what the name suggests. It also replaces open code that explicitly does
it with the now existent functions. It differs slightly from upstream,
because upstream merged it after gleb's interrupt rework, that we don't
ship.

Just for reference, upstream changelog is
(2809f5d2c4cfad171167b131bb2a21ab65eba40f):

This patch replaces drop_interrupt_shadow with the more
general set_interrupt_shadow, that can either drop or raise
it, depending on its parameter.  It also adds -&gt;get_interrupt_shadow()
for future use.

Signed-off-by: Glauber Costa &lt;glommer@redhat.com&gt;
Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>x86: fix assembly constraints in native_save_fl()</title>
<updated>2009-08-16T21:18:43Z</updated>
<author>
<name>H. Peter Anvin</name>
</author>
<published>2009-08-03T23:33:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ff140ed76059c4c65bf32fc21f70a9189085f5dd'/>
<id>urn:sha1:ff140ed76059c4c65bf32fc21f70a9189085f5dd</id>
<content type='text'>
commit f1f029c7bfbf4ee1918b90a431ab823bed812504 upstream.

From Gabe Black in bugzilla 13888:

native_save_fl is implemented as follows:

  11static inline unsigned long native_save_fl(void)
  12{
  13        unsigned long flags;
  14
  15        asm volatile("# __raw_save_flags\n\t"
  16                     "pushf ; pop %0"
  17                     : "=g" (flags)
  18                     : /* no input */
  19                     : "memory");
  20
  21        return flags;
  22}

If gcc chooses to put flags on the stack, for instance because this is
inlined into a larger function with more register pressure, the offset
of the flags variable from the stack pointer will change when the
pushf is performed. gcc doesn't attempt to understand that fact, and
address used for pop will still be the same. It will write to
somewhere near flags on the stack but not actually into it and
overwrite some other value.

I saw this happen in the ide_device_add_all function when running in a
simulator I work on. I'm assuming that some quirk of how the simulated
hardware is set up caused the code path this is on to be executed when
it normally wouldn't.

A simple fix might be to change "=g" to "=r".

Reported-by: Gabe Black &lt;spamforgabe@umich.edu&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>x86: Fix movq immediate operand constraints in uaccess.h</title>
<updated>2009-07-30T21:40:03Z</updated>
<author>
<name>H. Peter Anvin</name>
</author>
<published>2009-07-21T06:27:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7de184f1743320a092f8831853b603a474606f13'/>
<id>urn:sha1:7de184f1743320a092f8831853b603a474606f13</id>
<content type='text'>
commit ebe119cd0929df4878f758ebf880cb435e4dcaaf upstream.

The movq instruction, generated by __put_user_asm() when used for
64-bit data, takes a sign-extended immediate ("e") not a zero-extended
immediate ("Z").

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Uros Bizjak &lt;ubizjak@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>x86: Fix movq immediate operand constraints in uaccess_64.h</title>
<updated>2009-07-30T21:40:01Z</updated>
<author>
<name>Uros Bizjak</name>
</author>
<published>2009-07-19T16:06:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=105010723459c496c1c0e1dc3a6fd8f2e6288703'/>
<id>urn:sha1:105010723459c496c1c0e1dc3a6fd8f2e6288703</id>
<content type='text'>
commit 155b73529583c38f30fd394d692b15a893960782 upstream.

arch/x86/include/asm/uaccess_64.h uses wrong asm operand constraint
("ir") for movq insn. Since movq sign-extends its immediate operand,
"er" constraint should be used instead.

Attached patch changes all uses of __put_user_asm in uaccess_64.h to use
"er" when "q" insn suffix is involved.

Patch was compile tested on x86_64 with defconfig.

Signed-off-by: Uros Bizjak &lt;ubizjak@gmail.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>x86/pci: insert ioapic resource before assigning unassigned resources</title>
<updated>2009-07-30T21:39:55Z</updated>
<author>
<name>Yinghai Lu</name>
</author>
<published>2009-07-10T16:36:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c58b0ab995f63edcbc3524a582ffa22277d1c650'/>
<id>urn:sha1:c58b0ab995f63edcbc3524a582ffa22277d1c650</id>
<content type='text'>
commit 857fdc53a0a90c3ba7fcf5b1fb4c7a62ae03cf82 upstream.

Stephen reported that his DL585 G2 needed noapic after 2.6.22 (?)

Dann bisected it down to:
  commit 30a18d6c3f1e774de656ebd8ff219d53e2ba4029
  Date:   Tue Feb 19 03:21:20 2008 -0800

      x86: multi pci root bus with different io resource range, on
      64-bit

It turns out that:
  1. that AMD-based systems have two HT chains.
  2. BIOS doesn't allocate resources for BAR 6 of devices under 8132 etc
  3. that multi-peer-root patch will try to split root resources to peer
     root resources according to PCI conf of NB
  4. PCI core assigns unassigned resources, but they overlap with BARs
     that are used by ioapic addr of io4 and 8132.

The reason: at that point ioapic address are not inserted yet.  Solution
is to insert ioapic resources into the tree a bit earlier.

Reported-by: Stephen Frost &lt;sfrost@snowman.net&gt;
Reported-and-Tested-by: dann frazier &lt;dannf@hp.com&gt;
Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>x86: Fix fixmap page order for FIX_TEXT_POKE0,1</title>
<updated>2009-07-30T21:39:42Z</updated>
<author>
<name>Mathieu Desnoyers</name>
</author>
<published>2009-07-01T21:37:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c242f9dd84db9159fd64b9d254660eabd90503b0'/>
<id>urn:sha1:c242f9dd84db9159fd64b9d254660eabd90503b0</id>
<content type='text'>
commit 12b9d7ccb841805e347fec8f733f368f43ddba40 upstream.

Masami reported:

&gt; Since the fixmap pages are assigned higher address to lower,
&gt; text_poke() has to use it with inverted order (FIX_TEXT_POKE1
&gt; to FIX_TEXT_POKE0).

I prefer to just invert the order of the fixmap declaration.
It's simpler and more straightforward.

Backward fixmaps seems to be used by both x86 32 and 64.

It's really rare but a nasty bug, because it only hurts when
instructions to patch are crossing a page boundary. If this
happens, the fixmap write accesses will spill on the following
fixmap, which may very well crash the system. And this does not
crash the system, it could leave illegal instructions in place.
Thanks Masami for finding this.

It seems to have crept into the 2.6.30-rc series, so this calls
for a -stable inclusion.

Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Acked-by: Masami Hiramatsu &lt;mhiramat@redhat.com&gt;
LKML-Reference: &lt;20090701213722.GH19926@Krystal&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
