On 21/10/2015 17:04, Laszlo Ersek wrote:
> Now, on TCG, reading the APIC ID register (for device "apic") happens in:
>
> apic_mem_readl() [hw/intc/apic.c]
> val = s->id << 24
>
> Whereas on KVM, the same occurs in:
>
> kvm_apic_mem_read() [hw/i386/kvm/apic.c]
> return ~(uint64_t)0;
>
> However, such reads don't seem to reach QEMU (and the above read stub);
> they are handled within KVM (I don't know where the distinction is made
> in KVM).
It's here:
static u32 __apic_read(struct kvm_lapic *apic, unsigned int offset)
{
u32 val = 0;
if (offset >= LAPIC_MMIO_LENGTH)
return 0;
switch (offset) {
case APIC_ID:
if (apic_x2apic_mode(apic))
val = kvm_apic_id(apic);
else
val = kvm_apic_id(apic) << 24;
break;
I'll try following the equally dizzying chains in OVMF and see why KVM
is in x2apic mode. In any case, "-cpu foo,-x2apic" is the next thing to
try.
Paolo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel