Skip to contentSkip to conversation

qemu-dm: pass-through: fix header type register emulation.

PATCH In review Isaku Yamahata 3 participants 3 messages Apr 5, 2010 – Apr 6, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-dm: pass-through: fix header type register emulation.

This patch fixes the emulation of latency timer and header type. The change set of cc1a204423475ff7a918b11d78b9ae637f320e23 deleted the header type register emulation.
On the other hand, the change set of ec5e52d5cb2e6f8851c345b7c3095fe2030fff9c tries to update header type emulation, however it wrongly
touches latency timer emulation part.
I think this was caused by mis-merging. This patch sorts it out.

Cc Dexuan Cui <[email protected]>
Cc Masaki Kanno <[email protected]>
Cc Simon Horman <[email protected]>
Cc Ian Jackson <[email protected]>

---
This is compile-tested only.
Please review/test it

---
 hw/pass-through.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
hw/pass-through.c +13 -1
index fadd358..5a76e8d 100644
@@ -329,11 +329,23 @@ static struct pt_reg_info_tbl pt_emu_reg_header0_tbl[] = {
         .init_val   = 0x00,
         .ro_mask    = 0x00,
         .emu_mask   = 0xFF,
-        .init       = pt_header_type_reg_init,
+        .init       = pt_common_reg_init,
         .u.b.read   = pt_byte_reg_read,
         .u.b.write  = pt_byte_reg_write,
         .u.b.restore  = pt_byte_reg_restore,
     },
+    /* Header Type reg */
+    {
+        .offset     = PCI_HEADER_TYPE,
+        .size       = 1,
+        .init_val   = 0x00,
+        .ro_mask    = 0xFF,
+        .emu_mask   = 0x00,
+        .init       = pt_header_type_reg_init,
+        .u.b.read   = pt_byte_reg_read,
+        .u.b.write  = pt_byte_reg_write,
+        .u.b.restore  = NULL,
+    },
     /* Interrupt Line reg */
     {
         .offset     = PCI_INTERRUPT_LINE,
Signature · 1 line
1.6.6.1
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Isaku Yamahata

This patch fixes the emulation of latency timer and header type. The change set of cc1a204423475ff7a918b11d78b9ae637f320e23 deleted the header type register emulation.
On the other hand, the change set of ec5e52d5cb2e6f8851c345b7c3095fe2030fff9c tries to update header type emulation, however it wrongly
touches latency timer emulation part.
I think this was caused by mis-merging. This patch sorts it out.

Quoted 5 lines
Cc Dexuan Cui <[email protected]>
Cc Masaki Kanno <[email protected]>
Cc Simon Horman <[email protected]>
Cc Ian Jackson <[email protected]>
Quoted 43 lines

---
This is compile-tested only.
Please review/test it

---
 hw/pass-through.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
hw/pass-through.c +13 -1
index fadd358..5a76e8d 100644
@@ -329,11 +329,23 @@ static struct pt_reg_info_tbl pt_emu_reg_header0_tbl[] = {
         .init_val   = 0x00,
         .ro_mask    = 0x00,
         .emu_mask   = 0xFF,
-        .init       = pt_header_type_reg_init,
+        .init       = pt_common_reg_init,
         .u.b.read   = pt_byte_reg_read,
         .u.b.write  = pt_byte_reg_write,
         .u.b.restore  = pt_byte_reg_restore,
     },
+    /* Header Type reg */
+    {
+        .offset     = PCI_HEADER_TYPE,
+        .size       = 1,
+        .init_val   = 0x00,
+        .ro_mask    = 0xFF,
+        .emu_mask   = 0x00,
+        .init       = pt_header_type_reg_init,
+        .u.b.read   = pt_byte_reg_read,
+        .u.b.write  = pt_byte_reg_write,
+        .u.b.restore  = NULL,
+    },
     /* Interrupt Line reg */
     {
         .offset     = PCI_INTERRUPT_LINE,
Signature · 6 lines
1.6.6.1

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
#2 lore raw

Simon Horman writes ("Re: [Xen-devel] [PATCH] qemu-dm: pass-through: fix header type register emulation."):

Quoted 1 line

Thanks. I assume this is for -unstable, not for the imminent 4.0.0.

Ian.