]> xenbits.xensource.com Git - xenclient/kernel.git/log
xenclient/kernel.git
16 years agolinux/x86-64: remove _TIF_SECCOMP check from ret_from_fork
Keir Fraser [Mon, 18 Aug 2008 09:52:29 +0000 (10:52 +0100)]
linux/x86-64: remove _TIF_SECCOMP check from ret_from_fork

Native doesn't have this, and I can't see why the Xen kernel should be
different here.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years ago[IA64] xencomm support for HVMOP_set_mem_type.
Isaku Yamahata [Thu, 14 Aug 2008 02:03:53 +0000 (11:03 +0900)]
[IA64] xencomm support for HVMOP_set_mem_type.

remove the runtime warning when HVMOP_set_mem_type is used.
> xencomm_privcmd_hvm_op: unknown HVMOP 8
add xencomm support of HVMOP_set_mem_type.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years ago[IA64] Fix xc_save for PV domains
Isaku Yamahata [Wed, 13 Aug 2008 13:50:27 +0000 (22:50 +0900)]
[IA64] Fix xc_save for PV domains

Saving PV domains fails with the following error:
  xc_save: failed to subscribe to domain: -1
This adds XEN_DOMCTL_subscribe to xencomm.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
16 years agoFix the build after public header sync.
Keir Fraser [Wed, 13 Aug 2008 13:01:49 +0000 (14:01 +0100)]
Fix the build after public header sync.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoSync xen public headers.
Keir Fraser [Wed, 13 Aug 2008 12:53:31 +0000 (13:53 +0100)]
Sync xen public headers.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoMSI-X: enhancement
Keir Fraser [Wed, 13 Aug 2008 12:46:14 +0000 (13:46 +0100)]
MSI-X: enhancement

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoSync domctl.h for XEN_DOMCTL_subscribe
Keir Fraser [Wed, 13 Aug 2008 09:00:09 +0000 (10:00 +0100)]
Sync domctl.h for XEN_DOMCTL_subscribe

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
16 years agoRevert 630:9c730ffb48f. Crashes on boot.
Keir Fraser [Mon, 11 Aug 2008 12:39:00 +0000 (13:39 +0100)]
Revert 630:9c730ffb48f. Crashes on boot.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agomerge with linux-2.6.18-xen.hg
Isaku Yamahata [Mon, 11 Aug 2008 02:05:57 +0000 (11:05 +0900)]
merge with linux-2.6.18-xen.hg

16 years ago[IA64] Fix PV driver domains - xenlinux xencomm support
Isaku Yamahata [Fri, 8 Aug 2008 02:39:35 +0000 (11:39 +0900)]
[IA64] Fix PV driver domains - xenlinux xencomm support

This adds xencomm support for several PHYSDEVOP calls (map_pirq and
unmap_pirq) as well as XEN_DOMCTL_assign_device.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
16 years agomerge with linux-2.6.18-xen.hg
Isaku Yamahata [Thu, 7 Aug 2008 02:58:10 +0000 (11:58 +0900)]
merge with linux-2.6.18-xen.hg

16 years agoDon't WARN_ON -ENOSYS from PHYSDEVOP_manage_pci_remove
Keir Fraser [Fri, 8 Aug 2008 09:54:59 +0000 (10:54 +0100)]
Don't WARN_ON -ENOSYS from PHYSDEVOP_manage_pci_remove

We let -ENOSYS slip through on the add side to support old
hypervisors, let's do the same on the remove end so we don't get stack
dumps during bootup.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
16 years ago[IA64] improve response time in dom 0 at creating a guest domain
Isaku Yamahata [Tue, 5 Aug 2008 03:19:38 +0000 (12:19 +0900)]
[IA64] improve response time in dom 0 at creating a guest domain

The hypercall takes several hundred mili seconds,
and it takes around 5 mili seconds with my new patch.
Time of one hypercall should be smaller than a vcpu time slice.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
16 years agoxen suspend: Fix suspend-via-evtchn reentrancy.
Keir Fraser [Thu, 31 Jul 2008 14:33:54 +0000 (15:33 +0100)]
xen suspend: Fix suspend-via-evtchn reentrancy.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agonet accel: Don't set accel watch on suspend_cancel unless we're in a
Keir Fraser [Thu, 31 Jul 2008 08:46:58 +0000 (09:46 +0100)]
net accel: Don't set accel watch on suspend_cancel unless we're in a
state where it has meaning.

From: Kieran Mansley <kmansley@solarflare.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agolinux/blkfront: Add "media" file to vbd sysfs directory
Keir Fraser [Tue, 29 Jul 2008 15:16:31 +0000 (16:16 +0100)]
linux/blkfront: Add "media" file to vbd sysfs directory

Patch adds "media" file to the vbd sysfs directory.  File contains a
string,  cdrom or disk.

