X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmx_hw_info.c;h=478bfbc54efdef862a9d0920b65d6a15c5812838;hb=0e91f474b35c8e394455b64a6d69d030f18eff45;hp=f50404e07c53001292938c5bc581b0f2596f3e36;hpb=7d780533980c895368aa404cbdd54f7bc2d91b40;p=palacios-OLD.git diff --git a/palacios/src/palacios/vmx_hw_info.c b/palacios/src/palacios/vmx_hw_info.c index f50404e..478bfbc 100644 --- a/palacios/src/palacios/vmx_hw_info.c +++ b/palacios/src/palacios/vmx_hw_info.c @@ -25,9 +25,19 @@ // Intel VMX Feature MSRs +uint32_t v3_vmx_get_ctrl_features(struct vmx_ctrl_field * fields) { + // features are available if they are hardwired to 1, or the mask is 0 (they can be changed) + uint32_t features = 0; + + features = fields->req_val; + features |= ~(fields->req_mask); + + return features; +} + static int get_ex_ctrl_caps(struct vmx_hw_info * hw_info, struct vmx_ctrl_field * field, - uint32_t old_msr, uint32_t true_msr) { + uint32_t old_msr, uint32_t true_msr) { uint32_t old_0; /* Bit is 1 => MB1 */ uint32_t old_1; /* Bit is 0 => MBZ */ uint32_t true_0; /* Bit is 1 => MB1 */