Re: [PATCH v2 1/5] i386/tcg: implement x2APIC registers MSR access

2023-03-28 Thread Bui Quang Minh
On 3/27/23 23:56, David Woodhouse wrote: On Sun, 2023-03-26 at 12:20 +0700, Bui Quang Minh wrote: +static void apic_mem_write(void *opaque, hwaddr addr, uint64_t val, +   unsigned size) +{ +    int index = (addr >> 4) & 0xff; + +    if (size < 4) { +    return; +   

Re: [PATCH v2 1/5] i386/tcg: implement x2APIC registers MSR access

2023-03-27 Thread David Woodhouse
On Sun, 2023-03-26 at 12:20 +0700, Bui Quang Minh wrote: > > +static void apic_mem_write(void *opaque, hwaddr addr, uint64_t val, > +   unsigned size) > +{ > +    int index = (addr >> 4) & 0xff; > + > +    if (size < 4) { > +    return; > +    } > + > +    if (addr > 0x

[PATCH v2 1/5] i386/tcg: implement x2APIC registers MSR access

2023-03-25 Thread Bui Quang Minh
This commit refactors apic_mem_read/write to support both MMIO access in xAPIC and MSR access in x2APIC. Signed-off-by: Bui Quang Minh --- hw/intc/apic.c | 79 ++-- hw/intc/trace-events | 4 +- include/hw/i386/apic.h |