Currently all PV vbd devices are seen by HAL as "disk".  Applications
that query HAL info.capabilities attribute to determine a block
devices capabilities fail to see a PV cdrom as having CDROM
capabilities. With the attached patch and a small corresponding patch
to HAL, applications that query HAL for the storage type of the block
device will see it as a disk or a cdrom.  Standard Linux IDE devices
use this same mechanism.

lshal of vbd without patches:
     info.capabilities = {'storage', 'block'} (string list)
lshal of vbd with patches:
    info.capabilities = {'storage', 'block', 'storage.cdrom'} (string
     list)

Signed-off-by: Pat Campbell <plc@novell.com>
16 years agoDecouple xen controlled cpufreq path from dom0 CONFIG_CPU_FREQ,
Keir Fraser [Tue, 29 Jul 2008 12:26:15 +0000 (13:26 +0100)]
Decouple xen controlled cpufreq path from dom0 CONFIG_CPU_FREQ,
since only processor_perflib.o is required for necessary freq
information parse. This avoids hacks to cpufreq drivers and
fortunately the change is not intrusive.

Signed-off-by Kevin Tian <kevin.tian@intel.com>
Signed-off-by Jinsong Liu <jinsong.liu@inte.com>

16 years agoMove xen-pm options from dom0 cmdline option to start info.
Keir Fraser [Mon, 28 Jul 2008 10:43:36 +0000 (11:43 +0100)]
Move xen-pm options from dom0 cmdline option to start info.

Thus to avoid xen-pm being manually enforced by end user in dom0
cmdline but without enabling them in xen.

Signed-off-by: Wei Gang <gang.wei@intel.com>
16 years agoacpi: Fix broken extctnl mechanism.
Keir Fraser [Mon, 28 Jul 2008 10:26:33 +0000 (11:26 +0100)]
acpi: Fix broken extctnl mechanism.

Fn arch_acpi_processor_init_extcntl need to be called before any
acpi_processor init stuff, otherwise many special paths for
xen-cpu-idle & xen-cpu-freq can't get executed. So keep
arch_acpi_processor_init_extcntl call in processor_extcntl_init and
call it very early, move other stuff of processor_extcntl_init into a
new fn processor_extcntl_prepare.

Signed-off-by: Wei Gang <gang.wei@intel.com>
16 years ago[IA64] xencomm: support PHYSDEVOP_manage_pci_add/remove.
Isaku Yamahata [Mon, 28 Jul 2008 08:24:40 +0000 (17:24 +0900)]
[IA64] xencomm: support PHYSDEVOP_manage_pci_add/remove.

add support PHYSDEVOP_manage_pci_add/remove which were
newly added.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years ago[IA64] kexec: remove unnecessary #ifdef CONFIG_XEN.
Isaku Yamahata [Mon, 28 Jul 2008 08:24:37 +0000 (17:24 +0900)]
[IA64] kexec: remove unnecessary #ifdef CONFIG_XEN.

There is no specific reason to reduce memory and stack registers
for kexec. Because the page for relocate_kernel code is allocated
by kimage_alloc_pages() which calls xen_limit_pages_to_max_mfn()
so that pages are guaranteed to be machine contiguous.
Remove those unnecessary #ifdef CONFIG_XEN.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years ago[IA64] initialize /proc/iomem_machine properly when discontig mem.
Isaku Yamahata [Mon, 28 Jul 2008 08:22:46 +0000 (17:22 +0900)]
[IA64] initialize /proc/iomem_machine properly when discontig mem.

With CONFIG_DISCONTIGMEM enabled /proc/iomem_machine isn't
initialized properly so that kexec failes because kexec-tools wrongly
tries to use ia64 boot mem (or efi memmap area).
This patch fixes /proc/iomem_machine.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years ago[IA64] backport Pick highest possible saved_max_pfn for crash_dump
Isaku Yamahata [Mon, 28 Jul 2008 08:22:45 +0000 (17:22 +0900)]
[IA64] backport Pick highest possible saved_max_pfn for crash_dump

backport Upstream Linux changeset e55fdf11f3029bcd41b1b9547ad9db12c27eea76

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years ago[IA64] backport point saved_max_pfn to the max_pfn of the entire system
Isaku Yamahata [Mon, 28 Jul 2008 08:22:45 +0000 (17:22 +0900)]
[IA64] backport point saved_max_pfn to the max_pfn of the entire system

backport Upstream Linux changeset f4a570997e71b892805a1e71303d09c327af135f

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years ago[IA64] remove warning.
Isaku Yamahata [Mon, 28 Jul 2008 08:22:45 +0000 (17:22 +0900)]
[IA64] remove warning.

This patch removes the following warning.

