qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

hw/i386/pc: Use e820_get_num_entries() to access e820_entries

To be able to extract the e820* code out of this file (in the next
patch), access e820_entries with its correct helper.

Reviewed-by: Li Qiang <liq3ea@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190818225414.22590-2-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

authored by

Philippe Mathieu-Daudé and committed by
Paolo Bonzini
42d400ac bd1f7ff4

+1 -1
+1 -1
hw/i386/pc.c
··· 1029 1029 fw_cfg_add_bytes(fw_cfg, FW_CFG_E820_TABLE, 1030 1030 &e820_reserve, sizeof(e820_reserve)); 1031 1031 fw_cfg_add_file(fw_cfg, "etc/e820", e820_table, 1032 - sizeof(struct e820_entry) * e820_entries); 1032 + sizeof(struct e820_entry) * e820_get_num_entries()); 1033 1033 1034 1034 fw_cfg_add_bytes(fw_cfg, FW_CFG_HPET, &hpet_cfg, sizeof(hpet_cfg)); 1035 1035 /* allocate memory for the NUMA channel: one (64bit) word for the number