]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
13 years agoMerge branch 'uek2-stable' of git://ca-git.us.oracle.com/linux-uek-2.6.39 into 2...
Maxim Uvarov [Thu, 29 Sep 2011 17:43:19 +0000 (10:43 -0700)]
Merge branch 'uek2-stable' of git://ca-git.us.oracle.com/linux-uek-2.6.39 into 2.6.39-100.0.5_pulltest

13 years ago[PATCH] audit: dynamically allocate audit_names when not enough spaceis in the names...
Maxim Uvarov [Thu, 29 Sep 2011 17:11:07 +0000 (10:11 -0700)]
[PATCH] audit: dynamically allocate audit_names when not enough spaceis in the names array

Some system calls, such as loading a module, can cause filesystem activity
such as creating lots of new files in /sys or debugfs. Audit can only capture
20 inodes in a single syscall since it stores them in a fixed length array.
This patch shrinks the fixed length array to 5 names (the number used by a
rename operation) and then allocates names dynamically as they are needed
after 5. It should shut up the complaints we sometimes see about
'name_count maxed, losing inode data" such as that seen in Red Hat bugzilla
445757.

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoSPEC: v2.6.39-100.0.11
Guru Anbalagane [Thu, 29 Sep 2011 00:19:02 +0000 (17:19 -0700)]
SPEC: v2.6.39-100.0.11

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoAdd include bootmem.h in xen-seflballoon.c
Guru Anbalagane [Wed, 28 Sep 2011 23:56:29 +0000 (16:56 -0700)]
Add include bootmem.h in xen-seflballoon.c

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoSPEC: v2.6.39-100.0.10
Guru Anbalagane [Wed, 28 Sep 2011 22:26:56 +0000 (15:26 -0700)]
SPEC: v2.6.39-100.0.10
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoocfs2: Add datavolume mount option
Guru Anbalagane [Wed, 28 Sep 2011 21:46:14 +0000 (14:46 -0700)]
ocfs2: Add datavolume mount option

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'in-3.1/bug.fixes' of git://oss.oracle.com/git/kwilk/xen into uek2-stable
Guru Anbalagane [Wed, 28 Sep 2011 19:01:10 +0000 (12:01 -0700)]
Merge branch 'in-3.1/bug.fixes' of git://oss.oracle.com/git/kwilk/xen into uek2-stable

13 years agoxen: Fix selfballooning and ensure it doesn't go too far
Dan Magenheimer [Tue, 27 Sep 2011 14:47:58 +0000 (08:47 -0600)]
xen: Fix selfballooning and ensure it doesn't go too far

The balloon driver's "current_pages" is very different from
totalram_pages.  Self-ballooning needs to be driven by
the latter.  Also, Committed_AS doesn't account for pages
used by the kernel so enforce a floor for when there are little
or no user-space threads using memory.  The floor function
includes a "safety margin" tuneable in case we discover later
that the floor function is still too aggressive in some workloads,
though likely it will not be needed.

Changes since version 1:
- tuneable safety margin added

[v2: konrad.wilk@oracle.com: make safety margin tuneable]

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
13 years agotg3: Dont dump DMA error when interface not ready.
fjin [Tue, 27 Sep 2011 06:55:34 +0000 (14:55 +0800)]
tg3: Dont dump DMA error when interface not ready.

This fixes orabug 12981473.

When do testing with BCM5704 Gigabit Ethernet, bootup get below warning:

tg3 0000:03:01.0: eth0: DMA Status error.  Resetting chip.
<Registers state of device>
tg3 0000:03:01.0: eth0: 0: Host status block [00000007:00000002:(0000:0000:0000):(0000:0000)]
tg3 0000:03:01.0: eth0: 0: NAPI info [00000001:00000002:(0000:0000:01ff):0000:(00c8:0000:0000:0000)]
tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex
tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX
tg3 0000:03:01.0: tg3_stop_block timed out, ofs=4800 enable_bit=2
tg3 0000:03:01.0: eth0: Link is down
tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex
tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX

We need not to check the status and dump registers status if the device
not ready,

Signed-off-by: Joe Jin <joe.jin@oracle.com>
Reported-by: Gurudas Pai <gurudas.pai@oracle.com>
13 years agobnx2x: prevent flooded warnning kernel info
Joe Jin [Tue, 27 Sep 2011 07:17:10 +0000 (15:17 +0800)]
bnx2x: prevent flooded warnning kernel info

This fixes orabug 12687487 and backported fixes for RHBZ 712000.
When a VN is configured to invalid Max BW, we only need to be told once.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
Reported-by: Sriharsha Devdas <sriharsha.devdas@oracle.com>
13 years agox86/paravirt: PTE updates in k(un)map_atomic need to be synchronous, regardless of...
Konrad Rzeszutek Wilk [Fri, 23 Sep 2011 21:02:29 +0000 (17:02 -0400)]
x86/paravirt: PTE updates in k(un)map_atomic need to be synchronous, regardless of lazy_mmu mode.

This patch fixes an outstanding issue that has been reported since 2.6.37.
Under a heavy loaded machine processing "fork()" calls could keepover with:

