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

hw/net/e1000: Move macreg[] arrays to .rodata to save 1MiB of .data

Each array consumes 256KiB of .data. As we do not reassign entries,
we can move it to the .rodata section, and save a total of 1MiB of
.data (size reported on x86_64 host).

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Dmitry Fleytman <dmitry.fleytman@gmail.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20200305010446.17029-3-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>

authored by

Philippe Mathieu-Daudé and committed by
Laurent Vivier
da5cf9a4 3b6b3a27

+4 -4
+2 -2
hw/net/e1000.c
··· 1151 1151 1152 1152 #define getreg(x) [x] = mac_readreg 1153 1153 typedef uint32_t (*readops)(E1000State *, int); 1154 - static readops macreg_readops[] = { 1154 + static const readops macreg_readops[] = { 1155 1155 getreg(PBA), getreg(RCTL), getreg(TDH), getreg(TXDCTL), 1156 1156 getreg(WUFC), getreg(TDT), getreg(CTRL), getreg(LEDCTL), 1157 1157 getreg(MANC), getreg(MDIC), getreg(SWSM), getreg(STATUS), ··· 1207 1207 1208 1208 #define putreg(x) [x] = mac_writereg 1209 1209 typedef void (*writeops)(E1000State *, int, uint32_t); 1210 - static writeops macreg_writeops[] = { 1210 + static const writeops macreg_writeops[] = { 1211 1211 putreg(PBA), putreg(EERD), putreg(SWSM), putreg(WUFC), 1212 1212 putreg(TDBAL), putreg(TDBAH), putreg(TXDCTL), putreg(RDBAH), 1213 1213 putreg(RDBAL), putreg(LEDCTL), putreg(VET), putreg(FCRUC),
+2 -2
hw/net/e1000e_core.c
··· 2856 2856 2857 2857 #define e1000e_getreg(x) [x] = e1000e_mac_readreg 2858 2858 typedef uint32_t (*readops)(E1000ECore *, int); 2859 - static readops e1000e_macreg_readops[] = { 2859 + static const readops e1000e_macreg_readops[] = { 2860 2860 e1000e_getreg(PBA), 2861 2861 e1000e_getreg(WUFC), 2862 2862 e1000e_getreg(MANC), ··· 3063 3063 3064 3064 #define e1000e_putreg(x) [x] = e1000e_mac_writereg 3065 3065 typedef void (*writeops)(E1000ECore *, int, uint32_t); 3066 - static writeops e1000e_macreg_writeops[] = { 3066 + static const writeops e1000e_macreg_writeops[] = { 3067 3067 e1000e_putreg(PBA), 3068 3068 e1000e_putreg(SWSM), 3069 3069 e1000e_putreg(WUFC),