WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [patch] [qemu-xen] pass-thorugh: porvide leading zero for vd

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [patch] [qemu-xen] pass-thorugh: porvide leading zero for vdevfn
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Wed, 20 May 2009 11:41:30 +1000
Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>, Dexuan Cui <dexuan.cui@xxxxxxxxx>
Delivery-date: Tue, 19 May 2009 18:41:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
This is consistent with the format used elsewhere.

At this time this inconsistency manifests in the output of pci-list
for functions that have been hot-plugged.

e.g.

Without this patch:

# xm pci-list debian
VSlt domain   bus   slot   func
0x03 0x0000   0x01  0x00   0x0    
0x07 0x0000   0x01  0x00   0x1    
# xm pci-attach debian 00:1b.0
# xm pci-list debian
VSlt domain   bus   slot   func
0x03 0x0000   0x01  0x00   0x0    
0x07 0x0000   0x01  0x00   0x1    
0x5  0x0000   0x00  0x1b   0x0   

With this patch:

# xm pci-list debian
VSlt domain   bus   slot   func
0x03 0x0000   0x01  0x00   0x0    
0x07 0x0000   0x01  0x00   0x1    
# xm pci-attach debian 00:1b.0
# xm pci-list debian
VSlt domain   bus   slot   func
0x03 0x0000   0x01  0x00   0x0    
0x07 0x0000   0x01  0x00   0x1    
0x05 0x0000   0x00  0x1b   0x0   


While the pci-list output could be unified inside xm or xend by,
for example parsing the string as an integer and then formating it
as a string, there seems to be no disadvantage in making the
string representation used consistent.

Cc: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Cc: Dexuan Cui <dexuan.cui@xxxxxxxxx>
Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

Index: ioemu-remote/hw/piix4acpi.c
===================================================================
--- ioemu-remote.orig/hw/piix4acpi.c    2009-05-20 11:15:14.000000000 +1000
+++ ioemu-remote/hw/piix4acpi.c 2009-05-20 11:28:14.000000000 +1000
@@ -508,7 +508,7 @@ void acpi_php_add(int slot)
     power_on_php_slot(slot);
 
     /* tell Control panel which slot for the new pass-throgh dev */
-    sprintf(ret_str, "0x%x", slot);
+    sprintf(ret_str, "0x%02x", slot);
     xenstore_record_dm("parameter", ret_str);
 
     /* signal the CP ACPI hot insert done */

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [patch] [qemu-xen] pass-thorugh: porvide leading zero for vdevfn, Simon Horman <=