BUG: unable to handle kernel paging request at f573fc8c
IP: [<c01abc54>] swap_count_continued+0x104/0x180
*pdpt = 000000002a3b9027 *pde = 0000000001bed067 *pte = 0000000000000000
Oops: 0000 [#1] SMP
Modules linked in:
Pid: 1638, comm: apache2 Not tainted 3.0.4-linode37 #1
EIP: 0061:[<c01abc54>] EFLAGS: 00210246 CPU: 3
EIP is at swap_count_continued+0x104/0x180
.. snip..
Call Trace:
 [<c01ac222>] ? __swap_duplicate+0xc2/0x160
 [<c01040f7>] ? pte_mfn_to_pfn+0x87/0xe0
 [<c01ac2e4>] ? swap_duplicate+0x14/0x40
 [<c01a0a6b>] ? copy_pte_range+0x45b/0x500
 [<c01a0ca5>] ? copy_page_range+0x195/0x200
 [<c01328c6>] ? dup_mmap+0x1c6/0x2c0
 [<c0132cf8>] ? dup_mm+0xa8/0x130
 [<c013376a>] ? copy_process+0x98a/0xb30
 [<c013395f>] ? do_fork+0x4f/0x280
 [<c01573b3>] ? getnstimeofday+0x43/0x100
 [<c010f770>] ? sys_clone+0x30/0x40
 [<c06c048d>] ? ptregs_clone+0x15/0x48
 [<c06bfb71>] ? syscall_call+0x7/0xb

The problem is that in copy_page_range we turn lazy mode on, and then
in swap_entry_free we call swap_count_continued which ends up in:

         map = kmap_atomic(page, KM_USER0) + offset;

and then later we touch *map.

Since we are running in batched mode (lazy) we don't actually set up the
PTE mappings and the kmap_atomic is not done synchronously and ends up
trying to dereference a page that has not been set.

Looking at kmap_atomic_prot_pfn, it uses 'arch_flush_lazy_mmu_mode' and
doing the same in kmap_atomic_prot and __kunmap_atomic makes the problem
go away.

Interestingly, git commit b8bcfe997e46150fedcc3f5b26b846400122fdd9
removed part of this to fix an interrupt issue - but it went to far
and did not consider this scenario.

CC: Thomas Gleixner <tglx@linutronix.de>
CC: Ingo Molnar <mingo@redhat.com>
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: x86@kernel.org
CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
CC: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
CC: stable@kernel.org
[v1: Redid the commit description per Jeremy's apt suggestion]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoocfs2: update ocfs2 version
Tiger Yang [Mon, 26 Sep 2011 07:15:09 +0000 (15:15 +0800)]
ocfs2: update ocfs2 version

Update the printed version to 1.8.0.

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13 years agoMerge branch 'uek2-stable-mpt2sas' of git://ca-git.us.oracle.com/linux-mkp-public...
Guru Anbalagane [Mon, 26 Sep 2011 21:58:03 +0000 (14:58 -0700)]
Merge branch 'uek2-stable-mpt2sas' of git://ca-git.us.oracle.com/linux-mkp-public into uek2-stable

13 years agoconfig: disable panic on hardlockup [orabug 13007648]
Guru Anbalagane [Mon, 26 Sep 2011 21:38:10 +0000 (14:38 -0700)]
config: disable panic on hardlockup [orabug 13007648]

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoblock: Rate-limit failed I/O error message
Dave Kleikamp [Mon, 26 Sep 2011 21:33:32 +0000 (14:33 -0700)]
block: Rate-limit failed I/O error message

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoRevert "[AUDIT/workaround] Increase AUDIT_NAMES array len"
Guru Anbalagane [Mon, 26 Sep 2011 20:54:40 +0000 (13:54 -0700)]
Revert "[AUDIT/workaround] Increase AUDIT_NAMES array len"

This reverts commit 629b8994afa2674fac82ab01472e404e48935c9c.

13 years agompt2sas: Do not check DIF for unwritten blocks
Martin K. Petersen [Fri, 23 Sep 2011 00:54:11 +0000 (20:54 -0400)]
mpt2sas: Do not check DIF for unwritten blocks

Blocks that have never been written contain all ones in the protection
information. When reading, a target device will disable checking for any
block whose application tag contains 0xFFFF.

Some MPT adapters, however, enable checking for all blocks by
default. This causes reads to previously unwritten sectors to fail.

Tweak the relevant bit in the MPT configuration page that causes the HBA
to disable PI checking when a received app tag contains 0xFFFF.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
13 years agoSPEC: v2.6.39-100.0.9
Guru Anbalagane [Fri, 23 Sep 2011 00:37:56 +0000 (17:37 -0700)]
SPEC: v2.6.39-100.0.9

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoxen/i386: follow-up to "replace order-based range checking of M2P table by linear...
Jan Beulich [Thu, 15 Sep 2011 07:52:40 +0000 (08:52 +0100)]
xen/i386: follow-up to "replace order-based range checking of M2P table by linear one"

The numbers obtained from the hypervisor really can't ever lead to an
overflow here, only the original calculation going through the order
of the range could have. This avoids the (as Jeremy points outs)
somewhat ugly NULL-based calculation here.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/irq: Alter the locking to use a mutex instead of a spinlock.
Konrad Rzeszutek Wilk [Wed, 14 Sep 2011 09:10:00 +0000 (05:10 -0400)]
xen/irq: Alter the locking to use a mutex instead of a spinlock.

When we allocate/change the IRQ informations, we do not
need to use spinlocks. We can use a mutex (which is
what the generic IRQ code does for allocations/changes).
Fixes a slew of:

BUG: sleeping function called from invalid context at /linux/kernel/mutex.c:271
in_atomic(): 1, irqs_disabled(): 0, pid: 3216, name: xenstored
2 locks held by xenstored/3216:
 #0:  (&u->bind_mutex){......}, at: [<ffffffffa02e0920>] evtchn_ioctl+0x30/0x3a0 [xen_evtchn]
 #1:  (irq_mapping_update_lock){......}, at: [<ffffffff8138b274>] bind_evtchn_to_irq+0x24/0x90
Pid: 3216, comm: xenstored Not tainted 3.1.0-rc6-00021-g437a3d1 #2
Call Trace:
 [<ffffffff81088d10>] __might_sleep+0x100/0x130
 [<ffffffff81645c2f>] mutex_lock_nested+0x2f/0x50
 [<ffffffff81627529>] __irq_alloc_descs+0x49/0x200
 [<ffffffffa02e0920>] ? evtchn_ioctl+0x30/0x3a0 [xen_evtchn]
 [<ffffffff8138b214>] xen_allocate_irq_dynamic+0x34/0x70
 [<ffffffff8138b2ad>] bind_evtchn_to_irq+0x5d/0x90
 [<ffffffffa02e03c0>] ? evtchn_bind_to_user+0x60/0x60 [xen_evtchn]
 [<ffffffff8138c282>] bind_evtchn_to_irqhandler+0x32/0x80
 [<ffffffffa02e03a9>] evtchn_bind_to_user+0x49/0x60 [xen_evtchn]
 [<ffffffffa02e0a34>] evtchn_ioctl+0x144/0x3a0 [xen_evtchn]
 [<ffffffff811b4070>] ? vfsmount_lock_local_unlock+0x50/0x80
 [<ffffffff811a6a1a>] do_vfs_ioctl+0x9a/0x5e0
 [<ffffffff811b476f>] ? mntput+0x1f/0x30
 [<ffffffff81196259>] ? fput+0x199/0x240
 [<ffffffff811a7001>] sys_ioctl+0xa1/0xb0
 [<ffffffff8164ea82>] system_call_fastpath+0x16/0x1b

Reported-by: Jim Burns <jim_burn@bellsouth.net>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/e820: if there is no dom0_mem=, don't tweak extra_pages.
David Vrabel [Tue, 13 Sep 2011 14:17:32 +0000 (10:17 -0400)]
xen/e820: if there is no dom0_mem=, don't tweak extra_pages.

The patch "xen: use maximum reservation to limit amount of usable RAM"
(d312ae878b6aed3912e1acaaf5d0b2a9d08a4f11) breaks machines that
do not use 'dom0_mem=' argument with:

reserve RAM buffer: 000000133f2e2000 - 000000133fffffff
(XEN) mm.c:4976:d0 Global bit is set to kernel page fffff8117e
(XEN) domain_crash_sync called from entry.S
(XEN) Domain 0 (vcpu#0) crashed on cpu#0:
...

The reason being that the last E820 entry is created using the
'extra_pages' (which is based on how many pages have been freed).
The mentioned git commit sets the initial value of 'extra_pages'
using a hypercall which returns the number of pages (if dom0_mem
has been used) or -1 otherwise. If the later we return with
MAX_DOMAIN_PAGES as basis for calculation:

    return min(max_pages, MAX_DOMAIN_PAGES);

and use it:

     extra_limit = xen_get_max_pages();
     if (extra_limit >= max_pfn)
             extra_pages = extra_limit - max_pfn;
     else
             extra_pages = 0;

which means we end up with extra_pages = 128GB in PFNs (33554432)
- 8GB in PFNs (2097152, on this specific box, can be larger or smaller),
and then we add that value to the E820 making it:

  Xen: 00000000ff000000 - 0000000100000000 (reserved)
  Xen: 0000000100000000 - 000000133f2e2000 (usable)

which is clearly wrong. It should look as so:

  Xen: 00000000ff000000 - 0000000100000000 (reserved)
  Xen: 0000000100000000 - 000000027fbda000 (usable)

Naturally this problem does not present itself if dom0_mem=max:X
is used.

CC: stable@kernel.org
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoRevert "xen/e820: if there is no dom0_mem=, don't tweak extra_pages."
Konrad Rzeszutek Wilk [Thu, 22 Sep 2011 20:28:08 +0000 (16:28 -0400)]
Revert "xen/e820: if there is no dom0_mem=, don't tweak extra_pages."

This reverts commit 38ec5d3381179924085ac3b21caa8f27da9ba8b3.

We will use an version that went upstream.

13 years agoksplice: Clear garbage data on the kernel stack when handling signals.
Nelson Elhage [Tue, 20 Sep 2011 20:40:00 +0000 (16:40 -0400)]
ksplice: Clear garbage data on the kernel stack when handling signals.

13 years ago- Add -u parameter to kernel_variant_post to make it work properly for uek [orabug...
kevin.x.lyons [Wed, 21 Sep 2011 19:04:31 +0000 (12:04 -0700)]
- Add -u parameter to kernel_variant_post to make it work properly for uek [orabug 12965870]

13 years agoradeon: add missed firmwares
Joe Jin [Wed, 21 Sep 2011 01:18:03 +0000 (09:18 +0800)]
radeon: add missed firmwares

This fixes orabug 12981553 for uek2(2.6.39).
mkdumprd need these files when generated dump initrd file.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agogenerate -paravirt configs more accurate
Maxim Uvarov [Wed, 21 Sep 2011 18:38:40 +0000 (11:38 -0700)]
generate -paravirt configs more accurate

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoSPEC: v2.6.39-100.0.7
Guru Anbalagane [Tue, 20 Sep 2011 20:44:59 +0000 (13:44 -0700)]
SPEC: v2.6.39-100.0.7
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoCONFIG: Add support for Large files - 32bit orabug 12984979
Guru Anbalagane [Tue, 20 Sep 2011 20:38:55 +0000 (13:38 -0700)]
CONFIG: Add support for Large files - 32bit orabug 12984979

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agompt2sas: Return the correct sense key for DIF errors
Martin K. Petersen [Tue, 20 Sep 2011 19:18:28 +0000 (15:18 -0400)]
mpt2sas: Return the correct sense key for DIF errors

Only a target device should return ABORTED COMMAND when a PI error is
discovered. The HBA should always set the sense key to ILLEGAL REQUEST.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
13 years agompt2sas: Add a module parameter that permits overriding protection capabilities
Martin K. Petersen [Tue, 20 Sep 2011 19:18:20 +0000 (15:18 -0400)]
mpt2sas: Add a module parameter that permits overriding protection capabilities

Add a parameter that allows the host protection capabilities mask to be
provided at module load time.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
13 years agofix --noarch build
Maxim Uvarov [Mon, 19 Sep 2011 23:01:24 +0000 (16:01 -0700)]
fix --noarch build

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoSPECFILE: v2.6.39-100.0.6
Guru Anbalagane [Mon, 19 Sep 2011 22:41:07 +0000 (15:41 -0700)]
SPECFILE: v2.6.39-100.0.6
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agox86, acpi: Handle xapic/x2apic entries in MADT at same time
Yinghai Lu [Thu, 8 Sep 2011 18:33:22 +0000 (11:33 -0700)]
x86, acpi: Handle xapic/x2apic entries in MADT at same time

One system have mixing xapic and x2apic entries in MADT and SRAT.
BIOS guys insist that ACPI 4.0 SPEC said so, if apic id < 255, even
the cpus are with x2apic mode pre-enabled, still need to use xapic entries
instead of x2apic entries.

on 8 socket system with x2apic pre-enabled, will get out of order sequence:
CPU0: socket0, core0, thread0.
CPU1 - CPU 40: socket 4 - socket 7, thread 0
CPU41 - CPU 80: socket 4 - socket 7, thread 1
CPU81 - CPU 119: socket 0 - socket 3, thread 0
CPU120 - CPU 159: socket 0 - socket 3, thread 1

so max_cpus=80 will not get all thread0 now.

Need to handle every entry in MADT at same time with xapic and x2apic.
so we can honor sequence in MADT.

We can use max_cpus= command line to use thread0 in every core,
because recent MADT always have all thread0 at first.
Also it could make the cpu to node mapping more sane.

after patch will get
CPU0 - CPU 79: socket 0 - socket 7, thread 0
CPU80 - CPU 159: socket 0 - socket 7, thread 1

-v2: update some comments, and change to pass array pointer.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
13 years agoscsi: bump up SD_MAX_DISKS
Dave Kleikamp [Wed, 14 Sep 2011 21:48:47 +0000 (16:48 -0500)]
scsi: bump up SD_MAX_DISKS

SD_MAX_DISKS is arbitrarily limited to the number of scsi disks in the
namespace constructed of "sd" followed by one to three of the letters
a-z, or 18278 disks. There is no need for this limit, since appending
a fourth letter works perfectly fine. This simple patch just bumps the
number up to allow up to four letters after "sd". It might be best to
simply remove the test against SD_MAX_DISKS, but this is the patch that
has been unit tested.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agoCONFIG: enable sysfs(el5) and xen memory hotplug
Guru Anbalagane [Mon, 19 Sep 2011 21:53:41 +0000 (14:53 -0700)]
CONFIG: enable sysfs(el5) and xen memory hotplug
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoTurn on CONFIG_CRYPTO_FIPS
Maxim Uvarov [Fri, 16 Sep 2011 17:37:21 +0000 (10:37 -0700)]
Turn on CONFIG_CRYPTO_FIPS

Oraclebug: 12989580
CRYPTO_FIPS depends on CRYPTO_ANSI_CPRNG && !CRYPTO_MANAGER_DISABLE_TESTS.
Turn it on in kernel config.

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoconfig-debug: enable LOCKDEP and more debug options
Maxim Uvarov [Thu, 15 Sep 2011 23:06:22 +0000 (16:06 -0700)]
config-debug: enable LOCKDEP and more debug options

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agomake XEN_MAX_DOMAIN_MEMORY selectable
Maxim Uvarov [Thu, 15 Sep 2011 19:06:50 +0000 (12:06 -0700)]
make XEN_MAX_DOMAIN_MEMORY selectable

Fix arch/x86/xen/Kconfig XEN_MAX_DOMAIN_MEMORY selection option.
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoSpecfile: build OCFS2
Maxim Uvarov [Thu, 15 Sep 2011 18:30:09 +0000 (11:30 -0700)]
Specfile: build OCFS2

13 years agoRemove commented out patches from spec
Maxim Uvarov [Thu, 15 Sep 2011 01:36:57 +0000 (18:36 -0700)]
Remove commented out patches from spec

For now we build directly from git tree. Remove commented out patches
from spec file to make it more readable.

13 years agoBuild paravirt and paravirt-debug kernels
Maxim Uvarov [Thu, 15 Sep 2011 01:28:16 +0000 (18:28 -0700)]
Build paravirt and paravirt-debug kernels

13 years agoMerge branch '3.0.4v3' of /home/muvarov/GIT/linux-uek-2.6.39 into 2.6.39-100.0.5_pulltest
Maxim Uvarov [Thu, 15 Sep 2011 18:15:37 +0000 (11:15 -0700)]
Merge branch '3.0.4v3' of /home/muvarov/GIT/linux-uek-2.6.39 into 2.6.39-100.0.5_pulltest

13 years agoSPEC: v2.6.39-100.0.5 xen/config/tmem support
Guru Anbalagane [Wed, 14 Sep 2011 01:04:22 +0000 (18:04 -0700)]
SPEC: v2.6.39-100.0.5 xen/config/tmem support
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoconfig: Enable PARAVIRT and Xen options
Konrad Rzeszutek Wilk [Wed, 14 Sep 2011 00:28:21 +0000 (17:28 -0700)]
config: Enable PARAVIRT and Xen options
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoRevert "ipc semaphores: reduce ipc_lock contention in semtimedop"
Guru Anbalagane [Tue, 13 Sep 2011 19:10:38 +0000 (12:10 -0700)]
Revert "ipc semaphores: reduce ipc_lock contention in semtimedop"

This reverts commit c7fa322dd72b08450a440ef800124705a1fa148c.

13 years agoRevert "ipc semaphores: order wakeups based on waiter CPU"
Guru Anbalagane [Tue, 13 Sep 2011 19:10:13 +0000 (12:10 -0700)]
Revert "ipc semaphores: order wakeups based on waiter CPU"

This reverts commit 8102e1ff9d667661b581209323faaf7a84f0f528.

13 years agoRevert "use rwlocks for ipc"
Guru Anbalagane [Tue, 13 Sep 2011 19:09:55 +0000 (12:09 -0700)]
Revert "use rwlocks for ipc"

This reverts commit 78fe45325c8e2e3f4b6ebb1ee15b6c2e8af5ddb1.

13 years agoRevert "IPC lock reduction corners"
Guru Anbalagane [Tue, 13 Sep 2011 19:09:31 +0000 (12:09 -0700)]
Revert "IPC lock reduction corners"

This reverts commit 8385de45ab8e4b40eaf8341f599bf0c19b08bb64.

13 years agoRevert "IPC reduce lock contention in semctl"
Guru Anbalagane [Tue, 13 Sep 2011 19:08:13 +0000 (12:08 -0700)]
Revert "IPC reduce lock contention in semctl"

This reverts commit a8fc9c3f989c474f44e6d4b4f126961207261a1e.

13 years agoMerge branch 'in-3.1/bug.fixes' of git://oss.oracle.com/git/kwilk/xen into uek2-stable
Guru Anbalagane [Tue, 13 Sep 2011 18:20:33 +0000 (11:20 -0700)]
Merge branch 'in-3.1/bug.fixes' of git://oss.oracle.com/git/kwilk/xen into uek2-stable

13 years agoconfig: from 6.1 and review
Guru Anbalagane [Tue, 13 Sep 2011 18:05:55 +0000 (11:05 -0700)]
config: from 6.1 and review
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoxen/e820: if there is no dom0_mem=, don't tweak extra_pages.
Konrad Rzeszutek Wilk [Mon, 12 Sep 2011 19:58:25 +0000 (15:58 -0400)]
xen/e820: if there is no dom0_mem=, don't tweak extra_pages.

The patch "xen: use maximum reservation to limit amount of usable RAM"
(d312ae878b6aed3912e1acaaf5d0b2a9d08a4f11) breaks machines that
do not use 'dom0_mem=' argument with:

reserve RAM buffer: 000000133f2e2000 - 000000133fffffff
(XEN) mm.c:4976:d0 Global bit is set to kernel page fffff8117e
(XEN) domain_crash_sync called from entry.S
(XEN) Domain 0 (vcpu#0) crashed on cpu#0:
...

The reason being that the last E820 entry is created using the
'extra_pages' (which is based on how many pages have been freed).
The mentioned git commit sets the initial value of 'extra_pages'
using a hypercall which returns the number of pages (if dom0_mem
has been used) or -1 otherwise. If the later we return with
MAX_DOMAIN_PAGES as basis for calculation:

    return min(max_pages, MAX_DOMAIN_PAGES);

and use it:

     extra_limit = xen_get_max_pages();
     if (extra_limit >= max_pfn)
             extra_pages = extra_limit - max_pfn;
     else
             extra_pages = 0;

which means we end up with extra_pages = 128GB in PFNs (33554432)
- 8GB in PFNs (2097152, on this specific box, can be larger or smaller),
and then we add that value to the E820 making it:

  Xen: 00000000ff000000 - 0000000100000000 (reserved)
  Xen: 0000000100000000 - 000000133f2e2000 (usable)

which is clearly wrong. It should look as so:

  Xen: 00000000ff000000 - 0000000100000000 (reserved)
  Xen: 0000000100000000 - 000000027fbda000 (usable)

Naturally this problem does not present itself if dom0_mem=max:X
is used.

CC: stable@kernel.org
CC: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen: disable PV spinlocks on HVM
Stefano Stabellini [Tue, 6 Sep 2011 16:41:47 +0000 (17:41 +0100)]
xen: disable PV spinlocks on HVM

PV spinlocks cannot possibly work with the current code because they are
enabled after pvops patching has already been done, and because PV
spinlocks use a different data structure than native spinlocks so we
cannot switch between them dynamically. A spinlock that has been taken
once by the native code (__ticket_spin_lock) cannot be taken by
__xen_spin_lock even after it has been released.

Reported-and-Tested-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/smp: Warn user why they keel over - nosmp or noapic and what to use instead.
Konrad Rzeszutek Wilk [Thu, 1 Sep 2011 13:48:27 +0000 (09:48 -0400)]
xen/smp: Warn user why they keel over - nosmp or noapic and what to use instead.

We have hit a couple of customer bugs where they would like to
use those parameters to run an UP kernel - but both of those
options turn of important sources of interrupt information so
we end up not being able to boot. The correct way is to
pass in 'dom0_max_vcpus=1' on the Xen hypervisor line and
the kernel will patch itself to be a UP kernel.

Fixes bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637308

CC: stable@kernel.org
Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen: x86_32: do not enable iterrupts when returning from exception in interrupt context
Igor Mammedov [Thu, 1 Sep 2011 11:46:55 +0000 (13:46 +0200)]
xen: x86_32: do not enable iterrupts when returning from exception in interrupt context

If vmalloc page_fault happens inside of interrupt handler with interrupts
disabled then on exit path from exception handler when there is no pending
interrupts, the following code (arch/x86/xen/xen-asm_32.S:112):

cmpw $0x0001, XEN_vcpu_info_pending(%eax)
sete XEN_vcpu_info_mask(%eax)

will enable interrupts even if they has been previously disabled according to
eflags from the bounce frame (arch/x86/xen/xen-asm_32.S:99)

testb $X86_EFLAGS_IF>>8, 8+1+ESP_OFFSET(%esp)
setz XEN_vcpu_info_mask(%eax)

Solution is in setting XEN_vcpu_info_mask only when it should be set
according to
cmpw $0x0001, XEN_vcpu_info_pending(%eax)
but not clearing it if there isn't any pending events.

Reproducer for bug is attached to RHBZ 707552

CC: stable@kernel.org
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen: use maximum reservation to limit amount of usable RAM
David Vrabel [Fri, 19 Aug 2011 14:57:16 +0000 (15:57 +0100)]
xen: use maximum reservation to limit amount of usable RAM

Use the domain's maximum reservation to limit the amount of extra RAM
for the memory balloon. This reduces the size of the pages tables and
the amount of reserved low memory (which defaults to about 1/32 of the
total RAM).

On a system with 8 GiB of RAM with the domain limited to 1 GiB the
kernel reports:

Before:

Memory: 627792k/4472000k available

After:

Memory: 549740k/11132224k available

A increase of about 76 MiB (~1.5% of the unused 7 GiB).  The reserved
low memory is also reduced from 253 MiB to 32 MiB.  The total
additional usable RAM is 329 MiB.

For dom0, this requires at patch to Xen ('x86: use 'dom0_mem' to limit
the number of pages for dom0') (c/s 23790)

CC: stable@kernel.org
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoSCSI: Fix oops dereferencing queue
Martin K. Petersen [Fri, 22 Jul 2011 15:59:17 +0000 (08:59 -0700)]
SCSI: Fix oops dereferencing queue

Commit 86cbfb5607d4b81b1a993ff689bbd2addd5d3a9b introduced a regression
where requests could be queued after a device had disappeared.
Subsequent commits have attempted to fix some but not all of these
issues.

Since there appears to be ongoing discussion about the proper way to fix
this we'll partially revert the upstream commit.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: guru.anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'in-3.1/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
Guru Anbalagane [Tue, 6 Sep 2011 06:38:28 +0000 (23:38 -0700)]
Merge branch 'in-3.1/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into uek2-stable

13 years agoMerge branch 'stable/tracing' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad...
Guru Anbalagane [Tue, 6 Sep 2011 06:37:25 +0000 (23:37 -0700)]
Merge branch 'stable/tracing' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into uek2-stable

13 years agoMerge branch 'stable/xen-pciback-0.6.3.bugfixes' of git://git.kernel.org/pub/scm...
Guru Anbalagane [Tue, 6 Sep 2011 06:36:45 +0000 (23:36 -0700)]
Merge branch 'stable/xen-pciback-0.6.3.bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into uek2-stable

13 years agoMerge branches 'stable/drivers.other' and 'stable/drivers.bugfixes' of git://git...
Guru Anbalagane [Tue, 6 Sep 2011 06:35:17 +0000 (23:35 -0700)]
Merge branches 'stable/drivers.other' and 'stable/drivers.bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into uek2-stable

13 years agoMerge branch 'stable/pci.cleanups.v1' of git://git.kernel.org/pub/scm/linux/kernel...
Guru Anbalagane [Tue, 6 Sep 2011 06:32:59 +0000 (23:32 -0700)]
Merge branch 'stable/pci.cleanups.v1' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into uek2-stable

13 years agoMerge branch 'stable/drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad...
Guru Anbalagane [Tue, 6 Sep 2011 06:31:28 +0000 (23:31 -0700)]
Merge branch 'stable/drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into uek2-stable

13 years agoMerge branch 'for-guru' of git://git.kernel.org/pub/scm/linux/kernel/git/djm/tmem...
Guru Anbalagane [Tue, 6 Sep 2011 06:27:27 +0000 (23:27 -0700)]
Merge branch 'for-guru' of git://git.kernel.org/pub/scm/linux/kernel/git/djm/tmem into uek2-stable

13 years agoxen-blkback: fixed indentation and comments
Joe Jin [Mon, 15 Aug 2011 04:57:07 +0000 (12:57 +0800)]
xen-blkback: fixed indentation and comments

This patch fixes belows:

1. Fix code style issue.
2. Fix incorrect functions name in comments.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
Cc: Jens Axboe <jaxboe@fusionio.com>
Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/blkback: Make description more obvious.
Konrad Rzeszutek Wilk [Wed, 3 Aug 2011 15:12:17 +0000 (11:12 -0400)]
xen/blkback: Make description more obvious.

With the frontend having Xen but the backend not, it just looks odd:

  <*>   Xen virtual block device support
  <*>   Block-device backend driver

Fix it to have the 'Xen' in front of it.

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen-blkfront: Drop name and minor adjustments for emulated scsi devices
Stefan Bader [Thu, 14 Jul 2011 13:30:22 +0000 (15:30 +0200)]
xen-blkfront: Drop name and minor adjustments for emulated scsi devices

These were intended to avoid the namespace clash when representing
emulated IDE and SCSI devices. However that seems to confuse users
more than expected (a disk defined as sda becomes xvde).
So for now go back to the scheme which does no adjustments. This
will break when mixing IDE and SCSI names in the configuration of
guests but should be by now expected.

Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen-blkfront: Fix one off warning about name clash
Stefan Bader [Thu, 14 Jul 2011 13:30:37 +0000 (15:30 +0200)]
xen-blkfront: Fix one off warning about name clash

Avoid telling users to use xvde and onwards when using xvde.

Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen: Do not enable PV IPIs when vector callback not present
Stefano Stabellini [Wed, 17 Aug 2011 13:15:00 +0000 (15:15 +0200)]
xen: Do not enable PV IPIs when vector callback not present

Fix regression for HVM case on older (<4.1.1) hypervisors caused by

  commit 99bbb3a84a99cd04ab16b998b20f01a72cfa9f4f
  Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
  Date:   Thu Dec 2 17:55:10 2010 +0000

    xen: PV on HVM: support PV spinlocks and IPIs

This change replaced the SMP operations with event based handlers without
taking into account that this only works when the hypervisor supports
callback vectors. This causes unexplainable hangs early on boot for
HVM guests with more than one CPU.

BugLink: http://bugs.launchpad.net/bugs/791850
CC: stable@kernel.org
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Tested-and-Reported-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/x86: replace order-based range checking of M2P table by linear one
Jan Beulich [Tue, 16 Aug 2011 14:07:41 +0000 (15:07 +0100)]
xen/x86: replace order-based range checking of M2P table by linear one

The order-based approach is not only less efficient (requiring a shift
and a compare, typical generated code looking like this

mov eax, [machine_to_phys_order]
mov ecx, eax
shr ebx, cl
test ebx, ebx
jnz ...

whereas a direct check requires just a compare, like in

cmp ebx, [machine_to_phys_nr]
jae ...

), but also slightly dangerous in the 32-on-64 case - the element
address calculation can wrap if the next power of two boundary is
sufficiently far away from the actual upper limit of the table, and
hence can result in user space addresses being accessed (with it being
unknown what may actually be mapped there).

Additionally, the elimination of the mistaken use of fls() here (should
have been __fls()) fixes a latent issue on x86-64 that would trigger
if the code was run on a system with memory extending beyond the 44-bit
boundary.

CC: stable@kernel.org
Signed-off-by: Jan Beulich <jbeulich@novell.com>
[v1: Based on Jeremy's feedback]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen: Fix misleading WARN message at xen_release_chunk
Igor Mammedov [Tue, 2 Aug 2011 09:45:25 +0000 (11:45 +0200)]
xen: Fix misleading WARN message at xen_release_chunk

WARN message should not complain
 "Failed to release memory %lx-%lx err=%d\n"
                           ^^^^^^^
about range when it fails to release just one page,
instead it should say what pfn is not freed.

In addition line:
 printk(KERN_INFO "xen_release_chunk: looking at area pfn %lx-%lx: "
 ...
 printk(KERN_CONT "%lu pages freed\n", len);
will be broken if WARN in between this line is fired. So fix it
by using a single printk for this.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen: Fix printk() format in xen/setup.c
Igor Mammedov [Tue, 2 Aug 2011 09:45:24 +0000 (11:45 +0200)]
xen: Fix printk() format in xen/setup.c

Use correct format specifier for unsigned long.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/grant: Fix compile warning.
Konrad Rzeszutek Wilk [Fri, 22 Jul 2011 18:00:06 +0000 (14:00 -0400)]
xen/grant: Fix compile warning.

drivers/xen/grant-table.c:85: warning: ‘rc’ may be used uninitialized in this function

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen: xen-selfballoon.c needs more header files
Randy Dunlap [Wed, 10 Aug 2011 18:22:42 +0000 (11:22 -0700)]
xen: xen-selfballoon.c needs more header files

Fix build errors (found when CONFIG_SYSFS is not enabled):

drivers/xen/xen-selfballoon.c:446: warning: data definition has no type or storage class
drivers/xen/xen-selfballoon.c:446: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
drivers/xen/xen-selfballoon.c:446: warning: parameter names (without types) in function declaration
drivers/xen/xen-selfballoon.c:485: error: expected declaration specifiers or '...' before string constant
drivers/xen/xen-selfballoon.c:485: warning: data definition has no type or storage class
drivers/xen/xen-selfballoon.c:485: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/xen/xen-selfballoon.c:485: warning: function declaration isn't a prototype

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/self-balloon: Add dependency on tmem.
Konrad Rzeszutek Wilk [Sat, 30 Jul 2011 15:21:09 +0000 (11:21 -0400)]
xen/self-balloon: Add dependency on tmem.

Without enabling CONFIG_XEN_TMEM we get this:

drivers/xen/xen-selfballoon.c:461: undefined reference to `tmem_enabled'

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/balloon: Fix compile errors - missing header files.
Konrad Rzeszutek Wilk [Fri, 22 Jul 2011 18:01:16 +0000 (14:01 -0400)]
xen/balloon: Fix compile errors - missing header files.

With a specific enough .config file compile errors show
for missing workqueue declarations.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen: convert to 64 bit stats interface
stephen hemminger [Tue, 21 Jun 2011 05:35:31 +0000 (05:35 +0000)]
xen: convert to 64 bit stats interface

Convert xen driver to 64 bit statistics interface.
Use stats_sync to ensure that 64 bit update is read atomically on 32 bit platform.
Put hot statistics into per-cpu table.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxen/netback: Add module alias for autoloading
Bastian Blank [Thu, 30 Jun 2011 18:19:09 +0000 (11:19 -0700)]
xen/netback: Add module alias for autoloading

Add xen-backend:vif module alias to the xen-netback module. This allows
automatic loading of the module.

Signed-off-by: Bastian Blank <waldi@debian.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/blkback: Don't let in-flight requests defer pending ones.
Daniel Stodden [Sat, 28 May 2011 20:21:10 +0000 (13:21 -0700)]
xen/blkback: Don't let in-flight requests defer pending ones.

Running RING_FINAL_CHECK_FOR_REQUESTS from make_response is a bad
idea. It means that in-flight I/O is essentially blocking continued
batches. This essentially kills throughput on frontends which unplug
(or even just notify) early and rightfully assume addtional requests
will be picked up on time, not synchronously.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
[v1: Rebased and fixed compile problems]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/blkback: Add module alias for autoloading
Bastian Blank [Wed, 29 Jun 2011 12:40:50 +0000 (14:40 +0200)]
xen/blkback: Add module alias for autoloading

Add xen-backend:vbd module alias to the xen-blkback module. This allows
automatic loading of the module.

Signed-off-by: Bastian Blank <waldi@debian.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agomm: extend memory hotplug API to allow memory hotplug in virtual machines
Daniel Kiper [Tue, 26 Jul 2011 00:12:05 +0000 (17:12 -0700)]
mm: extend memory hotplug API to allow memory hotplug in virtual machines

This patch contains online_page_callback and apropriate functions for
registering/unregistering online page callbacks.  It allows to do some
machine specific tasks during online page stage which is required to
implement memory hotplug in virtual machines.  Currently this patch is
required by latest memory hotplug support for Xen balloon driver patch
which will be posted soon.

Additionally, originial online_page() function was splited into
following functions doing "atomic" operations:

  - __online_page_set_limits() - set new limits for memory management code,
  - __online_page_increment_counters() - increment totalram_pages and totalhigh_pages,
  - __online_page_free() - free page to allocator.

It was done to:
  - not duplicate existing code,
  - ease hotplug code devolpment by usage of well defined interface,
  - avoid stupid bugs which are unavoidable when the same code
    (by design) is developed in many places.

[akpm@linux-foundation.org: use explicit indirect-call syntax]
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoxen/balloon: memory hotplug support for Xen balloon driver
Daniel Kiper [Tue, 26 Jul 2011 00:12:06 +0000 (17:12 -0700)]
xen/balloon: memory hotplug support for Xen balloon driver

Memory hotplug support for Xen balloon driver.  It should be mentioned
that hotplugged memory is not onlined automatically.  It should be onlined
by user through standard sysfs interface.

Memory could be hotplugged in following steps:

  1) dom0: xl mem-max <domU> <maxmem>
     where <maxmem> is >= requested memory size,

  2) dom0: xl mem-set <domU> <memory>
     where <memory> is requested memory size; alternatively memory
     could be added by writing proper value to
     /sys/devices/system/xen_memory/xen_memory0/target or
     /sys/devices/system/xen_memory/xen_memory0/target_kb on dumU,

  3) domU: for i in /sys/devices/system/memory/memory*/state; do \
             [ "`cat "$i"`" = offline ] && echo online > "$i"; done

Memory could be onlined automatically on domU by adding following line to
udev rules:

  SUBSYSTEM=="memory", ACTION=="add", RUN+="/bin/sh -c '[ -f /sys$devpath/state ] && echo online > /sys$devpath/state'"

In that case step 3 should be omitted.

Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoInput: xen-kbdfront - enable driver for HVM guests
Stefano Stabellini [Tue, 5 Jul 2011 02:22:00 +0000 (19:22 -0700)]
Input: xen-kbdfront - enable driver for HVM guests

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoxen/tracing: Fix tracing config option properly
Jeremy Fitzhardinge [Thu, 11 Aug 2011 20:17:20 +0000 (13:17 -0700)]
xen/tracing: Fix tracing config option properly

Steven Rostedt says we should use CONFIG_EVENT_TRACING.

Cc:Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/trace: Fix compile error when CONFIG_XEN_PRIVILEGED_GUEST is not set
Konrad Rzeszutek Wilk [Thu, 4 Aug 2011 22:42:10 +0000 (18:42 -0400)]
xen/trace: Fix compile error when CONFIG_XEN_PRIVILEGED_GUEST is not set

with CONFIG_XEN and CONFIG_FTRACE set we get this:

arch/x86/xen/trace.c:22: error: ‘__HYPERVISOR_console_io’ undeclared here (not in a function)
arch/x86/xen/trace.c:22: error: array index in initializer not of integer type
arch/x86/xen/trace.c:22: error: (near initialization for ‘xen_hypercall_names’)
arch/x86/xen/trace.c:23: error: ‘__HYPERVISOR_physdev_op_compat’ undeclared here (not in a function)

Issue was that the definitions of __HYPERVISOR were not pulled
if CONFIG_XEN_PRIVILEGED_GUEST was not set.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years ago xen/tracing: it looks like we wanted CONFIG_FTRACE
Jeremy Fitzhardinge [Wed, 3 Aug 2011 16:43:44 +0000 (09:43 -0700)]
 xen/tracing: it looks like we wanted CONFIG_FTRACE

Apparently we wanted CONFIG_FTRACE rather the CONFIG_FUNCTION_TRACER.

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Tested-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/tracing: fix compile errors when tracing is disabled.
Jeremy Fitzhardinge [Mon, 25 Jul 2011 22:51:02 +0000 (15:51 -0700)]
xen/tracing: fix compile errors when tracing is disabled.

When CONFIG_FUNCTION_TRACER is disabled, compilation fails as follows:
  CC      arch/x86/xen/setup.o
In file included from arch/x86/include/asm/xen/hypercall.h:42,
                 from arch/x86/xen/setup.c:19:
include/trace/events/xen.h:31: warning: 'struct multicall_entry' declared inside parameter list
include/trace/events/xen.h:31: warning: its scope is only this definition or declaration, which is probably not what you want
include/trace/events/xen.h:31: warning: 'struct multicall_entry' declared inside parameter list
include/trace/events/xen.h:31: warning: 'struct multicall_entry' declared inside parameter list
include/trace/events/xen.h:31: warning: 'struct multicall_entry' declared inside parameter list
[...]
arch/x86/xen/trace.c:5: error: '__HYPERVISOR_set_trap_table' undeclared here (not in a function)
arch/x86/xen/trace.c:5: error: array index in initializer not of integer type
arch/x86/xen/trace.c:5: error: (near initialization for 'xen_hypercall_names')
arch/x86/xen/trace.c:6: error: '__HYPERVISOR_mmu_update' undeclared here (not in a function)
arch/x86/xen/trace.c:6: error: array index in initializer not of integer type
arch/x86/xen/trace.c:6: error: (near initialization for 'xen_hypercall_names')

Fix this by making sure struct multicall_entry has a declaration in
scope at all times, and don't bother compiling xen/trace.c when tracing
is disabled.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoxen/trace: use class for multicall trace
Jeremy Fitzhardinge [Tue, 21 Jun 2011 00:52:13 +0000 (17:52 -0700)]
xen/trace: use class for multicall trace

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoxen/trace: convert mmu events to use DECLARE_EVENT_CLASS()/DEFINE_EVENT()
Jeremy Fitzhardinge [Tue, 21 Jun 2011 00:48:40 +0000 (17:48 -0700)]
xen/trace: convert mmu events to use DECLARE_EVENT_CLASS()/DEFINE_EVENT()

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoxen/multicall: move *idx fields to start of mc_buffer
Jeremy Fitzhardinge [Sat, 18 Dec 2010 01:33:11 +0000 (17:33 -0800)]
xen/multicall: move *idx fields to start of mc_buffer

The CPU would prefer small offsets.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoxen/multicall: special-case singleton hypercalls
Jeremy Fitzhardinge [Sat, 18 Dec 2010 01:32:28 +0000 (17:32 -0800)]
xen/multicall: special-case singleton hypercalls

Singleton calls seem to end up being pretty common, so just
directly call the hypercall rather than going via multicall.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoxen/multicalls: add unlikely around slowpath in __xen_mc_entry()
Jeremy Fitzhardinge [Sat, 18 Dec 2010 01:20:25 +0000 (17:20 -0800)]
xen/multicalls: add unlikely around slowpath in __xen_mc_entry()

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoxen/multicalls: disable MC_DEBUG
Jeremy Fitzhardinge [Sat, 18 Dec 2010 01:19:42 +0000 (17:19 -0800)]
xen/multicalls: disable MC_DEBUG

It's useful - and probably should be a config - but its very heavyweight,
especially with the tracing stuff to help sort out problems.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoxen/mmu: tune pgtable alloc/release
Jeremy Fitzhardinge [Fri, 17 Dec 2010 22:58:43 +0000 (14:58 -0800)]
xen/mmu: tune pgtable alloc/release

Make sure the fastpath code is inlined.  Batch the page permission change
and the pin/unpin, and make sure that it can be batched with any
adjacent set_pte/pmd/etc operations.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoxen/mmu: use extend_args for more mmuext updates
Jeremy Fitzhardinge [Fri, 17 Dec 2010 17:17:32 +0000 (09:17 -0800)]
xen/mmu: use extend_args for more mmuext updates

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoxen/trace: add tlb flush tracepoints
Jeremy Fitzhardinge [Mon, 20 Dec 2010 21:15:04 +0000 (13:15 -0800)]
xen/trace: add tlb flush tracepoints

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoxen/trace: add segment desc tracing
Jeremy Fitzhardinge [Fri, 17 Dec 2010 23:54:28 +0000 (15:54 -0800)]
xen/trace: add segment desc tracing

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoxen/trace: add xen_pgd_(un)pin tracepoints
Jeremy Fitzhardinge [Fri, 17 Dec 2010 23:31:23 +0000 (15:31 -0800)]
xen/trace: add xen_pgd_(un)pin tracepoints

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoxen/trace: add ptpage alloc/release tracepoints
Jeremy Fitzhardinge [Fri, 17 Dec 2010 22:21:17 +0000 (14:21 -0800)]
xen/trace: add ptpage alloc/release tracepoints

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoxen/trace: add mmu tracepoints
Jeremy Fitzhardinge [Fri, 17 Dec 2010 01:02:35 +0000 (17:02 -0800)]
xen/trace: add mmu tracepoints

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>