> linux-2.6.18-xen.hg/arch/ia64/kernel/efi.c: In function 'efi_initialize_iomem_machine_resources':
> linux-2.6.18-xen.hg/arch/ia64/kernel/efi.c:1185: warning: control reaches end of non-void function

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years ago[IA64] Support timer vector IPIs in PV code
Isaku Yamahata [Mon, 28 Jul 2008 01:53:43 +0000 (10:53 +0900)]
[IA64] Support timer vector IPIs in PV code

Add support for IA64_TIMER_VECTOR as a paravirtualized IPI target

Necessary for the latest upstream Linux implementation of
check_sal_cache_flush() 3463a93def55c309f3c0d0a8aaf216be3be42d64

Upstream Linux recently added this change:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3463a93def55c309f3c0d0a8aaf216be3be42d64

Now, for a platform bug check, we issue an IPI for the IA64_TIMER_VECTOR
and wait for it to show up in the IRR.  Since a PV kernel doesn't
support a timer IPI, this never happens.  The fix is simply to tie this
into xen_send_ipi() for this case.  This doesn't actually happen on
2.6.18, but since vendors are backporting changes from upstream, I think
it's good to have this in the reference tree

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
16 years agox86_64: Build fixes.
Keir Fraser [Sun, 10 Aug 2008 17:05:09 +0000 (18:05 +0100)]
x86_64: Build fixes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agolinux/x86: fix issues with the assignment of huge amounts of memory
Keir Fraser [Fri, 8 Aug 2008 13:24:33 +0000 (14:24 +0100)]
linux/x86: fix issues with the assignment of huge amounts of memory

At the same time remove the non-applicable and broken support for the
memmap= command line option.
Also fix the overlap of the modules area with the fixmaps on x86-64.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux/x86-64: use xen_new_user_pt() rather than open-coding it
Keir Fraser [Fri, 8 Aug 2008 13:22:52 +0000 (14:22 +0100)]
linux/x86-64: use xen_new_user_pt() rather than open-coding it

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux: some Kconfig adjustments
Keir Fraser [Fri, 8 Aug 2008 13:21:32 +0000 (14:21 +0100)]
linux: some Kconfig adjustments

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux/acpi: more extcntl code adjustments
Keir Fraser [Fri, 8 Aug 2008 13:20:34 +0000 (14:20 +0100)]
linux/acpi: more extcntl code adjustments

Restore a preprocessor conditional for native to remain unaltered.

Add necessary definitions for being able to build with
CONFIG_ACPI_DEBUG.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agox86, xen: get_time_values_from_Xen() is not IRQ-safe.
Keir Fraser [Fri, 8 Aug 2008 11:43:57 +0000 (12:43 +0100)]
x86, xen: get_time_values_from_Xen() is not IRQ-safe.
Also the loop header should act on local variables for safety.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agomsi: Remove unnecessary warning information
Keir Fraser [Fri, 8 Aug 2008 09:57:41 +0000 (10:57 +0100)]
msi: Remove unnecessary warning information
From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agox86: restrict keyboard io ports reservation to make ipmi driver work
Keir Fraser [Fri, 25 Jul 2008 08:42:29 +0000 (09:42 +0100)]
x86: restrict keyboard io ports reservation to make ipmi driver work

Straightforward port of
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9096bd7a66efbe406910365c5206a32eed3875af

Quoting its commit message:

    x86: restrict keyboard io ports reservation to make ipmi driver
    work

    On some of our (single board computer) boards (x86) we are using
    an IPMI controller that uses I/O ports 0x62 and 0x66 for a KCS
    (keyboard controller style) IPMI system interface.

    Trying to load the openipmi driver fails, because the ports
    (0x62/0x66) are reserved for keyboard. keyboard reserves the full
    range 0x60-0x6F while it doesn't need to.

    Reserve only ports 0x60 and 0x64 for the legacy PS/2 i8042 keyboad
    controller instead of 0x60-0x6F to allow the openipmi driver to
    work.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
16 years agolinux/i386: enforce PAE
Keir Fraser [Thu, 24 Jul 2008 13:16:04 +0000 (14:16 +0100)]
linux/i386: enforce PAE

Now that building non-PAE kernels isn't really possible anymore, force
X86_PAE on when X86_XEN gets selected.

While not in this patch, include/asm-i386/mach-xen/pgtable-2level*.h
could also be removed to reflect that state.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux/x86-64: (re-)add warning to set_pte_phys_ma()
Keir Fraser [Wed, 23 Jul 2008 13:21:58 +0000 (14:21 +0100)]
linux/x86-64: (re-)add warning to set_pte_phys_ma()

