[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/6] Use IO port for qemu<->guest BIOS communica
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH 1/6] Use IO port for qemu<->guest BIOS communication. |
Date: |
Sun, 24 Aug 2008 20:39:44 +0300 |
On 8/24/08, Gleb Natapov <address@hidden> wrote:
> Use PIO to get configuration info between qemu process and guest BIOS.
Could you make this a separate device, so that it could be used in
other machines? There is nothing PC-specific.
> +static uint32_t bios_cfg_read(void *opaque, uint32_t addr)
> +{
> + BIOSCfgEntry *e = &bios_params.entries[bios_params.entry];
You should use the opaque parameter and cast that to BIOSCfgState.
> + if (!e->data)
> + return 0;
> +
> + return e->data[bios_params.cur_offset++ % e->len];
Instead of using modular arithmetic, zero should be returned for invalid values.
> +static void bios_cfg_write(void *opaque, uint32_t addr, uint32_t value)
> +{
> + bios_params.entry = value % BIOS_CFG_MAX_ENTRY;
Same here, its important for downward compatibility.
> + bios_cfg_add_data(BIOS_CFG_SIGNATURE, "QEMU", 4);
I'd add:
+ bios_cfg_add_data(BIOS_CFG_ID, 1, 4);
- [Qemu-devel] [PATCH 0/6] Add UUID command-line option, Gleb Natapov, 2008/08/24
- [Qemu-devel] [PATCH 1/6] Use IO port for qemu<->guest BIOS communication., Gleb Natapov, 2008/08/24
- Re: [Qemu-devel] [PATCH 1/6] Use IO port for qemu<->guest BIOS communication.,
Blue Swirl <=
- [Qemu-devel] [PATCH 2/6] Add -uuid command line option., Gleb Natapov, 2008/08/24
- [Qemu-devel] [PATCH 3/6] Add "info uuid" command to monitor., Gleb Natapov, 2008/08/24
- [Qemu-devel] [PATCH 4/6] Use libuuid if available., Gleb Natapov, 2008/08/24
- [Qemu-devel] [PATCH 5/6] Add UUID to BIOS configuration info., Gleb Natapov, 2008/08/24
- [Qemu-devel] [PATCH 6/6] Pass cpu speed into SM BIOS., Gleb Natapov, 2008/08/24