aspeed queue
[PULL 1/2] hw/i2c/aspeed_i2c: reset and migrate pending_intr_sts
In reply to Cédric Le GoaterFrom: GuoHan Zhao <[email protected]>
Commit 7e82393ed058 ("hw/i2c/aspeed: fix lost interrupts on back-to-back commands") introduced pending_intr_sts to preserve interrupt bits that collide with already pending status bits.
That deferred interrupt state is consumed later when the guest clears INTR_STS, but it is not reset in aspeed_i2c_bus_reset() and it is not part of the bus migration state. A reset can therefore leave stale deferred bits behind, and migration can silently drop them.
Clear pending_intr_sts on reset and include it in VMState while keeping compatibility with older migration streams.
--- hw/i2c/aspeed_i2c.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
hw/i2c/aspeed_i2c.c +3 -1
@@ -1134,10 +1134,11 @@ static const MemoryRegionOps aspeed_i2c_bus_pool_ops = {static const VMStateDescription aspeed_i2c_bus_vmstate = { .name =TYPE_ASPEED_I2C , - .version_id =6 , + .version_id =7 , .minimum_version_id =6 , .fields = (const VMStateField []) {VMSTATE_UINT32_ARRAY (regs, AspeedI2CBus,ASPEED_I2C_NEW_NUM_REG ), +VMSTATE_UINT32_V (pending_intr_sts, AspeedI2CBus,7 ),VMSTATE_UINT8_ARRAY (pool, AspeedI2CBus,ASPEED_I2C_BUS_POOL_SIZE ),VMSTATE_UINT64 (dma_dram_offset, AspeedI2CBus),VMSTATE_END_OF_LIST ()
@@ -1510,6 +1511,7 @@ static void aspeed_i2c_bus_reset(DeviceState *dev)AspeedI2CBus *s =ASPEED_I2C_BUS (dev);memset (s->regs,0 ,sizeof (s->regs)); + s->pending_intr_sts =0 ;i2c_end_transfer (s->bus); }
Signature · 1 line
2.53.0
[PULL 2/2] net/ftgmac100: preserve full VLAN TCI in TX tag insertion
In reply to Cédric Le GoaterFrom: linhuang <[email protected]>
The VLAN tag insertion helper took vlan_tci as an 8-bit value, while the descriptor provides a 16-bit VLAN TCI. This truncated egress tags and caused VLAN ID corruption (for example, 4088/0x0ff8 became 248/0x00f8 at the receiver).
Change vlan_tci to uint16_t in the TX VLAN insertion path so the full 802.1Q TCI is preserved and transmitted correctly.
--- hw/net/ftgmac100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/net/ftgmac100.c +1 -1
@@ -498,7 +498,7 @@ static int ftgmac100_write_bd(FTGMAC100Desc *bd, dma_addr_t addr) }static int ftgmac100_insert_vlan (FTGMAC100State *s,int frame_size, -uint8_t vlan_tci) +uint16_t vlan_tci) {uint8_t *vlan_hdr = s->frame + (ETH_ALEN *2 );uint8_t *payload = vlan_hdr +sizeof (struct vlan_header );
Signature · 1 line
2.53.0
The following changes since commit 91f6a9cb1b0f11afa74ef7fb20d5579d9dfbe020:
Merge tag 'qga-pull-2026-03-27' of https://github.com/kostyanf14/qemu into staging (2026-03-27 18:41:05 +0000)
are available in the Git repository at:
https://github.com/legoater/qemu/ tags/pull-aspeed-20260330
for you to fetch changes up to 9160305d92d2750e6ca3ada8f048305c9290f03c:
net/ftgmac100: preserve full VLAN TCI in TX tag insertion (2026-03-30 07:36:25 +0200)
----------------------------------------------------------------
aspeed queue:
* Complete lost interrupts fix in the Aspeed I2C model
* Fix a vlan tag insertion issue in the ftgmac100 model
----------------------------------------------------------------
GuoHan Zhao (1):
hw/i2c/aspeed_i2c: reset and migrate pending_intr_sts
linhuang (1):
net/ftgmac100: preserve full VLAN TCI in TX tag insertion
hw/i2c/aspeed_i2c.c | 4 +++- hw/net/ftgmac100.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-)
Peter Maydell
AppliedQuoted 13 lines · Cédric Le Goater
The following changes since commit
91f6a9cb1b0f11afa74ef7fb20d5579d9dfbe020:Merge tag 'qga-pull-2026-03-27' of https://github.com/kostyanf14/qemu into staging (2026-03-27 18:41:05 +0000)
are available in the Git repository at:
https://github.com/legoater/qemu/ tags/pull-aspeed-20260330
for you to fetch changes up to
9160305d92d2750e6ca3ada8f048305c9290f03c:net/ftgmac100: preserve full VLAN TCI in TX tag insertion (2026-03-30 07:36:25 +0200)
Quoted 7 lines
----------------------------------------------------------------
aspeed queue:* Complete lost interrupts fix in the Aspeed I2C model
* Fix a vlan tag insertion issue in the ftgmac100 model----------------------------------------------------------------
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/11.0
for any user-visible changes.
-- PMM