[dropping kvm@vger because my mail server refuses to send mails there] On 08.08.2011, at 15:09, Avi Kivity wrote:
> Reviewed-by: Richard Henderson <r...@twiddle.net> > Reviewed-by: Anthony Liguori <aligu...@us.ibm.com> > Signed-off-by: Avi Kivity <a...@redhat.com> > --- > hw/cuda.c | 6 ++- > hw/escc.c | 42 +++++++++++++-------------- > hw/escc.h | 2 +- > hw/heathrow_pic.c | 29 ++++++++---------- > hw/ide.h | 2 +- > hw/ide/macio.c | 36 ++++++++++++----------- > hw/mac_dbdma.c | 32 ++++++++++---------- > hw/mac_dbdma.h | 4 ++- > hw/mac_nvram.c | 39 ++++++++++--------------- > hw/macio.c | 74 +++++++++++++++++++++++------------------------- > hw/openpic.c | 81 +++++++++++++++++++++++++---------------------------- > hw/openpic.h | 2 +- > hw/ppc_mac.h | 16 ++++++---- > hw/ppc_newworld.c | 30 +++++++++---------- > hw/ppc_oldworld.c | 23 +++++++-------- > 15 files changed, 201 insertions(+), 217 deletions(-) > > diff --git a/hw/cuda.c b/hw/cuda.c > index 065c362..5c92d81 100644 > --- a/hw/cuda.c > +++ b/hw/cuda.c > @@ -117,6 +117,7 @@ typedef struct CUDATimer { > } CUDATimer; > > typedef struct CUDAState { > + MemoryRegion mem; > /* cuda registers */ > uint8_t b; /* B-side data */ > uint8_t a; /* A-side data */ > @@ -722,7 +723,7 @@ static void cuda_reset(void *opaque) > set_counter(s, &s->timers[1], 0xffff); > } > > -void cuda_init (int *cuda_mem_index, qemu_irq irq) > +void cuda_init (MemoryRegion **cuda_mem, qemu_irq irq) > { > struct tm tm; > CUDAState *s = &cuda_state; > @@ -738,8 +739,9 @@ void cuda_init (int *cuda_mem_index, qemu_irq irq) > s->tick_offset = (uint32_t)mktimegm(&tm) + RTC_OFFSET; > > s->adb_poll_timer = qemu_new_timer_ns(vm_clock, cuda_adb_poll, s); > - *cuda_mem_index = cpu_register_io_memory(cuda_read, cuda_write, s, > + cpu_register_io_memory(cuda_read, cuda_write, s, > DEVICE_NATIVE_ENDIAN); > + *cuda_mem = &s->mem; Just stumbled over this while debugging why the Mac machines don't boot anymore. Are you sure this part is correct? We're not registering the region (and its callbacks) anymore now, right? Alex