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

Re: [Xen-devel] [PATCH v2 05/10] x86/HVM/SVM: Add AVIC initialization code



Hi Andrew,

On 1/2/17 23:37, Andrew Cooper wrote:
+    ma = d->avic_phy_apic_id_table_mfn;
+    vmcb->avic_phy_apic_id = (ma << PAGE_SHIFT) & AVIC_HPA_MASK;
+    vmcb->avic_phy_apic_id |= AVIC_PHY_APIC_ID_MAX;
Surely this should be some calculation derived from d->max_vcpus?

This is actually should be the value of highest physical APIC ID, since the documentations mentioned that this is the highest index into the physical APIC ID table.

I am checking with the HW folks to try to understand if there are any negative effects if we were to always set this to 0xFF.

However, I have also looking into setting/updating this in the following scenarios:

1. During svm_avic_init_vmcb(): We should be able to just have a for_each_vcpu() loop to iterate through all VMCBs and updating this field with the max physical APIC ID.

2. During avic_unaccel_trap_write()->avic_handle_apic_id_update():
This is more tricky since we would need to trap all VCPUs to update this field in all VMCBs to have the same value. What mechanism would you suggest to achieve this?

Thanks,
Suravee


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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