]> xenbits.xensource.com Git - xenclient/toolstack.git/commitdiff
Do not initialize hvm info table for xen 3.4. It gets done in libxc.
authorKamala Narasimhan <kamala.narasimhan@citrix.com>
Mon, 6 Apr 2009 20:04:59 +0000 (16:04 -0400)
committerKamala Narasimhan <kamala.narasimhan@citrix.com>
Mon, 6 Apr 2009 20:04:59 +0000 (16:04 -0400)
Reinitializing hvm info table wipes out some of the values set by libxc causing triple fault within guest.

xenguest/xenguest_stubs.c

index 7042bf9d61c9a3526076957563ac73a28660e0b9..3804cafe485c1b1138906a5e63e4a14116b72115 100644 (file)
@@ -219,15 +219,21 @@ static int hvm_build_set_params(int handle, int domid,
        }
 
        va_hvm = (struct hvm_info_table *)(va_map + HVM_INFO_OFFSET);
+#ifndef XEN_BRANCH_3_4
        memset(va_hvm, 0, sizeof(*va_hvm));
        strncpy(va_hvm->signature, "HVM INFO", 8);
        va_hvm->length = sizeof(struct hvm_info_table);
+#endif
        va_hvm->acpi_enabled = acpi;
        va_hvm->apic_mode = apic;
        va_hvm->nr_vcpus = vcpus;
        for (i = 0, sum = 0; i < va_hvm->length; i++)
                sum += ((uint8_t *) va_hvm)[i];
+#ifndef XEN_BRANCH_3_4
        va_hvm->checksum = -sum;
+#else
+        va_hvm->checksum -= sum;
+#endif
        munmap(va_map, XC_PAGE_SIZE);
 
        xc_get_hvm_param(handle, domid, HVM_PARAM_STORE_PFN, store_mfn);