Skip to contentSkip to conversation

target-i386: add i440fx 0xcf8 portascoalesced_pio

PATCH [email protected] 2 participants 2 messages Aug 27, 2018 – Aug 31, 2018 KVM

lore
Share & tools
lore
#0 lore raw
Quoted 20 lines · On Mon, Aug 27, 2018 at 04:25:00PM +0800, [email protected] wrote:
Quoted 19 lines
Quoted 19 lines
Quoted 7 lines · Peng Hao
hw/pci-host/piix.c +0 -0
index 0e60834..da73743 100644

hw/pci-host/piix.c static void i440fx_pcihost_realize(DeviceState *dev, Error **errp) · line 335

Quoted 9 lines
hw/pci-host/piix.c +4 -0
@@ -327,6 +327,10 @@ static void i440fx_pcihost_realize(DeviceState *dev, Error **errp)
 
    sysbus_add_io(sbd, 0xcfc, &s->data_mem);
    sysbus_init_ioports(sbd, 0xcfc, 4);
+
+    /* register i440fx 0xcf8 port as coalesced pio */
+    memory_region_set_flush_coalesced(&s->data_mem);
+    memory_region_add_coalescing(&s->conf_mem, 0, 4);
 }
 

Is there a reason to not register this port as coalesced PIO also for Q35? In q35_host_realize()?
If not, I would do that as an extra patch as part of this series.

Quoted 4 lines
Quoted 2 lines

Just as I mentioned in patch [0/4] , you can add pci->>host config port as coalesecd pio. I think it works for q35 port 0xcf8.

Quoted 1 line

-Liran

What's the performance improvement for q35?

q35 also has the same pci-host config port 0xcf8 as piix. I test the coalesced pio for q35 pci-host config port 0xcf8. It spent less VM-exit avg time from 3us to 0.6us.

Quoted 2 lines
Signature · 1 line
MST
#1 lore raw
Quoted 20 lines · On Mon, Aug 27, 2018 at 11:17:49PM +0800, [email protected] wrote:
Quoted 20 lines · On Mon, Aug 27, 2018 at 04:25:00PM +0800, [email protected] wrote:
Quoted 19 lines
Quoted 19 lines
Quoted 7 lines · Peng Hao
hw/pci-host/piix.c +0 -0
index 0e60834..da73743 100644

hw/pci-host/piix.c static void i440fx_pcihost_realize(DeviceState *dev, Error **errp) · line 335

Quoted 9 lines
hw/pci-host/piix.c +4 -0
@@ -327,6 +327,10 @@ static void i440fx_pcihost_realize(DeviceState *dev, Error **errp)
 
    sysbus_add_io(sbd, 0xcfc, &s->data_mem);
    sysbus_init_ioports(sbd, 0xcfc, 4);
+
+    /* register i440fx 0xcf8 port as coalesced pio */
+    memory_region_set_flush_coalesced(&s->data_mem);
+    memory_region_add_coalescing(&s->conf_mem, 0, 4);
 }
 

Is there a reason to not register this port as coalesced PIO also for Q35? In q35_host_realize()?
If not, I would do that as an extra patch as part of this series.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Just as I mentioned in patch [0/4] , you can add pci->>host config port as coalesecd pio. I think it works for q35 port 0xcf8.

Quoted 1 line

-Liran

What's the performance improvement for q35?

q35 also has the same pci-host config port 0xcf8 as piix. I test the coalesced pio for q35 pci-host config port 0xcf8. It spent less VM-exit avg time from 3us to 0.6us.

so pls include that patch too. piix is mostly feature frozen, piix only features aren't likely to be merged.

Quoted 2 lines
Quoted 2 lines
Signature · 1 line
MST