qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 5/6] hw/nvram/fw_cfg: Add HMP 'info fw_cfg' comm


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH 5/6] hw/nvram/fw_cfg: Add HMP 'info fw_cfg' command
Date: Tue, 18 Dec 2018 16:14:41 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1

Hi Michael,

On 12/10/18 10:18 AM, Philippe Mathieu-Daudé wrote:
> On 12/7/18 6:54 PM, Michael S. Tsirkin wrote:
>> On Fri, Dec 07, 2018 at 06:03:59PM +0100, Philippe Mathieu-Daudé wrote:
>>> $ qemu-system-x86_64 -S -monitor stdio
>>> (qemu) info fw_cfg
>>>         Type    Perm    Size    Specific   Order   Info
>>>    signature      RO       4                       QEMU
>>>           id      RO       4                       0x00000003
>>>         uuid      RO      16                       
>>> 00000000-0000-0000-0000-000000000000
>>>     ram_size      RO       8                       0x0000000008000000
>>>    nographic      RO       2                       0x0000
>>>      nb_cpus      RO       2                       0x0001
>>>         numa      RO      16
>>>    boot_menu      RO       2                       0x0000
>>>     max_cpus      RO       2                       0x0001
>>>     file_dir      RO    2052
>>>  file (id 1)      RO      36                 160   etc/acpi/rsdp
>>>  file (id 2)      RO  131072                 130   etc/acpi/tables
>>>  file (id 3)      RO       4                  15   etc/boot-fail-wait
>>>  file (id 4)      RO      20                  40   etc/e820
>>>  file (id 5)      RO      31                  30   etc/smbios/smbios-anchor
>>>  file (id 6)      RO     320                  20   etc/smbios/smbios-tables
>>>  file (id 7)      RO       6                  90   etc/system-states
>>>  file (id 8)      RO    4096                 140   etc/table-loader
>>> file (id 10)      RO    9216                  55   genroms/kvmvapic.bin
>>>         uuid      RO       4  (arch spec)          
>>> 01000000-0000-0000-0000-000000000000
>>>     ram_size      RO     324  (arch spec)
>>>    nographic      RO     121  (arch spec)
>>
>> Weird. Your code has arch_spec.
> 
> Hmmm I'll check that.

These are the entries used for Bochs:

#define FW_CFG_ACPI_TABLES (FW_CFG_ARCH_LOCAL + 0)
#define FW_CFG_SMBIOS_ENTRIES (FW_CFG_ARCH_LOCAL + 1)
#define FW_CFG_IRQ0_OVERRIDE (FW_CFG_ARCH_LOCAL + 2)
#define FW_CFG_E820_TABLE (FW_CFG_ARCH_LOCAL + 3)
#define FW_CFG_HPET (FW_CFG_ARCH_LOCAL + 4)

static FWCfgState *bochs_bios_init(AddressSpace *as, PCMachineState *pcms)
{
    [...]
    fw_cfg_add_bytes(fw_cfg, FW_CFG_ACPI_TABLES,
                     acpi_tables, acpi_tables_len);
    fw_cfg_add_i32(fw_cfg, FW_CFG_IRQ0_OVERRIDE,
                   kvm_allows_irq0_override());
    fw_cfg_add_bytes(fw_cfg, FW_CFG_E820_TABLE,
                     &e820_reserve, sizeof(e820_reserve));

So what happened here is the 'type' name is incorrect (I'll fix), but
the arch_spec flag is correct. Thanks for noticing this :)

Regards,

Phil.



reply via email to

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