Hi Boris/Andrew,
On 1/3/17 23:04, Andrew Cooper wrote:
On 03/01/17 16:01, Boris Ostrovsky wrote:
+static void avic_dump(unsigned char ch)
+{
+ struct domain *d;
+ struct vcpu *v;
+
+ printk("*********** SVM AVIC Statistics **************\n");
+
+ rcu_read_lock(&domlist_read_lock);
+
+ for_each_domain ( d )
+ {
+ if ( !is_hvm_domain(d) )
|| !svm_avic_vcpu_enabled(d->v[0]) (or something along these lines)?
It isn't safe to deference the vcpu array like this, which in turn
highlights that the avic predicate should be per-domain, not per-cpu.
Under no circumstances should we have AVIC on some vcpus but not others
of the same domain.
~Andrew
Let me add something like:
static inline bool svm_is_avic_domain(struct domain *d)
{
return ( d->arch.hvm_domain.svm.avic_physical_id_table != 0 );
}
This should allow us to check whether the svm_avic_dom_init() is enabled
successfully.
Thanks,
Suravee
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel