qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Help writing a trivial device


From: Avi Kivity
Subject: Re: [Qemu-devel] Help writing a trivial device
Date: Tue, 27 Sep 2011 09:38:22 +0300
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2

On 09/26/2011 03:54 PM, Lluís Vilanova wrote:
It is the second bar that generates the problems with KVM:

     s->data_ptr = g_malloc(s->size);
     memory_region_init_ram_ptr(&s->data,&s->dev.qdev, "backdoor.data",
                                s->size, s->data_ptr);
     pci_register_bar(&s->dev, 1, PCI_BASE_ADDRESS_SPACE_MEMORY,&s->data);


s->data_ptr is not properly aligned.  Use memory_region_init_ram().

>  I only had a few minutes and couldn't test reading from BAR0, but you
>  might want to get 32-bit reads working first before trying 64-bit.

The next problem is using 64bit reads and writes... if I set min_access_size and
max_access_size to 4, I get the calls to 'control_io_read', but not with 8...


8-byte accesses are not yet supported.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]