]> xenbits.xensource.com Git - qemu-xen-traditional.git/commitdiff
passthrough: fix header type register emulation
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 8 Apr 2010 15:56:24 +0000 (16:56 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 8 Apr 2010 15:56:24 +0000 (16:56 +0100)
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 <dexuan.cui@intel.com>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Simon Horman <horms@verge.net.au>
hw/pass-through.c

index fadd358fa30dc088a2e09b985d1c85aab960bfc2..5a76e8da565320a8e0efceef4396d9c6755cdd2a 100644 (file)
@@ -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,