<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.linux.kernel.commits.head">
    <title>gmane.linux.kernel.commits.head</title>
    <link>http://blog.gmane.org/gmane.linux.kernel.commits.head</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323026"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323025"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323024"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323023"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323022"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323021"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323020"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323019"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323018"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323017"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323016"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323015"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323014"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323013"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323012"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323011"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323010"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323009"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323008"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323007"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323026">
    <title>xen: implement apic ipi interface</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323026</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=f447d56d36af18c5104ff29dcb1327c0c0ac3634
Commit:     f447d56d36af18c5104ff29dcb1327c0c0ac3634
Parent:     569ca5b3f94cd0b3295ec5943aa457cf4a4f6a3a
Author:     Ben Guthro &amp;lt;ben&amp;lt; at &amp;gt;guthro.net&amp;gt;
AuthorDate: Sat Apr 21 00:11:04 2012 +0800
Committer:  Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
CommitDate: Mon May 7 15:33:15 2012 -0400

    xen: implement apic ipi interface
    
    Map native ipi vector to xen vector.
    Implement apic ipi interface with xen_send_IPI_one.
    
    Tested-by: Steven Noonan &amp;lt;steven&amp;lt; at &amp;gt;uplinklabs.net&amp;gt;
    Signed-off-by: Ben Guthro &amp;lt;ben&amp;lt; at &amp;gt;guthro.net&amp;gt;
    Signed-off-by: Lin Ming &amp;lt;mlin&amp;lt; at &amp;gt;ss.pku.edu.cn&amp;gt;
    Signed-off-by: Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
---
 arch/x86/xen/enlighten.c |    9 +++++
 arch/x86/xen/smp.c       |   81 +++++++++++++++++++++++++++++++++++++++++++--
 arch/x86/xen/smp.h       |   12 +++++++
 3 files changed, 98 insertions(+), 4 deletions(-)

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 4f51beb..1ed61c2 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -74,6 +74,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "xen-ops.h"
 #include "mmu.h"
+#include "smp.h"
 #include "multicalls.h"
 
 EXPORT_SYMBOL_GPL(hypercall_page);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -849,6 +850,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void set_xen_basic_apic_ops(void)
 apic-&amp;gt;icr_write = xen_apic_icr_write;
 apic-&amp;gt;wait_icr_idle = xen_apic_wait_icr_idle;
 apic-&amp;gt;safe_wait_icr_idle = xen_safe_apic_wait_icr_idle;
+
+#ifdef CONFIG_SMP
+apic-&amp;gt;send_IPI_allbutself = xen_send_IPI_allbutself;
+apic-&amp;gt;send_IPI_mask_allbutself = xen_send_IPI_mask_allbutself;
+apic-&amp;gt;send_IPI_mask = xen_send_IPI_mask;
+apic-&amp;gt;send_IPI_all = xen_send_IPI_all;
+apic-&amp;gt;send_IPI_self = xen_send_IPI_self;
+#endif
 }
 
 #endif
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index 5fac691..2dc6628 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -465,8 +465,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void xen_smp_send_reschedule(int cpu)
 xen_send_IPI_one(cpu, XEN_RESCHEDULE_VECTOR);
 }
 
