@@ -933,6 +933,7 @@ int viridian_hypercall(struct cpu_user_regs *regs)
{
struct vcpu *curr = current;
struct domain *currd = curr->domain;
+ struct viridian_domain *vd = currd->arch.hvm.viridian;
int mode = hvm_guest_x86_mode(curr);
unsigned long input_params_gpa, output_params_gpa;
int rc = 0;
@@ -962,6 +963,10 @@ int viridian_hypercall(struct cpu_user_regs *regs)
switch ( input.call_code )
{
case HVCALL_NOTIFY_LONG_SPIN_WAIT:
+ if ( !test_and_set_bit(_HCALL_spin_wait, vd->hypercall_flags) )
+ printk(XENLOG_G_INFO "d%d: VIRIDIAN HVCALL_NOTIFY_LONG_SPIN_WAIT\n",
+ currd->domain_id);
+
/*
* See section 14.5.1 of the specification.
*/
@@ -970,22 +975,38 @@ int viridian_hypercall(struct cpu_user_regs *regs)
case HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE:
case HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST:
+ if ( !test_and_set_bit(_HCALL_flush, vd->hypercall_flags) )
+ printk(XENLOG_G_INFO "%pd: VIRIDIAN HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE/LIST\n",
+ currd);
+
rc = hvcall_flush(&input, &output, input_params_gpa,
output_params_gpa);
break;
case HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX:
case HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST_EX:
+ if ( !test_and_set_bit(_HCALL_flush_ex, vd->hypercall_flags) )
+ printk(XENLOG_G_INFO "%pd: VIRIDIAN HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE/LIST_EX\n",
+ currd);
+
rc = hvcall_flush_ex(&input, &output, input_params_gpa,
output_params_gpa);
break;
case HVCALL_SEND_IPI:
+ if ( !test_and_set_bit(_HCALL_ipi, vd->hypercall_flags) )
+ printk(XENLOG_G_INFO "%pd: VIRIDIAN HVCALL_SEND_IPI\n",
+ currd);
+
rc = hvcall_ipi(&input, &output, input_params_gpa,
output_params_gpa);
break;
case HVCALL_SEND_IPI_EX:
+ if ( !test_and_set_bit(_HCALL_ipi_ex, vd->hypercall_flags) )
+ printk(XENLOG_G_INFO "%pd: VIRIDIAN HVCALL_SEND_IPI_EX\n",
+ currd);
+
rc = hvcall_ipi_ex(&input, &output, input_params_gpa,
output_params_gpa);
break;
@@ -55,10 +55,20 @@ struct viridian_time_ref_count
int64_t off;
};
+enum {
+ _HCALL_spin_wait,
+ _HCALL_flush,
+ _HCALL_flush_ex,
+ _HCALL_ipi,
+ _HCALL_ipi_ex,
+ _HCALL_nr /* must be last */
+};
+
struct viridian_domain
{
union hv_guest_os_id guest_os_id;
union hv_vp_assist_page_msr hypercall_gpa;
+ DECLARE_BITMAP(hypercall_flags, _HCALL_nr);
struct viridian_time_ref_count time_ref_count;
struct viridian_page reference_tsc;
};