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

Re: [Xen-devel] [PATCH] x86/HVM: type adjustments

On 11/23/2015 08:51 AM, Jan Beulich wrote:
- constify struct hvm_trap * function parameters
- width reduce and shuffle some struct hvm_trap members
- use bool_t for boolean fields struct hvm_function_table
- use unsigned for struct hvm_function_table's hap_capabilities field

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -1181,7 +1181,7 @@ static void svm_vcpu_destroy(struct vcpu
-static void svm_inject_trap(struct hvm_trap *trap)
+static void svm_inject_trap(const struct hvm_trap *trap)
      struct vcpu *curr = current;
      struct vmcb_struct *vmcb = curr->arch.hvm_svm.vmcb;
@@ -1442,7 +1442,7 @@ const struct hvm_function_table * __init
      if ( !printed )
          printk(" - none\n");
- svm_function_table.hap_supported = cpu_has_svm_npt;
+    svm_function_table.hap_supported = !!cpu_has_svm_npt;

Reviewed-by: Boris Ostrovsky<boris.ostrovsky@xxxxxxxxxx>

(Should we redefine constant_test_bit/variable_test_bit (which is what cpu_has_* is) to return bool_t?)


Xen-devel mailing list



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