From: Art Napor Subject: Re: [PATCH v3 01/04] HVM firmware passthrough HVM Date: Fri, 12 Oct 2012 11:46:40 -0700 (PDT) Message-ID: <1350067600.22418.YahooMailNeo@web121005.mail.ne1.yahoo.com> References: <1346343064.91089.YahooMailNeo@web121001.mail.ne1.yahoo.com> <831D55AF5A11D64C9B4B43F59EEBF720A31BCC42AB@FTLPMAILBOX02.citrite.net> <1346437375.61994.YahooMailNeo@web121001.mail.ne1.yahoo.com> <831D55AF5A11D64C9B4B43F59EEBF720A31BCC442E@FTLPMAILBOX02.citrite.net> <1349805295.77475.YahooMailNeo@web121002.mail.ne1.yahoo.com> <831D55AF5A11D64C9B4B43F59EEBF720A31C4E5D51@FTLPMAILBOX02.citrite.net> <1349812653.76722.YahooMailNeo@web121001.mail.ne1.yahoo.com> <831D55AF5A11D64C9B4B43F59EEBF720A31C6A4C96@FTLPMAILBOX02.citrite.net> Reply-To: Art Napor Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7771013552937689304==" Return-path: In-Reply-To: <831D55AF5A11D64C9B4B43F59EEBF720A31C6A4C96@FTLPMAILBOX02.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ross Philipson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org --===============7771013552937689304== Content-Type: multipart/alternative; boundary="-406315465-933205781-1350067600=:22418" ---406315465-933205781-1350067600=:22418 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sample code would be great if it can be forwarded to the list. =0A=0AThanks= =0AArt=0A=0A=0A=0A=0A________________________________=0A From: Ross Philips= on =0ATo: Art Napor ; "xen-d= evel@lists.xen.org" =0ASent: Wednesday, October 1= 0, 2012 11:00 AM=0ASubject: RE: [Xen-devel] [PATCH v3 01/04] HVM firmware = passthrough HVM=0A =0A=0AIt looks like this thread fell off the xen-devel l= ist =E2=80=93 putting it back. I am not sure what you mean by hard-coded. N= ewer kernels expose the DMI/SMBIOS information in sysfs. I could send out s= ome sample code that does this.=0A=C2=A0=0AGeneral question for xen-devel: = Is it ok to forward sample code to the list? I am not sure what the rules o= f engagement are concerning that.=0A=C2=A0=0AThanks=0ARoss=0A=C2=A0=0AFrom:= Art Napor [mailto:artnapor@yahoo.com] =0ASent: Tuesday, October 09, 2012 3:= 58 PM=0ATo: Ross Philipson=0ASubject: Re: [Xen-devel] [PATCH v3 01/04] HVM = firmware passthrough HVM=0A=C2=A0=0ARoss,=0A=C2=A0=0AI wish I could say yes= . I think I see where these are intended to be loaded in from the fourth pa= tch in the v3 series. I guess I'm not clear on how the tool stack would rea= d these in. Would these values be hard coded in from /sysfs or could these = be configured in xen.cfg or other arguments passed in? =0A=C2=A0=0A=C2=A0= =0A+#define HVM_XS_HVMLOADER=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "hvmloader"=0A+#define HVM_XS_BIOS= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "hvmloader/bios"=0A+#define HVM_XS_= GENERATION_ID_ADDRESS=C2=A0=C2=A0 "hvmloader/generation-id-address"=0A+=0A+= /* The following values allow additional ACPI tables to be added to the=0A+= * virtual ACPI BIOS that hvmloader constructs. The values specify the gues= t=0A+ * physical address and length of a block of ACPI tables to add. The f= ormat of=0A+ * the block is simply concatenated raw tables (which specify t= heir own length=0A+ * in the ACPI header).=0A+ */=0A+#define HVM_XS_ACPI_PT= _ADDRESS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "hvmloader/acpi/ad= dress"=0A+#define HVM_XS_ACPI_PT_LENGTH=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 "hvmloader/acpi/length"=0A+=0A+/* Any number of SMBIOS t= ypes can be passed through to an HVM guest using=0A+ * the following xensto= re values. The values specify the guest physical=0A+ * address and length o= f a block of SMBIOS structures for hvmloader to use.=0A+ * The block is for= matted in the following way:=0A+ *=0A+ * ..= .=0A+ *=0A+ * Each length separator is a 32b integer indicating the length = of the next=0A+ * SMBIOS structure. For DMTF defined types (0 - 121), the p= assed in struct=0A+ * will replace the default structure in hvmloader. In a= ddition, any=0A+ * OEM/vendortypes (128 - 255) will all be added.=0A+ */=0A= +#define HVM_XS_SMBIOS_PT_ADDRESS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "hvml= oader/smbios/address"=0A+#define HVM_XS_SMBIOS_PT_LENGTH=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 "hvmloader/smbios/length"=0A+=0A+/* Set to 1 to en= able SMBIOS default portable battery (type 22) values. */=0A+#define HVM_XS= _SMBIOS_DEFAULT_BATTERY=C2=A0 "hvmloader/smbios/default_battery"=0A+=0A+/* = The following xenstore values are used to override some of the default=0A+ = * string values in the SMBIOS table constructed in hvmloader.=0A+ */=0A+#de= fine HVM_XS_BIOS_STRINGS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 "bios-strings"=0A+#define HVM_XS_BIOS_VENDOR=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "bios-strings/bio= s-vendor"=0A+#define HVM_XS_BIOS_VERSION=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "bios-strings/bios-version"=0A+#define HV= M_XS_SYSTEM_MANUFACTURER=C2=A0=C2=A0=C2=A0=C2=A0 "bios-strings/system-manuf= acturer"=0A+#define HVM_XS_SYSTEM_PRODUCT_NAME=C2=A0=C2=A0=C2=A0=C2=A0 "bio= s-strings/system-product-name"=0A+#define HVM_XS_SYSTEM_VERSION=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "bios-strings/system-version"=0A= +#define HVM_XS_SYSTEM_SERIAL_NUMBER=C2=A0=C2=A0=C2=A0 "bios-strings/system= -serial-number"=0A+#define HVM_XS_ENCLOSURE_MANUFACTURER=C2=A0 "bios-string= s/enclosure-manufacturer"=0A+#define HVM_XS_ENCLOSURE_SERIAL_NUMBER "bios-s= trings/enclosure-serial-number"=0A+#define HVM_XS_BATTERY_MANUFACTURER=C2= =A0=C2=A0=C2=A0 "bios-strings/battery-manufacturer"=0A+#define HVM_XS_BATTE= RY_DEVICE_NAME=C2=A0=C2=A0=C2=A0=C2=A0 "bios-strings/battery-device-name"= =0A+=0A+/* Up to 100 OEM strings can be set in xenstore using values of the= form=0A=C2=A0=0A=0A________________________________=0A=0AFrom:Ross Philips= on =0ATo: Art Napor =0ASent= : Tuesday, October 9, 2012 2:06 PM=0ASubject: RE: [Xen-devel] [PATCH v3 01/= 04] HVM firmware passthrough HVM=0A=C2=A0=0AHi,=0A=C2=A0=0ASo the patches t= o xen are only part of what you need to make it all work. Something in your= toolstack needs to load the tables you want into the new guest. There was = no really good place to do this in the xen tools so I did not push. I am gu= essing e.g. somewhere in you dom0 tools, you would call dmidecode or read t= he tables from sysfs, form the set of tables for the guest that you want an= d pass them in to the libxc domain creator function. Does that make sense?= =0A=C2=A0=0AThanks=0ARoss=0A=C2=A0=0AFrom:Art Napor [mailto:artnapor@yahoo.= com] =0ASent: Tuesday, October 09, 2012 1:55 PM=0ATo: Ross Philipson=0ASubj= ect: Re: [Xen-devel] [PATCH v3 01/04] HVM firmware passthrough HVM=0A=C2=A0= =0ARoss,=0A=C2=A0=0AThanks again for the information. I was able to apply t= he SMBIOS patch series cleanly to 4.1.2 and v3 of your later patch series t= o 4.2 and 4.3 testing. Is there an option or flag that needs to be set to e= nable the HVM passthrough? I believe the patches applied cleanly - I didn't= notice any rejects. I have smbios loaded in the Dom0 /sys/firmware/smbios = and /sys/class/dmi/. A Centos 5 DomU with the patched Xen 4.2/4.3 appears t= o still report the standard Xen bios information via dmidecode. =0A=C2=A0= =0A=C2=A0=0A=0A________________________________=0A=0AFrom:Ross Philipson =0ATo: Art Napor ; "xen-devel@= lists.xen.org" =0ASent: Friday, August 31, 2012 4= :36 PM=0ASubject: RE: [Xen-devel] [PATCH v3 01/04] HVM firmware passthrough= HVM=0A=0A> I also came across the earlier smbios passthrough patch series.= I'm looking to be able to pass the DMI block from the Dom0 to the DomU whe= n. Your earlier smbios patch series applied cleanly built against to 4.1.2,= but the Dom0 smbios data didn't seem to make it into the HVM DomU. =0A=0A>= Are there any version or other changset limitations that would prevent the= patches from being manually applied to 4.1? =0A=0A> http://lists.xen.org/a= rchives/html/xen-devel/2012-02/msg01754.html=0A=0AWell there were some tool= stack changes (in libxl) that happened right around the time I was making = the patches so I had to change things to match that. So in an older branch = you might have to change the way the BIOS blobs get sent in to the domain b= uilding code.=0A=0AThe rest of the code to load the BIOS bits into the new = guests memory and the changes to hvmloader to process them should apply cle= anly I think.=0A=0ANote that the last patch set for this (v3) does support = passing in both SMBIOS structures and ACPI tables so you can use that patch= set.=0A=0AThanks=0ARoss ---406315465-933205781-1350067600=:22418 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Sample code would be = great if it can be forwarded to the list.

