Backport upstream patch to fix an ACPI internal exception (obvious when running WMI on Dell).
Patch details as is from upstream -
ACPICA: Fix for possible error when packages/buffers are passed to methods externally
Fixed a problem where buffer and package objects passed as
arguments to a control method via the external AcpiEvaluateObject
interface could cause an AE_AML_INTERNAL exception depending on the
order and type of operators executed by the target control method.
Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
Xen acpi-wmi driver provides the necessary interface for userspace
module (qemu) to communicate with acpi wmi wrapper kernel driver
which then communicates with the base firmware. The result
returned by the base firmware is communicated back to the userspace
module (qemu) through this driver.
OEM specific button/hotkey support within guest (patch 1/5).
OSS WMI wrapper driver with following modifications to fit our usecase -
a) Route WMI events to acpid.
b) Remove exports not required for our usecase, remove notification
installation/uninstallation code (as we now route events to acpid).
c) Minor device id issue.
d) Remove GUID parsing code as our usecase does not require supporting
36 char guid input.
Matt Mackall [Tue, 6 Jan 2009 12:06:06 +0000 (12:06 +0000)]
This makes physical page flags and counts available to userspace. Together
with /proc/pid/pagemap and /proc/pid/clear_refs, this can be used to measure
memory usage on a per-page basis.
[bunk@stusta.de: make struct proc_kpagemap static] Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Matt Mackall [Tue, 6 Jan 2009 12:06:06 +0000 (12:06 +0000)]
This interface provides a mapping for each page in an address space to its
physical page frame number, allowing precise determination of what pages are
mapped and what pages are shared between processes.
[akpm@linux-foundation.org: warning fix] Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Matt Mackall [Tue, 6 Jan 2009 12:06:05 +0000 (12:06 +0000)]
This interface is primarily useful for doing memory profiling and not much use
on deployed embedded boxes. Make it optional. Together with /proc/pid/smaps,
this save a few K.
Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Matt Mackall [Tue, 6 Jan 2009 12:06:05 +0000 (12:06 +0000)]
This interface is primarily useful for doing memory profiling and not much use
on deployed embedded boxes. Make it optional. Together with
/proc/pid/clear_refs, this save a few K.
Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Matt Mackall [Tue, 6 Jan 2009 12:06:05 +0000 (12:06 +0000)]
Reorder source so that all the code and data for each interface is together.
Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Matt Mackall [Tue, 6 Jan 2009 12:06:05 +0000 (12:06 +0000)]
This puts all the clear_refs code where it belongs and probably lets things
compile on MMU-less systems as well.
Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Matt Mackall [Tue, 6 Jan 2009 12:06:05 +0000 (12:06 +0000)]
This pulls the shared map display code out of show_map and puts it in
show_smap where it belongs.
Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Matt Mackall [Tue, 6 Jan 2009 12:06:05 +0000 (12:06 +0000)]
This lets it get shared outside of proc/ and linked in only when needed.
[akpm@linux-foundation.org: build fix] Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Matt Mackall [Tue, 6 Jan 2009 12:06:05 +0000 (12:06 +0000)]
This allows iterating over all levels of the page tables. Recursion continues
to the depth of the lowest supplied callback.
This makes the page walker nearly completely generic and should allow it to
replace some other hand-rolled page table walkers.
Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Matt Mackall [Tue, 6 Jan 2009 12:06:05 +0000 (12:06 +0000)]
Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Matt Mackall [Tue, 6 Jan 2009 12:06:05 +0000 (12:06 +0000)]
This makes the walker more generic.
Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Matt Mackall [Tue, 6 Jan 2009 12:06:05 +0000 (12:06 +0000)]
Eliminate the pmd_walker struct in the page walker.
This slightly simplifies things for the next few cleanups.
Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Matt Mackall [Tue, 6 Jan 2009 12:06:05 +0000 (12:06 +0000)]
This patch series introduces /proc/pid/pagemap and /proc/kpagemap, which allow
detailed run-time examination of process memory usage at a page granularity.
The first several patches whip the page-walking code introduced for
/proc/pid/smaps and clear_refs into a more generic form, the next couple make
those interfaces optional, and the last two introduce the new interfaces, also
optional.
This respin adds simple, expandable headers to both pagemap and kpagemap as
suggested by Nikita. I haven't moved pagewalk.c from lib/ to mm/ as suggested
by Nick as I still think lib is a better fit for its automatic conditional
linking.
This patch:
Uninline some functions in the page walker
Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
The following patch (based on a patch from Stephen Hemminger
<shemminger@linux-foundation.org>) removes use after free conditions in
the unregister path for the bonding master. Without this patch, an
operation of the form "echo -bond0 > /sys/class/net/bonding_masters"
would trigger a NULL pointer dereference in sysfs. I was not able to
induce the failure with the non-sysfs code path, but for consistency I
updated that code as well.
I also did some testing of the bonding /proc file being open
while the bond is being deleted, and didn't see any problems there.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
t_jeang [Tue, 6 Jan 2009 12:06:04 +0000 (12:06 +0000)]
Add a new ioctl to /proc/xen/privcmd which allows domctls to be performed
without using the generic hypercall interface, so that they are available
on restricted fds.
This requires an unfortunate amount of fiddling with headers so that
XEN_GUEST_HANDLE_64 and uint64_aligned_t are available in kernel
space.
t_jeang [Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)]
Watch the online node in the backend area, as well as the state node
in the frontend area, and fire the frontend state changed watch
whenever it changes. This allows us to catch the case where a device
shuts down in a domU and then gets xm detach'd from in dom0.
Otherwise, the backend doesn't shut down correctly, since online was
set when the frontend shut down and we don't get another kick when it
becomes unset.
t_jeang [Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)]
There's no point in sending lots of little packets to a copying
receiver if we can instead arrange to copy them all into a single RX
buffer. We need to copy anyway, so there's no overhead here, and this
is a little bit easier on the receiving domain's network stack.
t_jeang [Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)]
Ensure that packet csums are computed correctly when sending a GSO
packet to an interface which supports scatter-gather but not transmit
checksum offloads.
Signed-off-by: Steven Smith <ssmith@xensource.com>
t_jeang [Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)]
[NETBACK] Try to pull a minimum of 72 bytes into the skb data area
when receiving a packet into netback. The previous number, 64, tended
to place a fragment boundary in the middle of the TCP header options
and led to unnecessary fragmentation in Windows <-> Windows
networking.
Signed-off-by: Steven Smith <ssmith@xensource.com>
t_jeang [Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)]
It is possible for a frontend to generate a TSO request which doesn't
actually need segmentation (i.e. with size < MTU). Make sure this
doesn't crash the backend.
t_jeang [Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)]
The Windows drivers push the network frontend to state Closed, then
Initialised, then Closed again as part of device disable. Make sure
the backend doesn't get stuck at closed.
t_jeang [Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)]
Arrange that netback waits for the hotplug scripts to complete before
going to state Connected. WHQL gets quite upset if it sends packets
which don't arrive, and that can happen if our hotplug scripts are
slow and don't hook the network interface up to the bridge in time.
t_jeang [Tue, 6 Jan 2009 12:06:02 +0000 (12:06 +0000)]
It turns out that Windows occasionally generates packets in which the
IP and TCP headers are in different fragments. Make sure that the
backends can handle this.
t_jeang [Tue, 6 Jan 2009 12:06:01 +0000 (12:06 +0000)]
Close block devices when the pv drivers take over and flush the buffer cache.
- close and free the block devices in qemu when we switch to pv drivers in
the guest
- use BLKFLSBUF to flush the buffer cache, both in qemu and in blkback