.. as a similar one exists in set_pte_phys() (and also in native).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux/x86-64: eliminate dead code
Keir Fraser [Wed, 23 Jul 2008 13:21:16 +0000 (14:21 +0100)]
linux/x86-64: eliminate dead code

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux/acpi: adjust extcntl's changes to (mostly) common code, mostly for readability
Keir Fraser [Wed, 23 Jul 2008 13:20:56 +0000 (14:20 +0100)]
linux/acpi: adjust extcntl's changes to (mostly) common code, mostly for readability

While I realize that it may have been upon my request that all these
#ifdef-s were introduced, I think this went too far here: With the
abstraction in include/acpi/processor.h in place, the code still
guarantees even without all these #ifdef-s that in native kernels
built from the same source the logic will not change.

The one thing that appears a little weak still is the NR_ACPI_CPUS
construct - nothing guarantees that the ACPI IDs are constrained to 8
bits, and hence using an array here doesn't seem either safe or
scalable looking forward. To make the issue explict, the patch adds a
respective BUG_ON().

Also remove a stray export.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux/acpi: adjust extcntl code so that CONFIG_ACPI_PROCESSOR=m is possible again
Keir Fraser [Wed, 23 Jul 2008 12:37:30 +0000 (13:37 +0100)]
linux/acpi: adjust extcntl code so that CONFIG_ACPI_PROCESSOR=m is possible again

This is done by inverting the calling direction for registering the
extcntl_ops structure, similar to arch_acpi_processor_init_pdc().

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoxen: fix warnings (some errors with -Werror-implicit-function-declaration) in PCI...
Keir Fraser [Wed, 23 Jul 2008 12:36:53 +0000 (13:36 +0100)]
xen: fix warnings (some errors with -Werror-implicit-function-declaration) in PCI-MSI code

Plus a little bit of other cleanup.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agopvscsi: add retry in REPORT_LUN emulation
Keir Fraser [Wed, 23 Jul 2008 08:57:44 +0000 (09:57 +0100)]
pvscsi: add retry in REPORT_LUN emulation

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agolinux/evtchn: Add memory barriers to evtchn ring accesses.
Keir Fraser [Tue, 22 Jul 2008 10:59:42 +0000 (11:59 +0100)]
linux/evtchn: Add memory barriers to evtchn ring accesses.

Xenstore infrequently hangs up on IA64.
Actually the xenstored is still alive but no response from
xenstore-XXX commands.

After tracking down, I've found that evtchn_read() infrequently
returns a wrong evtchn port number and evtchn_write() never
unmask the exact port.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Yes, updates of the ring_prod and ring_cons are separately protected
by different locks/mutexes, but the data communication between
producer and consumer is lock-free. Barriers are needed.

Acked-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoFrom 2.6.19: Set SCI_EN when resuming from S3
Keir Fraser [Mon, 21 Jul 2008 08:51:36 +0000 (09:51 +0100)]
From 2.6.19: Set SCI_EN when resuming from S3

When resuming from S3, some platforms may clear SCI_EN bit in
PM1_CONTROL register and cause SCI interrupt disabled in Domain0. This
patch fixes this issue as Linux-2.6.19 does.

Signed-off-by: Huacai Chen <huacai.chen@intel.com>
16 years agoxen/x86: fix compatibility handling
Keir Fraser [Fri, 18 Jul 2008 10:26:26 +0000 (11:26 +0100)]
xen/x86: fix compatibility handling

A recent need for our kernel was to be able to run on 3.0.2-based Xen,
and this pointed out that while the fallback code in hypercall.h deals
with most of the cases, the multicalls used in the context switch code
didn't have appropriate fallback mechanisms. Short of breaking up the
multicall or checking individual operation status, the easier method
to fix this seemed to be to simply use the old hypercalls when
CONFIG_XEN_COMPAT_030002_AND_LATER is defined.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoxen/i386: fix ordering in pte_free_kernel()
Keir Fraser [Fri, 18 Jul 2008 10:25:56 +0000 (11:25 +0100)]
xen/i386: fix ordering in pte_free_kernel()

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agopvSCSI: compilation fix.
Keir Fraser [Fri, 18 Jul 2008 10:25:07 +0000 (11:25 +0100)]
pvSCSI: compilation fix.

This patch fixes the following compilation error.
scsiback_interface_exit() is called by scsiback_init().
remove __exit.