Thanks
Art



From: Ross Philipson <Ross.Philipson@citrix.c= om>
To: Art Napor &= lt;artnapor@yahoo.com>; "xen-devel@lists.xen.org" <xen-devel@lists.xe= n.org>
Sent: Wedne= sday, October 10, 2012 11:00 AM
S= ubject: RE: [Xen-devel] [PATCH v3 01/04] HVM firmware passthrou= gh HVM

=0A
It looks like this thread fell = off the xen-devel list =E2=80=93 putting it back. I am not sure what you me= an by hard-coded. Newer kernels expose the DMI/SMBIOS information in sysfs.= I could send out some sample code that does this.
 
General question for xen-devel: Is it ok to forward sample code to the lis= t? I am not sure what the rules of engagement are concerning that.
 
Thanks
Ross
 
From: Art = Napor [mailto:artnapor@yahoo.com]
Sent: Tuesday, October 09, 201= 2 3:58 PM
To: Ross Philipson
Subject: Re: [Xen-devel] [= PATCH v3 01/04] HVM firmware passthrough HVM
 
Ross,
 
I wish I could say yes. I think I see where these are= intended to be loaded in from the fourth patch in the v3 series. I guess I= 'm not clear on how the tool stack would read these in. Would these values = be hard coded in from /sysfs or could these be configured in xen.cfg or oth= er arguments passed in?
 
 
+#define HVM_XS_HVMLOADER       &nb= sp;       "hvmloader"
+#define HVM_XS_BIOS=             &nb= sp;       "hvmloader/bios"
+#define HVM_XS= _GENERATION_ID_ADDRESS   "hvmloader/generation-id-address"
++/* The following values allow additional ACPI tables to be added to the<= br>+ * virtual ACPI BIOS that hvmloader constructs. The values specify the = guest
+ * physical address and length of a block of ACPI tables to add. = The format of
+ * the block is simply concatenated raw tables (which spe= cify their own length
+ * in the ACPI header).
+ */
+#define HVM_X= S_ACPI_PT_ADDRESS         "hvmloade= r/acpi/address"
+#define HVM_XS_ACPI_PT_LENGTH         = ; "hvmloader/acpi/length"
+
+/* Any number of SMBIOS types can be pas= sed through to an HVM guest using
+ * the following xenstore values. The= values specify the guest physical
+ * address and length of a block of = SMBIOS structures for hvmloader to use.
+ * The block is formatted in th= e following way:
+ *
+ * <length><struct><length>&l= t;struct>...
+ *
+ * Each length separator is a 32b integer indica= ting the length of the next
+ * SMBIOS structure. For DMTF defined types= (0 - 121), the passed in struct
+ * will replace the default structure = in hvmloader. In addition, any
+ * OEM/vendortypes (128 - 255) will all = be added.
+ */
+#define HVM_XS_SMBIOS_PT_ADDRESS   &nb= sp;   "hvmloader/smbios/address"
+#define HVM_XS_SMBIOS_PT_LEN= GTH        "hvmloader/smbios/length"
+
+/* Set to 1 to enable SMBIOS default po= rtable battery (type 22) values. */
+#define HVM_XS_SMBIOS_DEFAULT_BATTE= RY  "hvmloader/smbios/default_battery"
+
+/* The following xenst= ore values are used to override some of the default
+ * string values in= the SMBIOS table constructed in hvmloader.
+ */
+#define HVM_XS_BIOS= _STRINGS            = "bios-strings"
+#define HVM_XS_BIOS_VENDOR     =         "bios-strings/bios-vendor"
+#= define HVM_XS_BIOS_VERSION        &= nbsp;   "bios-strings/bios-version"
+#define HVM_XS_SYSTEM_MAN= UFACTURER     "bios-strings/system-manufacturer"
+#d= efine HVM_XS_SYSTEM_PRODUCT_NAME     "bios-strings/syst= em-product-name"
+#define HVM_XS_SYSTEM_VERSION         = ; "bios-strings/system-version"
+#define HVM_XS_SYSTEM_SERIAL_NUMBER&nbs= p;   "bios-strings/system-serial-number"
+#define HVM_XS_ENCLO= SURE_MANUFACTURER  "bios-strings/enclosure-manufacturer"
+#define H= VM_XS_ENCLOSURE_SERIAL_NUMBER "bios-strings/enclosure-serial-number"
+#d= efine HVM_XS_BATTERY_MANUFACTURER    "bios-strings/battery-m= anufacturer"
+#define HVM_XS_BATTERY_DEVICE_NAME    = "bios-strings/battery-device-name"
+
+/* Up to 100 OEM strings can b= e set in xenstore using values of the form
 

From: Ross Philipson <Ross.Philipson@citrix.com>
To: Art= Napor <artnapor@yahoo.com>
Sent: Tuesday, October 9, 2012= 2:06 PM
Subject: RE: [Xen-devel] [PATCH v3 01/04] HVM firmware p= assthrough HVM
 
=
Hi= ,
 
So the patches to xen are only part of w= hat you need to make it all work. Something in your toolstack needs to load= the tables you want into the new guest. There was no really good place to = do this in the xen tools so I did not push. I am guessing e.g. somewhere in= you dom0 tools, you would call dmidecode or read the tables from sysfs, fo= rm the set of tables for the guest that you want and pass them in to the li= bxc domain creator function. Does that make sense?
 
Thanks
<= /div>
Ross
&nbs= p;
From: Art Napor [mailt= o:artnapor@yahoo.com]
Sent: Tuesday, October 09, 2012 1:55 PMTo: Ross Philipson
Subject: Re: [Xen-devel] [PATCH v3 01/= 04] HVM firmware passthrough HVM
=
 
<= div>
Ross,
 
Thanks again for the information. I was able to apply the SMBIOS patch= series cleanly to 4.1.2 and v3 of your later patch series to 4.2 and 4.3 t= esting. Is there an option or flag that needs to be set to enable the HVM p= assthrough? I believe the patches applied cleanly - I didn't notice any rej= ects. I have smbios loaded in the Dom0 /sys/firmware/smbios and /sys/class/= dmi/. A Centos 5 DomU with the patched Xen 4.2/4.3 appears to still report = the standard Xen bios information via dmidecode.
 
<= div>
 

<= div>
From: Ross Phili= pson <Ross.Philipson@citrix.com>
To: Art Napor <artnapor= @yahoo.com>; "xen-devel@lists.xen.org" <xen-devel@lists.xen.org> <= br>Sent: Friday, August 31, 2012 4:36 PM
Subject: RE: [Xen= -devel] [PATCH v3 01/04] HVM firmware passthrough HVM

> I also came across the earlier smbios passthroug= h patch series. I'm looking to be able to pass the DMI block from the Dom0 = to the DomU when. Your earlier smbios patch series applied cleanly built ag= ainst to 4.1.2, but the Dom0 smbios data didn't seem to make it into the HV= M DomU.

> Are there any version or other changset limitations th= at would prevent the patches from being manually applied to 4.1?

&g= t; http://lists.xen.org/archives/htm= l/xen-devel/2012-02/msg01754.html

Well there were some tool stac= k changes (in libxl) that happened right around the time I was making the p= atches so I had to change things to match that. So in an older branch you might have= to change the way the BIOS blobs get sent in to the domain building code.<= br>
The rest of the code to load the BIOS bits into the new guests memor= y and the changes to hvmloader to process them should apply cleanly I think= .

Note that the last patch set for this (v3) does support passing in= both SMBIOS structures and ACPI tables so you can use that patch set.
<= br>Thanks
Ross


 


---406315465-933205781-1350067600=:22418-- --===============7771013552937689304== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============7771013552937689304==--