# HG changeset patch # User gingold@virtu10 # Node ID c1b2a632df88364872b6c66f84e20ea005a6485d # Parent 8370553249bb3c99c2a1c6ce3439afc4606acc27 Virtualize lid for dom0. Because dom0 can't write eid/id into iosapics, lid can be virtualized. Signed-off-by: Tristan Gingold diff -r 8370553249bb -r c1b2a632df88 xen/arch/ia64/xen/dom_fw.c --- a/xen/arch/ia64/xen/dom_fw.c Tue Aug 08 10:59:08 2006 +0200 +++ b/xen/arch/ia64/xen/dom_fw.c Tue Aug 08 11:26:10 2006 +0200 @@ -254,10 +254,14 @@ acpi_update_lsapic (acpi_table_entry_hea enable = 0; if (lsapic->flags.enabled && enable) { printk("enable lsapic entry: 0x%lx\n", (u64)lsapic); + lsapic->id = lsapic_nbr; + lsapic->eid = 0; lsapic_nbr++; } else if (lsapic->flags.enabled) { printk("DISABLE lsapic entry: 0x%lx\n", (u64)lsapic); lsapic->flags.enabled = 0; + lsapic->id = 0; + lsapic->eid = 0; } return 0; } diff -r 8370553249bb -r c1b2a632df88 xen/arch/ia64/xen/vcpu.c --- a/xen/arch/ia64/xen/vcpu.c Tue Aug 08 10:59:08 2006 +0200 +++ b/xen/arch/ia64/xen/vcpu.c Tue Aug 08 11:26:10 2006 +0200 @@ -763,12 +763,8 @@ UINT64 vcpu_deliverable_timer(VCPU *vcpu IA64FAULT vcpu_get_lid(VCPU *vcpu, UINT64 *pval) { - /* Use real LID for domain0 until vIOSAPIC is present. - Use EID=0, ID=vcpu_id for domU. */ - if (vcpu->domain == dom0) - *pval = ia64_getreg(_IA64_REG_CR_LID); - else - *pval = vcpu->vcpu_id << 24; + /* Use EID=0, ID=vcpu_id. */ + *pval = vcpu->vcpu_id << 24; return IA64_NO_FAULT; }