qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] RFC: guest-side retrieval of fw_cfg file


From: Eric Blake
Subject: Re: [Qemu-devel] RFC: guest-side retrieval of fw_cfg file
Date: Thu, 16 Jul 2015 13:27:15 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1

On 07/15/2015 06:43 PM, Gabriel L. Somlo wrote:

> 
> OK, so I replaced my port i/o with mmio equivalents:
> 
> -#define FW_CFG_PORT_CTL  0x510
> +#define FW_CFG_PORT_CTL  (void *)0x09020008
> 
> -#define FW_CFG_PORT_DATA 0x511
> +#define FW_CFG_PORT_DATA (void *)0x09020000

Under-parenthesized; you'll want:

#define FW_CFG_PORT_DATA ((void *)0x09020000)

to be useful in all possible locations where an identifier can appear in
an expression.

> 
> -       outw(select, FW_CFG_PORT_CTL);
> +       writew(select, FW_CFG_PORT_CTL);
> 
> -       inb(FW_CFG_PORT_DATA);
> +       readb(FW_CFG_PORT_DATA);
> 
> -       insb(FW_CFG_PORT_DATA, buf, count);
> +       readsb(FW_CFG_PORT_DATA, buf, count);

But as it doesn't affect your usage here...

> 
> I'm probably missing something that'll turn out to be really obvious
> in retrospect... :)

I probably didn't spot the really obvious problem.

So much for my drive-by noise :)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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