|
|
@@ -1291,7 +1291,16 @@ static u64 kvm_hv_flush_tlb(struct kvm_vcpu *current_vcpu, u64 ingpa,
|
|
|
flush.address_space, flush.flags);
|
|
|
|
|
|
sparse_banks[0] = flush.processor_mask;
|
|
|
- all_cpus = flush.flags & HV_FLUSH_ALL_PROCESSORS;
|
|
|
+
|
|
|
+ /*
|
|
|
+ * Work around possible WS2012 bug: it sends hypercalls
|
|
|
+ * with processor_mask = 0x0 and HV_FLUSH_ALL_PROCESSORS clear,
|
|
|
+ * while also expecting us to flush something and crashing if
|
|
|
+ * we don't. Let's treat processor_mask == 0 same as
|
|
|
+ * HV_FLUSH_ALL_PROCESSORS.
|
|
|
+ */
|
|
|
+ all_cpus = (flush.flags & HV_FLUSH_ALL_PROCESSORS) ||
|
|
|
+ flush.processor_mask == 0;
|
|
|
} else {
|
|
|
if (unlikely(kvm_read_guest(kvm, ingpa, &flush_ex,
|
|
|
sizeof(flush_ex))))
|