>  LD      .tmp_vmlinux1
>`scsiback_interface_exit' referenced in section `.init.text' of
>drivers/built-in.o: defined in discarded section `.exit.text' of
>drivers/built-in.o

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agopcifront/back: Fix handling of device disconnect.
Keir Fraser [Wed, 16 Jul 2008 12:51:36 +0000 (13:51 +0100)]
pcifront/back: Fix handling of device disconnect.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
16 years agopvSCSI: Sanity check for REPORT_LUN emulation
Keir Fraser [Wed, 16 Jul 2008 10:19:14 +0000 (11:19 +0100)]
pvSCSI: Sanity check for REPORT_LUN emulation

- Sanity check for REPORT_LUN emulation.
- Return "residual" value from backend to frontend. The residual value
  is used to represent difference between request size the frontend
  requested and size backend actually responded.

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agonetback: Ensure we send offline udev event when an interface goes away.
Keir Fraser [Tue, 15 Jul 2008 15:39:39 +0000 (16:39 +0100)]
netback: Ensure we send offline udev event when an interface goes away.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agopvSCSI: More fixes (including locking cleanups)
Keir Fraser [Mon, 14 Jul 2008 09:15:44 +0000 (10:15 +0100)]
pvSCSI: More fixes (including locking cleanups)

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agogntdev: Do not take mutexes in initialiser function.
Keir Fraser [Fri, 11 Jul 2008 14:34:33 +0000 (15:34 +0100)]
gntdev: Do not take mutexes in initialiser function.
From: Derek Murray <derek.murray@gmail.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoBlkfront greater-than-16-vbd fixes
Keir Fraser [Wed, 9 Jul 2008 09:45:09 +0000 (10:45 +0100)]
Blkfront greater-than-16-vbd fixes

While reading through the code again, I realized that if you did
something like:

block-attach xvdb
block-attach xvdq
block-attach xvdc

The extended blkfront code would allocate the wrong device for xvdc,
since we had changed mi->type along the way.  To fix this, have a
separate "major_info" entry for the extended block devices, even
though it isn't technically a different major number.  With these
fixes in place, the above sequence works for me.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
16 years agoBlktap kernel compat layer
Keir Fraser [Wed, 9 Jul 2008 09:44:08 +0000 (10:44 +0100)]
Blktap kernel compat layer

The kernel side of the blktap extended vbd compatibility layer.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
16 years agopvSCSI: cleanup and fix few bugs
Keir Fraser [Tue, 8 Jul 2008 08:31:24 +0000 (09:31 +0100)]
pvSCSI: cleanup and fix few bugs

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agopvSCSI: Fix some aspects of attach/detach functionality
Keir Fraser [Tue, 8 Jul 2008 08:30:34 +0000 (09:30 +0100)]
pvSCSI: Fix some aspects of attach/detach functionality

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agopvSCSI: add sanity checks
Keir Fraser [Tue, 8 Jul 2008 08:29:42 +0000 (09:29 +0100)]
pvSCSI: add sanity checks

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agoMake new PCI device probe work with older hypervisors
Keir Fraser [Mon, 7 Jul 2008 12:52:16 +0000 (13:52 +0100)]
Make new PCI device probe work with older hypervisors

Be a bit more forgiving if hypervisor does not implement the
manage_pci_add hypercall.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
16 years agoHook Linux's PCI probe and remove callbacks
Keir Fraser [Fri, 4 Jul 2008 16:55:07 +0000 (17:55 +0100)]
Hook Linux's PCI probe and remove callbacks

Hijack the pci_bus_type probe and remove callbacks.  This option only
requires modification to the Xen specific part of Linux.

Signed-off-by: Joshua LeVasseur <joshua.levasseur@netronome.com>
16 years agoAdd hypercall for adding and removing PCI devices
Keir Fraser [Fri, 4 Jul 2008 16:53:20 +0000 (17:53 +0100)]
Add hypercall for adding and removing PCI devices

Signed-off-by: Joshua LeVasseur <joshua.levasseur@netronome.com>
16 years agoSet up an event channel to accept suspend requests.
Keir Fraser [Fri, 4 Jul 2008 10:59:59 +0000 (11:59 +0100)]
Set up an event channel to accept suspend requests.
This is much faster than going through xenstore.

Signed-off-by: Brendan Cullly <brendan@cs.ubc.ca>
16 years agopvSCSI: Clean up code
Keir Fraser [Thu, 3 Jul 2008 12:40:02 +0000 (13:40 +0100)]
pvSCSI: Clean up code

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agopvSCSI: Fix many points of backend/frontend driver
Keir Fraser [Thu, 3 Jul 2008 12:36:53 +0000 (13:36 +0100)]
pvSCSI: Fix many points of backend/frontend driver

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agopvSCSI: Add white list to SCSI command emulation
Keir Fraser [Thu, 3 Jul 2008 12:35:40 +0000 (13:35 +0100)]
pvSCSI: Add white list to SCSI command emulation

Add "white list" control to SCSI command emulation. Current setting
allows following mandatory and safe commands.

TEST UNIT READY
REZERO UNIT
REQUEST SENSE
FORMAT UNIT
READ BLOCK LIMITS
READ(06)
WRITE(06)
WRITE FILEMARKS
SPACE
INQUIRY
ERASE
MODE SENSE(06)
SEND DIAGNOSTIC
READ CAPACITY
READ(10)
WRITE(10)
REPORT LUN

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agopciback: Fix the build.
Keir Fraser [Thu, 3 Jul 2008 10:03:53 +0000 (11:03 +0100)]
pciback: Fix the build.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
16 years agoxenbus-dev watches: Actually add the extra data to the watch event
Ian Campbell [Thu, 3 Jul 2008 08:17:36 +0000 (09:17 +0100)]
xenbus-dev watches: Actually add the extra data to the watch event
instead of adding the token twice.

Signed-off-by: Christian Limpach <Christian.Limpach@citrix.com>
16 years agopciif: Fix bogus rename of msix_entries field.
Keir Fraser [Wed, 2 Jul 2008 19:53:00 +0000 (20:53 +0100)]
pciif: Fix bogus rename of msix_entries field.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agopciif: do not depend on linux' msix_entries, and use a conversion loop
Keir Fraser [Wed, 2 Jul 2008 12:36:55 +0000 (13:36 +0100)]
pciif: do not depend on linux' msix_entries, and use a conversion loop
instead (already done in the frontend).

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
16 years agox86/64: Fix syscall return code when ptrace or audit is active
Keir Fraser [Mon, 30 Jun 2008 15:14:04 +0000 (16:14 +0100)]
x86/64: Fix syscall return code when ptrace or audit is active

Fix the return value from the 64-bit kernel when you call with a bad
system call number with tracing enabled (for either ptrace or audit).
What should happen is that the user process gets a -ENOSYS return
call from the syscall; what actually happens (only in the 64-bit
kernel) is that you get back the system call number. The 32-bit
kernel does not suffer from this bug.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
16 years agoblktap: bugfix and support extended device numbers
Keir Fraser [Fri, 27 Jun 2008 15:07:56 +0000 (16:07 +0100)]
blktap: bugfix and support extended device numbers

This simple patch puts two fixes into the blktap backend.  The first
is a change of busid from an unsigned short to a u32 so we can
accommodate the new expanded format (which doesn't fit into 16-bits).
The second is a minor fix to signal_tapdisk(); while developing, if
the tools happen to set up the tapfds wrong, you can get into a
situation where the idx passed to signal_tapdisk() is NULL, causing a
kernel OOPS.  The fix for signal_tapdisk() just returns if the idx is
negative, preventing the crash.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
16 years agoblkfront: Fix blkfront to accept expanded devices (v2)
Keir Fraser [Fri, 27 Jun 2008 15:06:41 +0000 (16:06 +0100)]
blkfront: Fix blkfront to accept expanded devices (v2)

This patch implements the new extended allocation scheme on the
blkfront end. Note that there is a new xenbus node for the extended
stuff, called "virtual-device-ext".  On a blkfront_probe(), if nothing
is found in "virtual-device", then it will go looking in
"virtual-device-ext". This prevents old guest kernels from potentially
mis-interpreting data in "virtual-device" (and then subsequently
crashing).

Changes since v1:
- Restructure the changes to remove duplicate code
- Add some error checks on the xlvbd_add() path.  Note that I did not
do full error checking on the existing numbering scheme (i.e. the
202<<8 for xvd, 3<<8 for IDE, 8<<8 for SCSI, etc).  The reason I
didn't do full checking is that it is perfectly legal to do something
like: "xm block-attach pv tap:aio:/disk 0xCB10 w" (which is major
203), which then maps onto the 202 xvd device.  It's not particularly
nice behavior, in my opinion, but changing it now would change this
behavior.  So the only check I added was to make sure we weren't above
the extended device range (1<<28).

Signed-off-by: Chris Lalancette <clalance@redhat.com>
16 years agoFix CMOS time error after writing /proc/acpi/alarm
Keir Fraser [Fri, 27 Jun 2008 13:46:41 +0000 (14:46 +0100)]
Fix CMOS time error after writing /proc/acpi/alarm

When writing /proc/acpi/alarm in adjust mode, e.g.
        echo "+0000-00-00 00:00:15" >/proc/acpi/alarm
The "century" field should be read and added to "year" field before
writing, otherwise the CMOS time will go back to 2000 years ago, e.g.
        # cat /proc/acpi/alarm
        0008-06-21 11:38:46=20
Then the system time may be reset to the date of manufacture after
rebooting. This patch fixes this issue.

Signed-off-by: Huacai Chen <huacai.chen@intel.com>
16 years agoprivcmd: avoid deadlock due to copy_(to|from)_user with mmap_sem write lock held.
Ian Campbell [Tue, 24 Jun 2008 20:02:47 +0000 (21:02 +0100)]
privcmd: avoid deadlock due to copy_(to|from)_user with mmap_sem write lock held.

Accessing user memory with the write lock held is illegal, if the pages are
non-present then we will deadlock against the lock in do_page_fault. Avoid this
for IOCTL_PRIVCMD_MMAP and MMAPBATCH by copying the entire input data structure
into the kernel before taking the lock.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agoAMD PowerNow! in the Hypervisor
Keir Fraser [Fri, 20 Jun 2008 16:43:16 +0000 (17:43 +0100)]
AMD PowerNow! in the Hypervisor

This patch set moves support for AMD's PowerNow! technology from
dom0 into the hypervisor, now that there is support for
transferring ACPI data to the hypervisor.  It will only work for
AMD processors that support the architectural P-state driver,
such as 3rd generation Opterons, Phenoms, and Turion Ultras.

This patch guarantees that the previous dom0 PowerNow!
controller will not instantiate if the hypervisor PowerNow!
controller is enabled.

Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Acked-by: Conny Seidel <conny.seidel@amd.com>
16 years agoxen sysfs: Fix build when kexec support is not configured.
Keir Fraser [Tue, 17 Jun 2008 09:32:02 +0000 (10:32 +0100)]
xen sysfs: Fix build when kexec support is not configured.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoscsi: Add missing ICH10 PCI ID
Keir Fraser [Tue, 17 Jun 2008 08:37:36 +0000 (09:37 +0100)]
scsi: Add missing ICH10 PCI ID
Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
16 years agox86: Back port from latest Linux kernel to enable C2/C3 entry via MWAIT
Keir Fraser [Mon, 16 Jun 2008 09:36:24 +0000 (10:36 +0100)]
x86: Back port from latest Linux kernel to enable C2/C3 entry via MWAIT

Current xen-linux (2.6.18) not include support for Cx MWAIT entry
method. Back port from latest Linux kernel (already there since
2.6.23). Without this patch, _CST method couldn't get C states with
FFH address space type.

Signed-off-by: Wei Gang <gang.wei@intel.com>
16 years agoextract vmcoreinfo from /proc/vmcore for Xen
Keir Fraser [Fri, 13 Jun 2008 08:54:50 +0000 (09:54 +0100)]
extract vmcoreinfo from /proc/vmcore for Xen

- get the machine address of the vmcoreinfo area of xen
- expose the machine address and the size of the vmcoreinfo area
  via /sys/hypervisor/vmcoreinfo so that the kexec-tools looks them.

Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
16 years agoFix memory leak for copy-receiver of netfront.
Keir Fraser [Wed, 11 Jun 2008 08:28:01 +0000 (09:28 +0100)]
Fix memory leak for copy-receiver of netfront.

Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
Signed-off-by: Hirofumi Tsujimura <tsujimura.hirof@jp.fujitsu.com>
Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
16 years agoUse GFP_NOIO to avoid allocations which swap on resume.
Ian Campbell [Tue, 10 Jun 2008 07:50:39 +0000 (08:50 +0100)]
Use GFP_NOIO to avoid allocations which swap on resume.

377:e8b49cfbdac0 and 497:fdb998e79aba added __GFP_HIGH to allocations
which could cause swap on resume. __GFP_HIGH actually only makes such
allocations less likely (by allowing access to the emergency pools of
memory).

See: http://marc.info/?l=linux-kernel&m=121222807617695&w=2

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agoExport additional data from watch events through to userspace xenbus clients.
Ian Campbell [Tue, 10 Jun 2008 07:35:59 +0000 (08:35 +0100)]
Export additional data from watch events through to userspace xenbus clients.

This functionality is already available when connecting directly to
xenstore in dom0 or from within the kernel, but the xenbus dev which
is used from userspace to access xenbus over the kernel's xenbus
connection lacks this functionality -- it will only pass the path
where the watch fired and the token.

xend uses this functionality already when firing the @releaseDomain
watch from xenstored and passing the uuid of the domain which was
released.

The diff changes the implementation of split to return an additional
entry marking the end of the final string, in case the final string is
not null terminated.  None of the callers to split are affected by this
change.  The other change in the diff is to change the watch firing code
to return the additional data.

Signed-off-by: Christian Limpach <christian.limpach@citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agopvscsi: Fix build target.
Keir Fraser [Mon, 9 Jun 2008 08:49:13 +0000 (09:49 +0100)]
pvscsi: Fix build target.
From: Jun Kamada <kama@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agopvscsi: Enable REPORT_LUN command emulation.
Keir Fraser [Thu, 5 Jun 2008 09:40:54 +0000 (10:40 +0100)]
pvscsi: Enable REPORT_LUN command emulation.

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agoFix pvSCSI backend config parameters.
Keir Fraser [Thu, 5 Jun 2008 09:40:33 +0000 (10:40 +0100)]
Fix pvSCSI backend config parameters.

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agoblkback default configuration was incorrectly changed from 'y' to 'm'.
Keir Fraser [Thu, 5 Jun 2008 09:39:37 +0000 (10:39 +0100)]
blkback default configuration was incorrectly changed from 'y' to 'm'.
This changeset puts it back.

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agonetfront: fix updating of req_prod_pvt in the receive ring for the flipping case
Keir Fraser [Thu, 5 Jun 2008 09:37:58 +0000 (10:37 +0100)]
netfront: fix updating of req_prod_pvt in the receive ring for the flipping case

From: Pat Campbell <plc@novell.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoBuild fix for Fedora 9.
Keir Fraser [Mon, 2 Jun 2008 09:01:34 +0000 (10:01 +0100)]
Build fix for Fedora 9.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
16 years agovscsiif.h: define interface between frontend and backend driver
Keir Fraser [Mon, 2 Jun 2008 08:59:29 +0000 (09:59 +0100)]
vscsiif.h: define interface between frontend and backend driver

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agopvSCSI frontend driver
Keir Fraser [Mon, 2 Jun 2008 08:58:56 +0000 (09:58 +0100)]
pvSCSI frontend driver

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agopvSCSI backend driver
Keir Fraser [Mon, 2 Jun 2008 08:58:27 +0000 (09:58 +0100)]
pvSCSI backend driver

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agoxen: Set blocking timeout to 1/2 jiffy later than we want. This avoids
Keir Fraser [Fri, 30 May 2008 18:08:50 +0000 (19:08 +0100)]
xen: Set blocking timeout to 1/2 jiffy later than we want. This avoids
repeated early wakeup just before the jiffy tick, causing us to
effectively spin rather than sleep.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agox86_64: Remove warning message about 'Breaking affinity for irq'.
Keir Fraser [Tue, 27 May 2008 09:33:54 +0000 (10:33 +0100)]
x86_64: Remove warning message about 'Breaking affinity for irq'.

32-bit equivalent checked in as:
 http://xenbits.xensource.com/xen-unstable.hg/rev/d24ab5abf857

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
16 years agoxen: Do not allow gcc-3.4 to turn loop on a 64-bit variable into
Keir Fraser [Wed, 21 May 2008 16:04:37 +0000 (17:04 +0100)]
xen: Do not allow gcc-3.4 to turn loop on a 64-bit variable into
64-bit division, which the kernel does not support.

Signed-off-by: Guillaume Rousse <guillaume.rousse@inria.fr>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoAdd support for SB700 storage controllers.
Keir Fraser [Wed, 21 May 2008 10:11:00 +0000 (11:11 +0100)]
Add support for SB700 storage controllers.
Signed-off-by: Travis Betak <travis.betak@amd.com>
16 years agoxen: Sync sysctl.h for xen cpuidle statistic interface.
Keir Fraser [Wed, 21 May 2008 10:00:28 +0000 (11:00 +0100)]
xen: Sync sysctl.h for xen cpuidle statistic interface.
Signed-off-by: Wei Gang <gang.wei@intel.com>
16 years agomerge with linux-2.6.18-xen.hg
Isaku Yamahata [Tue, 20 May 2008 02:33:33 +0000 (11:33 +0900)]
merge with linux-2.6.18-xen.hg

16 years agomerge with linux-2.6.18-xen.hg
Isaku Yamahata [Thu, 15 May 2008 07:26:16 +0000 (16:26 +0900)]
merge with linux-2.6.18-xen.hg

16 years agoballoon: Fix minimum_target() check to work when built as a module.
Keir Fraser [Thu, 15 May 2008 08:42:27 +0000 (09:42 +0100)]
balloon: Fix minimum_target() check to work when built as a module.
From: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoacpi: Fix a bug related to parse named objects
Keir Fraser [Wed, 14 May 2008 12:53:06 +0000 (13:53 +0100)]
acpi: Fix a bug related to parse named objects

This patch is pulled from native linux, and is needed in our patchset
to make it run, otherwise will parse wrong _PSD info.

Fixed a problem with the Package operator where all named
references were created as object references and left otherwise
unresolved. According to the ACPI specification, a Package can
only contain Data Objects or references to control methods. The
implication is that named references to Data Objects (Integer,
Buffer, String, Package, BufferField, Field) should be resolved
immediately upon package creation. This is the approach taken
with this change. References to all other named objects (Methods,
Devices, Scopes, etc.) are all now properly created as reference
objects.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoxen: Basic framework of getting and notifying Px info
Keir Fraser [Wed, 14 May 2008 12:51:50 +0000 (13:51 +0100)]
xen: Basic framework of getting and notifying Px info

Setup basic framework for ACPI Px parse, get basic Px info,
transfer Px info to hypervisor through platform op hypercall.
Add external control for ACPI parse, add notify mechanism for
dynamic Px event (like ppc).

Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
16 years agoSync Xen public headers.
Keir Fraser [Wed, 14 May 2008 08:32:31 +0000 (09:32 +0100)]
Sync Xen public headers.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>