[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xsm: Add missing dummy hooks


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Thu, 23 Aug 2012 05:22:07 +0000
  • Delivery-date: Thu, 23 Aug 2012 05:22:19 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
# Date 1345670012 -3600
# Node ID c961e012e00bd2c185275a931dab1a8f90d50667
# Parent  e6ca45ca03c2e08af3a74b404166527b68fd1218
xsm: Add missing dummy hooks

A few XSM hooks have been defined without implementation in dummy.c;
these will cause a null function pointer deference if called. Also
implement the efi_call hook, which was incorrectly added without any
implementations.

Signed-off-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r e6ca45ca03c2 -r c961e012e00b xen/xsm/dummy.c
--- a/xen/xsm/dummy.c   Mon Aug 20 08:46:47 2012 +0200
+++ b/xen/xsm/dummy.c   Wed Aug 22 22:13:32 2012 +0100
@@ -295,6 +295,21 @@ static char *dummy_show_security_evtchn 
     return NULL;
 }
 
+static int dummy_get_pod_target(struct domain *d)
+{
+    return 0;
+}
+
+static int dummy_set_pod_target(struct domain *d)
+{
+    return 0;
+}
+
+static int dummy_get_device_group (uint32_t machine_bdf)
+{
+    return 0;
+}
+
 static int dummy_test_assign_device (uint32_t machine_bdf)
 {
     return 0;
@@ -503,6 +518,11 @@ static int dummy_firmware_info (void)
     return 0;
 }
 
+static int dummy_efi_call(void)
+{
+    return 0;
+}
+
 static int dummy_acpi_sleep (void)
 {
     return 0;
@@ -565,6 +585,11 @@ static int dummy_bind_pt_irq (struct dom
     return 0;
 }
 
+static int dummy_unbind_pt_irq (struct domain *d)
+{
+    return 0;
+}
+
 static int dummy_pin_mem_cacheattr (struct domain *d)
 {
     return 0;
@@ -652,6 +677,8 @@ void xsm_fixup_ops (struct xsm_operation
     set_to_dummy_if_null(ops, alloc_security_evtchn);
     set_to_dummy_if_null(ops, free_security_evtchn);
     set_to_dummy_if_null(ops, show_security_evtchn);
+    set_to_dummy_if_null(ops, get_pod_target);
+    set_to_dummy_if_null(ops, set_pod_target);
 
     set_to_dummy_if_null(ops, memory_adjust_reservation);
     set_to_dummy_if_null(ops, memory_stat_reservation);
@@ -670,6 +697,7 @@ void xsm_fixup_ops (struct xsm_operation
     set_to_dummy_if_null(ops, iomem_permission);
     set_to_dummy_if_null(ops, pci_config_permission);
 
+    set_to_dummy_if_null(ops, get_device_group);
     set_to_dummy_if_null(ops, test_assign_device);
     set_to_dummy_if_null(ops, assign_device);
     set_to_dummy_if_null(ops, deassign_device);
@@ -711,6 +739,7 @@ void xsm_fixup_ops (struct xsm_operation
     set_to_dummy_if_null(ops, physinfo);
     set_to_dummy_if_null(ops, platform_quirk);
     set_to_dummy_if_null(ops, firmware_info);
+    set_to_dummy_if_null(ops, efi_call);
     set_to_dummy_if_null(ops, acpi_sleep);
     set_to_dummy_if_null(ops, change_freq);
     set_to_dummy_if_null(ops, getidletime);
@@ -723,6 +752,7 @@ void xsm_fixup_ops (struct xsm_operation
     set_to_dummy_if_null(ops, remove_from_physmap);
     set_to_dummy_if_null(ops, sendtrigger);
     set_to_dummy_if_null(ops, bind_pt_irq);
+    set_to_dummy_if_null(ops, unbind_pt_irq);
     set_to_dummy_if_null(ops, pin_mem_cacheattr);
     set_to_dummy_if_null(ops, ext_vcpucontext);
     set_to_dummy_if_null(ops, vcpuextstate);
diff -r e6ca45ca03c2 -r c961e012e00b xen/xsm/flask/hooks.c
--- a/xen/xsm/flask/hooks.c     Mon Aug 20 08:46:47 2012 +0200
+++ b/xen/xsm/flask/hooks.c     Wed Aug 22 22:13:32 2012 +0100
@@ -1280,6 +1280,11 @@ static int flask_firmware_info(void)
     return domain_has_xen(current->domain, XEN__FIRMWARE);
 }
 
+static int flask_efi_call(void)
+{
+    return domain_has_xen(current->domain, XEN__FIRMWARE);
+}
+
 static int flask_acpi_sleep(void)
 {
     return domain_has_xen(current->domain, XEN__SLEEP);
@@ -1663,6 +1668,7 @@ static struct xsm_operations flask_ops =
     .physinfo = flask_physinfo,
     .platform_quirk = flask_platform_quirk,
     .firmware_info = flask_firmware_info,
+    .efi_call = flask_efi_call,
     .acpi_sleep = flask_acpi_sleep,
     .change_freq = flask_change_freq,
     .getidletime = flask_getidletime,

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.