-static void xen_send_IPI_mask(const struct cpumask *mask,
-      enum ipi_vector vector)
+static void __xen_send_IPI_mask(const struct cpumask *mask,
+      int vector)
 {
 unsigned cpu;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -478,7 +478,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void xen_smp_send_call_function_ipi(const struct cpumask *mask)
 {
 int cpu;
 
-xen_send_IPI_mask(mask, XEN_CALL_FUNCTION_VECTOR);
+__xen_send_IPI_mask(mask, XEN_CALL_FUNCTION_VECTOR);
 
 /* Make sure other vcpus get a chance to run if they need to. */
 for_each_cpu(cpu, mask) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -491,10 +491,83 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void xen_smp_send_call_function_ipi(const struct cpumask *mask)
 
 static void xen_smp_send_call_function_single_ipi(int cpu)
 {
-xen_send_IPI_mask(cpumask_of(cpu),
+__xen_send_IPI_mask(cpumask_of(cpu),
   XEN_CALL_FUNCTION_SINGLE_VECTOR);
 }
 
+static inline int xen_map_vector(int vector)
+{
+int xen_vector;
+
+switch (vector) {
+case RESCHEDULE_VECTOR:
+xen_vector = XEN_RESCHEDULE_VECTOR;
+break;
+case CALL_FUNCTION_VECTOR:
+xen_vector = XEN_CALL_FUNCTION_VECTOR;
+break;
+case CALL_FUNCTION_SINGLE_VECTOR:
+xen_vector = XEN_CALL_FUNCTION_SINGLE_VECTOR;
+break;
+default:
+xen_vector = -1;
+printk(KERN_ERR "xen: vector 0x%x is not implemented\n",
+vector);
+}
+
+return xen_vector;
+}
+
+void xen_send_IPI_mask(const struct cpumask *mask,
+      int vector)
+{
+int xen_vector = xen_map_vector(vector);
+
+if (xen_vector &amp;gt;= 0)
+__xen_send_IPI_mask(mask, xen_vector);
+}
+
+void xen_send_IPI_all(int vector)
+{
+int xen_vector = xen_map_vector(vector);
+
+if (xen_vector &amp;gt;= 0)
+__xen_send_IPI_mask(cpu_online_mask, xen_vector);
+}
+
+void xen_send_IPI_self(int vector)
+{
+int xen_vector = xen_map_vector(vector);
+
+if (xen_vector &amp;gt;= 0)
+xen_send_IPI_one(smp_processor_id(), xen_vector);
+}
+
+void xen_send_IPI_mask_allbutself(const struct cpumask *mask,
+int vector)
+{
+unsigned cpu;
+unsigned int this_cpu = smp_processor_id();
+
+if (!(num_online_cpus() &amp;gt; 1))
+return;
+
+for_each_cpu_and(cpu, mask, cpu_online_mask) {
+if (this_cpu == cpu)
+continue;
+
+xen_smp_send_call_function_single_ipi(cpu);
+}
+}
+
+void xen_send_IPI_allbutself(int vector)
+{
+int xen_vector = xen_map_vector(vector);
+
+if (xen_vector &amp;gt;= 0)
+xen_send_IPI_mask_allbutself(cpu_online_mask, xen_vector);
+}
+
 static irqreturn_t xen_call_function_interrupt(int irq, void *dev_id)
 {
 irq_enter();
diff --git a/arch/x86/xen/smp.h b/arch/x86/xen/smp.h
new file mode 100644
index 0000000..8981a76
--- /dev/null
+++ b/arch/x86/xen/smp.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#ifndef _XEN_SMP_H
+
+extern void xen_send_IPI_mask(const struct cpumask *mask,
+      int vector);
+extern void xen_send_IPI_mask_allbutself(const struct cpumask *mask,
+int vector);
+extern void xen_send_IPI_allbutself(int vector);
+extern void physflat_send_IPI_allbutself(int vector);
+extern void xen_send_IPI_all(int vector);
+extern void xen_send_IPI_self(int vector);
+
+#endif
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323025">
    <title>xen/acpi/sleep: Enable ACPI sleep via the __acpi_os_prepare_sleep</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323025</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=211063dc159695bd6072c5393e9bc729481c6ede
Commit:     211063dc159695bd6072c5393e9bc729481c6ede
Parent:     1ff2b0c303698e486f1e0886b4d9876200ef8ca5
Author:     Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
AuthorDate: Thu Dec 8 17:32:23 2011 +0800
Committer:  Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
CommitDate: Mon May 7 15:33:18 2012 -0400

    xen/acpi/sleep: Enable ACPI sleep via the __acpi_os_prepare_sleep
    
    Provide the registration callback to call in the Xen's
    ACPI sleep functionality. This means that during S3/S5
    we make a hypercall XENPF_enter_acpi_sleep with the
    proper PM1A/PM1B registers.
    
    Based of Ke Yu's &amp;lt;ke.yu&amp;lt; at &amp;gt;intel.com&amp;gt; initial idea.
    [ From http://xenbits.xensource.com/linux-2.6.18-xen.hg
    change c68699484a65 ]
    
    [v1: Added Copyright and license]
    [v2: Added check if PM1A/B the 16-bits MSB contain something. The spec
         only uses 16-bits but might have more in future]
    Signed-off-by: Liang Tang &amp;lt;liang.tang&amp;lt; at &amp;gt;oracle.com&amp;gt;
    Signed-off-by: Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
---
 arch/x86/xen/enlighten.c |    3 ++
 drivers/xen/Makefile     |    2 +-
 drivers/xen/acpi.c       |   62 ++++++++++++++++++++++++++++++++++++++++++++++
 include/xen/acpi.h       |   58 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 124 insertions(+), 1 deletions(-)

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 1ed61c2..eca90e5 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -42,6 +42,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;xen/page.h&amp;gt;
 #include &amp;lt;xen/hvm.h&amp;gt;
 #include &amp;lt;xen/hvc-console.h&amp;gt;
+#include &amp;lt;xen/acpi.h&amp;gt;
 
 #include &amp;lt;asm/paravirt.h&amp;gt;
 #include &amp;lt;asm/apic.h&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1373,6 +1374,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; asmlinkage void __init xen_start_kernel(void)
 
 /* Make sure ACS will be enabled */
 pci_request_acs();
+
+xen_acpi_sleep_register();
 }
 
 
diff --git a/drivers/xen/Makefile b/drivers/xen/Makefile
index 9adc5be..fc34886 100644
--- a/drivers/xen/Makefile
+++ b/drivers/xen/Makefile
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -17,7 +17,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; obj-$(CONFIG_XEN_SYS_HYPERVISOR)+= sys-hypervisor.o
 obj-$(CONFIG_XEN_PVHVM)+= platform-pci.o
 obj-$(CONFIG_XEN_TMEM)+= tmem.o
 obj-$(CONFIG_SWIOTLB_XEN)+= swiotlb-xen.o
-obj-$(CONFIG_XEN_DOM0)+= pci.o
+obj-$(CONFIG_XEN_DOM0)+= pci.o acpi.o
 obj-$(CONFIG_XEN_PCIDEV_BACKEND)+= xen-pciback/
 obj-$(CONFIG_XEN_PRIVCMD)+= xen-privcmd.o
 obj-$(CONFIG_XEN_ACPI_PROCESSOR)+= xen-acpi-processor.o
diff --git a/drivers/xen/acpi.c b/drivers/xen/acpi.c
new file mode 100644
index 0000000..119d42a
--- /dev/null
+++ b/drivers/xen/acpi.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,62 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/******************************************************************************
+ * acpi.c
+ * acpi file for domain 0 kernel
+ *
+ * Copyright (c) 2011 Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
+ * Copyright (c) 2011 Yu Ke ke.yu&amp;lt; at &amp;gt;intel.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation; or, when distributed
+ * separately from the Linux kernel or incorporated into other
+ * software packages, subject to the following license:
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this source file (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy, modify,
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include &amp;lt;xen/acpi.h&amp;gt;
+#include &amp;lt;xen/interface/platform.h&amp;gt;
+#include &amp;lt;asm/xen/hypercall.h&amp;gt;
+#include &amp;lt;asm/xen/hypervisor.h&amp;gt;
+
+int xen_acpi_notify_hypervisor_state(u8 sleep_state,
+     u32 pm1a_cnt, u32 pm1b_cnt)
+{
+struct xen_platform_op op = {
+.cmd = XENPF_enter_acpi_sleep,
+.interface_version = XENPF_INTERFACE_VERSION,
+.u = {
+.enter_acpi_sleep = {
+.pm1a_cnt_val = (u16)pm1a_cnt,
+.pm1b_cnt_val = (u16)pm1b_cnt,
+.sleep_state = sleep_state,
+},
+},
+};
+
+if ((pm1a_cnt &amp;amp; 0xffff0000) || (pm1b_cnt &amp;amp; 0xffff0000)) {
+WARN(1, "Using more than 16bits of PM1A/B 0x%x/0x%x!"
+     "Email xen-devel&amp;lt; at &amp;gt;lists.xensource.com  Thank you.\n", \
+     pm1a_cnt, pm1b_cnt);
+return -1;
+}
+
+HYPERVISOR_dom0_op(&amp;amp;op);
+return 1;
+}
diff --git a/include/xen/acpi.h b/include/xen/acpi.h
new file mode 100644
index 0000000..48a9c01
--- /dev/null
+++ b/include/xen/acpi.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,58 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/******************************************************************************
+ * acpi.h
+ * acpi file for domain 0 kernel
+ *
+ * Copyright (c) 2011 Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
+ * Copyright (c) 2011 Yu Ke &amp;lt;ke.yu&amp;lt; at &amp;gt;intel.com&amp;gt;
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation; or, when distributed
+ * separately from the Linux kernel or incorporated into other
+ * software packages, subject to the following license:
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this source file (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy, modify,
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef _XEN_ACPI_H
+#define _XEN_ACPI_H
+
+#include &amp;lt;linux/types.h&amp;gt;
+
+#ifdef CONFIG_XEN_DOM0
+#include &amp;lt;asm/xen/hypervisor.h&amp;gt;
+#include &amp;lt;xen/xen.h&amp;gt;
+#include &amp;lt;linux/acpi.h&amp;gt;
+
+int xen_acpi_notify_hypervisor_state(u8 sleep_state,
+     u32 pm1a_cnt, u32 pm1b_cnd);
+
+static inline void xen_acpi_sleep_register(void)
+{
+if (xen_initial_domain())
+acpi_os_set_prepare_sleep(
+&amp;amp;xen_acpi_notify_hypervisor_state);
+}
+#else
+static inline void xen_acpi_sleep_register(void)
+{
+}
+#endif
+
+#endif/* _XEN_ACPI_H */
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323024">
    <title>xen: Add selfballoning memory reservation tunable.</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323024</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=d79d5959a023fd637e90ed1ff6547ff09d19396b
Commit:     d79d5959a023fd637e90ed1ff6547ff09d19396b
Parent:     d2fb4c51c7471a23f0a95526b624c14cec62603d
Author:     Jana Saout &amp;lt;jana&amp;lt; at &amp;gt;saout.de&amp;gt;
AuthorDate: Tue May 15 12:34:46 2012 +0200
Committer:  Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
CommitDate: Mon May 21 10:52:53 2012 -0400

    xen: Add selfballoning memory reservation tunable.
    
    Currently, the memory target in the Xen selfballooning driver is mainly
    driven by the value of "Committed_AS".  However, there are cases in
    which it is desirable to assign additional memory to be available for
    the kernel, e.g. for local caches (which are not covered by cleancache),
    e.g. dcache and inode caches.
    
    This adds an additional tunable in the selfballooning driver (accessible
    via sysfs) which allows the user to specify an additional constant
    amount of memory to be reserved by the selfballoning driver for the
    local domain.
    
    Signed-off-by: Jana Saout &amp;lt;jana&amp;lt; at &amp;gt;saout.de&amp;gt;
    Acked-by: Dan Magenheimer &amp;lt;dan.magenheimer&amp;lt; at &amp;gt;oracle.com&amp;gt;
    Signed-off-by: Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
---
 drivers/xen/xen-selfballoon.c |   34 +++++++++++++++++++++++++++++++++-
 1 files changed, 33 insertions(+), 1 deletions(-)

diff --git a/drivers/xen/xen-selfballoon.c b/drivers/xen/xen-selfballoon.c
index 146c948..7d041cb 100644
--- a/drivers/xen/xen-selfballoon.c
+++ b/drivers/xen/xen-selfballoon.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -105,6 +105,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static unsigned int selfballoon_interval __read_mostly = 5;
  */
 static unsigned int selfballoon_min_usable_mb;
 
+/*
+ * Amount of RAM in MB to add to the target number of pages.
+ * Can be used to reserve some more room for caches and the like.
+ */
+static unsigned int selfballoon_reserved_mb;
+
 static void selfballoon_process(struct work_struct *work);
 static DECLARE_DELAYED_WORK(selfballoon_worker, selfballoon_process);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -217,7 +223,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void selfballoon_process(struct work_struct *work)
 cur_pages = totalram_pages;
 tgt_pages = cur_pages; /* default is no change */
 goal_pages = percpu_counter_read_positive(&amp;amp;vm_committed_as) +
-totalreserve_pages;
+totalreserve_pages +
+MB2PAGES(selfballoon_reserved_mb);
 #ifdef CONFIG_FRONTSWAP
 /* allow space for frontswap pages to be repatriated */
 if (frontswap_selfshrinking &amp;amp;&amp;amp; frontswap_enabled)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -397,6 +404,30 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static DEVICE_ATTR(selfballoon_min_usable_mb, S_IRUGO | S_IWUSR,
    show_selfballoon_min_usable_mb,
    store_selfballoon_min_usable_mb);
 
+SELFBALLOON_SHOW(selfballoon_reserved_mb, "%d\n",
+selfballoon_reserved_mb);
+
+static ssize_t store_selfballoon_reserved_mb(struct device *dev,
+     struct device_attribute *attr,
+     const char *buf,
+     size_t count)
+{
+unsigned long val;
+int err;
+
+if (!capable(CAP_SYS_ADMIN))
+return -EPERM;
+err = strict_strtoul(buf, 10, &amp;amp;val);
+if (err || val == 0)
+return -EINVAL;
+selfballoon_reserved_mb = val;
+return count;
+}
+
+static DEVICE_ATTR(selfballoon_reserved_mb, S_IRUGO | S_IWUSR,
+   show_selfballoon_reserved_mb,
+   store_selfballoon_reserved_mb);
+
 
 #ifdef CONFIG_FRONTSWAP
 SELFBALLOON_SHOW(frontswap_selfshrinking, "%d\n", frontswap_selfshrinking);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -480,6 +511,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct attribute *selfballoon_attrs[] = {
 &amp;amp;dev_attr_selfballoon_downhysteresis.attr,
 &amp;amp;dev_attr_selfballoon_uphysteresis.attr,
 &amp;amp;dev_attr_selfballoon_min_usable_mb.attr,
+&amp;amp;dev_attr_selfballoon_reserved_mb.attr,
 #ifdef CONFIG_FRONTSWAP
 &amp;amp;dev_attr_frontswap_selfshrinking.attr,
 &amp;amp;dev_attr_frontswap_hysteresis.attr,
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323023">
    <title>xen/p2m: Collapse early_alloc_p2m_middle redundant checks.</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323023</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=d5096850b47424fb0f1c6a75b8f7184f7169319a
Commit:     d5096850b47424fb0f1c6a75b8f7184f7169319a
Parent:     cef4cca551d652b7f69c9d76337c5fae24e069dc
Author:     Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
AuthorDate: Fri Mar 30 14:16:49 2012 -0400
Committer:  Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
CommitDate: Fri Apr 6 17:03:04 2012 -0400

    xen/p2m: Collapse early_alloc_p2m_middle redundant checks.
    
    At the start of the function we were checking for idx != 0
    and bailing out. And later calling extend_brk if idx != 0.
    
    That is unnecessary so remove that checks.
    
    Signed-off-by: Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
---
 arch/x86/xen/p2m.c |   25 ++++++++++++-------------
 1 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
index 8b3a395..952edef 100644
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -502,6 +502,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static bool alloc_p2m(unsigned long pfn)
 static bool __init early_alloc_p2m_middle(unsigned long pfn, bool check_boundary)
 {
 unsigned topidx, mididx, idx;
+unsigned long *p2m;
+unsigned long *mid_mfn_p;
 
 topidx = p2m_top_index(pfn);
 mididx = p2m_mid_index(pfn);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -522,24 +524,21 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static bool __init early_alloc_p2m_middle(unsigned long pfn, bool check_boundary
 return false;
 
 /* Boundary cross-over for the edges: */
-if (idx) {
-unsigned long *p2m = extend_brk(PAGE_SIZE, PAGE_SIZE);
-unsigned long *mid_mfn_p;
+p2m = extend_brk(PAGE_SIZE, PAGE_SIZE);
 
-p2m_init(p2m);
+p2m_init(p2m);
 
-p2m_top[topidx][mididx] = p2m;
+p2m_top[topidx][mididx] = p2m;
 
-/* For save/restore we need to MFN of the P2M saved */
+/* For save/restore we need to MFN of the P2M saved */
 
-mid_mfn_p = p2m_top_mfn_p[topidx];
-WARN(mid_mfn_p[mididx] != virt_to_mfn(p2m_missing),
-"P2M_TOP_P[%d][%d] != MFN of p2m_missing!\n",
-topidx, mididx);
-mid_mfn_p[mididx] = virt_to_mfn(p2m);
+mid_mfn_p = p2m_top_mfn_p[topidx];
+WARN(mid_mfn_p[mididx] != virt_to_mfn(p2m_missing),
+"P2M_TOP_P[%d][%d] != MFN of p2m_missing!\n",
+topidx, mididx);
+mid_mfn_p[mididx] = virt_to_mfn(p2m);
 
-}
-return idx != 0;
+return true;
 }
 
 static bool __init early_alloc_p2m(unsigned long pfn)
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323022">
    <title>KVM: fix kvm_vcpu_kick build failure on S390</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323022</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=8c84780df909433777ea9463b8350bc0aab34940
Commit:     8c84780df909433777ea9463b8350bc0aab34940
Parent:     5d1c0f4a80a6df73395fb3fc2c302510f8f09d36
Author:     Marcelo Tosatti &amp;lt;mtosatti&amp;lt; at &amp;gt;redhat.com&amp;gt;
AuthorDate: Wed Mar 14 17:58:48 2012 -0300
Committer:  Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
CommitDate: Sun Apr 8 12:49:42 2012 +0300

    KVM: fix kvm_vcpu_kick build failure on S390
    
    S390's kvm_vcpu_stat does not contain halt_wakeup member.
    
    Signed-off-by: Marcelo Tosatti &amp;lt;mtosatti&amp;lt; at &amp;gt;redhat.com&amp;gt;
    Signed-off-by: Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 virt/kvm/kvm_main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 7149a2e..a612bc8 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1514,6 +1514,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void kvm_vcpu_block(struct kvm_vcpu *vcpu)
 finish_wait(&amp;amp;vcpu-&amp;gt;wq, &amp;amp;wait);
 }
 
+#ifndef CONFIG_S390
 /*
  * Kick a sleeping VCPU, or a guest VCPU in guest mode, into host kernel mode.
  */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1535,6 +1536,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void kvm_vcpu_kick(struct kvm_vcpu *vcpu)
 smp_send_reschedule(cpu);
 put_cpu();
 }
+#endif /* !CONFIG_S390 */
 
 void kvm_resched(struct kvm_vcpu *vcpu)
 {
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323021">
    <title>KVM: MMU: Split the main body of rmap_write_protect() off from others</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323021</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=a0ed46073c14f66dbf0707aaa7588b78da83d7c6
Commit:     a0ed46073c14f66dbf0707aaa7588b78da83d7c6
Parent:     248997095d652576f1213028a95ca5fff85d089f
Author:     Takuya Yoshikawa &amp;lt;yoshikawa.takuya&amp;lt; at &amp;gt;oss.ntt.co.jp&amp;gt;
AuthorDate: Thu Mar 1 19:31:22 2012 +0900
Committer:  Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
CommitDate: Sun Apr 8 12:49:56 2012 +0300

    KVM: MMU: Split the main body of rmap_write_protect() off from others
    
    We will use this in the following patch to implement another function
    which needs to write protect pages using the rmap information.
    
    Note that there is a small change in debug printing for large pages:
    we do not differentiate them from others to avoid duplicating code.
    
    Signed-off-by: Takuya Yoshikawa &amp;lt;yoshikawa.takuya&amp;lt; at &amp;gt;oss.ntt.co.jp&amp;gt;
    Signed-off-by: Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 arch/x86/kvm/mmu.c |   53 ++++++++++++++++++++++++++-------------------------
 1 files changed, 27 insertions(+), 26 deletions(-)

diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 4cb1642..c8b5694 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1010,42 +1010,43 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void drop_spte(struct kvm *kvm, u64 *sptep)
 rmap_remove(kvm, sptep);
 }
 
-int kvm_mmu_rmap_write_protect(struct kvm *kvm, u64 gfn,
-       struct kvm_memory_slot *slot)
+static int __rmap_write_protect(struct kvm *kvm, unsigned long *rmapp, int level)
 {
-unsigned long *rmapp;
-u64 *spte;
-int i, write_protected = 0;
+u64 *spte = NULL;
+int write_protected = 0;
 
-rmapp = __gfn_to_rmap(gfn, PT_PAGE_TABLE_LEVEL, slot);
-spte = rmap_next(rmapp, NULL);
-while (spte) {
+while ((spte = rmap_next(rmapp, spte))) {
 BUG_ON(!(*spte &amp;amp; PT_PRESENT_MASK));
 rmap_printk("rmap_write_protect: spte %p %llx\n", spte, *spte);
-if (is_writable_pte(*spte)) {
+
+if (!is_writable_pte(*spte))
+continue;
+
+if (level == PT_PAGE_TABLE_LEVEL) {
 mmu_spte_update(spte, *spte &amp;amp; ~PT_WRITABLE_MASK);
-write_protected = 1;
+} else {
+BUG_ON(!is_large_pte(*spte));
+drop_spte(kvm, spte);
+--kvm-&amp;gt;stat.lpages;
+spte = NULL;
 }
-spte = rmap_next(rmapp, spte);
+
+write_protected = 1;
 }
 
-/* check for huge page mappings */
-for (i = PT_DIRECTORY_LEVEL;
+return write_protected;
+}
+
+int kvm_mmu_rmap_write_protect(struct kvm *kvm, u64 gfn,
+       struct kvm_memory_slot *slot)
+{
+unsigned long *rmapp;
+int i, write_protected = 0;
+
+for (i = PT_PAGE_TABLE_LEVEL;
      i &amp;lt; PT_PAGE_TABLE_LEVEL + KVM_NR_PAGE_SIZES; ++i) {
 rmapp = __gfn_to_rmap(gfn, i, slot);
-spte = rmap_next(rmapp, NULL);
-while (spte) {
-BUG_ON(!(*spte &amp;amp; PT_PRESENT_MASK));
-BUG_ON(!is_large_pte(*spte));
-pgprintk("rmap_write_protect(large): spte %p %llx %lld\n", spte, *spte, gfn);
-if (is_writable_pte(*spte)) {
-drop_spte(kvm, spte);
---kvm-&amp;gt;stat.lpages;
-spte = NULL;
-write_protected = 1;
-}
-spte = rmap_next(rmapp, spte);
-}
+write_protected |= __rmap_write_protect(kvm, rmapp, i);
 }
 
 return write_protected;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323020">
    <title>powerpc/booke: Provide exception macros with interrupt name</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323020</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=cfac57847a67c4903f34a77e971521531bbc7c77
Commit:     cfac57847a67c4903f34a77e971521531bbc7c77
Parent:     ab9fc4056af338248640ddb18497be386360363d
Author:     Scott Wood &amp;lt;scottwood&amp;lt; at &amp;gt;freescale.com&amp;gt;
AuthorDate: Tue Dec 20 15:34:40 2011 +0000
Committer:  Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
CommitDate: Sun Apr 8 12:51:17 2012 +0300

    powerpc/booke: Provide exception macros with interrupt name
    
    DO_KVM will need to identify the particular exception type.
    
    There is an existing set of arbitrary numbers that Linux passes,
    but it's an undocumented mess that sort of corresponds to server/classic
    exception vectors but not really.
    
    Signed-off-by: Scott Wood &amp;lt;scottwood&amp;lt; at &amp;gt;freescale.com&amp;gt;
    Signed-off-by: Alexander Graf &amp;lt;agraf&amp;lt; at &amp;gt;suse.de&amp;gt;
    Signed-off-by: Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 arch/powerpc/kernel/head_44x.S       |   23 +++++++++------
 arch/powerpc/kernel/head_booke.h     |   41 ++++++++++++++------------
 arch/powerpc/kernel/head_fsl_booke.S |   52 +++++++++++++++++++++-------------
 3 files changed, 68 insertions(+), 48 deletions(-)

diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index 7dd2981..d1192c5 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -248,10 +248,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _ENTRY(_start);
 
 interrupt_base:
 /* Critical Input Interrupt */
-CRITICAL_EXCEPTION(0x0100, CriticalInput, unknown_exception)
+CRITICAL_EXCEPTION(0x0100, CRITICAL, CriticalInput, unknown_exception)
 
 /* Machine Check Interrupt */
-CRITICAL_EXCEPTION(0x0200, MachineCheck, machine_check_exception)
+CRITICAL_EXCEPTION(0x0200, MACHINE_CHECK, MachineCheck, \
+   machine_check_exception)
 MCHECK_EXCEPTION(0x0210, MachineCheckA, machine_check_exception)
 
 /* Data Storage Interrupt */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -261,7 +262,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; interrupt_base:
 INSTRUCTION_STORAGE_EXCEPTION
 
 /* External Input Interrupt */
-EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+EXCEPTION(0x0500, BOOKE_INTERRUPT_EXTERNAL, ExternalInput, \
+  do_IRQ, EXC_XFER_LITE)
 
 /* Alignment Interrupt */
 ALIGNMENT_EXCEPTION
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -273,29 +275,32 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; interrupt_base:
 #ifdef CONFIG_PPC_FPU
 FP_UNAVAILABLE_EXCEPTION
 #else
-EXCEPTION(0x2010, FloatingPointUnavailable, unknown_exception, EXC_XFER_EE)
+EXCEPTION(0x2010, BOOKE_INTERRUPT_FP_UNAVAIL, \
+  FloatingPointUnavailable, unknown_exception, EXC_XFER_EE)
 #endif
 /* System Call Interrupt */
 START_EXCEPTION(SystemCall)
-NORMAL_EXCEPTION_PROLOG
+NORMAL_EXCEPTION_PROLOG(BOOKE_INTERRUPT_SYSCALL)
 EXC_XFER_EE_LITE(0x0c00, DoSyscall)
 
 /* Auxiliary Processor Unavailable Interrupt */
-EXCEPTION(0x2020, AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE)
+EXCEPTION(0x2020, BOOKE_INTERRUPT_AP_UNAVAIL, \
+  AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE)
 
 /* Decrementer Interrupt */
 DECREMENTER_EXCEPTION
 
 /* Fixed Internal Timer Interrupt */
 /* TODO: Add FIT support */
-EXCEPTION(0x1010, FixedIntervalTimer, unknown_exception, EXC_XFER_EE)
+EXCEPTION(0x1010, BOOKE_INTERRUPT_FIT, FixedIntervalTimer, \
+  unknown_exception, EXC_XFER_EE)
 
 /* Watchdog Timer Interrupt */
 /* TODO: Add watchdog support */
 #ifdef CONFIG_BOOKE_WDT
-CRITICAL_EXCEPTION(0x1020, WatchdogTimer, WatchdogException)
+CRITICAL_EXCEPTION(0x1020, WATCHDOG, WatchdogTimer, WatchdogException)
 #else
-CRITICAL_EXCEPTION(0x1020, WatchdogTimer, unknown_exception)
+CRITICAL_EXCEPTION(0x1020, WATCHDOG, WatchdogTimer, unknown_exception)
 #endif
 
 /* Data TLB Error Interrupt */
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h
index 0e41753..51fd072 100644
--- a/arch/powerpc/kernel/head_booke.h
+++ b/arch/powerpc/kernel/head_booke.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2,6 +2,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #define __HEAD_BOOKE_H__
 
 #include &amp;lt;asm/ptrace.h&amp;gt;/* for STACK_FRAME_REGS_MARKER */
+#include &amp;lt;asm/kvm_asm.h&amp;gt;
+
 /*
  * Macros used for common Book-e exception handling
  */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -28,7 +30,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
  */
 #define THREAD_NORMSAVE(offset)(THREAD_NORMSAVES + (offset * 4))
 
-#define NORMAL_EXCEPTION_PROLOG     \
+#define NORMAL_EXCEPTION_PROLOG(intno)     \
 mtsprSPRN_SPRG_WSCRATCH0, r10;/* save one register */     \
 mfsprr10, SPRN_SPRG_THREAD;     \
 stwr11, THREAD_NORMSAVE(0)(r10);     \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -113,7 +115,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
  * registers as the normal prolog above. Instead we use a portion of the
  * critical/machine check exception stack at low physical addresses.
  */
-#define EXC_LEVEL_EXCEPTION_PROLOG(exc_level, exc_level_srr0, exc_level_srr1) \
+#define EXC_LEVEL_EXCEPTION_PROLOG(exc_level, intno, exc_level_srr0, exc_level_srr1) \
 mtsprSPRN_SPRG_WSCRATCH_##exc_level,r8;     \
 BOOKE_LOAD_EXC_LEVEL_STACK(exc_level);/* r8 points to the exc_level stack*/ \
 stwr9,GPR9(r8);/* save various registers   */\
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -162,12 +164,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 SAVE_4GPRS(3, r11);     \
 SAVE_2GPRS(7, r11)
 
-#define CRITICAL_EXCEPTION_PROLOG \
-EXC_LEVEL_EXCEPTION_PROLOG(CRIT, SPRN_CSRR0, SPRN_CSRR1)
+#define CRITICAL_EXCEPTION_PROLOG(intno) \
+EXC_LEVEL_EXCEPTION_PROLOG(CRIT, intno, SPRN_CSRR0, SPRN_CSRR1)
 #define DEBUG_EXCEPTION_PROLOG \
-EXC_LEVEL_EXCEPTION_PROLOG(DBG, SPRN_DSRR0, SPRN_DSRR1)
+EXC_LEVEL_EXCEPTION_PROLOG(DBG, DEBUG, SPRN_DSRR0, SPRN_DSRR1)
 #define MCHECK_EXCEPTION_PROLOG \
-EXC_LEVEL_EXCEPTION_PROLOG(MC, SPRN_MCSRR0, SPRN_MCSRR1)
+EXC_LEVEL_EXCEPTION_PROLOG(MC, MACHINE_CHECK, \
+SPRN_MCSRR0, SPRN_MCSRR1)
 
 /*
  * Exception vectors.
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -181,16 +184,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; label:
 .longfunc;\
 .longret_from_except_full
 
-#define EXCEPTION(n, label, hdlr, xfer)\
+#define EXCEPTION(n, intno, label, hdlr, xfer)\
 START_EXCEPTION(label);\
-NORMAL_EXCEPTION_PROLOG;\
+NORMAL_EXCEPTION_PROLOG(intno);\
 addir3,r1,STACK_FRAME_OVERHEAD;\
 xfer(n, hdlr)
 
-#define CRITICAL_EXCEPTION(n, label, hdlr)\
-START_EXCEPTION(label);\
-CRITICAL_EXCEPTION_PROLOG;\
-addir3,r1,STACK_FRAME_OVERHEAD;\
+#define CRITICAL_EXCEPTION(n, intno, label, hdlr)\
+START_EXCEPTION(label);\
+CRITICAL_EXCEPTION_PROLOG(intno);\
+addir3,r1,STACK_FRAME_OVERHEAD;\
 EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL &amp;amp; ~(MSR_ME|MSR_DE|MSR_CE)), \
   NOCOPY, crit_transfer_to_handler, \
   ret_from_crit_exc)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -302,7 +305,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; label:
 
 #define DEBUG_CRIT_EXCEPTION      \
 START_EXCEPTION(DebugCrit);      \
-CRITICAL_EXCEPTION_PROLOG;      \
+CRITICAL_EXCEPTION_PROLOG(DEBUG);      \
       \
 /*      \
  * If there is a single step or branch-taken exception in an      \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -355,7 +358,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; label:
 
 #define DATA_STORAGE_EXCEPTION      \
 START_EXCEPTION(DataStorage)      \
-NORMAL_EXCEPTION_PROLOG;      \
+NORMAL_EXCEPTION_PROLOG(DATA_STORAGE);      \
 mfsprr5,SPRN_ESR;/* Grab the ESR and save it */      \
 stwr5,_ESR(r11);      \
 mfsprr4,SPRN_DEAR;/* Grab the DEAR */      \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -363,7 +366,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; label:
 
 #define INSTRUCTION_STORAGE_EXCEPTION      \
 START_EXCEPTION(InstructionStorage)      \
-NORMAL_EXCEPTION_PROLOG;      \
+NORMAL_EXCEPTION_PROLOG(INST_STORAGE);      \
 mfsprr5,SPRN_ESR;/* Grab the ESR and save it */      \
 stwr5,_ESR(r11);      \
 mr      r4,r12;                 /* Pass SRR0 as arg2 */      \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -372,7 +375,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; label:
 
 #define ALIGNMENT_EXCEPTION      \
 START_EXCEPTION(Alignment)      \
-NORMAL_EXCEPTION_PROLOG;      \
+NORMAL_EXCEPTION_PROLOG(ALIGNMENT);      \
 mfspr   r4,SPRN_DEAR;           /* Grab the DEAR and save it */      \
 stw     r4,_DEAR(r11);      \
 addi    r3,r1,STACK_FRAME_OVERHEAD;      \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -380,7 +383,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; label:
 
 #define PROGRAM_EXCEPTION      \
 START_EXCEPTION(Program)      \
-NORMAL_EXCEPTION_PROLOG;      \
+NORMAL_EXCEPTION_PROLOG(PROGRAM);      \
 mfsprr4,SPRN_ESR;/* Grab the ESR and save it */      \
 stwr4,_ESR(r11);      \
 addir3,r1,STACK_FRAME_OVERHEAD;      \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -388,7 +391,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; label:
 
 #define DECREMENTER_EXCEPTION      \
 START_EXCEPTION(Decrementer)      \
-NORMAL_EXCEPTION_PROLOG;      \
+NORMAL_EXCEPTION_PROLOG(DECREMENTER);      \
 lis     r0,TSR_DIS&amp;lt; at &amp;gt;h;           /* Setup the DEC interrupt mask */    \
 mtspr   SPRN_TSR,r0;/* Clear the DEC interrupt */      \
 addi    r3,r1,STACK_FRAME_OVERHEAD;      \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -396,7 +399,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; label:
 
 #define FP_UNAVAILABLE_EXCEPTION      \
 START_EXCEPTION(FloatingPointUnavailable)      \
-NORMAL_EXCEPTION_PROLOG;      \
+NORMAL_EXCEPTION_PROLOG(FP_UNAVAIL);      \
 beq1f;      \
 blload_up_fpu;/* if from user, just load it up */   \
 bfast_exception_return;      \
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index 28e6259..7c406dd 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -301,19 +301,20 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _ENTRY(__early_start)
 
 interrupt_base:
 /* Critical Input Interrupt */
-CRITICAL_EXCEPTION(0x0100, CriticalInput, unknown_exception)
+CRITICAL_EXCEPTION(0x0100, CRITICAL, CriticalInput, unknown_exception)
 
 /* Machine Check Interrupt */
 #ifdef CONFIG_E200
 /* no RFMCI, MCSRRs on E200 */
-CRITICAL_EXCEPTION(0x0200, MachineCheck, machine_check_exception)
+CRITICAL_EXCEPTION(0x0200, MACHINE_CHECK, MachineCheck, \
+   machine_check_exception)
 #else
 MCHECK_EXCEPTION(0x0200, MachineCheck, machine_check_exception)
 #endif
 
 /* Data Storage Interrupt */
 START_EXCEPTION(DataStorage)
-NORMAL_EXCEPTION_PROLOG
+NORMAL_EXCEPTION_PROLOG(DATA_STORAGE)
 mfsprr5,SPRN_ESR/* Grab the ESR, save it, pass arg3 */
 stwr5,_ESR(r11)
 mfsprr4,SPRN_DEAR/* Grab the DEAR, save it, pass arg2 */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -328,7 +329,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; interrupt_base:
 INSTRUCTION_STORAGE_EXCEPTION
 
 /* External Input Interrupt */
-EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+EXCEPTION(0x0500, EXTERNAL, ExternalInput, do_IRQ, EXC_XFER_LITE)
 
 /* Alignment Interrupt */
 ALIGNMENT_EXCEPTION
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -342,32 +343,36 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; interrupt_base:
 #else
 #ifdef CONFIG_E200
 /* E200 treats 'normal' floating point instructions as FP Unavail exception */
-EXCEPTION(0x0800, FloatingPointUnavailable, program_check_exception, EXC_XFER_EE)
+EXCEPTION(0x0800, FP_UNAVAIL, FloatingPointUnavailable, \
+  program_check_exception, EXC_XFER_EE)
 #else
-EXCEPTION(0x0800, FloatingPointUnavailable, unknown_exception, EXC_XFER_EE)
+EXCEPTION(0x0800, FP_UNAVAIL, FloatingPointUnavailable, \
+  unknown_exception, EXC_XFER_EE)
 #endif
 #endif
 
 /* System Call Interrupt */
 START_EXCEPTION(SystemCall)
-NORMAL_EXCEPTION_PROLOG
+NORMAL_EXCEPTION_PROLOG(SYSCALL)
 EXC_XFER_EE_LITE(0x0c00, DoSyscall)
 
 /* Auxiliary Processor Unavailable Interrupt */
-EXCEPTION(0x2900, AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE)
+EXCEPTION(0x2900, AP_UNAVAIL, AuxillaryProcessorUnavailable, \
+  unknown_exception, EXC_XFER_EE)
 
 /* Decrementer Interrupt */
 DECREMENTER_EXCEPTION
 
 /* Fixed Internal Timer Interrupt */
 /* TODO: Add FIT support */
-EXCEPTION(0x3100, FixedIntervalTimer, unknown_exception, EXC_XFER_EE)
+EXCEPTION(0x3100, FIT, FixedIntervalTimer, \
+  unknown_exception, EXC_XFER_EE)
 
 /* Watchdog Timer Interrupt */
 #ifdef CONFIG_BOOKE_WDT
-CRITICAL_EXCEPTION(0x3200, WatchdogTimer, WatchdogException)
+CRITICAL_EXCEPTION(0x3200, WATCHDOG, WatchdogTimer, WatchdogException)
 #else
-CRITICAL_EXCEPTION(0x3200, WatchdogTimer, unknown_exception)
+CRITICAL_EXCEPTION(0x3200, WATCHDOG, WatchdogTimer, unknown_exception)
 #endif
 
 /* Data TLB Error Interrupt */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -538,31 +543,38 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; interrupt_base:
 #ifdef CONFIG_SPE
 /* SPE Unavailable */
 START_EXCEPTION(SPEUnavailable)
-NORMAL_EXCEPTION_PROLOG
+NORMAL_EXCEPTION_PROLOG(SPE_UNAVAIL)
 bneload_up_spe
 addir3,r1,STACK_FRAME_OVERHEAD
 EXC_XFER_EE_LITE(0x2010, KernelSPE)
 #else
-EXCEPTION(0x2020, SPEUnavailable, unknown_exception, EXC_XFER_EE)
+EXCEPTION(0x2020, SPE_UNAVAIL, SPEUnavailable, \
+  unknown_exception, EXC_XFER_EE)
 #endif /* CONFIG_SPE */
 
 /* SPE Floating Point Data */
 #ifdef CONFIG_SPE
-EXCEPTION(0x2030, SPEFloatingPointData, SPEFloatingPointException, EXC_XFER_EE);
+EXCEPTION(0x2030, SPE_FP_DATA, SPEFloatingPointData, \
+  SPEFloatingPointException, EXC_XFER_EE);
 
 /* SPE Floating Point Round */
-EXCEPTION(0x2050, SPEFloatingPointRound, SPEFloatingPointRoundException, EXC_XFER_EE)
+EXCEPTION(0x2050, SPE_FP_ROUND, SPEFloatingPointRound, \
+  SPEFloatingPointRoundException, EXC_XFER_EE)
 #else
-EXCEPTION(0x2040, SPEFloatingPointData, unknown_exception, EXC_XFER_EE)
-EXCEPTION(0x2050, SPEFloatingPointRound, unknown_exception, EXC_XFER_EE)
+EXCEPTION(0x2040, SPE_FP_DATA, SPEFloatingPointData, \
+  unknown_exception, EXC_XFER_EE)
+EXCEPTION(0x2050, SPE_FP_ROUND, SPEFloatingPointRound, \
+  unknown_exception, EXC_XFER_EE)
 #endif /* CONFIG_SPE */
 
 /* Performance Monitor */
-EXCEPTION(0x2060, PerformanceMonitor, performance_monitor_exception, EXC_XFER_STD)
+EXCEPTION(0x2060, PERFORMANCE_MONITOR, PerformanceMonitor, \
+  performance_monitor_exception, EXC_XFER_STD)
 
-EXCEPTION(0x2070, Doorbell, doorbell_exception, EXC_XFER_STD)
+EXCEPTION(0x2070, DOORBELL, Doorbell, doorbell_exception, EXC_XFER_STD)
 
-CRITICAL_EXCEPTION(0x2080, CriticalDoorbell, unknown_exception)
+CRITICAL_EXCEPTION(0x2080, DOORBELL_CRITICAL, \
+   CriticalDoorbell, unknown_exception)
 
 /* Debug Interrupt */
 DEBUG_DEBUG_EXCEPTION
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323019">
    <title>KVM: PPC: bookehv: remove unused code</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323019</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=55cdf08b9a6c99f1335fa6ad42372dcfb3715b56
Commit:     55cdf08b9a6c99f1335fa6ad42372dcfb3715b56
Parent:     0268597c811ccf55e0bda20907c1a9e6001365cf
Author:     Alexander Graf &amp;lt;agraf&amp;lt; at &amp;gt;suse.de&amp;gt;
AuthorDate: Mon Feb 20 12:39:36 2012 +0100
Committer:  Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
CommitDate: Sun Apr 8 12:55:21 2012 +0300

    KVM: PPC: bookehv: remove unused code
    
    There was some unused code in the exit code path that must have been
    a leftover from earlier iterations. While it did no harm, it's superfluous
    and thus should be removed.
    
    Signed-off-by: Alexander Graf &amp;lt;agraf&amp;lt; at &amp;gt;suse.de&amp;gt;
    Signed-off-by: Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 arch/powerpc/kvm/bookehv_interrupts.S |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm/bookehv_interrupts.S
index 3a1db90..2d1f56c 100644
--- a/arch/powerpc/kvm/bookehv_interrupts.S
+++ b/arch/powerpc/kvm/bookehv_interrupts.S
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -91,10 +91,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 PPC_STLr9, VCPU_TIMING_EXIT_TBU(r4)
 #endif
 
-.if\flags &amp;amp; NEED_EMU
-lwzr9, VCPU_KVM(r4)
-.endif
&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:59</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323018">
    <title>xen/setup: Populate freed MFNs from non-RAM E820 entries and gaps to E820 RAM</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323018</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=2e2fb75475c2fc74c98100f1468c8195fee49f3b
Commit:     2e2fb75475c2fc74c98100f1468c8195fee49f3b
Parent:     ca1182387e57470460294ce1e39e2d5518809811
Author:     Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
AuthorDate: Fri Apr 6 10:07:11 2012 -0400
Committer:  Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
CommitDate: Mon May 7 15:31:46 2012 -0400

    xen/setup: Populate freed MFNs from non-RAM E820 entries and gaps to E820 RAM
    
    When the Xen hypervisor boots a PV kernel it hands it two pieces
    of information: nr_pages and a made up E820 entry.
    
    The nr_pages value defines the range from zero to nr_pages of PFNs
    which have a valid Machine Frame Number (MFN) underneath it. The
    E820 mirrors that (with the VGA hole):
    BIOS-provided physical RAM map:
     Xen: 0000000000000000 - 00000000000a0000 (usable)
     Xen: 00000000000a0000 - 0000000000100000 (reserved)
     Xen: 0000000000100000 - 0000000080800000 (usable)
    
    The fun comes when a PV guest that is run with a machine E820 - that
    can either be the initial domain or a PCI PV guest, where the E820
    looks like the normal thing:
    
    BIOS-provided physical RAM map:
     Xen: 0000000000000000 - 000000000009e000 (usable)
     Xen: 000000000009ec00 - 0000000000100000 (reserved)
     Xen: 0000000000100000 - 0000000020000000 (usable)
     Xen: 0000000020000000 - 0000000020200000 (reserved)
     Xen: 0000000020200000 - 0000000040000000 (usable)
     Xen: 0000000040000000 - 0000000040200000 (reserved)
     Xen: 0000000040200000 - 00000000bad80000 (usable)
     Xen: 00000000bad80000 - 00000000badc9000 (ACPI NVS)
    ..
    With that overlaying the nr_pages directly on the E820 does not
    work as there are gaps and non-RAM regions that won't be used
    by the memory allocator. The 'xen_release_chunk' helps with that
    by punching holes in the P2M (PFN to MFN lookup tree) for those
    regions and tells us that:
    
    Freeing  20000-20200 pfn range: 512 pages freed
    Freeing  40000-40200 pfn range: 512 pages freed
    Freeing  bad80-badf4 pfn range: 116 pages freed
    Freeing  badf6-bae7f pfn range: 137 pages freed
    Freeing  bb000-100000 pfn range: 282624 pages freed
    Released 283999 pages of unused memory
    
    Those 283999 pages are subtracted from the nr_pages and are returned
    to the hypervisor. The end result is that the initial domain
    boots with 1GB less memory as the nr_pages has been subtracted by
    the amount of pages residing within the PCI hole. It can balloon up
    to that if desired using 'xl mem-set 0 8092', but the balloon driver
    is not always compiled in for the initial domain.
    
    This patch, implements the populate hypercall (XENMEM_populate_physmap)
    which increases the the domain with the same amount of pages that
    were released.
    
    The other solution (that did not work) was to transplant the MFN in
    the P2M tree - the ones that were going to be freed were put in
    the E820_RAM regions past the nr_pages. But the modifications to the
    M2P array (the other side of creating PTEs) were not carried away.
    As the hypervisor is the only one capable of modifying that and the
    only two hypercalls that would do this are: the update_va_mapping
    (which won't work, as during initial bootup only PFNs up to nr_pages
    are mapped in the guest) or via the populate hypercall.
    
    The end result is that the kernel can now boot with the
    nr_pages without having to subtract the 283999 pages.
    
    On a 8GB machine, with various dom0_mem= parameters this is what we get:
    
    no dom0_mem
    -Memory: 6485264k/9435136k available (5817k kernel code, 1136060k absent, 1813812k reserved, 2899k data, 696k init)
    +Memory: 7619036k/9435136k available (5817k kernel code, 1136060k absent, 680040k reserved, 2899k data, 696k init)
    
    dom0_mem=3G
    -Memory: 2616536k/9435136k available (5817k kernel code, 1136060k absent, 5682540k reserved, 2899k data, 696k init)
    +Memory: 2703776k/9435136k available (5817k kernel code, 1136060k absent, 5595300k reserved, 2899k data, 696k init)
    
    dom0_mem=max:3G
    -Memory: 2696732k/4281724k available (5817k kernel code, 1136060k absent, 448932k reserved, 2899k data, 696k init)
    +Memory: 2702204k/4281724k available (5817k kernel code, 1136060k absent, 443460k reserved, 2899k data, 696k init)
    
    And the 'xm list' or 'xl list' now reflect what the dom0_mem=
    argument is.
    
    Acked-by: David Vrabel &amp;lt;david.vrabel&amp;lt; at &amp;gt;citrix.com&amp;gt;
    [v2: Use populate hypercall]
    [v3: Remove debug printks]
    [v4: Simplify code]
    Signed-off-by: Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
---
 arch/x86/xen/setup.c |  116 ++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 112 insertions(+), 4 deletions(-)

diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 7b0ab77..710af36 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -26,7 +26,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;xen/interface/memory.h&amp;gt;
 #include &amp;lt;xen/interface/physdev.h&amp;gt;
 #include &amp;lt;xen/features.h&amp;gt;
-
 #include "xen-ops.h"
 #include "vdso.h"
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -120,7 +119,105 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static unsigned long __init xen_release_chunk(unsigned long start,
 
 return len;
 }
+static unsigned long __init xen_populate_physmap(unsigned long start,
+ unsigned long end)
+{
+struct xen_memory_reservation reservation = {
+.address_bits = 0,
+.extent_order = 0,
+.domid        = DOMID_SELF
+};
+unsigned long len = 0;
+int ret;
+
+for (pfn = start; pfn &amp;lt; end; pfn++) {
+unsigned long frame;
+
+/* Make sure pfn does not exists to start with */
+if (pfn_to_mfn(pfn) != INVALID_P2M_ENTRY)
+continue;
 
+frame = pfn;
+set_xen_guest_handle(reservation.extent_start, &amp;amp;frame);
+reservation.nr_extents = 1;
+
+ret = HYPERVISOR_memory_op(XENMEM_populate_physmap, &amp;amp;reservation);
+WARN(ret != 1, "Failed to populate pfn %lx err=%d\n", pfn, ret);
+if (ret == 1) {
+if (!early_set_phys_to_machine(pfn, frame)) {
+set_xen_guest_handle(reservation.extent_start, &amp;amp;frame);
+reservation.nr_extents = 1;
+ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation,
+&amp;amp;reservation);
+break;
+}
+len++;
+} else
+break;
+}
+if (len)
+printk(KERN_INFO "Populated %lx-%lx pfn range: %lu pages added\n",
+       start, end, len);
+return len;
+}
+static unsigned long __init xen_populate_chunk(
+const struct e820entry *list, size_t map_size,
+unsigned long max_pfn, unsigned long *last_pfn,
+unsigned long credits_left)
+{
+const struct e820entry *entry;
+unsigned int i;
+unsigned long done = 0;
+unsigned long dest_pfn;
+
+for (i = 0, entry = list; i &amp;lt; map_size; i++, entry++) {
+unsigned long credits = credits_left;
+unsigned long s_pfn;
+unsigned long e_pfn;
+unsigned long pfns;
+long capacity;
+
+if (credits &amp;lt;= 0)
+break;
+
+if (entry-&amp;gt;type != E820_RAM)
+continue;
+
+e_pfn = PFN_UP(entry-&amp;gt;addr + entry-&amp;gt;size);
+
+/* We only care about E820 after the xen_start_info-&amp;gt;nr_pages */
+if (e_pfn &amp;lt;= max_pfn)
+continue;
+
+s_pfn = PFN_DOWN(entry-&amp;gt;addr);
+/* If the E820 falls within the nr_pages, we want to start
+ * at the nr_pages PFN.
+ * If that would mean going past the E820 entry, skip it
+ */
+if (s_pfn &amp;lt;= max_pfn) {
+capacity = e_pfn - max_pfn;
+dest_pfn = max_pfn;
+} else {
+/* last_pfn MUST be within E820_RAM regions */
+if (*last_pfn &amp;amp;&amp;amp; e_pfn &amp;gt;= *last_pfn)
+s_pfn = *last_pfn;
+capacity = e_pfn - s_pfn;
+dest_pfn = s_pfn;
+}
+/* If we had filled this E820_RAM entry, go to the next one. */
+if (capacity &amp;lt;= 0)
+continue;
+
+if (credits &amp;gt; capacity)
+credits = capacity;
+
+pfns = xen_populate_physmap(dest_pfn, dest_pfn + credits);
+done += pfns;
+credits_left -= pfns;
+*last_pfn = (dest_pfn + pfns);
+}
+return done;
+}
 static unsigned long __init xen_set_identity_and_release(
 const struct e820entry *list, size_t map_size, unsigned long nr_pages)
 {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -143,7 +240,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static unsigned long __init xen_set_identity_and_release(
  */
 for (i = 0, entry = list; i &amp;lt; map_size; i++, entry++) {
 phys_addr_t end = entry-&amp;gt;addr + entry-&amp;gt;size;
-
 if (entry-&amp;gt;type == E820_RAM || i == map_size - 1) {
 unsigned long start_pfn = PFN_DOWN(start);
 unsigned long end_pfn = PFN_UP(end);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -220,7 +316,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; char * __init xen_memory_setup(void)
 int rc;
 struct xen_memory_map memmap;
 unsigned long max_pages;
+unsigned long last_pfn = 0;
 unsigned long extra_pages = 0;
+unsigned long populated;
 int i;
 int op;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -260,9 +358,20 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; char * __init xen_memory_setup(void)
  */
 xen_released_pages = xen_set_identity_and_release(
 map, memmap.nr_entries, max_pfn);
-extra_pages += xen_released_pages;
 
 /*
+ * Populate back the non-RAM pages and E820 gaps that had been
+ * released. */
+populated = xen_populate_chunk(map, memmap.nr_entries,
+max_pfn, &amp;amp;last_pfn, xen_released_pages);
+
+extra_pages += (xen_released_pages - populated);
+
+if (last_pfn &amp;gt; max_pfn) {
+max_pfn = min(MAX_DOMAIN_PAGES, last_pfn);
+mem_end = PFN_PHYS(max_pfn);
+}
+/*
  * Clamp the amount of extra memory to a EXTRA_MEM_RATIO
  * factor the base size.  On non-highmem systems, the base
  * size is the full initial memory allocation; on highmem it
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -275,7 +384,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; char * __init xen_memory_setup(void)
  */
 extra_pages = min(EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM)),
   extra_pages);
&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323017">
    <title>KVM: PPC: bookehv: remove negation for CONFIG_64BIT</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323017</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=8764b46ee3873b685a7823fc79388bae7d19e51e
Commit:     8764b46ee3873b685a7823fc79388bae7d19e51e
Parent:     73ede8d32be6adc298fe3c2716e77c352c504c8c
Author:     Alexander Graf &amp;lt;agraf&amp;lt; at &amp;gt;suse.de&amp;gt;
AuthorDate: Thu Feb 16 14:40:26 2012 +0000
Committer:  Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
CommitDate: Sun Apr 8 12:55:10 2012 +0300

    KVM: PPC: bookehv: remove negation for CONFIG_64BIT
    
    Instead if doing
    
      #ifndef CONFIG_64BIT
      ...
      #else
      ...
      #endif
    
    we should rather do
    
      #ifdef CONFIG_64BIT
      ...
      #else
      ...
      #endif
    
    which is a lot easier to read. Change the bookehv implementation to
    stick with this rule.
    
    Signed-off-by: Alexander Graf &amp;lt;agraf&amp;lt; at &amp;gt;suse.de&amp;gt;
    Signed-off-by: Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 arch/powerpc/kvm/bookehv_interrupts.S |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm/bookehv_interrupts.S
index e4a1172..af771de 100644
--- a/arch/powerpc/kvm/bookehv_interrupts.S
+++ b/arch/powerpc/kvm/bookehv_interrupts.S
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -99,10 +99,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 .endif
 
 orisr8, r6, MSR_CE&amp;lt; at &amp;gt;h
-#ifndef CONFIG_64BIT
-stwr6, (VCPU_SHARED_MSR + 4)(r11)
-#else
+#ifdef CONFIG_64BIT
 stdr6, (VCPU_SHARED_MSR)(r11)
+#else
+stwr6, (VCPU_SHARED_MSR + 4)(r11)
 #endif
 orir8, r8, MSR_ME | MSR_RI
 PPC_STLr5, VCPU_PC(r4)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -344,10 +344,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _GLOBAL(kvmppc_resume_host)
 stwr5, VCPU_SHARED_MAS0(r11)
 mfsprr7, SPRN_MAS2
 stwr6, VCPU_SHARED_MAS1(r11)
-#ifndef CONFIG_64BIT
-stwr7, (VCPU_SHARED_MAS2 + 4)(r11)
-#else
+#ifdef CONFIG_64BIT
 stdr7, (VCPU_SHARED_MAS2)(r11)
+#else
+stwr7, (VCPU_SHARED_MAS2 + 4)(r11)
 #endif
 mfsprr5, SPRN_MAS3
 mfsprr6, SPRN_MAS4
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -530,10 +530,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; lightweight_exit:
 stwr3, VCPU_HOST_MAS6(r4)
 lwzr3, VCPU_SHARED_MAS0(r11)
 lwzr5, VCPU_SHARED_MAS1(r11)
-#ifndef CONFIG_64BIT
-lwzr6, (VCPU_SHARED_MAS2 + 4)(r11)
-#else
+#ifdef CONFIG_64BIT
 ldr6, (VCPU_SHARED_MAS2)(r11)
+#else
+lwzr6, (VCPU_SHARED_MAS2 + 4)(r11)
 #endif
 lwzr7, VCPU_SHARED_MAS7_3+4(r11)
 lwzr8, VCPU_SHARED_MAS4(r11)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -572,10 +572,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; lightweight_exit:
 PPC_LLr6, VCPU_CTR(r4)
 PPC_LLr7, VCPU_CR(r4)
 PPC_LLr8, VCPU_PC(r4)
-#ifndef CONFIG_64BIT
-lwzr9, (VCPU_SHARED_MSR + 4)(r11)
-#else
+#ifdef CONFIG_64BIT
 ldr9, (VCPU_SHARED_MSR)(r11)
+#else
+lwzr9, (VCPU_SHARED_MSR + 4)(r11)
 #endif
 PPC_LLr0, VCPU_GPR(r0)(r4)
 PPC_LLr1, VCPU_GPR(r1)(r4)
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:59</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323016">
    <title>KVM: PPC: make e500v2 kvm and e500mc cpu mutually exclusive</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323016</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=b2e19b20708edb6413dea38e6285a6e546dce06b
Commit:     b2e19b20708edb6413dea38e6285a6e546dce06b
Parent:     bf7ca4bdcb8f1eb15d11879efa824b45443ddb69
Author:     Alexander Graf &amp;lt;agraf&amp;lt; at &amp;gt;suse.de&amp;gt;
AuthorDate: Wed Feb 15 23:41:20 2012 +0000
Committer:  Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
CommitDate: Sun Apr 8 12:54:59 2012 +0300

    KVM: PPC: make e500v2 kvm and e500mc cpu mutually exclusive
    
    We can't run e500v2 kvm on e500mc kernels, so indicate that by
    making the 2 options mutually exclusive in kconfig.
    
    Signed-off-by: Alexander Graf &amp;lt;agraf&amp;lt; at &amp;gt;suse.de&amp;gt;
    Signed-off-by: Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 arch/powerpc/kvm/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
index 44a998d..f4dacb9 100644
--- a/arch/powerpc/kvm/Kconfig
+++ b/arch/powerpc/kvm/Kconfig
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -120,7 +120,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; config KVM_EXIT_TIMING
 
 config KVM_E500V2
 bool "KVM support for PowerPC E500v2 processors"
-depends on EXPERIMENTAL &amp;amp;&amp;amp; E500
+depends on EXPERIMENTAL &amp;amp;&amp;amp; E500 &amp;amp;&amp;amp; !PPC_E500MC
 select KVM
 select KVM_MMIO
 ---help---
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323015">
    <title>xen/p2m: Move code around to allow for better re-usage.</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323015</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=3f3aaea29ff7ee2d43b430338427f30ba7f60ff9
Commit:     3f3aaea29ff7ee2d43b430338427f30ba7f60ff9
Parent:     f09d8432e39797abf39531f41ac8a46a3fbf442a
Author:     Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
AuthorDate: Fri Mar 30 11:45:01 2012 -0400
Committer:  Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
CommitDate: Fri Apr 6 17:02:59 2012 -0400

    xen/p2m: Move code around to allow for better re-usage.
    
    We are going to be using the early_alloc_p2m (and
    early_alloc_p2m_middle) code in follow up patches which
    are not related to setting identity pages.
    
    Hence lets move the code out in its own function and
    rename them as appropiate.
    
    Signed-off-by: Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
---
 arch/x86/xen/p2m.c |   62 ++++++++++++++++++++++++++++-----------------------
 1 files changed, 34 insertions(+), 28 deletions(-)

diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
index 1b267e7..3cc3afe 100644
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -499,7 +499,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static bool alloc_p2m(unsigned long pfn)
 return true;
 }
 
-static bool __init __early_alloc_p2m(unsigned long pfn)
+static bool __init early_alloc_p2m_middle(unsigned long pfn)
 {
 unsigned topidx, mididx, idx;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -541,6 +541,36 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static bool __init __early_alloc_p2m(unsigned long pfn)
 }
 return idx != 0;
 }
+
+static bool __init early_alloc_p2m(unsigned long pfn)
+{
+unsigned topidx = p2m_top_index(pfn);
+unsigned long *mid_mfn_p;
+unsigned long **mid;
+
+mid = p2m_top[topidx];
+mid_mfn_p = p2m_top_mfn_p[topidx];
+if (mid == p2m_mid_missing) {
+mid = extend_brk(PAGE_SIZE, PAGE_SIZE);
+
+p2m_mid_init(mid);
+
+p2m_top[topidx] = mid;
+
+BUG_ON(mid_mfn_p != p2m_mid_missing_mfn);
+}
+/* And the save/restore P2M tables.. */
+if (mid_mfn_p == p2m_mid_missing_mfn) {
+mid_mfn_p = extend_brk(PAGE_SIZE, PAGE_SIZE);
+p2m_mid_mfn_init(mid_mfn_p);
+
+p2m_top_mfn_p[topidx] = mid_mfn_p;
+p2m_top_mfn[topidx] = virt_to_mfn(mid_mfn_p);
+/* Note: we don't set mid_mfn_p[midix] here,
+ * look in early_alloc_p2m_middle */
+}
+return true;
+}
 unsigned long __init set_phys_range_identity(unsigned long pfn_s,
       unsigned long pfn_e)
 {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -559,35 +589,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; unsigned long __init set_phys_range_identity(unsigned long pfn_s,
 pfn &amp;lt; ALIGN(pfn_e, (P2M_MID_PER_PAGE * P2M_PER_PAGE));
 pfn += P2M_MID_PER_PAGE * P2M_PER_PAGE)
 {
-unsigned topidx = p2m_top_index(pfn);
-unsigned long *mid_mfn_p;
-unsigned long **mid;
-
-mid = p2m_top[topidx];
-mid_mfn_p = p2m_top_mfn_p[topidx];
-if (mid == p2m_mid_missing) {
-mid = extend_brk(PAGE_SIZE, PAGE_SIZE);
-
-p2m_mid_init(mid);
-
-p2m_top[topidx] = mid;
-
-BUG_ON(mid_mfn_p != p2m_mid_missing_mfn);
-}
-/* And the save/restore P2M tables.. */
-if (mid_mfn_p == p2m_mid_missing_mfn) {
-mid_mfn_p = extend_brk(PAGE_SIZE, PAGE_SIZE);
-p2m_mid_mfn_init(mid_mfn_p);
&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323014">
    <title>KVM: PPC: e500: merge &lt;asm/kvm_e500.h&gt; into arch/powerpc/kvm/e500.h</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323014</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=fc6cf99509eb8e5f16e0f81db0c71f5301193005
Commit:     fc6cf99509eb8e5f16e0f81db0c71f5301193005
Parent:     29a5a6f9102aed97a06aa984cc294e0e603b3a79
Author:     Scott Wood &amp;lt;scottwood&amp;lt; at &amp;gt;freescale.com&amp;gt;
AuthorDate: Tue Dec 20 15:34:31 2011 +0000
Committer:  Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
CommitDate: Sun Apr 8 12:51:09 2012 +0300

    KVM: PPC: e500: merge &amp;lt;asm/kvm_e500.h&amp;gt; into arch/powerpc/kvm/e500.h
    
    Keeping two separate headers for e500-specific things was a
    pain, and wasn't even organized along any logical boundary.
    
    There was TLB stuff in &amp;lt;asm/kvm_e500.h&amp;gt; despite the existence of
    arch/powerpc/kvm/e500_tlb.h, and nothing in &amp;lt;asm/kvm_e500.h&amp;gt; needed
    to be referenced from outside arch/powerpc/kvm.
    
    Signed-off-by: Scott Wood &amp;lt;scottwood&amp;lt; at &amp;gt;freescale.com&amp;gt;
    [agraf: fix bisectability]
    Signed-off-by: Alexander Graf &amp;lt;agraf&amp;lt; at &amp;gt;suse.de&amp;gt;
    Signed-off-by: Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 arch/powerpc/include/asm/kvm_e500.h |   96 -----------------------------------
 arch/powerpc/kvm/e500.c             |    1 -
 arch/powerpc/kvm/e500.h             |   82 ++++++++++++++++++++++++++++--
 arch/powerpc/kvm/e500_emulate.c     |    1 -
 arch/powerpc/kvm/e500_tlb.c         |    1 -
 5 files changed, 78 insertions(+), 103 deletions(-)

diff --git a/arch/powerpc/include/asm/kvm_e500.h b/arch/powerpc/include/asm/kvm_e500.h
deleted file mode 100644
index 8cd50a5..0000000
--- a/arch/powerpc/include/asm/kvm_e500.h
+++ /dev/null
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,96 +0,0 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-/*
- * Copyright (C) 2008-2011 Freescale Semiconductor, Inc. All rights reserved.
- *
- * Author: Yu Liu, &amp;lt;yu.liu&amp;lt; at &amp;gt;freescale.com&amp;gt;
- *
- * Description:
- * This file is derived from arch/powerpc/include/asm/kvm_44x.h,
- * by Hollis Blanchard &amp;lt;hollisb&amp;lt; at &amp;gt;us.ibm.com&amp;gt;.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation.
- */
-
-#ifndef __ASM_KVM_E500_H__
-#define __ASM_KVM_E500_H__
-
-#include &amp;lt;linux/kvm_host.h&amp;gt;
-
-#define BOOKE_INTERRUPT_SIZE 36
-
-#define E500_PID_NUM   3
-#define E500_TLB_NUM   2
-
-#define E500_TLB_VALID 1
-#define E500_TLB_DIRTY 2
-
-struct tlbe_ref {
-pfn_t pfn;
-unsigned int flags; /* E500_TLB_* */
-};
-
-struct tlbe_priv {
-struct tlbe_ref ref; /* TLB0 only -- TLB1 uses tlb_refs */
-};
-
-struct vcpu_id_table;
-
-struct kvmppc_e500_tlb_params {
-int entries, ways, sets;
-};
-
-struct kvmppc_vcpu_e500 {
-/* Unmodified copy of the guest's TLB -- shared with host userspace. */
-struct kvm_book3e_206_tlb_entry *gtlb_arch;
-
-/* Starting entry number in gtlb_arch[] */
-int gtlb_offset[E500_TLB_NUM];
-
-/* KVM internal information associated with each guest TLB entry */
-struct tlbe_priv *gtlb_priv[E500_TLB_NUM];
-
-struct kvmppc_e500_tlb_params gtlb_params[E500_TLB_NUM];
-
-unsigned int gtlb_nv[E500_TLB_NUM];
-
-/*
- * information associated with each host TLB entry --
- * TLB1 only for now.  If/when guest TLB1 entries can be
- * mapped with host TLB0, this will be used for that too.
- *
- * We don't want to use this for guest TLB0 because then we'd
- * have the overhead of doing the translation again even if
- * the entry is still in the guest TLB (e.g. we swapped out
- * and back, and our host TLB entries got evicted).
- */
-struct tlbe_ref *tlb_refs[E500_TLB_NUM];
-unsigned int host_tlb1_nv;
-
-u32 host_pid[E500_PID_NUM];
-u32 pid[E500_PID_NUM];
-u32 svr;
-
-/* vcpu id table */
-struct vcpu_id_table *idt;
-
-u32 l1csr0;
-u32 l1csr1;
-u32 hid0;
-u32 hid1;
-u32 tlb0cfg;
-u32 tlb1cfg;
-u64 mcar;
-
-struct page **shared_tlb_pages;
-int num_shared_tlb_pages;
-
-struct kvm_vcpu vcpu;
-};
-
-static inline struct kvmppc_vcpu_e500 *to_e500(struct kvm_vcpu *vcpu)
-{
-return container_of(vcpu, struct kvmppc_vcpu_e500, vcpu);
-}
-
-#endif /* __ASM_KVM_E500_H__ */
diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c
index 5c450ba..76b35d8 100644
--- a/arch/powerpc/kvm/e500.c
+++ b/arch/powerpc/kvm/e500.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -20,7 +20,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;asm/reg.h&amp;gt;
 #include &amp;lt;asm/cputable.h&amp;gt;
 #include &amp;lt;asm/tlbflush.h&amp;gt;
-#include &amp;lt;asm/kvm_e500.h&amp;gt;
 #include &amp;lt;asm/kvm_ppc.h&amp;gt;
 
 #include "booke.h"
diff --git a/arch/powerpc/kvm/e500.h b/arch/powerpc/kvm/e500.h
index 02ecde2..51d13bd 100644
--- a/arch/powerpc/kvm/e500.h
+++ b/arch/powerpc/kvm/e500.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,11 +1,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 /*
  * Copyright (C) 2008-2011 Freescale Semiconductor, Inc. All rights reserved.
  *
- * Author: Yu Liu, yu.liu&amp;lt; at &amp;gt;freescale.com
+ * Author: Yu Liu &amp;lt;yu.liu&amp;lt; at &amp;gt;freescale.com&amp;gt;
  *
  * Description:
- * This file is based on arch/powerpc/kvm/44x_tlb.h,
- * by Hollis Blanchard &amp;lt;hollisb&amp;lt; at &amp;gt;us.ibm.com&amp;gt;.
+ * This file is based on arch/powerpc/kvm/44x_tlb.h and
+ * arch/powerpc/include/asm/kvm_44x.h by Hollis Blanchard &amp;lt;hollisb&amp;lt; at &amp;gt;us.ibm.com&amp;gt;,
+ * Copyright IBM Corp. 2007-2008
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License, version 2, as
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -18,7 +19,80 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;linux/kvm_host.h&amp;gt;
 #include &amp;lt;asm/mmu-book3e.h&amp;gt;
 #include &amp;lt;asm/tlb.h&amp;gt;
-#include &amp;lt;asm/kvm_e500.h&amp;gt;
+
+#define E500_PID_NUM   3
+#define E500_TLB_NUM   2
+
+#define E500_TLB_VALID 1
+#define E500_TLB_DIRTY 2
+
+struct tlbe_ref {
+pfn_t pfn;
+unsigned int flags; /* E500_TLB_* */
+};
+
+struct tlbe_priv {
+struct tlbe_ref ref; /* TLB0 only -- TLB1 uses tlb_refs */
+};
+
+struct vcpu_id_table;
+
+struct kvmppc_e500_tlb_params {
+int entries, ways, sets;
+};
+
+struct kvmppc_vcpu_e500 {
+/* Unmodified copy of the guest's TLB -- shared with host userspace. */
+struct kvm_book3e_206_tlb_entry *gtlb_arch;
+
+/* Starting entry number in gtlb_arch[] */
+int gtlb_offset[E500_TLB_NUM];
+
+/* KVM internal information associated with each guest TLB entry */
+struct tlbe_priv *gtlb_priv[E500_TLB_NUM];
+
+struct kvmppc_e500_tlb_params gtlb_params[E500_TLB_NUM];
+
+unsigned int gtlb_nv[E500_TLB_NUM];
+
+/*
+ * information associated with each host TLB entry --
+ * TLB1 only for now.  If/when guest TLB1 entries can be
+ * mapped with host TLB0, this will be used for that too.
+ *
+ * We don't want to use this for guest TLB0 because then we'd
+ * have the overhead of doing the translation again even if
+ * the entry is still in the guest TLB (e.g. we swapped out
+ * and back, and our host TLB entries got evicted).
+ */
+struct tlbe_ref *tlb_refs[E500_TLB_NUM];
+unsigned int host_tlb1_nv;
+
+u32 host_pid[E500_PID_NUM];
+u32 pid[E500_PID_NUM];
+u32 svr;
+
+/* vcpu id table */
+struct vcpu_id_table *idt;
+
+u32 l1csr0;
+u32 l1csr1;
+u32 hid0;
+u32 hid1;
+u32 tlb0cfg;
+u32 tlb1cfg;
+u64 mcar;
+
+struct page **shared_tlb_pages;
+int num_shared_tlb_pages;
+
+struct kvm_vcpu vcpu;
+};
+
+static inline struct kvmppc_vcpu_e500 *to_e500(struct kvm_vcpu *vcpu)
+{
+return container_of(vcpu, struct kvmppc_vcpu_e500, vcpu);
+}
 
 /* This geometry is the legacy default -- can be overridden by userspace */
 #define KVM_E500_TLB0_WAY_SIZE128
diff --git a/arch/powerpc/kvm/e500_emulate.c b/arch/powerpc/kvm/e500_emulate.c
index 2a1a228..7e2d592 100644
--- a/arch/powerpc/kvm/e500_emulate.c
+++ b/arch/powerpc/kvm/e500_emulate.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -14,7 +14,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include &amp;lt;asm/kvm_ppc.h&amp;gt;
 #include &amp;lt;asm/disassemble.h&amp;gt;
-#include &amp;lt;asm/kvm_e500.h&amp;gt;
 
 #include "booke.h"
 #include "e500.h"
diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c
index 1d623a0..7d4a918 100644
--- a/arch/powerpc/kvm/e500_tlb.c
+++ b/arch/powerpc/kvm/e500_tlb.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -26,7 +26,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;linux/vmalloc.h&amp;gt;
 #include &amp;lt;linux/hugetlb.h&amp;gt;
 #include &amp;lt;asm/kvm_ppc.h&amp;gt;
-#include &amp;lt;asm/kvm_e500.h&amp;gt;
 
 #include "../mm/mmu_decl.h"
 #include "e500.h"
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323013">
    <title>xen/smp: unbind irqworkX when unplugging vCPUs.</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323013</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=2f1bd67d544d3c086fb5101513f4b6c8f4291b43
Commit:     2f1bd67d544d3c086fb5101513f4b6c8f4291b43
Parent:     4b3451ad1313134821ad13b6fe821d0b4409aa18
Author:     Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
AuthorDate: Mon May 21 09:19:38 2012 -0400
Committer:  Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
CommitDate: Mon May 21 09:26:04 2012 -0400

    xen/smp: unbind irqworkX when unplugging vCPUs.
    
    The git commit  1ff2b0c303698e486f1e0886b4d9876200ef8ca5
    "xen: implement IRQ_WORK_VECTOR handler" added the functionality
    to have a per-cpu "irqworkX" for the IPI APIC functionality.
    However it missed the unbind when a vCPU is unplugged resulting
    in an orphaned per-cpu interrupt line for unplugged vCPU:
    
      30:        216          0   xen-dyn-event     hvc_console
      31:        810          4   xen-dyn-event     eth0
      32:         29          0   xen-dyn-event     blkif
    - 36:          0          0  xen-percpu-ipi       irqwork2
    - 37:        287          0   xen-dyn-event     xenbus
    + 36:        287          0   xen-dyn-event     xenbus
     NMI:          0          0   Non-maskable interrupts
     LOC:          0          0   Local timer interrupts
     SPU:          0          0   Spurious interrupts
    
    Signed-off-by: Konrad Rzeszutek Wilk &amp;lt;konrad.wilk&amp;lt; at &amp;gt;oracle.com&amp;gt;
---
 arch/x86/xen/smp.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index 3ec3f8e..ce9e98b 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -419,6 +419,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void xen_cpu_die(unsigned int cpu)
 unbind_from_irqhandler(per_cpu(xen_callfunc_irq, cpu), NULL);
 unbind_from_irqhandler(per_cpu(xen_debug_irq, cpu), NULL);
 unbind_from_irqhandler(per_cpu(xen_callfuncsingle_irq, cpu), NULL);
+unbind_from_irqhandler(per_cpu(xen_irq_work, cpu), NULL);
 xen_uninit_lock_cpu(cpu);
 xen_teardown_timer(cpu);
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323012">
    <title>kvmclock: Add functions to check if the host has stopped the vm</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323012</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=3b5d56b9317fa7b5407dff1aa7b115bf6cdbd494
Commit:     3b5d56b9317fa7b5407dff1aa7b115bf6cdbd494
Parent:     eae3ee7d8a7c59cf63441dedf28674889f5fc477
Author:     Eric B Munson &amp;lt;emunson&amp;lt; at &amp;gt;mgebm.net&amp;gt;
AuthorDate: Sat Mar 10 14:37:26 2012 -0500
Committer:  Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
CommitDate: Sun Apr 8 12:48:59 2012 +0300

    kvmclock: Add functions to check if the host has stopped the vm
    
    When a host stops or suspends a VM it will set a flag to show this.  The
    watchdog will use these functions to determine if a softlockup is real, or the
    result of a suspended VM.
    
    Signed-off-by: Eric B Munson &amp;lt;emunson&amp;lt; at &amp;gt;mgebm.net&amp;gt;
    asm-generic changes Acked-by: Arnd Bergmann &amp;lt;arnd&amp;lt; at &amp;gt;arndb.de&amp;gt;
    Signed-off-by: Marcelo Tosatti &amp;lt;mtosatti&amp;lt; at &amp;gt;redhat.com&amp;gt;
    Signed-off-by: Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 arch/alpha/include/asm/kvm_para.h      |    1 +
 arch/arm/include/asm/kvm_para.h        |    1 +
 arch/avr32/include/asm/kvm_para.h      |    1 +
 arch/blackfin/include/asm/kvm_para.h   |    1 +
 arch/c6x/include/asm/kvm_para.h        |    1 +
 arch/frv/include/asm/kvm_para.h        |    1 +
 arch/h8300/include/asm/kvm_para.h      |    1 +
 arch/hexagon/include/asm/kvm_para.h    |    1 +
 arch/ia64/include/asm/kvm_para.h       |    5 +++++
 arch/m68k/include/asm/kvm_para.h       |    1 +
 arch/microblaze/include/asm/kvm_para.h |    1 +
 arch/mips/include/asm/kvm_para.h       |    1 +
 arch/mn10300/include/asm/kvm_para.h    |    1 +
 arch/openrisc/include/asm/kvm_para.h   |    1 +
 arch/parisc/include/asm/kvm_para.h     |    1 +
 arch/powerpc/include/asm/kvm_para.h    |    5 +++++
 arch/s390/include/asm/kvm_para.h       |    5 +++++
 arch/score/include/asm/kvm_para.h      |    1 +
 arch/sh/include/asm/kvm_para.h         |    1 +
 arch/sparc/include/asm/kvm_para.h      |    1 +
 arch/tile/include/asm/kvm_para.h       |    1 +
 arch/um/include/asm/kvm_para.h         |    1 +
 arch/unicore32/include/asm/kvm_para.h  |    1 +
 arch/x86/include/asm/kvm_para.h        |    8 ++++++++
 arch/x86/kernel/kvmclock.c             |   21 +++++++++++++++++++++
 arch/xtensa/include/asm/kvm_para.h     |    1 +
 include/asm-generic/kvm_para.h         |   14 ++++++++++++++
 27 files changed, 79 insertions(+), 0 deletions(-)

diff --git a/arch/alpha/include/asm/kvm_para.h b/arch/alpha/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/alpha/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/arm/include/asm/kvm_para.h b/arch/arm/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/arm/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/avr32/include/asm/kvm_para.h b/arch/avr32/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/avr32/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/blackfin/include/asm/kvm_para.h b/arch/blackfin/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/blackfin/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/c6x/include/asm/kvm_para.h b/arch/c6x/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/c6x/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/frv/include/asm/kvm_para.h b/arch/frv/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/frv/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/h8300/include/asm/kvm_para.h b/arch/h8300/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/h8300/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/hexagon/include/asm/kvm_para.h b/arch/hexagon/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/hexagon/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/ia64/include/asm/kvm_para.h b/arch/ia64/include/asm/kvm_para.h
index 1588aee..2019cb9 100644
--- a/arch/ia64/include/asm/kvm_para.h
+++ b/arch/ia64/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -26,6 +26,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline unsigned int kvm_arch_para_features(void)
 return 0;
 }
 
+static inline bool kvm_check_and_clear_guest_paused(void)
+{
+return false;
+}
+
 #endif
 
 #endif
diff --git a/arch/m68k/include/asm/kvm_para.h b/arch/m68k/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/m68k/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/microblaze/include/asm/kvm_para.h b/arch/microblaze/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/microblaze/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/mips/include/asm/kvm_para.h b/arch/mips/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/mips/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/mn10300/include/asm/kvm_para.h b/arch/mn10300/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/mn10300/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/openrisc/include/asm/kvm_para.h b/arch/openrisc/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/openrisc/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/parisc/include/asm/kvm_para.h b/arch/parisc/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/parisc/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/powerpc/include/asm/kvm_para.h b/arch/powerpc/include/asm/kvm_para.h
index 7b754e7..c18916b 100644
--- a/arch/powerpc/include/asm/kvm_para.h
+++ b/arch/powerpc/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -206,6 +206,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline unsigned int kvm_arch_para_features(void)
 return r;
 }
 
+static inline bool kvm_check_and_clear_guest_paused(void)
+{
+return false;
+}
+
 #endif /* __KERNEL__ */
 
 #endif /* __POWERPC_KVM_PARA_H__ */
diff --git a/arch/s390/include/asm/kvm_para.h b/arch/s390/include/asm/kvm_para.h
index 6964db2..a988329 100644
--- a/arch/s390/include/asm/kvm_para.h
+++ b/arch/s390/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -149,6 +149,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline unsigned int kvm_arch_para_features(void)
 return 0;
 }
 
+static inline bool kvm_check_and_clear_guest_paused(void)
+{
+return false;
+}
+
 #endif
 
 #endif /* __S390_KVM_PARA_H */
diff --git a/arch/score/include/asm/kvm_para.h b/arch/score/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/score/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/sh/include/asm/kvm_para.h b/arch/sh/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/sh/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/sparc/include/asm/kvm_para.h b/arch/sparc/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/sparc/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/tile/include/asm/kvm_para.h b/arch/tile/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/tile/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/um/include/asm/kvm_para.h b/arch/um/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/um/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/unicore32/include/asm/kvm_para.h b/arch/unicore32/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/unicore32/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/arch/x86/include/asm/kvm_para.h b/arch/x86/include/asm/kvm_para.h
index 734c376..99c4bbe 100644
--- a/arch/x86/include/asm/kvm_para.h
+++ b/arch/x86/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -95,6 +95,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct kvm_vcpu_pv_apf_data {
 extern void kvmclock_init(void);
 extern int kvm_register_clock(char *txt);
 
+#ifdef CONFIG_KVM_CLOCK
+bool kvm_check_and_clear_guest_paused(void);
+#else
+static inline bool kvm_check_and_clear_guest_paused(void)
+{
+return false;
+}
+#endif /* CONFIG_KVMCLOCK */
 
 /* This instruction is vmcall.  On non-VT architectures, it will generate a
  * trap that we will then rewrite to the appropriate instruction.
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
index f8492da..4ba090c 100644
--- a/arch/x86/kernel/kvmclock.c
+++ b/arch/x86/kernel/kvmclock.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -22,6 +22,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;asm/msr.h&amp;gt;
 #include &amp;lt;asm/apic.h&amp;gt;
 #include &amp;lt;linux/percpu.h&amp;gt;
+#include &amp;lt;linux/hardirq.h&amp;gt;
 
 #include &amp;lt;asm/x86_init.h&amp;gt;
 #include &amp;lt;asm/reboot.h&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -114,6 +115,26 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void kvm_get_preset_lpj(void)
 preset_lpj = lpj;
 }
 
+bool kvm_check_and_clear_guest_paused(void)
+{
+bool ret = false;
+struct pvclock_vcpu_time_info *src;
+
+/*
+ * per_cpu() is safe here because this function is only called from
+ * timer functions where preemption is already disabled.
+ */
+WARN_ON(!in_atomic());
+src = &amp;amp;__get_cpu_var(hv_clock);
+if ((src-&amp;gt;flags &amp;amp; PVCLOCK_GUEST_STOPPED) != 0) {
+__this_cpu_and(hv_clock.flags, ~PVCLOCK_GUEST_STOPPED);
+ret = true;
+}
+
+return ret;
+}
+EXPORT_SYMBOL_GPL(kvm_check_and_clear_guest_paused);
+
 static struct clocksource kvm_clock = {
 .name = "kvm-clock",
 .read = kvm_clock_get_cycles,
diff --git a/arch/xtensa/include/asm/kvm_para.h b/arch/xtensa/include/asm/kvm_para.h
new file mode 100644
index 0000000..14fab8f
--- /dev/null
+++ b/arch/xtensa/include/asm/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include &amp;lt;asm-generic/kvm_para.h&amp;gt;
diff --git a/include/asm-generic/kvm_para.h b/include/asm-generic/kvm_para.h
new file mode 100644
index 0000000..05ef7e7
--- /dev/null
+++ b/include/asm-generic/kvm_para.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#ifndef _ASM_GENERIC_KVM_PARA_H
+#define _ASM_GENERIC_KVM_PARA_H
+
+
+/*
+ * This function is used by architectures that support kvm to avoid issuing
+ * false soft lockup messages.
+ */
+static inline bool kvm_check_and_clear_guest_paused(void)
+{
+return false;
+}
+
+#endif
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323011">
    <title>KVM: PPC: e500: clean up arch/powerpc/kvm/e500.h</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323011</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=52e1718c6fd1a1f54c676c2107dc931e93865fe8
Commit:     52e1718c6fd1a1f54c676c2107dc931e93865fe8
Parent:     fc6cf99509eb8e5f16e0f81db0c71f5301193005
Author:     Scott Wood &amp;lt;scottwood&amp;lt; at &amp;gt;freescale.com&amp;gt;
AuthorDate: Tue Dec 20 15:34:32 2011 +0000
Committer:  Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
CommitDate: Sun Apr 8 12:51:10 2012 +0300

    KVM: PPC: e500: clean up arch/powerpc/kvm/e500.h
    
    Move vcpu to the beginning of vcpu_e500 to give it appropriate
    prominence, especially if more fields end up getting added to the
    end of vcpu_e500 (and vcpu ends up in the middle).
    
    Remove gratuitous "extern" and add parameter names to prototypes.
    
    Signed-off-by: Scott Wood &amp;lt;scottwood&amp;lt; at &amp;gt;freescale.com&amp;gt;
    [agraf: fix bisectability]
    Signed-off-by: Alexander Graf &amp;lt;agraf&amp;lt; at &amp;gt;suse.de&amp;gt;
    Signed-off-by: Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 arch/powerpc/kvm/e500.h |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/arch/powerpc/kvm/e500.h b/arch/powerpc/kvm/e500.h
index 51d13bd..a48af00 100644
--- a/arch/powerpc/kvm/e500.h
+++ b/arch/powerpc/kvm/e500.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -42,6 +42,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct kvmppc_e500_tlb_params {
 };
 
 struct kvmppc_vcpu_e500 {
+struct kvm_vcpu vcpu;
+
 /* Unmodified copy of the guest's TLB -- shared with host userspace. */
 struct kvm_book3e_206_tlb_entry *gtlb_arch;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -85,8 +87,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct kvmppc_vcpu_e500 {
 
 struct page **shared_tlb_pages;
 int num_shared_tlb_pages;
-
-struct kvm_vcpu vcpu;
 };
 
 static inline struct kvmppc_vcpu_e500 *to_e500(struct kvm_vcpu *vcpu)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -113,19 +113,22 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline struct kvmppc_vcpu_e500 *to_e500(struct kvm_vcpu *vcpu)
   (MAS3_U0 | MAS3_U1 | MAS3_U2 | MAS3_U3 \
    | E500_TLB_USER_PERM_MASK | E500_TLB_SUPER_PERM_MASK)
 
-extern void kvmppc_dump_tlbs(struct kvm_vcpu *);
-extern int kvmppc_e500_emul_mt_mmucsr0(struct kvmppc_vcpu_e500 *, ulong);
-extern int kvmppc_e500_emul_tlbwe(struct kvm_vcpu *);
-extern int kvmppc_e500_emul_tlbre(struct kvm_vcpu *);
-extern int kvmppc_e500_emul_tlbivax(struct kvm_vcpu *, int, int);
-extern int kvmppc_e500_emul_tlbsx(struct kvm_vcpu *, int);
-extern int kvmppc_e500_tlb_search(struct kvm_vcpu *, gva_t, unsigned int, int);
 extern void kvmppc_e500_tlb_put(struct kvm_vcpu *);
 extern void kvmppc_e500_tlb_load(struct kvm_vcpu *, int);
-extern int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 *);
-extern void kvmppc_e500_tlb_uninit(struct kvmppc_vcpu_e500 *);
 extern void kvmppc_e500_tlb_setup(struct kvmppc_vcpu_e500 *);
 extern void kvmppc_e500_recalc_shadow_pid(struct kvmppc_vcpu_e500 *);
+int kvmppc_e500_emul_mt_mmucsr0(struct kvmppc_vcpu_e500 *vcpu_e500,
+ulong value);
+int kvmppc_e500_emul_tlbwe(struct kvm_vcpu *vcpu);
+int kvmppc_e500_emul_tlbre(struct kvm_vcpu *vcpu);
+int kvmppc_e500_emul_tlbivax(struct kvm_vcpu *vcpu, int ra, int rb);
+int kvmppc_e500_emul_tlbsx(struct kvm_vcpu *vcpu, int rb);
+int kvmppc_e500_tlb_search(struct kvm_vcpu *, gva_t, unsigned int, int);
+int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 *vcpu_e500);
+void kvmppc_e500_tlb_uninit(struct kvmppc_vcpu_e500 *vcpu_e500);
+
+void kvmppc_get_sregs_e500_tlb(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs);
+int kvmppc_set_sregs_e500_tlb(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs);
 
 /* TLB helper functions */
 static inline unsigned int
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323010">
    <title>KVM: PPC: Rework wqp conditional code</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323010</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=2246f8b56315befa30f3d3d2800e0734c774f70e
Commit:     2246f8b56315befa30f3d3d2800e0734c774f70e
Parent:     b6d33834bd4e8bdf4a199812e31b3e36da53c794
Author:     Alexander Graf &amp;lt;agraf&amp;lt; at &amp;gt;suse.de&amp;gt;
AuthorDate: Tue Mar 13 22:35:01 2012 +0100
Committer:  Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
CommitDate: Sun Apr 8 12:47:49 2012 +0300

    KVM: PPC: Rework wqp conditional code
    
    On PowerPC, we sometimes use a waitqueue per core, not per thread,
    so we can't always use the vcpu internal waitqueue.
    
    This code has been generalized by Christoffer Dall recently, but
    unfortunately broke compilation for PowerPC. At the time the helper
    function is defined, struct kvm_vcpu is not declared yet, so we can't
    dereference it.
    
    This patch moves all logic into the generic inline function, at which
    time we have all information necessary.
    
    Signed-off-by: Alexander Graf &amp;lt;agraf&amp;lt; at &amp;gt;suse.de&amp;gt;
    Signed-off-by: Marcelo Tosatti &amp;lt;mtosatti&amp;lt; at &amp;gt;redhat.com&amp;gt;
    Signed-off-by: Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 arch/powerpc/include/asm/kvm_host.h |    6 +-----
 include/linux/kvm_host.h            |    6 ++++--
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h
index 8893837..20ab5b2 100644
--- a/arch/powerpc/include/asm/kvm_host.h
+++ b/arch/powerpc/include/asm/kvm_host.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -498,10 +498,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct kvm_vcpu_arch {
 #define KVM_MMIO_REG_QPR0x0040
 #define KVM_MMIO_REG_FQPR0x0060
 
-#define __KVM_HAVE_ARCH_VCPU_GET_WQ 1
-static inline wait_queue_head *kvm_arch_vcpu_wq(struct kvm_vcpu *vcpu)
-{
-return vcpu-&amp;gt;arch.wqp;
-}
+#define __KVM_HAVE_ARCH_WQP
 
 #endif /* __POWERPC_KVM_HOST_H__ */
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 5b624e1..5184817 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -524,12 +524,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline void kvm_arch_free_vm(struct kvm *kvm)
 }
 #endif
 
-#ifndef __KVM_HAVE_ARCH_VCPU_GET_WQ
 static inline wait_queue_head_t *kvm_arch_vcpu_wq(struct kvm_vcpu *vcpu)
 {
+#ifdef __KVM_HAVE_ARCH_WQP
+return vcpu-&amp;gt;arch.wqp;
+#else
 return &amp;amp;vcpu-&amp;gt;wq;
-}
 #endif
+}
 
 int kvm_arch_init_vm(struct kvm *kvm, unsigned long type);
 void kvm_arch_destroy_vm(struct kvm *kvm);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323009">
    <title>KVM: PPC: e500mc: Add doorbell emulation support</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323009</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=4ab969199ec6a14604ceaffb21fe78cc4881d3b8
Commit:     4ab969199ec6a14604ceaffb21fe78cc4881d3b8
Parent:     73196cd364a2d972d73fa08da9d81ca3215bed68
Author:     Alexander Graf &amp;lt;agraf&amp;lt; at &amp;gt;suse.de&amp;gt;
AuthorDate: Wed Feb 15 13:28:48 2012 +0000
Committer:  Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
CommitDate: Sun Apr 8 12:54:50 2012 +0300

    KVM: PPC: e500mc: Add doorbell emulation support
    
    When one vcpu wants to kick another, it can issue a special IPI instruction
    called msgsnd. This patch emulates this instruction, its clearing counterpart
    and the infrastructure required to actually trigger that interrupt inside
    a guest vcpu.
    
    With this patch, SMP guests on e500mc work.
    
    Signed-off-by: Alexander Graf &amp;lt;agraf&amp;lt; at &amp;gt;suse.de&amp;gt;
    Signed-off-by: Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 arch/powerpc/include/asm/dbell.h |    2 +
 arch/powerpc/kvm/booke.c         |    2 +
 arch/powerpc/kvm/e500_emulate.c  |   68 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 72 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/include/asm/dbell.h b/arch/powerpc/include/asm/dbell.h
index d7365b0..154c067 100644
--- a/arch/powerpc/include/asm/dbell.h
+++ b/arch/powerpc/include/asm/dbell.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -19,7 +19,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #define PPC_DBELL_MSG_BRDCAST(0x04000000)
 #define PPC_DBELL_TYPE(x)(((x) &amp;amp; 0xf) &amp;lt;&amp;lt; (63-36))
+#define PPC_DBELL_TYPE_MASKPPC_DBELL_TYPE(0xf)
 #define PPC_DBELL_LPID(x)((x) &amp;lt;&amp;lt; (63 - 49))
+#define PPC_DBELL_PIR_MASK0x3fff
 enum ppc_dbell {
 PPC_DBELL = 0,/* doorbell */
 PPC_DBELL_CRIT = 1,/* critical doorbell */
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 0b77be1..85bd5b8 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -326,6 +326,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
 int_class = INT_CLASS_NONCRIT;
 break;
 case BOOKE_IRQPRIO_CRITICAL:
+case BOOKE_IRQPRIO_DBELL_CRIT:
 allowed = vcpu-&amp;gt;arch.shared-&amp;gt;msr &amp;amp; MSR_CE;
 allowed = allowed &amp;amp;&amp;amp; !crit;
 msr_mask = MSR_GS | MSR_ME;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -342,6 +343,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
 keep_irq = true;
 /* fall through */
 case BOOKE_IRQPRIO_EXTERNAL:
+case BOOKE_IRQPRIO_DBELL:
 allowed = vcpu-&amp;gt;arch.shared-&amp;gt;msr &amp;amp; MSR_EE;
 allowed = allowed &amp;amp;&amp;amp; !crit;
 msr_mask = MSR_GS | MSR_CE | MSR_ME | MSR_DE;
diff --git a/arch/powerpc/kvm/e500_emulate.c b/arch/powerpc/kvm/e500_emulate.c
index 98b6c1c..99155f8 100644
--- a/arch/powerpc/kvm/e500_emulate.c
+++ b/arch/powerpc/kvm/e500_emulate.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -14,16 +14,74 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include &amp;lt;asm/kvm_ppc.h&amp;gt;
 #include &amp;lt;asm/disassemble.h&amp;gt;
+#include &amp;lt;asm/dbell.h&amp;gt;
 
 #include "booke.h"
 #include "e500.h"
 
+#define XOP_MSGSND  206
+#define XOP_MSGCLR  238
 #define XOP_TLBIVAX 786
 #define XOP_TLBSX   914
 #define XOP_TLBRE   946
 #define XOP_TLBWE   978
 #define XOP_TLBILX  18
 
+#ifdef CONFIG_KVM_E500MC
+static int dbell2prio(ulong param)
+{
+int msg = param &amp;amp; PPC_DBELL_TYPE_MASK;
+int prio = -1;
+
+switch (msg) {
+case PPC_DBELL_TYPE(PPC_DBELL):
+prio = BOOKE_IRQPRIO_DBELL;
+break;
+case PPC_DBELL_TYPE(PPC_DBELL_CRIT):
+prio = BOOKE_IRQPRIO_DBELL_CRIT;
+break;
+default:
+break;
+}
+
+return prio;
+}
+
+static int kvmppc_e500_emul_msgclr(struct kvm_vcpu *vcpu, int rb)
+{
+ulong param = vcpu-&amp;gt;arch.gpr[rb];
+int prio = dbell2prio(param);
+
+if (prio &amp;lt; 0)
+return EMULATE_FAIL;
+
+clear_bit(prio, &amp;amp;vcpu-&amp;gt;arch.pending_exceptions);
+return EMULATE_DONE;
+}
+
+static int kvmppc_e500_emul_msgsnd(struct kvm_vcpu *vcpu, int rb)
+{
+ulong param = vcpu-&amp;gt;arch.gpr[rb];
+int prio = dbell2prio(rb);
+int pir = param &amp;amp; PPC_DBELL_PIR_MASK;
+int i;
+struct kvm_vcpu *cvcpu;
+
+if (prio &amp;lt; 0)
+return EMULATE_FAIL;
+
+kvm_for_each_vcpu(i, cvcpu, vcpu-&amp;gt;kvm) {
+int cpir = cvcpu-&amp;gt;arch.shared-&amp;gt;pir;
+if ((param &amp;amp; PPC_DBELL_MSG_BRDCAST) || (cpir == pir)) {
+set_bit(prio, &amp;amp;cvcpu-&amp;gt;arch.pending_exceptions);
+kvm_vcpu_kick(cvcpu);
+}
+}
+
+return EMULATE_DONE;
+}
+#endif
+
 int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu,
                            unsigned int inst, int *advance)
 {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -36,6 +94,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu,
 case 31:
 switch (get_xop(inst)) {
 
+#ifdef CONFIG_KVM_E500MC
+case XOP_MSGSND:
+emulated = kvmppc_e500_emul_msgsnd(vcpu, get_rb(inst));
+break;
+
+case XOP_MSGCLR:
+emulated = kvmppc_e500_emul_msgclr(vcpu, get_rb(inst));
+break;
+#endif
+
 case XOP_TLBRE:
 emulated = kvmppc_e500_emul_tlbre(vcpu);
 break;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323008">
    <title>KVM: set upper bounds for iobus dev to limit userspace</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323008</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=786a9f888bfbe70a36d0592b26037ca1e8c8da7f
Commit:     786a9f888bfbe70a36d0592b26037ca1e8c8da7f
Parent:     a13007160f1b9ec7c67e28ec9254f197c5c08d7d
Author:     Amos Kong &amp;lt;akong&amp;lt; at &amp;gt;redhat.com&amp;gt;
AuthorDate: Fri Mar 9 12:17:40 2012 +0800
Committer:  Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
CommitDate: Sun Apr 8 12:47:00 2012 +0300

    KVM: set upper bounds for iobus dev to limit userspace
    
    kvm_io_bus devices are used for ioevent, pit, pic, ioapic,
    coalesced_mmio.
    
    Currently Qemu only emulates one PCI bus, it contains 32 slots,
    one slot contains 8 functions, maximum of supported PCI devices:
     1 * 32 * 8 = 256. One virtio-blk takes one iobus device,
    one virtio-net(vhost=on) takes two iobus devices.
    The maximum of coalesced mmio zone is 100, each zone
    has an iobus devices. So 300 io_bus devices are not enough.
    
    Set an upper bounds for kvm_io_range to limit userspace.
    1000 is a very large limit and not bloat the typical user.
    
    Signed-off-by: Amos Kong &amp;lt;akong&amp;lt; at &amp;gt;redhat.com&amp;gt;
    Signed-off-by: Marcelo Tosatti &amp;lt;mtosatti&amp;lt; at &amp;gt;redhat.com&amp;gt;
    Signed-off-by: Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 include/linux/kvm_host.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index ba9fb4a..3a2cea6 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -68,7 +68,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct kvm_io_range {
 struct kvm_io_device *dev;
 };
 
-#define NR_IOBUS_DEVS 300
+#define NR_IOBUS_DEVS 1000
 
 struct kvm_io_bus {
 int                   dev_count;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323007">
    <title>KVM: x86: Add ioctl for KVM_KVMCLOCK_CTRL</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323007</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=1c0b28c2a46d98cd258d96b8c222144b22876c46
Commit:     1c0b28c2a46d98cd258d96b8c222144b22876c46
Parent:     3b5d56b9317fa7b5407dff1aa7b115bf6cdbd494
Author:     Eric B Munson &amp;lt;emunson&amp;lt; at &amp;gt;mgebm.net&amp;gt;
AuthorDate: Sat Mar 10 14:37:27 2012 -0500
Committer:  Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
CommitDate: Sun Apr 8 12:49:01 2012 +0300

    KVM: x86: Add ioctl for KVM_KVMCLOCK_CTRL
    
    Now that we have a flag that will tell the guest it was suspended, create an
    interface for that communication using a KVM ioctl.
    
    Signed-off-by: Eric B Munson &amp;lt;emunson&amp;lt; at &amp;gt;mgebm.net&amp;gt;
    Signed-off-by: Marcelo Tosatti &amp;lt;mtosatti&amp;lt; at &amp;gt;redhat.com&amp;gt;
    Signed-off-by: Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 Documentation/virtual/kvm/api.txt |   20 ++++++++++++++++++++
 Documentation/virtual/kvm/msr.txt |    4 ++++
 arch/x86/kvm/x86.c                |   22 ++++++++++++++++++++++
 include/linux/kvm.h               |    3 +++
 4 files changed, 49 insertions(+), 0 deletions(-)

diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 6386f8c..81ff39f 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1669,6 +1669,26 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; at the memory location pointed to by "addr".
 The list of registers accessible using this interface is identical to the
 list in 4.64.
 
+4.70 KVM_KVMCLOCK_CTRL
+
+Capability: KVM_CAP_KVMCLOCK_CTRL
+Architectures: Any that implement pvclocks (currently x86 only)
+Type: vcpu ioctl
+Parameters: None
+Returns: 0 on success, -1 on error
+
+This signals to the host kernel that the specified guest is being paused by
+userspace.  The host will set a flag in the pvclock structure that is checked
+from the soft lockup watchdog.  The flag is part of the pvclock structure that
+is shared between guest and host, specifically the second bit of the flags
+field of the pvclock_vcpu_time_info structure.  It will be set exclusively by
+the host and read/cleared exclusively by the guest.  The guest operation of
+checking and clearing the flag must an atomic operation so
+load-link/store-conditional, or equivalent must be used.  There are two cases
+where the guest will clear the flag: when the soft lockup watchdog timer resets
+itself or when a soft lockup is detected.  This ioctl can be called any time
+after pausing the vcpu, but before it is resumed.
+
 5. The kvm_run structure
 
 Application code obtains a pointer to the kvm_run structure by
diff --git a/Documentation/virtual/kvm/msr.txt b/Documentation/virtual/kvm/msr.txt
index 5031780..96b41bd 100644
--- a/Documentation/virtual/kvm/msr.txt
+++ b/Documentation/virtual/kvm/msr.txt
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -109,6 +109,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; MSR_KVM_SYSTEM_TIME_NEW:  0x4b564d01
      0      |   24      | multiple cpus are guaranteed to
     |   | be monotonic
 -------------------------------------------------------------
+    |   | guest vcpu has been paused by
+     1    |  N/A   | the host
+    |   | See 4.70 in api.txt
+-------------------------------------------------------------
 
 Availability of this MSR must be checked via bit 3 in 0x4000001 cpuid
 leaf prior to usage.
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 511031d..99b7380 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2147,6 +2147,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int kvm_dev_ioctl_check_extension(long ext)
 case KVM_CAP_ASYNC_PF:
 case KVM_CAP_GET_TSC_KHZ:
 case KVM_CAP_PCI_2_3:
+case KVM_CAP_KVMCLOCK_CTRL:
 r = 1;
 break;
 case KVM_CAP_COALESCED_MMIO:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2597,6 +2598,23 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int kvm_vcpu_ioctl_x86_set_xcrs(struct kvm_vcpu *vcpu,
 return r;
 }
 
+/*
+ * kvm_set_guest_paused() indicates to the guest kernel that it has been
+ * stopped by the hypervisor.  This function will be called from the host only.
+ * EINVAL is returned when the host attempts to set the flag for a guest that
+ * does not support pv clocks.
+ */
+static int kvm_set_guest_paused(struct kvm_vcpu *vcpu)
+{
+struct pvclock_vcpu_time_info *src = &amp;amp;vcpu-&amp;gt;arch.hv_clock;
+if (!vcpu-&amp;gt;arch.time_page)
+return -EINVAL;
+src-&amp;gt;flags |= PVCLOCK_GUEST_STOPPED;
+mark_page_dirty(vcpu-&amp;gt;kvm, vcpu-&amp;gt;arch.time &amp;gt;&amp;gt; PAGE_SHIFT);
+kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu);
+return 0;
+}
+
 long kvm_arch_vcpu_ioctl(struct file *filp,
  unsigned int ioctl, unsigned long arg)
 {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2873,6 +2891,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; long kvm_arch_vcpu_ioctl(struct file *filp,
 r = vcpu-&amp;gt;arch.virtual_tsc_khz;
 goto out;
 }
+case KVM_KVMCLOCK_CTRL: {
+r = kvm_set_guest_paused(vcpu);
+goto out;
+}
 default:
 r = -EINVAL;
 }
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 6c322a9..7a9dd4b 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -589,6 +589,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct kvm_ppc_pvinfo {
 #define KVM_CAP_S390_UCONTROL 73
 #define KVM_CAP_SYNC_REGS 74
 #define KVM_CAP_PCI_2_3 75
+#define KVM_CAP_KVMCLOCK_CTRL 76
 
 #ifdef KVM_CAP_IRQ_ROUTING
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -859,6 +860,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct kvm_s390_ucas_mapping {
 /* Available with KVM_CAP_ONE_REG */
 #define KVM_GET_ONE_REG  _IOW(KVMIO,  0xab, struct kvm_one_reg)
 #define KVM_SET_ONE_REG  _IOW(KVMIO,  0xac, struct kvm_one_reg)
+/* VM is being stopped by host */
+#define KVM_KVMCLOCK_CTRL  _IO(KVMIO,   0xad)
 
 #define KVM_DEV_ASSIGN_ENABLE_IOMMU(1 &amp;lt;&amp;lt; 0)
 #define KVM_DEV_ASSIGN_PCI_2_3(1 &amp;lt;&amp;lt; 1)
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.commits.head/323006">
    <title>KVM: PPC: e500: Track TLB1 entries with a bitmap</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.commits.head/323006</link>
    <description>&lt;pre&gt;Gitweb:     http://git.kernel.org/linus/;a=commit;h=4f802fe98bd5bd4fe1dd86df3e5c58546e65ad09
Commit:     4f802fe98bd5bd4fe1dd86df3e5c58546e65ad09
Parent:     8fdd21a26876ea6c486c38bfa75fdd18ba299351
Author:     Scott Wood &amp;lt;scottwood&amp;lt; at &amp;gt;freescale.com&amp;gt;
AuthorDate: Tue Dec 20 15:34:37 2011 +0000
Committer:  Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
CommitDate: Sun Apr 8 12:51:14 2012 +0300

    KVM: PPC: e500: Track TLB1 entries with a bitmap
    
    Rather than invalidate everything when a TLB1 entry needs to be
    taken down, keep track of which host TLB1 entries are used for
    a given guest TLB1 entry, and invalidate just those entries.
    
    Based on code from Ashish Kalra &amp;lt;Ashish.Kalra&amp;lt; at &amp;gt;freescale.com&amp;gt;
    and Liu Yu &amp;lt;yu.liu&amp;lt; at &amp;gt;freescale.com&amp;gt;.
    
    Signed-off-by: Scott Wood &amp;lt;scottwood&amp;lt; at &amp;gt;freescale.com&amp;gt;
    Signed-off-by: Alexander Graf &amp;lt;agraf&amp;lt; at &amp;gt;suse.de&amp;gt;
    Signed-off-by: Avi Kivity &amp;lt;avi&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 arch/powerpc/kvm/e500.h     |    5 +++
 arch/powerpc/kvm/e500_tlb.c |   72 ++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 72 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/kvm/e500.h b/arch/powerpc/kvm/e500.h
index 34cef08..f4dee55 100644
--- a/arch/powerpc/kvm/e500.h
+++ b/arch/powerpc/kvm/e500.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2,6 +2,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
  * Copyright (C) 2008-2011 Freescale Semiconductor, Inc. All rights reserved.
  *
  * Author: Yu Liu &amp;lt;yu.liu&amp;lt; at &amp;gt;freescale.com&amp;gt;
+ *         Ashish Kalra &amp;lt;ashish.kalra&amp;lt; at &amp;gt;freescale.com&amp;gt;
  *
  * Description:
  * This file is based on arch/powerpc/kvm/44x_tlb.h and
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -25,6 +26,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #define E500_TLB_VALID 1
 #define E500_TLB_DIRTY 2
+#define E500_TLB_BITMAP 4
 
 struct tlbe_ref {
 pfn_t pfn;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -82,6 +84,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct kvmppc_vcpu_e500 {
 struct page **shared_tlb_pages;
 int num_shared_tlb_pages;
 
+u64 *g2h_tlb1_map;
+unsigned int *h2g_tlb1_rmap;
+
 #ifdef CONFIG_KVM_E500
 u32 pid[E500_PID_NUM];
 
diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c
index 9925fc6..c8ce51d 100644
--- a/arch/powerpc/kvm/e500_tlb.c
+++ b/arch/powerpc/kvm/e500_tlb.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2,6 +2,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
  * Copyright (C) 2008-2011 Freescale Semiconductor, Inc. All rights reserved.
  *
  * Author: Yu Liu, yu.liu&amp;lt; at &amp;gt;freescale.com
+ *         Ashish Kalra, ashish.kalra&amp;lt; at &amp;gt;freescale.com
  *
  * Description:
  * This file is based on arch/powerpc/kvm/44x_tlb.c,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -175,8 +176,28 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void inval_gtlbe_on_host(struct kvmppc_vcpu_e500 *vcpu_e500,
 struct kvm_book3e_206_tlb_entry *gtlbe =
 get_entry(vcpu_e500, tlbsel, esel);
 
-if (tlbsel == 1) {
-kvmppc_e500_tlbil_all(vcpu_e500);
+if (tlbsel == 1 &amp;amp;&amp;amp;
+    vcpu_e500-&amp;gt;gtlb_priv[1][esel].ref.flags &amp;amp; E500_TLB_BITMAP) {
+u64 tmp = vcpu_e500-&amp;gt;g2h_tlb1_map[esel];
+int hw_tlb_indx;
+unsigned long flags;
+
+local_irq_save(flags);
+while (tmp) {
+hw_tlb_indx = __ilog2_u64(tmp &amp;amp; -tmp);
+mtspr(SPRN_MAS0,
+      MAS0_TLBSEL(1) |
+      MAS0_ESEL(to_htlb1_esel(hw_tlb_indx)));
+mtspr(SPRN_MAS1, 0);
+asm volatile("tlbwe");
+vcpu_e500-&amp;gt;h2g_tlb1_rmap[hw_tlb_indx] = 0;
+tmp &amp;amp;= tmp - 1;
+}
+mb();
+vcpu_e500-&amp;gt;g2h_tlb1_map[esel] = 0;
+vcpu_e500-&amp;gt;gtlb_priv[1][esel].ref.flags &amp;amp;= ~E500_TLB_BITMAP;
+local_irq_restore(flags);
+
 return;
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -282,6 +303,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline void kvmppc_e500_ref_release(struct tlbe_ref *ref)
 }
 }
 
+static void clear_tlb1_bitmap(struct kvmppc_vcpu_e500 *vcpu_e500)
+{
+if (vcpu_e500-&amp;gt;g2h_tlb1_map)
+memset(vcpu_e500-&amp;gt;g2h_tlb1_map,
+       sizeof(u64) * vcpu_e500-&amp;gt;gtlb_params[1].entries, 0);
+if (vcpu_e500-&amp;gt;h2g_tlb1_rmap)
+memset(vcpu_e500-&amp;gt;h2g_tlb1_rmap,
+       sizeof(unsigned int) * host_tlb_params[1].entries, 0);
+}
+
 static void clear_tlb_privs(struct kvmppc_vcpu_e500 *vcpu_e500)
 {
 int tlbsel = 0;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -511,7 +542,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void kvmppc_e500_tlb0_map(struct kvmppc_vcpu_e500 *vcpu_e500,
 /* XXX for both one-one and one-to-many , for now use TLB1 */
 static int kvmppc_e500_tlb1_map(struct kvmppc_vcpu_e500 *vcpu_e500,
 u64 gvaddr, gfn_t gfn, struct kvm_book3e_206_tlb_entry *gtlbe,
-struct kvm_book3e_206_tlb_entry *stlbe)
+struct kvm_book3e_206_tlb_entry *stlbe, int esel)
 {
 struct tlbe_ref *ref;
 unsigned int victim;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -524,6 +555,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int kvmppc_e500_tlb1_map(struct kvmppc_vcpu_e500 *vcpu_e500,
 ref = &amp;amp;vcpu_e500-&amp;gt;tlb_refs[1][victim];
 kvmppc_e500_shadow_map(vcpu_e500, gvaddr, gfn, gtlbe, 1, stlbe, ref);
 
+vcpu_e500-&amp;gt;g2h_tlb1_map[esel] |= (u64)1 &amp;lt;&amp;lt; victim;
+vcpu_e500-&amp;gt;gtlb_priv[1][esel].ref.flags |= E500_TLB_BITMAP;
+if (vcpu_e500-&amp;gt;h2g_tlb1_rmap[victim]) {
+unsigned int idx = vcpu_e500-&amp;gt;h2g_tlb1_rmap[victim];
+vcpu_e500-&amp;gt;g2h_tlb1_map[idx] &amp;amp;= ~(1ULL &amp;lt;&amp;lt; victim);
+}
+vcpu_e500-&amp;gt;h2g_tlb1_rmap[victim] = esel;
+
 return victim;
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -728,7 +767,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int kvmppc_e500_emul_tlbwe(struct kvm_vcpu *vcpu)
  * are mapped on the fly. */
 stlbsel = 1;
 sesel = kvmppc_e500_tlb1_map(vcpu_e500, eaddr,
-    raddr &amp;gt;&amp;gt; PAGE_SHIFT, gtlbe, &amp;amp;stlbe);
+    raddr &amp;gt;&amp;gt; PAGE_SHIFT, gtlbe, &amp;amp;stlbe, esel);
 break;
 
 default:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -856,7 +895,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr,
 
 stlbsel = 1;
 sesel = kvmppc_e500_tlb1_map(vcpu_e500, eaddr, gfn,
-     gtlbe, &amp;amp;stlbe);
+     gtlbe, &amp;amp;stlbe, esel);
 break;
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -872,6 +911,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void free_gtlb(struct kvmppc_vcpu_e500 *vcpu_e500)
 {
 int i;
 
+clear_tlb1_bitmap(vcpu_e500);
+kfree(vcpu_e500-&amp;gt;g2h_tlb1_map);
+
 clear_tlb_refs(vcpu_e500);
 kfree(vcpu_e500-&amp;gt;gtlb_priv[0]);
 kfree(vcpu_e500-&amp;gt;gtlb_priv[1]);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -932,6 +974,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int kvm_vcpu_ioctl_config_tlb(struct kvm_vcpu *vcpu,
 char *virt;
 struct page **pages;
 struct tlbe_priv *privs[2] = {};
+u64 *g2h_bitmap = NULL;
 size_t array_len;
 u32 sets;
 int num_pages, ret, i;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -993,10 +1036,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int kvm_vcpu_ioctl_config_tlb(struct kvm_vcpu *vcpu,
 if (!privs[0] || !privs[1])
 goto err_put_page;
 
+g2h_bitmap = kzalloc(sizeof(u64) * params.tlb_sizes[1],
+                     GFP_KERNEL);
+if (!g2h_bitmap)
+goto err_put_page;
+
 free_gtlb(vcpu_e500);
 
 vcpu_e500-&amp;gt;gtlb_priv[0] = privs[0];
 vcpu_e500-&amp;gt;gtlb_priv[1] = privs[1];
+vcpu_e500-&amp;gt;g2h_tlb1_map = g2h_bitmap;
 
 vcpu_e500-&amp;gt;gtlb_arch = (struct kvm_book3e_206_tlb_entry *)
 (virt + (cfg-&amp;gt;array &amp;amp; (PAGE_SIZE - 1)));
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1129,6 +1178,18 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 *vcpu_e500)
 if (!vcpu_e500-&amp;gt;gtlb_priv[1])
 goto err;
 
+vcpu_e500-&amp;gt;g2h_tlb1_map = kzalloc(sizeof(unsigned int) *
+  vcpu_e500-&amp;gt;gtlb_params[1].entries,
+  GFP_KERNEL);
+if (!vcpu_e500-&amp;gt;g2h_tlb1_map)
+goto err;
+
+vcpu_e500-&amp;gt;h2g_tlb1_rmap = kzalloc(sizeof(unsigned int) *
+   host_tlb_params[1].entries,
+   GFP_KERNEL);
+if (!vcpu_e500-&amp;gt;h2g_tlb1_rmap)
+goto err;
+
 /* Init TLB configuration register */
 vcpu-&amp;gt;arch.tlbcfg[0] = mfspr(SPRN_TLB0CFG) &amp;amp;
      ~(TLBnCFG_N_ENTRY | TLBnCFG_ASSOC);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1154,6 +1215,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; err:
 void kvmppc_e500_tlb_uninit(struct kvmppc_vcpu_e500 *vcpu_e500)
 {
 free_gtlb(vcpu_e500);
+kfree(vcpu_e500-&amp;gt;h2g_tlb1_rmap);
 kfree(vcpu_e500-&amp;gt;tlb_refs[0]);
 kfree(vcpu_e500-&amp;gt;tlb_refs[1]);
 }
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Linux Kernel Mailing List</dc:creator>
    <dc:date>2012-05-24T23:23:58</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.linux.kernel.commits.head">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.linux.kernel.commits.head</link>
  </textinput>
</rdf:RDF>

