All of lore.kernel.org
 help / color / mirror / Atom feed
* HVM firmware passthrough - helper library
@ 2013-01-08 22:04 Ross Philipson
  2013-01-09 10:44 ` Ian Campbell
       [not found] ` <1363806237.80975.YahooMailNeo@web161405.mail.bf1.yahoo.com>
  0 siblings, 2 replies; 18+ messages in thread
From: Ross Philipson @ 2013-01-08 22:04 UTC (permalink / raw)
  To: xen-devel; +Cc: Art Napor (artnapor@yahoo.com)

[-- Attachment #1: Type: text/plain, Size: 508 bytes --]

Attached is a tarball with a helper library for reading host ACPI and SMBIOS firmware and creating firmware files that can be used with the HVM firmware passthrough patches I submitted. I used it in my testing of the patches and planned to use it later when we moved to a new Xen version. This library was requested by a few people - I hope you find it useful.

Ross Philipson
Senior Software Engineer
Citrix Systems, Inc
14 Crosby Drive
Bedford, MA 01730
781-301-7949
ross.philipson@citrix.com



[-- Attachment #2: xen-libhvm.tar.gz --]
[-- Type: application/x-gzip, Size: 13664 bytes --]

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: HVM firmware passthrough - helper library
  2013-01-08 22:04 HVM firmware passthrough - helper library Ross Philipson
@ 2013-01-09 10:44 ` Ian Campbell
  2013-01-09 17:57   ` Ross Philipson
  2013-02-01 20:26   ` Ross Philipson
       [not found] ` <1363806237.80975.YahooMailNeo@web161405.mail.bf1.yahoo.com>
  1 sibling, 2 replies; 18+ messages in thread
From: Ian Campbell @ 2013-01-09 10:44 UTC (permalink / raw)
  To: Ross Philipson; +Cc: Art Napor (artnapor@yahoo.com), xen-devel

On Tue, 2013-01-08 at 22:04 +0000, Ross Philipson wrote:
> Attached is a tarball with a helper library for reading host ACPI and
> SMBIOS firmware and creating firmware files that can be used with the
> HVM firmware passthrough patches I submitted. I used it in my testing
> of the patches and planned to use it later when we moved to a new Xen
> version. This library was requested by a few people - I hope you find
> it useful.

Would it make sense / are you planning to integrate this into the Xen
tree as well? I'm not sure if it fits into an existing library e.g.
libxenguest if it would be a separate library.

Ian.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: HVM firmware passthrough - helper library
  2013-01-09 10:44 ` Ian Campbell
@ 2013-01-09 17:57   ` Ross Philipson
  2013-02-01 20:26   ` Ross Philipson
  1 sibling, 0 replies; 18+ messages in thread
From: Ross Philipson @ 2013-01-09 17:57 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

> -----Original Message-----
> From: Ian Campbell
> Sent: Wednesday, January 09, 2013 5:45 AM
> To: Ross Philipson
> Cc: xen-devel@lists.xensource.com; Art Napor (artnapor@yahoo.com)
> Subject: Re: [Xen-devel] HVM firmware passthrough - helper library
> 
> On Tue, 2013-01-08 at 22:04 +0000, Ross Philipson wrote:
> > Attached is a tarball with a helper library for reading host ACPI and
> > SMBIOS firmware and creating firmware files that can be used with the
> > HVM firmware passthrough patches I submitted. I used it in my testing
> > of the patches and planned to use it later when we moved to a new Xen
> > version. This library was requested by a few people - I hope you find
> > it useful.
> 
> Would it make sense / are you planning to integrate this into the Xen
> tree as well? I'm not sure if it fits into an existing library e.g.
> libxenguest if it would be a separate library.
> 
> Ian.

Right so I mainly put it out there because some people asked for it. I had
the same issue while I was working on the fw patches - I could not really
figure out where it might belong. That is why I left it separate and did
not submit it for inclusion (though I had mentioned it in some earlier
threads).

I am perfectly happy to have it integrated in Xen (and submit patches for
it) if we can figure out how and where to integrate it.

Thanks
Ross

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: HVM firmware passthrough - helper library
  2013-01-09 10:44 ` Ian Campbell
  2013-01-09 17:57   ` Ross Philipson
@ 2013-02-01 20:26   ` Ross Philipson
  2013-02-04 10:24     ` Ian Campbell
  1 sibling, 1 reply; 18+ messages in thread
From: Ross Philipson @ 2013-02-01 20:26 UTC (permalink / raw)
  To: Ian Campbell, xen-devel

> -----Original Message-----
> From: Ian Campbell
> Sent: Wednesday, January 09, 2013 5:45 AM
> To: Ross Philipson
> Cc: xen-devel@lists.xensource.com; Art Napor (artnapor@yahoo.com)
> Subject: Re: [Xen-devel] HVM firmware passthrough - helper library
> 
> On Tue, 2013-01-08 at 22:04 +0000, Ross Philipson wrote:
> > Attached is a tarball with a helper library for reading host ACPI and
> > SMBIOS firmware and creating firmware files that can be used with the
> > HVM firmware passthrough patches I submitted. I used it in my testing
> > of the patches and planned to use it later when we moved to a new Xen
> > version. This library was requested by a few people - I hope you find
> > it useful.
> 
> Would it make sense / are you planning to integrate this into the Xen
> tree as well? I'm not sure if it fits into an existing library e.g.
> libxenguest if it would be a separate library.
> 
> Ian.

Following up on this. Is there any interest in integrating this into
xen? I don't think it belongs in xenguest because it would be used up
at the libxl level where the fw blobs are passed in via the xl config
file. It seems like it should be in some separate utilities library
but I can't really see where.

Thanks
Ross

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: HVM firmware passthrough - helper library
  2013-02-01 20:26   ` Ross Philipson
@ 2013-02-04 10:24     ` Ian Campbell
  2013-02-04 18:42       ` Ross Philipson
  0 siblings, 1 reply; 18+ messages in thread
From: Ian Campbell @ 2013-02-04 10:24 UTC (permalink / raw)
  To: Ross Philipson; +Cc: xen-devel

On Fri, 2013-02-01 at 20:26 +0000, Ross Philipson wrote:
> > -----Original Message-----
> > From: Ian Campbell
> > Sent: Wednesday, January 09, 2013 5:45 AM
> > To: Ross Philipson
> > Cc: xen-devel@lists.xensource.com; Art Napor (artnapor@yahoo.com)
> > Subject: Re: [Xen-devel] HVM firmware passthrough - helper library
> > 
> > On Tue, 2013-01-08 at 22:04 +0000, Ross Philipson wrote:
> > > Attached is a tarball with a helper library for reading host ACPI and
> > > SMBIOS firmware and creating firmware files that can be used with the
> > > HVM firmware passthrough patches I submitted. I used it in my testing
> > > of the patches and planned to use it later when we moved to a new Xen
> > > version. This library was requested by a few people - I hope you find
> > > it useful.
> > 
> > Would it make sense / are you planning to integrate this into the Xen
> > tree as well? I'm not sure if it fits into an existing library e.g.
> > libxenguest if it would be a separate library.
> > 
> > Ian.
> 
> Following up on this. Is there any interest in integrating this into
> xen? I don't think it belongs in xenguest because it would be used up
> at the libxl level where the fw blobs are passed in via the xl config
> file. It seems like it should be in some separate utilities library
> but I can't really see where.

Maybe the best place would be in libxl itself, or perhaps better in
libxlu?

Toolstacks are supposed to be moving towards using libxl(u) anyway and
even in the interim linking against the library for just these functions
is no great hardship.

Ian.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: HVM firmware passthrough - helper library
  2013-02-04 10:24     ` Ian Campbell
@ 2013-02-04 18:42       ` Ross Philipson
  0 siblings, 0 replies; 18+ messages in thread
From: Ross Philipson @ 2013-02-04 18:42 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

> -----Original Message-----
> From: Ian Campbell
> Sent: Monday, February 04, 2013 5:24 AM
> To: Ross Philipson
> Cc: xen-devel@lists.xensource.com
> Subject: Re: [Xen-devel] HVM firmware passthrough - helper library
> 
> On Fri, 2013-02-01 at 20:26 +0000, Ross Philipson wrote:
> > > -----Original Message-----
> > > From: Ian Campbell
> > > Sent: Wednesday, January 09, 2013 5:45 AM
> > > To: Ross Philipson
> > > Cc: xen-devel@lists.xensource.com; Art Napor (artnapor@yahoo.com)
> > > Subject: Re: [Xen-devel] HVM firmware passthrough - helper library
> > >
> > > On Tue, 2013-01-08 at 22:04 +0000, Ross Philipson wrote:
> > > > Attached is a tarball with a helper library for reading host ACPI
> and
> > > > SMBIOS firmware and creating firmware files that can be used with
> the
> > > > HVM firmware passthrough patches I submitted. I used it in my
> testing
> > > > of the patches and planned to use it later when we moved to a new
> Xen
> > > > version. This library was requested by a few people - I hope you
> find
> > > > it useful.
> > >
> > > Would it make sense / are you planning to integrate this into the
> Xen
> > > tree as well? I'm not sure if it fits into an existing library e.g.
> > > libxenguest if it would be a separate library.
> > >
> > > Ian.
> >
> > Following up on this. Is there any interest in integrating this into
> > xen? I don't think it belongs in xenguest because it would be used up
> > at the libxl level where the fw blobs are passed in via the xl config
> > file. It seems like it should be in some separate utilities library
> > but I can't really see where.
> 
> Maybe the best place would be in libxl itself, or perhaps better in
> libxlu?
> 
> Toolstacks are supposed to be moving towards using libxl(u) anyway and
> even in the interim linking against the library for just these functions
> is no great hardship.
> 
> Ian.

Ok, yeah. I was looking at libxlu on Friday. I just wasn't really sure
what the intended scope of that library was. But the routines in that
helper library to snarf firmware bits are pretty much utility functions.

I can try knocking something together in libxlu and submit it.

Thanks
Ross

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: HVM firmware passthrough - helper library
       [not found] ` <1363806237.80975.YahooMailNeo@web161405.mail.bf1.yahoo.com>
@ 2013-03-20 20:08   ` Ross Philipson
  2013-03-21 19:42     ` Art Napor
  0 siblings, 1 reply; 18+ messages in thread
From: Ross Philipson @ 2013-03-20 20:08 UTC (permalink / raw)
  To: xen-devel; +Cc: Art Napor

[-- Attachment #1: Type: text/plain, Size: 1848 bytes --]


> Ross,
>
> Finally got back to this project to test out the helper lib using the v3
> hvm-firmware passthrough patches with Xen 4.2.1. When building from
> tools/firmware the build failed with the following output:
>
> make
> gcc -Wl,-soname -Wl,libxenhvm.so.1.0 -shared -o libxenhvm.so.1.0.0
> xenhvm.opic smbios_module.opic acpi_module.opic xh_internal.opic
> /home/ajn131/rpmbuild/SOURCES/xen-4.2.1/tools/firmware/libhvm/../../../tools/xenstore/libxenstore.so
>
> xenhvm.opic: could not read symbols: File in wrong format
> collect2: ld returned 1 exit status
> make: *** [libxenhvm.so.1.0.0] Error 1
>
> I was hoping to integrate the build into the RPM. Any thoughts? Should I
> try it with the latest 4.3?
>
>
> Thanks Again,
>
> -
> Art

Art,

Can you try the attached tarball. A colleague found and fixed a couple
of issues in my sample including the face that it was including in the
wrong Rules.mk.

Thanks
Ross

> ------------------------------------------------------------------------
> *From:* Ross Philipson <Ross.Philipson@citrix.com>
> *To:* "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
> *Cc:* "Art Napor (artnapor@yahoo.com)" <artnapor@yahoo.com>
> *Sent:* Tuesday, January 8, 2013 5:04 PM
> *Subject:* HVM firmware passthrough - helper library
>
> Attached is a tarball with a helper library for reading host ACPI and
> SMBIOS firmware and creating firmware files that can be used with the
> HVM firmware passthrough patches I submitted. I used it in my testing of
> the patches and planned to use it later when we moved to a new Xen
> version. This library was requested by a few people - I hope you find it
> useful.
>
> Ross Philipson
> Senior Software Engineer
> Citrix Systems, Inc
> 14 Crosby Drive
> Bedford, MA 01730
> 781-301-7949
> ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
>




[-- Attachment #2: xen-libhvm.tar.gz --]
[-- Type: application/gzip, Size: 13730 bytes --]

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: HVM firmware passthrough - helper library
  2013-03-20 20:08   ` Ross Philipson
@ 2013-03-21 19:42     ` Art Napor
  2013-03-24 21:10       ` Ross Philipson
  0 siblings, 1 reply; 18+ messages in thread
From: Art Napor @ 2013-03-21 19:42 UTC (permalink / raw)
  To: Ross Philipson, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 2925 bytes --]

Ross,

I rebuilt Xen 4.2.1 with the V5 patch series and the updated helper library. The biospt utility built cleanly and runs on Dom0 with the aformentioned libraries in place. However, I'm not seeing the SMBIOS strings passed through to the DomU (A Centos 5 VM). Options 1 and 3 using the biostpt utility appear to dump the SMBIOS and ACPI tables, but I'm not sure how to pass the tables in to the VM?

[root@localhost biospt]# ./biospt 
Usage:
$ biospt <n>
 1 - Write some SMBIOS tables using MMAP
 2 - Write some SMBIOS tables using SYSFS
 3 - Write some ACPI tables using MMAP
 4 - Write some ACPI using SYSFS
 5 - Read and trace DMI files
 6 - Write out some test files

./biospt 6
Make SMBIOS file from FW.
Fail(1), errno: 2



-
Art



________________________________
 From: Ross Philipson <ross.philipson@citrix.com>
To: xen-devel@lists.xensource.com 
Cc: Art Napor <artnapor@yahoo.com> 
Sent: Wednesday, March 20, 2013 4:08 PM
Subject: Re: HVM firmware passthrough - helper library
 

> Ross,
>
> Finally got back to this project to test out the helper lib using the v3
> hvm-firmware passthrough patches with Xen 4.2.1. When building from
> tools/firmware the build failed with the following output:
>
> make
> gcc -Wl,-soname -Wl,libxenhvm.so.1.0 -shared -o libxenhvm.so.1.0.0
> xenhvm.opic smbios_module.opic acpi_module.opic xh_internal.opic
> /home/ajn131/rpmbuild/SOURCES/xen-4.2.1/tools/firmware/libhvm/../../../tools/xenstore/libxenstore.so
>
> xenhvm.opic: could not read symbols: File in wrong format
> collect2: ld returned 1 exit status
> make: *** [libxenhvm.so.1.0.0] Error 1
>
> I was hoping to integrate the build into the RPM. Any thoughts? Should I
> try it with the latest 4.3?
>
>
> Thanks Again,
>
> -
> Art

Art,

Can you try the attached tarball. A colleague found and fixed a couple
of issues in my sample including the face that it was including in the
wrong Rules.mk.

Thanks
Ross

> ------------------------------------------------------------------------
> *From:* Ross Philipson <Ross.Philipson@citrix.com>
> *To:* "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
> *Cc:* "Art Napor (artnapor@yahoo.com)" <artnapor@yahoo.com>
> *Sent:* Tuesday, January 8, 2013 5:04 PM
> *Subject:* HVM firmware passthrough - helper library
>
> Attached is a tarball with a helper library for reading host ACPI and
> SMBIOS firmware and creating firmware files that can be used with the
> HVM firmware passthrough patches I submitted. I used it in my testing of
> the patches and planned to use it later when we moved to a new Xen
> version. This library was requested by a few people - I hope you find it
> useful.
>
> Ross Philipson
> Senior Software Engineer
> Citrix Systems, Inc
> 14 Crosby Drive
> Bedford, MA 01730
> 781-301-7949
> ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
>

[-- Attachment #1.2: Type: text/html, Size: 4762 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: HVM firmware passthrough - helper library
  2013-03-21 19:42     ` Art Napor
@ 2013-03-24 21:10       ` Ross Philipson
  2013-03-27  4:50         ` Art Napor
  0 siblings, 1 reply; 18+ messages in thread
From: Ross Philipson @ 2013-03-24 21:10 UTC (permalink / raw)
  To: Art Napor, xen-devel

On 03/21/2013 03:42 PM, Art Napor wrote:
> Ross,
>
> I rebuilt Xen 4.2.1 with the V5 patch series and the updated helper
> library. The biospt utility built cleanly and runs on Dom0 with the
> aformentioned libraries in place. However, I'm not seeing the SMBIOS
> strings passed through to the DomU (A Centos 5 VM). Options 1 and 3
> using the biostpt utility appear to dump the SMBIOS and ACPI tables, but
> I'm not sure how to pass the tables in to the VM?

Look at the related commits to libxl. After the firmware chunks are 
given to libxc to load into the new domain, the addresses are returned 
to libxl which writes them to xenstore.

>
> [root@localhost biospt]# ./biospt
> Usage:
> $ biospt <n>
> 1 - Write some SMBIOS tables using MMAP
> 2 - Write some SMBIOS tables using SYSFS
> 3 - Write some ACPI tables using MMAP
> 4 - Write some ACPI using SYSFS
> 5 - Read and trace DMI files
> 6 - Write out some test files
>
> ./biospt 6
> Make SMBIOS file from FW.
> Fail(1), errno: 2

This is a rather rough test app for using the library. You should look 
closely at the code in it and figure out what it is doing. It does not 
have very robust error handling etc.

Thanks
Ross

>
>
> -
> Art
>
> ------------------------------------------------------------------------
> *From:* Ross Philipson <ross.philipson@citrix.com>
> *To:* xen-devel@lists.xensource.com
> *Cc:* Art Napor <artnapor@yahoo.com>
> *Sent:* Wednesday, March 20, 2013 4:08 PM
> *Subject:* Re: HVM firmware passthrough - helper library
>
>
>  > Ross,
>  >
>  > Finally got back to this project to test out the helper lib using the v3
>  > hvm-firmware passthrough patches with Xen 4.2.1. When building from
>  > tools/firmware the build failed with the following output:
>  >
>  > make
>  > gcc -Wl,-soname -Wl,libxenhvm.so.1.0 -shared -o libxenhvm.so.1.0.0
>  > xenhvm.opic smbios_module.opic acpi_module.opic xh_internal.opic
>  >
> /home/ajn131/rpmbuild/SOURCES/xen-4.2.1/tools/firmware/libhvm/../../../tools/xenstore/libxenstore.so
>  >
>  > xenhvm.opic: could not read symbols: File in wrong format
>  > collect2: ld returned 1 exit status
>  > make: *** [libxenhvm.so.1.0.0] Error 1
>  >
>  > I was hoping to integrate the build into the RPM. Any thoughts? Should I
>  > try it with the latest 4.3?
>  >
>  >
>  > Thanks Again,
>  >
>  > -
>  > Art
>
> Art,
>
> Can you try the attached tarball. A colleague found and fixed a couple
> of issues in my sample including the face that it was including in the
> wrong Rules.mk.
>
> Thanks
> Ross
>
>  > ------------------------------------------------------------------------
>  > *From:* Ross Philipson <Ross.Philipson@citrix.com
> <mailto:Ross.Philipson@citrix.com>>
>  > *To:* "xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>" <xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>
>  > *Cc:* "Art Napor (artnapor@yahoo.com <mailto:artnapor@yahoo.com>)"
> <artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>  > *Sent:* Tuesday, January 8, 2013 5:04 PM
>  > *Subject:* HVM firmware passthrough - helper library
>  >
>  > Attached is a tarball with a helper library for reading host ACPI and
>  > SMBIOS firmware and creating firmware files that can be used with the
>  > HVM firmware passthrough patches I submitted. I used it in my testing of
>  > the patches and planned to use it later when we moved to a new Xen
>  > version. This library was requested by a few people - I hope you find it
>  > useful.
>  >
>  > Ross Philipson
>  > Senior Software Engineer
>  > Citrix Systems, Inc
>  > 14 Crosby Drive
>  > Bedford, MA 01730
>  > 781-301-7949
>  > ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>
>  >
>
>
>
>
>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: HVM firmware passthrough - helper library
  2013-03-24 21:10       ` Ross Philipson
@ 2013-03-27  4:50         ` Art Napor
  2013-04-01 22:04           ` Ross Philipson
  0 siblings, 1 reply; 18+ messages in thread
From: Art Napor @ 2013-03-27  4:50 UTC (permalink / raw)
  To: Ross Philipson, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 4847 bytes --]

Works great with the updated libxl commits - thanks.  

> ./biospt 6
> Make SMBIOS file from FW.
> Fail(1), errno: 2

Looks like this does require the sysfs-dmi kmod to expose the dmi structure for the utility to write out the smbios_fw.bin. 


# ./biospt 6
Make SMBIOS file from FW.
Make SMBIOS Xen vendor struct.
Wrote SMBIOS structures file: smbios_fw.bin count: 8
Make ACPI SLIC file from FW.
Fail(3), errno: 2


Do the ACPI tables require the same exposure via sysfs? Not sure if this 
changes from 2.6 to 3.x kernels. The biospt utility can dump the ACPI 
tables using the MMAP option, but not via sysfs on a 3.4.32 system. 



Thanks,
Art





________________________________
 From: Ross Philipson <ross.philipson@citrix.com>
To: Art Napor <artnapor@yahoo.com>; "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com> 
Sent: Sunday, March 24, 2013 5:10 PM
Subject: Re: HVM firmware passthrough - helper library
 
On 03/21/2013 03:42 PM, Art Napor wrote:
> Ross,
>
> I rebuilt Xen 4.2.1 with the V5 patch series and the updated helper
> library. The biospt utility built cleanly and runs on Dom0 with the
> aformentioned libraries in place. However, I'm not seeing the SMBIOS
> strings passed through to the DomU (A Centos 5 VM). Options 1 and 3
> using the biostpt utility appear to dump the SMBIOS and ACPI tables, but
> I'm not sure how to pass the tables in to the VM?

Look at the related commits to libxl. After the firmware chunks are 
given to libxc to load into the new domain, the addresses are returned 
to libxl which writes them to xenstore.

>
> [root@localhost biospt]# ./biospt
> Usage:
> $ biospt <n>
> 1 - Write some SMBIOS tables using MMAP
> 2 - Write some SMBIOS tables using SYSFS
> 3 - Write some ACPI tables using MMAP
> 4 - Write some ACPI using SYSFS
> 5 - Read and trace DMI files
> 6 - Write out some test files
>
> ./biospt 6
> Make SMBIOS file from FW.
> Fail(1), errno: 2

This is a rather rough test app for using the library. You should look 
closely at the code in it and figure out what it is doing. It does not 
have very robust error handling etc.

Thanks
Ross

>
>
> -
> Art
>
> ------------------------------------------------------------------------
> *From:* Ross Philipson <ross.philipson@citrix.com>
> *To:* xen-devel@lists.xensource.com
> *Cc:* Art Napor <artnapor@yahoo.com>
> *Sent:* Wednesday, March 20, 2013 4:08 PM
> *Subject:* Re: HVM firmware passthrough - helper library
>
>
>  > Ross,
>  >
>  > Finally got back to this project to test out the helper lib using the v3
>  > hvm-firmware passthrough patches with Xen 4.2.1. When building from
>  > tools/firmware the build failed with the following output:
>  >
>  > make
>  > gcc -Wl,-soname -Wl,libxenhvm.so.1.0 -shared -o libxenhvm.so.1.0.0
>  > xenhvm.opic smbios_module.opic acpi_module.opic xh_internal.opic
>  >
> /home/ajn131/rpmbuild/SOURCES/xen-4.2.1/tools/firmware/libhvm/../../../tools/xenstore/libxenstore.so
>  >
>  > xenhvm.opic: could not read symbols: File in wrong format
>  > collect2: ld returned 1 exit status
>  > make: *** [libxenhvm.so.1.0.0] Error 1
>  >
>  > I was hoping to integrate the build into the RPM. Any thoughts? Should I
>  > try it with the latest 4.3?
>  >
>  >
>  > Thanks Again,
>  >
>  > -
>  > Art
>
> Art,
>
> Can you try the attached tarball. A colleague found and fixed a couple
> of issues in my sample including the face that it was including in the
> wrong Rules.mk.
>
> Thanks
> Ross
>
>  > ------------------------------------------------------------------------
>  > *From:* Ross Philipson <Ross.Philipson@citrix.com
> <mailto:Ross.Philipson@citrix.com>>
>  > *To:* "xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>" <xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>
>  > *Cc:* "Art Napor (artnapor@yahoo.com <mailto:artnapor@yahoo.com>)"
> <artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>  > *Sent:* Tuesday, January 8, 2013 5:04 PM
>  > *Subject:* HVM firmware passthrough - helper library
>  >
>  > Attached is a tarball with a helper library for reading host ACPI and
>  > SMBIOS firmware and creating firmware files that can be used with the
>  > HVM firmware passthrough patches I submitted. I used it in my testing of
>  > the patches and planned to use it later when we moved to a new Xen
>  > version. This library was requested by a few people - I hope you find it
>  > useful.
>  >
>  > Ross Philipson
>  > Senior Software Engineer
>  > Citrix Systems, Inc
>  > 14 Crosby Drive
>  > Bedford, MA 01730
>  > 781-301-7949
>  > ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>
>  >
>
>
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 8905 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: HVM firmware passthrough - helper library
  2013-03-27  4:50         ` Art Napor
@ 2013-04-01 22:04           ` Ross Philipson
  2013-04-02  3:19             ` Art Napor
  0 siblings, 1 reply; 18+ messages in thread
From: Ross Philipson @ 2013-04-01 22:04 UTC (permalink / raw)
  To: Art Napor; +Cc: xen-devel

On 03/27/2013 12:50 AM, Art Napor wrote:
> Works great with the updated libxl commits - thanks.
>
>  > ./biospt 6
>  > Make SMBIOS file from FW.
>  > Fail(1), errno: 2
>
> Looks like this does require the sysfs-dmi kmod to expose the dmi
> structure for the utility to write out the smbios_fw.bin.
>
> # ./biospt 6
> Make SMBIOS file from FW.
> Make SMBIOS Xen vendor struct.
> Wrote SMBIOS structures file: smbios_fw.bin count: 8
> Make ACPI SLIC file from FW.
> Fail(3), errno: 2
>
> Do the ACPI tables require the same exposure via sysfs? Not sure if this
> changes from 2.6 to 3.x kernels. The biospt utility can dump the ACPI
> tables using the MMAP option, but not via sysfs on a 3.4.32 system.

They are in the same place on my wheezy with 3.2.x kernel. I would be 
pretty surprised if they moved. Can you go in to 
/sys/firmware/acpi/tables and see what's there? Maybe try a hexdump -C < 
SLIC ...

>
>
> Thanks,
> Art
>
>
> ------------------------------------------------------------------------
> *From:* Ross Philipson <ross.philipson@citrix.com>
> *To:* Art Napor <artnapor@yahoo.com>; "xen-devel@lists.xensource.com"
> <xen-devel@lists.xensource.com>
> *Sent:* Sunday, March 24, 2013 5:10 PM
> *Subject:* Re: HVM firmware passthrough - helper library
>
> On 03/21/2013 03:42 PM, Art Napor wrote:
>  > Ross,
>  >
>  > I rebuilt Xen 4.2.1 with the V5 patch series and the updated helper
>  > library. The biospt utility built cleanly and runs on Dom0 with the
>  > aformentioned libraries in place. However, I'm not seeing the SMBIOS
>  > strings passed through to the DomU (A Centos 5 VM). Options 1 and 3
>  > using the biostpt utility appear to dump the SMBIOS and ACPI tables, but
>  > I'm not sure how to pass the tables in to the VM?
>
> Look at the related commits to libxl. After the firmware chunks are
> given to libxc to load into the new domain, the addresses are returned
> to libxl which writes them to xenstore.
>
>  >
>  > [root@localhost biospt]# ./biospt
>  > Usage:
>  > $ biospt <n>
>  > 1 - Write some SMBIOS tables using MMAP
>  > 2 - Write some SMBIOS tables using SYSFS
>  > 3 - Write some ACPI tables using MMAP
>  > 4 - Write some ACPI using SYSFS
>  > 5 - Read and trace DMI files
>  > 6 - Write out some test files
>  >
>  > ./biospt 6
>  > Make SMBIOS file from FW.
>  > Fail(1), errno: 2
>
> This is a rather rough test app for using the library. You should look
> closely at the code in it and figure out what it is doing. It does not
> have very robust error handling etc.
>
> Thanks
> Ross
>
>  >
>  >
>  > -
>  > Art
>  >
>  > ------------------------------------------------------------------------
>  > *From:* Ross Philipson <ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com>>
>  > *To:* xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > *Cc:* Art Napor <artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>  > *Sent:* Wednesday, March 20, 2013 4:08 PM
>  > *Subject:* Re: HVM firmware passthrough - helper library
>  >
>  >
>  > > Ross,
>  > >
>  > > Finally got back to this project to test out the helper lib using
> the v3
>  > > hvm-firmware passthrough patches with Xen 4.2.1. When building from
>  > > tools/firmware the build failed with the following output:
>  > >
>  > > make
>  > > gcc -Wl,-soname -Wl,libxenhvm.so.1.0 -shared -o libxenhvm.so.1.0.0
>  > > xenhvm.opic smbios_module.opic acpi_module.opic xh_internal.opic
>  > >
>  >
> /home/ajn131/rpmbuild/SOURCES/xen-4.2.1/tools/firmware/libhvm/../../../tools/xenstore/libxenstore.so
>  > >
>  > > xenhvm.opic: could not read symbols: File in wrong format
>  > > collect2: ld returned 1 exit status
>  > > make: *** [libxenhvm.so.1.0.0] Error 1
>  > >
>  > > I was hoping to integrate the build into the RPM. Any thoughts?
> Should I
>  > > try it with the latest 4.3?
>  > >
>  > >
>  > > Thanks Again,
>  > >
>  > > -
>  > > Art
>  >
>  > Art,
>  >
>  > Can you try the attached tarball. A colleague found and fixed a couple
>  > of issues in my sample including the face that it was including in the
>  > wrong Rules.mk.
>  >
>  > Thanks
>  > Ross
>  >
>  > >
> ------------------------------------------------------------------------
>  > > *From:* Ross Philipson <Ross.Philipson@citrix.com
> <mailto:Ross.Philipson@citrix.com>
>  > <mailto:Ross.Philipson@citrix.com <mailto:Ross.Philipson@citrix.com>>>
>  > > *To:* "xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>" <xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>>
>  > > *Cc:* "Art Napor (artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>)"
>  > <artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>
>  > > *Sent:* Tuesday, January 8, 2013 5:04 PM
>  > > *Subject:* HVM firmware passthrough - helper library
>  > >
>  > > Attached is a tarball with a helper library for reading host ACPI and
>  > > SMBIOS firmware and creating firmware files that can be used with the
>  > > HVM firmware passthrough patches I submitted. I used it in my
> testing of
>  > > the patches and planned to use it later when we moved to a new Xen
>  > > version. This library was requested by a few people - I hope you
> find it
>  > > useful.
>  > >
>  > > Ross Philipson
>  > > Senior Software Engineer
>  > > Citrix Systems, Inc
>  > > 14 Crosby Drive
>  > > Bedford, MA 01730
>  > > 781-301-7949
>  > > ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>
>  > >
>  >
>  >
>  >
>  >
>  >
>
>
>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: HVM firmware passthrough - helper library
  2013-04-01 22:04           ` Ross Philipson
@ 2013-04-02  3:19             ` Art Napor
  2013-04-02 21:15               ` Ross Philipson
  0 siblings, 1 reply; 18+ messages in thread
From: Art Napor @ 2013-04-02  3:19 UTC (permalink / raw)
  To: Ross Philipson; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 7820 bytes --]

Looks like they're where they're supposed to be, but no SLIC. 


ls /sys/firmware/acpi/tables/
APIC  ASF!  DSDT  dynamic  FACP  FACS  HPET  MCFG  SSDT1  SSDT2  XMAR


hexdump -C < /sys/firmware/acpi/tables/XMAR
00000000  58 4d 41 52 e8 00 00 00  01 f9 49 4e 54 45 4c 20  |XMAR......INTEL |
00000010  53 4e 42 20 00 00 00 00  01 00 00 00 49 4e 54 4c  |SNB ........INTL|
00000020  01 00 00 00 23 01 00 00  00 00 00 00 00 00 00 00  |....#...........|
00000030  00 00 18 00 00 00 00 00  00 00 d9 fe 00 00 00 00  |................|
00000040  01 08 00 00 00 00 02 00  00 00 58 00 01 00 00 00  |..........X.....|
00000050  00 10 d9 fe 00 00 00 00  03 08 00 00 02 f0 1f 00  |................|
00000060  04 08 00 00 00 f0 0f 00  04 08 00 00 00 f0 0f 01  |................|
00000070  04 08 00 00 00 f0 0f 02  04 08 00 00 00 f0 0f 03  |................|
00000080  04 08 00 00 00 f0 0f 04  04 08 00 00 00 f0 0f 05  |................|
00000090  04 08 00 00 00 f0 0f 06  04 08 00 00 00 f0 0f 07  |................|
000000a0  01 00 28 00 00 00 00 00  00 30 d4 da 00 00 00 00  |..(......0......|
000000b0  ff 1f d5 da 00 00 00 00  01 08 00 00 00 00 1d 00  |................|
000000c0  01 08 00 00 00 00 1a 00  01 00 20 00 00 00 00 00  |.......... .....|
000000d0  00 00 80 db 00 00 00 00  ff ff 9f df 00 00 00 00  |................|
000000e0  01 08 00 00 00 00 02 00                           |........|
000000e8



________________________________
 From: Ross Philipson <ross.philipson@citrix.com>
To: Art Napor <artnapor@yahoo.com> 
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com> 
Sent: Monday, April 1, 2013 6:04 PM
Subject: Re: HVM firmware passthrough - helper library
 
On 03/27/2013 12:50 AM, Art Napor wrote:
> Works great with the updated libxl commits - thanks.
>
>  > ./biospt 6
>  > Make SMBIOS file from FW.
>  > Fail(1), errno: 2
>
> Looks like this does require the sysfs-dmi kmod to expose the dmi
> structure for the utility to write out the smbios_fw.bin.
>
> # ./biospt 6
> Make SMBIOS file from FW.
> Make SMBIOS Xen vendor struct.
> Wrote SMBIOS structures file: smbios_fw.bin count: 8
> Make ACPI SLIC file from FW.
> Fail(3), errno: 2
>
> Do the ACPI tables require the same exposure via sysfs? Not sure if this
> changes from 2.6 to 3.x kernels. The biospt utility can dump the ACPI
> tables using the MMAP option, but not via sysfs on a 3.4.32 system.

They are in the same place on my wheezy with 3.2.x kernel. I would be 
pretty surprised if they moved. Can you go in to 
/sys/firmware/acpi/tables and see what's there? Maybe try a hexdump -C < 
SLIC ...

>
>
> Thanks,
> Art
>
>
> ------------------------------------------------------------------------
> *From:* Ross Philipson <ross.philipson@citrix.com>
> *To:* Art Napor <artnapor@yahoo.com>; "xen-devel@lists.xensource.com"
> <xen-devel@lists.xensource.com>
> *Sent:* Sunday, March 24, 2013 5:10 PM
> *Subject:* Re: HVM firmware passthrough - helper library
>
> On 03/21/2013 03:42 PM, Art Napor wrote:
>  > Ross,
>  >
>  > I rebuilt Xen 4.2.1 with the V5 patch series and the updated helper
>  > library. The biospt utility built cleanly and runs on Dom0 with the
>  > aformentioned libraries in place. However, I'm not seeing the SMBIOS
>  > strings passed through to the DomU (A Centos 5 VM). Options 1 and 3
>  > using the biostpt utility appear to dump the SMBIOS and ACPI tables, but
>  > I'm not sure how to pass the tables in to the VM?
>
> Look at the related commits to libxl. After the firmware chunks are
> given to libxc to load into the new domain, the addresses are returned
> to libxl which writes them to xenstore.
>
>  >
>  > [root@localhost biospt]# ./biospt
>  > Usage:
>  > $ biospt <n>
>  > 1 - Write some SMBIOS tables using MMAP
>  > 2 - Write some SMBIOS tables using SYSFS
>  > 3 - Write some ACPI tables using MMAP
>  > 4 - Write some ACPI using SYSFS
>  > 5 - Read and trace DMI files
>  > 6 - Write out some test files
>  >
>  > ./biospt 6
>  > Make SMBIOS file from FW.
>  > Fail(1), errno: 2
>
> This is a rather rough test app for using the library. You should look
> closely at the code in it and figure out what it is doing. It does not
> have very robust error handling etc.
>
> Thanks
> Ross
>
>  >
>  >
>  > -
>  > Art
>  >
>  > ------------------------------------------------------------------------
>  > *From:* Ross Philipson <ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com>>
>  > *To:* xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > *Cc:* Art Napor <artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>  > *Sent:* Wednesday, March 20, 2013 4:08 PM
>  > *Subject:* Re: HVM firmware passthrough - helper library
>  >
>  >
>  > > Ross,
>  > >
>  > > Finally got back to this project to test out the helper lib using
> the v3
>  > > hvm-firmware passthrough patches with Xen 4.2.1. When building from
>  > > tools/firmware the build failed with the following output:
>  > >
>  > > make
>  > > gcc -Wl,-soname -Wl,libxenhvm.so.1.0 -shared -o libxenhvm.so.1.0.0
>  > > xenhvm.opic smbios_module.opic acpi_module.opic xh_internal.opic
>  > >
>  >
> /home/ajn131/rpmbuild/SOURCES/xen-4.2.1/tools/firmware/libhvm/../../../tools/xenstore/libxenstore.so
>  > >
>  > > xenhvm.opic: could not read symbols: File in wrong format
>  > > collect2: ld returned 1 exit status
>  > > make: *** [libxenhvm.so.1.0.0] Error 1
>  > >
>  > > I was hoping to integrate the build into the RPM. Any thoughts?
> Should I
>  > > try it with the latest 4.3?
>  > >
>  > >
>  > > Thanks Again,
>  > >
>  > > -
>  > > Art
>  >
>  > Art,
>  >
>  > Can you try the attached tarball. A colleague found and fixed a couple
>  > of issues in my sample including the face that it was including in the
>  > wrong Rules.mk.
>  >
>  > Thanks
>  > Ross
>  >
>  > >
> ------------------------------------------------------------------------
>  > > *From:* Ross Philipson <Ross.Philipson@citrix.com
> <mailto:Ross.Philipson@citrix.com>
>  > <mailto:Ross.Philipson@citrix.com <mailto:Ross.Philipson@citrix.com>>>
>  > > *To:* "xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>" <xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>>
>  > > *Cc:* "Art Napor (artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>)"
>  > <artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>
>  > > *Sent:* Tuesday, January 8, 2013 5:04 PM
>  > > *Subject:* HVM firmware passthrough - helper library
>  > >
>  > > Attached is a tarball with a helper library for reading host ACPI and
>  > > SMBIOS firmware and creating firmware files that can be used with the
>  > > HVM firmware passthrough patches I submitted. I used it in my
> testing of
>  > > the patches and planned to use it later when we moved to a new Xen
>  > > version. This library was requested by a few people - I hope you
> find it
>  > > useful.
>  > >
>  > > Ross Philipson
>  > > Senior Software Engineer
>  > > Citrix Systems, Inc
>  > > 14 Crosby Drive
>  > > Bedford, MA 01730
>  > > 781-301-7949
>  > > ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>
>  > >
>  >
>  >
>  >
>  >
>  >
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 14679 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: HVM firmware passthrough - helper library
  2013-04-02  3:19             ` Art Napor
@ 2013-04-02 21:15               ` Ross Philipson
  2013-04-23 22:06                 ` Art Napor
  2013-09-12 19:29                 ` Art Napor
  0 siblings, 2 replies; 18+ messages in thread
From: Ross Philipson @ 2013-04-02 21:15 UTC (permalink / raw)
  To: Art Napor; +Cc: xen-devel

On 04/01/2013 11:19 PM, Art Napor wrote:
> Looks like they're where they're supposed to be, but no SLIC.

Right well there is nothing that mandates it be there. It is an OEM 
platform license.

>
> ls /sys/firmware/acpi/tables/
> APIC ASF! DSDT dynamic FACP FACS HPET MCFG SSDT1 SSDT2 XMAR
>
> hexdump -C < /sys/firmware/acpi/tables/XMAR
> 00000000 58 4d 41 52 e8 00 00 00 01 f9 49 4e 54 45 4c 20 |XMAR......INTEL |
> 00000010 53 4e 42 20 00 00 00 00 01 00 00 00 49 4e 54 4c |SNB ........INTL|
> 00000020 01 00 00 00 23 01 00 00 00 00 00 00 00 00 00 00 |....#...........|
> 00000030 00 00 18 00 00 00 00 00 00 00 d9 fe 00 00 00 00 |................|
> 00000040 01 08 00 00 00 00 02 00 00 00 58 00 01 00 00 00 |..........X.....|
> 00000050 00 10 d9 fe 00 00 00 00 03 08 00 00 02 f0 1f 00 |................|
> 00000060 04 08 00 00 00 f0 0f 00 04 08 00 00 00 f0 0f 01 |................|
> 00000070 04 08 00 00 00 f0 0f 02 04 08 00 00 00 f0 0f 03 |................|
> 00000080 04 08 00 00 00 f0 0f 04 04 08 00 00 00 f0 0f 05 |................|
> 00000090 04 08 00 00 00 f0 0f 06 04 08 00 00 00 f0 0f 07 |................|
> 000000a0 01 00 28 00 00 00 00 00 00 30 d4 da 00 00 00 00 |..(......0......|
> 000000b0 ff 1f d5 da 00 00 00 00 01 08 00 00 00 00 1d 00 |................|
> 000000c0 01 08 00 00 00 00 1a 00 01 00 20 00 00 00 00 00 |.......... .....|
> 000000d0 00 00 80 db 00 00 00 00 ff ff 9f df 00 00 00 00 |................|
> 000000e0 01 08 00 00 00 00 02 00 |........|
> 000000e8
>
> ------------------------------------------------------------------------
> *From:* Ross Philipson <ross.philipson@citrix.com>
> *To:* Art Napor <artnapor@yahoo.com>
> *Cc:* "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
> *Sent:* Monday, April 1, 2013 6:04 PM
> *Subject:* Re: HVM firmware passthrough - helper library
>
> On 03/27/2013 12:50 AM, Art Napor wrote:
>  > Works great with the updated libxl commits - thanks.
>  >
>  > > ./biospt 6
>  > > Make SMBIOS file from FW.
>  > > Fail(1), errno: 2
>  >
>  > Looks like this does require the sysfs-dmi kmod to expose the dmi
>  > structure for the utility to write out the smbios_fw.bin.
>  >
>  > # ./biospt 6
>  > Make SMBIOS file from FW.
>  > Make SMBIOS Xen vendor struct.
>  > Wrote SMBIOS structures file: smbios_fw.bin count: 8
>  > Make ACPI SLIC file from FW.
>  > Fail(3), errno: 2
>  >
>  > Do the ACPI tables require the same exposure via sysfs? Not sure if this
>  > changes from 2.6 to 3.x kernels. The biospt utility can dump the ACPI
>  > tables using the MMAP option, but not via sysfs on a 3.4.32 system.
>
> They are in the same place on my wheezy with 3.2.x kernel. I would be
> pretty surprised if they moved. Can you go in to
> /sys/firmware/acpi/tables and see what's there? Maybe try a hexdump -C <
> SLIC ...
>
>  >
>  >
>  > Thanks,
>  > Art
>  >
>  >
>  > ------------------------------------------------------------------------
>  > *From:* Ross Philipson <ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com>>
>  > *To:* Art Napor <artnapor@yahoo.com <mailto:artnapor@yahoo.com>>;
> "xen-devel@lists.xensource.com <mailto:xen-devel@lists.xensource.com>"
>  > <xen-devel@lists.xensource.com <mailto:xen-devel@lists.xensource.com>>
>  > *Sent:* Sunday, March 24, 2013 5:10 PM
>  > *Subject:* Re: HVM firmware passthrough - helper library
>  >
>  > On 03/21/2013 03:42 PM, Art Napor wrote:
>  > > Ross,
>  > >
>  > > I rebuilt Xen 4.2.1 with the V5 patch series and the updated helper
>  > > library. The biospt utility built cleanly and runs on Dom0 with the
>  > > aformentioned libraries in place. However, I'm not seeing the SMBIOS
>  > > strings passed through to the DomU (A Centos 5 VM). Options 1 and 3
>  > > using the biostpt utility appear to dump the SMBIOS and ACPI
> tables, but
>  > > I'm not sure how to pass the tables in to the VM?
>  >
>  > Look at the related commits to libxl. After the firmware chunks are
>  > given to libxc to load into the new domain, the addresses are returned
>  > to libxl which writes them to xenstore.
>  >
>  > >
>  > > [root@localhost biospt]# ./biospt
>  > > Usage:
>  > > $ biospt <n>
>  > > 1 - Write some SMBIOS tables using MMAP
>  > > 2 - Write some SMBIOS tables using SYSFS
>  > > 3 - Write some ACPI tables using MMAP
>  > > 4 - Write some ACPI using SYSFS
>  > > 5 - Read and trace DMI files
>  > > 6 - Write out some test files
>  > >
>  > > ./biospt 6
>  > > Make SMBIOS file from FW.
>  > > Fail(1), errno: 2
>  >
>  > This is a rather rough test app for using the library. You should look
>  > closely at the code in it and figure out what it is doing. It does not
>  > have very robust error handling etc.
>  >
>  > Thanks
>  > Ross
>  >
>  > >
>  > >
>  > > -
>  > > Art
>  > >
>  > >
> ------------------------------------------------------------------------
>  > > *From:* Ross Philipson <ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>
>  > > *To:* xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>
>  > > *Cc:* Art Napor <artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>
>  > > *Sent:* Wednesday, March 20, 2013 4:08 PM
>  > > *Subject:* Re: HVM firmware passthrough - helper library
>  > >
>  > >
>  > > > Ross,
>  > > >
>  > > > Finally got back to this project to test out the helper lib using
>  > the v3
>  > > > hvm-firmware passthrough patches with Xen 4.2.1. When building from
>  > > > tools/firmware the build failed with the following output:
>  > > >
>  > > > make
>  > > > gcc -Wl,-soname -Wl,libxenhvm.so.1.0 -shared -o libxenhvm.so.1.0.0
>  > > > xenhvm.opic smbios_module.opic acpi_module.opic xh_internal.opic
>  > > >
>  > >
>  >
> /home/ajn131/rpmbuild/SOURCES/xen-4.2.1/tools/firmware/libhvm/../../../tools/xenstore/libxenstore.so
>  > > >
>  > > > xenhvm.opic: could not read symbols: File in wrong format
>  > > > collect2: ld returned 1 exit status
>  > > > make: *** [libxenhvm.so.1.0.0] Error 1
>  > > >
>  > > > I was hoping to integrate the build into the RPM. Any thoughts?
>  > Should I
>  > > > try it with the latest 4.3?
>  > > >
>  > > >
>  > > > Thanks Again,
>  > > >
>  > > > -
>  > > > Art
>  > >
>  > > Art,
>  > >
>  > > Can you try the attached tarball. A colleague found and fixed a couple
>  > > of issues in my sample including the face that it was including in the
>  > > wrong Rules.mk.
>  > >
>  > > Thanks
>  > > Ross
>  > >
>  > > >
>  > ------------------------------------------------------------------------
>  > > > *From:* Ross Philipson <Ross.Philipson@citrix.com
> <mailto:Ross.Philipson@citrix.com>
>  > <mailto:Ross.Philipson@citrix.com <mailto:Ross.Philipson@citrix.com>>
>  > > <mailto:Ross.Philipson@citrix.com
> <mailto:Ross.Philipson@citrix.com> <mailto:Ross.Philipson@citrix.com
> <mailto:Ross.Philipson@citrix.com>>>>
>  > > > *To:* "xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>
>  > > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>>" <xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>
>  > > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>>>
>  > > > *Cc:* "Art Napor (artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>  > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>)"
>  > > <artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>  > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>>
>  > > > *Sent:* Tuesday, January 8, 2013 5:04 PM
>  > > > *Subject:* HVM firmware passthrough - helper library
>  > > >
>  > > > Attached is a tarball with a helper library for reading host ACPI and
>  > > > SMBIOS firmware and creating firmware files that can be used with the
>  > > > HVM firmware passthrough patches I submitted. I used it in my
>  > testing of
>  > > > the patches and planned to use it later when we moved to a new Xen
>  > > > version. This library was requested by a few people - I hope you
>  > find it
>  > > > useful.
>  > > >
>  > > > Ross Philipson
>  > > > Senior Software Engineer
>  > > > Citrix Systems, Inc
>  > > > 14 Crosby Drive
>  > > > Bedford, MA 01730
>  > > > 781-301-7949
>  > > > ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>
>  > > <mailto:ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com> <mailto:ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com>>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>>
>  > > >
>  > >
>  > >
>  > >
>  > >
>  > >
>  >
>  >
>  >
>
>
>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: HVM firmware passthrough - helper library
  2013-04-02 21:15               ` Ross Philipson
@ 2013-04-23 22:06                 ` Art Napor
  2013-04-24 13:09                   ` Ross Philipson
  2013-09-12 19:29                 ` Art Napor
  1 sibling, 1 reply; 18+ messages in thread
From: Art Napor @ 2013-04-23 22:06 UTC (permalink / raw)
  To: Ross Philipson; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 10402 bytes --]

Could the biospt utility generate the ACPI table file even on systems without OEM/branding tables - /SLIC? I have a kludgy work around to mount overtop of /sys/firmware/acpi/tables/SLIC before running the utility for systems without, but was wondering if the utility could skip over SLIC for systems that don't have this table.





________________________________
 From: Ross Philipson <ross.philipson@citrix.com>
To: Art Napor <artnapor@yahoo.com> 
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com> 
Sent: Tuesday, April 2, 2013 5:15 PM
Subject: Re: HVM firmware passthrough - helper library
 

On 04/01/2013 11:19 PM, Art Napor wrote:
> Looks like they're where they're supposed to be, but no SLIC.

Right well there is nothing that mandates it be there. It is an OEM 
platform license.

>
> ls /sys/firmware/acpi/tables/
> APIC ASF! DSDT dynamic FACP FACS HPET MCFG SSDT1 SSDT2 XMAR
>
> hexdump -C < /sys/firmware/acpi/tables/XMAR
> 00000000 58 4d 41 52 e8 00 00 00 01 f9 49 4e 54 45 4c 20 |XMAR......INTEL |
> 00000010 53 4e 42 20 00 00 00 00 01 00 00 00 49 4e 54 4c |SNB ........INTL|
> 00000020 01 00 00 00 23 01 00 00 00 00 00 00 00 00 00 00 |....#...........|
> 00000030 00 00 18 00 00 00 00 00 00 00 d9 fe 00 00 00 00 |................|
> 00000040 01 08 00 00 00 00 02 00 00 00 58 00 01 00 00 00 |..........X.....|
> 00000050 00 10 d9 fe 00 00 00 00 03 08 00 00 02 f0 1f 00 |................|
> 00000060 04 08 00 00 00 f0 0f 00 04 08 00 00 00 f0 0f 01 |................|
> 00000070 04 08 00 00 00 f0 0f 02 04 08 00 00 00 f0 0f 03 |................|
> 00000080 04 08 00 00 00 f0 0f 04 04 08 00 00 00 f0 0f 05 |................|
> 00000090 04 08 00 00 00 f0 0f 06 04 08 00 00 00 f0 0f 07 |................|
> 000000a0 01 00 28 00 00 00 00 00 00 30 d4 da 00 00 00 00 |..(......0......|
> 000000b0 ff 1f d5 da 00 00 00 00 01 08 00 00 00 00 1d 00 |................|
> 000000c0 01 08 00 00 00 00 1a 00 01 00 20 00 00 00 00 00 |.......... .....|
> 000000d0 00 00 80 db 00 00 00 00 ff ff 9f df 00 00 00 00 |................|
> 000000e0 01 08 00 00 00 00 02 00 |........|
> 000000e8
>
> ------------------------------------------------------------------------
> *From:* Ross Philipson <ross.philipson@citrix.com>
> *To:* Art Napor <artnapor@yahoo.com>
> *Cc:* "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
> *Sent:* Monday, April 1, 2013 6:04 PM
> *Subject:* Re: HVM firmware passthrough - helper library
>
> On 03/27/2013 12:50 AM, Art Napor wrote:
>  > Works great with the updated libxl commits - thanks.
>  >
>  > > ./biospt 6
>  > > Make SMBIOS file from FW.
>  > > Fail(1), errno: 2
>  >
>  > Looks like this does require the sysfs-dmi kmod to expose the dmi
>  > structure for the utility to write out the smbios_fw.bin.
>  >
>  > # ./biospt 6
>  > Make SMBIOS file from FW.
>  > Make SMBIOS Xen vendor struct.
>  > Wrote SMBIOS structures file: smbios_fw.bin count: 8
>  > Make ACPI SLIC file from FW.
>  > Fail(3), errno: 2
>  >
>  > Do the ACPI tables require the same exposure via sysfs? Not sure if this
>  > changes from 2.6 to 3.x kernels. The biospt utility can dump the ACPI
>  > tables using the MMAP option, but not via sysfs on a 3.4.32 system.
>
> They are in the same place on my wheezy with 3.2.x kernel. I would be
> pretty surprised if they moved. Can you go in to
> /sys/firmware/acpi/tables and see what's there? Maybe try a hexdump -C <
> SLIC ...
>
>  >
>  >
>  > Thanks,
>  > Art
>  >
>  >
>  > ------------------------------------------------------------------------
>  > *From:* Ross Philipson <ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com>>
>  > *To:* Art Napor <artnapor@yahoo.com <mailto:artnapor@yahoo.com>>;
> "xen-devel@lists.xensource.com <mailto:xen-devel@lists.xensource.com>"
>  > <xen-devel@lists.xensource.com <mailto:xen-devel@lists.xensource.com>>
>  > *Sent:* Sunday, March 24, 2013 5:10 PM
>  > *Subject:* Re: HVM firmware passthrough - helper library
>  >
>  > On 03/21/2013 03:42 PM, Art Napor wrote:
>  > > Ross,
>  > >
>  > > I rebuilt Xen 4.2.1 with the V5 patch series and the updated helper
>  > > library. The biospt utility built cleanly and runs on Dom0 with the
>  > > aformentioned libraries in place. However, I'm not seeing the SMBIOS
>  > > strings passed through to the DomU (A Centos 5 VM). Options 1 and 3
>  > > using the biostpt utility appear to dump the SMBIOS and ACPI
> tables, but
>  > > I'm not sure how to pass the tables in to the VM?
>  >
>  > Look at the related commits to libxl. After the firmware chunks are
>  > given to libxc to load into the new domain, the addresses are returned
>  > to libxl which writes them to xenstore.
>  >
>  > >
>  > > [root@localhost biospt]# ./biospt
>  > > Usage:
>  > > $ biospt <n>
>  > > 1 - Write some SMBIOS tables using MMAP
>  > > 2 - Write some SMBIOS tables using SYSFS
>  > > 3 - Write some ACPI tables using MMAP
>  > > 4 - Write some ACPI using SYSFS
>  > > 5 - Read and trace DMI files
>  > > 6 - Write out some test files
>  > >
>  > > ./biospt 6
>  > > Make SMBIOS file from FW.
>  > > Fail(1), errno: 2
>  >
>  > This is a rather rough test app for using the library. You should look
>  > closely at the code in it and figure out what it is doing. It does not
>  > have very robust error handling etc.
>  >
>  > Thanks
>  > Ross
>  >
>  > >
>  > >
>  > > -
>  > > Art
>  > >
>  > >
> ------------------------------------------------------------------------
>  > > *From:* Ross Philipson <ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>
>  > > *To:* xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>
>  > > *Cc:* Art Napor <artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>
>  > > *Sent:* Wednesday, March 20, 2013 4:08 PM
>  > > *Subject:* Re: HVM firmware passthrough - helper library
>  > >
>  > >
>  > > > Ross,
>  > > >
>  > > > Finally got back to this project to test out the helper lib using
>  > the v3
>  > > > hvm-firmware passthrough patches with Xen 4.2.1. When building from
>  > > > tools/firmware the build failed with the following output:
>  > > >
>  > > > make
>  > > > gcc -Wl,-soname -Wl,libxenhvm.so.1.0 -shared -o libxenhvm.so.1.0.0
>  > > > xenhvm.opic smbios_module.opic acpi_module.opic xh_internal.opic
>  > > >
>  > >
>  >
> /home/ajn131/rpmbuild/SOURCES/xen-4.2.1/tools/firmware/libhvm/../../../tools/xenstore/libxenstore.so
>  > > >
>  > > > xenhvm.opic: could not read symbols: File in wrong format
>  > > > collect2: ld returned 1 exit status
>  > > > make: *** [libxenhvm.so.1.0.0] Error 1
>  > > >
>  > > > I was hoping to integrate the build into the RPM. Any thoughts?
>  > Should I
>  > > > try it with the latest 4.3?
>  > > >
>  > > >
>  > > > Thanks Again,
>  > > >
>  > > > -
>  > > > Art
>  > >
>  > > Art,
>  > >
>  > > Can you try the attached tarball. A colleague found and fixed a couple
>  > > of issues in my sample including the face that it was including in the
>  > > wrong Rules.mk.
>  > >
>  > > Thanks
>  > > Ross
>  > >
>  > > >
>  > ------------------------------------------------------------------------
>  > > > *From:* Ross Philipson <Ross.Philipson@citrix.com
> <mailto:Ross.Philipson@citrix.com>
>  > <mailto:Ross.Philipson@citrix.com <mailto:Ross.Philipson@citrix.com>>
>  > > <mailto:Ross.Philipson@citrix.com
> <mailto:Ross.Philipson@citrix.com> <mailto:Ross.Philipson@citrix.com
> <mailto:Ross.Philipson@citrix.com>>>>
>  > > > *To:* "xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>
>  > > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>>" <xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>
>  > > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>>>
>  > > > *Cc:* "Art Napor (artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>  > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>)"
>  > > <artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>  > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>>
>  > > > *Sent:* Tuesday, January 8, 2013 5:04 PM
>  > > > *Subject:* HVM firmware passthrough - helper library
>  > > >
>  > > > Attached is a tarball with a helper library for reading host ACPI and
>  > > > SMBIOS firmware and creating firmware files that can be used with the
>  > > > HVM firmware passthrough patches I submitted. I used it in my
>  > testing of
>  > > > the patches and planned to use it later when we moved to a new Xen
>  > > > version. This library was requested by a few people - I hope you
>  > find it
>  > > > useful.
>  > > >
>  > > > Ross Philipson
>  > > > Senior Software Engineer
>  > > > Citrix Systems, Inc
>  > > > 14 Crosby Drive
>  > > > Bedford, MA 01730
>  > > > 781-301-7949
>  > > > ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>
>  > > <mailto:ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com> <mailto:ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com>>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>>
>  > > >
>  > >
>  > >
>  > >
>  > >
>  > >
>  >
>  >
>  >
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 21757 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: HVM firmware passthrough - helper library
  2013-04-23 22:06                 ` Art Napor
@ 2013-04-24 13:09                   ` Ross Philipson
  0 siblings, 0 replies; 18+ messages in thread
From: Ross Philipson @ 2013-04-24 13:09 UTC (permalink / raw)
  To: Art Napor; +Cc: xen-devel

On 04/23/2013 06:06 PM, Art Napor wrote:
> Could the biospt utility generate the ACPI table file even on systems
> without OEM/branding tables - /SLIC? I have a kludgy work around to
> mount overtop of /sys/firmware/acpi/tables/SLIC before running the
> utility for systems without, but was wondering if the utility could skip
> over SLIC for systems that don't have this table.
>

The utility can do whatever you want it to do - is really is just sample 
code. I wrote it to test the code I was submitting and I just happened 
to pick the SLIC table to snarf. Please feel free to modify it in any 
way you see fit, the library itself lets you specify what tables you 
want to grab.

Ross

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: HVM firmware passthrough - helper library
  2013-04-02 21:15               ` Ross Philipson
  2013-04-23 22:06                 ` Art Napor
@ 2013-09-12 19:29                 ` Art Napor
  2013-09-13 13:25                   ` Ross Philipson
  1 sibling, 1 reply; 18+ messages in thread
From: Art Napor @ 2013-09-12 19:29 UTC (permalink / raw)
  To: Ross Philipson; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 10169 bytes --]

Ross,

Did this make it into 4.3? I was going to try it on the 4.2.3 with the latest patches. 




________________________________
 From: Ross Philipson <ross.philipson@citrix.com>
To: Art Napor <artnapor@yahoo.com> 
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com> 
Sent: Tuesday, April 2, 2013 5:15 PM
Subject: Re: HVM firmware passthrough - helper library
 

On 04/01/2013 11:19 PM, Art Napor wrote:
> Looks like they're where they're supposed to be, but no SLIC.

Right well there is nothing that mandates it be there. It is an OEM 
platform license.

>
> ls /sys/firmware/acpi/tables/
> APIC ASF! DSDT dynamic FACP FACS HPET MCFG SSDT1 SSDT2 XMAR
>
> hexdump -C < /sys/firmware/acpi/tables/XMAR
> 00000000 58 4d 41 52 e8 00 00 00 01 f9 49 4e 54 45 4c 20 |XMAR......INTEL |
> 00000010 53 4e 42 20 00 00 00 00 01 00 00 00 49 4e 54 4c |SNB ........INTL|
> 00000020 01 00 00 00 23 01 00 00 00 00 00 00 00 00 00 00 |....#...........|
> 00000030 00 00 18 00 00 00 00 00 00 00 d9 fe 00 00 00 00 |................|
> 00000040 01 08 00 00 00 00 02 00 00 00 58 00 01 00 00 00 |..........X.....|
> 00000050 00 10 d9 fe 00 00 00 00 03 08 00 00 02 f0 1f 00 |................|
> 00000060 04 08 00 00 00 f0 0f 00 04 08 00 00 00 f0 0f 01 |................|
> 00000070 04 08 00 00 00 f0 0f 02 04 08 00 00 00 f0 0f 03 |................|
> 00000080 04 08 00 00 00 f0 0f 04 04 08 00 00 00 f0 0f 05 |................|
> 00000090 04 08 00 00 00 f0 0f 06 04 08 00 00 00 f0 0f 07 |................|
> 000000a0 01 00 28 00 00 00 00 00 00 30 d4 da 00 00 00 00 |..(......0......|
> 000000b0 ff 1f d5 da 00 00 00 00 01 08 00 00 00 00 1d 00 |................|
> 000000c0 01 08 00 00 00 00 1a 00 01 00 20 00 00 00 00 00 |.......... .....|
> 000000d0 00 00 80 db 00 00 00 00 ff ff 9f df 00 00 00 00 |................|
> 000000e0 01 08 00 00 00 00 02 00 |........|
> 000000e8
>
> ------------------------------------------------------------------------
> *From:* Ross Philipson <ross.philipson@citrix.com>
> *To:* Art Napor <artnapor@yahoo.com>
> *Cc:* "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
> *Sent:* Monday, April 1, 2013 6:04 PM
> *Subject:* Re: HVM firmware passthrough - helper library
>
> On 03/27/2013 12:50 AM, Art Napor wrote:
>  > Works great with the updated libxl commits - thanks.
>  >
>  > > ./biospt 6
>  > > Make SMBIOS file from FW.
>  > > Fail(1), errno: 2
>  >
>  > Looks like this does require the sysfs-dmi kmod to expose the dmi
>  > structure for the utility to write out the smbios_fw.bin.
>  >
>  > # ./biospt 6
>  > Make SMBIOS file from FW.
>  > Make SMBIOS Xen vendor struct.
>  > Wrote SMBIOS structures file: smbios_fw.bin count: 8
>  > Make ACPI SLIC file from FW.
>  > Fail(3), errno: 2
>  >
>  > Do the ACPI tables require the same exposure via sysfs? Not sure if this
>  > changes from 2.6 to 3.x kernels. The biospt utility can dump the ACPI
>  > tables using the MMAP option, but not via sysfs on a 3.4.32 system.
>
> They are in the same place on my wheezy with 3.2.x kernel. I would be
> pretty surprised if they moved. Can you go in to
> /sys/firmware/acpi/tables and see what's there? Maybe try a hexdump -C <
> SLIC ...
>
>  >
>  >
>  > Thanks,
>  > Art
>  >
>  >
>  > ------------------------------------------------------------------------
>  > *From:* Ross Philipson <ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com>>
>  > *To:* Art Napor <artnapor@yahoo.com <mailto:artnapor@yahoo.com>>;
> "xen-devel@lists.xensource.com <mailto:xen-devel@lists.xensource.com>"
>  > <xen-devel@lists.xensource.com <mailto:xen-devel@lists.xensource.com>>
>  > *Sent:* Sunday, March 24, 2013 5:10 PM
>  > *Subject:* Re: HVM firmware passthrough - helper library
>  >
>  > On 03/21/2013 03:42 PM, Art Napor wrote:
>  > > Ross,
>  > >
>  > > I rebuilt Xen 4.2.1 with the V5 patch series and the updated helper
>  > > library. The biospt utility built cleanly and runs on Dom0 with the
>  > > aformentioned libraries in place. However, I'm not seeing the SMBIOS
>  > > strings passed through to the DomU (A Centos 5 VM). Options 1 and 3
>  > > using the biostpt utility appear to dump the SMBIOS and ACPI
> tables, but
>  > > I'm not sure how to pass the tables in to the VM?
>  >
>  > Look at the related commits to libxl. After the firmware chunks are
>  > given to libxc to load into the new domain, the addresses are returned
>  > to libxl which writes them to xenstore.
>  >
>  > >
>  > > [root@localhost biospt]# ./biospt
>  > > Usage:
>  > > $ biospt <n>
>  > > 1 - Write some SMBIOS tables using MMAP
>  > > 2 - Write some SMBIOS tables using SYSFS
>  > > 3 - Write some ACPI tables using MMAP
>  > > 4 - Write some ACPI using SYSFS
>  > > 5 - Read and trace DMI files
>  > > 6 - Write out some test files
>  > >
>  > > ./biospt 6
>  > > Make SMBIOS file from FW.
>  > > Fail(1), errno: 2
>  >
>  > This is a rather rough test app for using the library. You should look
>  > closely at the code in it and figure out what it is doing. It does not
>  > have very robust error handling etc.
>  >
>  > Thanks
>  > Ross
>  >
>  > >
>  > >
>  > > -
>  > > Art
>  > >
>  > >
> ------------------------------------------------------------------------
>  > > *From:* Ross Philipson <ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>
>  > > *To:* xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>
>  > > *Cc:* Art Napor <artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>
>  > > *Sent:* Wednesday, March 20, 2013 4:08 PM
>  > > *Subject:* Re: HVM firmware passthrough - helper library
>  > >
>  > >
>  > > > Ross,
>  > > >
>  > > > Finally got back to this project to test out the helper lib using
>  > the v3
>  > > > hvm-firmware passthrough patches with Xen 4.2.1. When building from
>  > > > tools/firmware the build failed with the following output:
>  > > >
>  > > > make
>  > > > gcc -Wl,-soname -Wl,libxenhvm.so.1.0 -shared -o libxenhvm.so.1.0.0
>  > > > xenhvm.opic smbios_module.opic acpi_module.opic xh_internal.opic
>  > > >
>  > >
>  >
> /home/ajn131/rpmbuild/SOURCES/xen-4.2.1/tools/firmware/libhvm/../../../tools/xenstore/libxenstore.so
>  > > >
>  > > > xenhvm.opic: could not read symbols: File in wrong format
>  > > > collect2: ld returned 1 exit status
>  > > > make: *** [libxenhvm.so.1.0.0] Error 1
>  > > >
>  > > > I was hoping to integrate the build into the RPM. Any thoughts?
>  > Should I
>  > > > try it with the latest 4.3?
>  > > >
>  > > >
>  > > > Thanks Again,
>  > > >
>  > > > -
>  > > > Art
>  > >
>  > > Art,
>  > >
>  > > Can you try the attached tarball. A colleague found and fixed a couple
>  > > of issues in my sample including the face that it was including in the
>  > > wrong Rules.mk.
>  > >
>  > > Thanks
>  > > Ross
>  > >
>  > > >
>  > ------------------------------------------------------------------------
>  > > > *From:* Ross Philipson <Ross.Philipson@citrix.com
> <mailto:Ross.Philipson@citrix.com>
>  > <mailto:Ross.Philipson@citrix.com <mailto:Ross.Philipson@citrix.com>>
>  > > <mailto:Ross.Philipson@citrix.com
> <mailto:Ross.Philipson@citrix.com> <mailto:Ross.Philipson@citrix.com
> <mailto:Ross.Philipson@citrix.com>>>>
>  > > > *To:* "xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>
>  > > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>>" <xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>
>  > > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>>>
>  > > > *Cc:* "Art Napor (artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>  > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>)"
>  > > <artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>  > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>>
>  > > > *Sent:* Tuesday, January 8, 2013 5:04 PM
>  > > > *Subject:* HVM firmware passthrough - helper library
>  > > >
>  > > > Attached is a tarball with a helper library for reading host ACPI and
>  > > > SMBIOS firmware and creating firmware files that can be used with the
>  > > > HVM firmware passthrough patches I submitted. I used it in my
>  > testing of
>  > > > the patches and planned to use it later when we moved to a new Xen
>  > > > version. This library was requested by a few people - I hope you
>  > find it
>  > > > useful.
>  > > >
>  > > > Ross Philipson
>  > > > Senior Software Engineer
>  > > > Citrix Systems, Inc
>  > > > 14 Crosby Drive
>  > > > Bedford, MA 01730
>  > > > 781-301-7949
>  > > > ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>
>  > > <mailto:ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com> <mailto:ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com>>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>>
>  > > >
>  > >
>  > >
>  > >
>  > >
>  > >
>  >
>  >
>  >
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 21526 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: HVM firmware passthrough - helper library
  2013-09-12 19:29                 ` Art Napor
@ 2013-09-13 13:25                   ` Ross Philipson
  2013-09-14 13:45                     ` Andrew Bobulsky
  0 siblings, 1 reply; 18+ messages in thread
From: Ross Philipson @ 2013-09-13 13:25 UTC (permalink / raw)
  To: Art Napor; +Cc: xen-devel

On 09/12/2013 03:29 PM, Art Napor wrote:
> Ross,
>
> Did this make it into 4.3? I was going to try it on the 4.2.3 with the
> latest patches.

No, I don't believe the patches made it into 4.3.

Ross

>
>
> ------------------------------------------------------------------------
> *From:* Ross Philipson <ross.philipson@citrix.com>
> *To:* Art Napor <artnapor@yahoo.com>
> *Cc:* "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
> *Sent:* Tuesday, April 2, 2013 5:15 PM
> *Subject:* Re: HVM firmware passthrough - helper library
>
> On 04/01/2013 11:19 PM, Art Napor wrote:
>  > Looks like they're where they're supposed to be, but no SLIC.
>
> Right well there is nothing that mandates it be there. It is an OEM
> platform license.
>
>  >
>  > ls /sys/firmware/acpi/tables/
>  > APIC ASF! DSDT dynamic FACP FACS HPET MCFG SSDT1 SSDT2 XMAR
>  >
>  > hexdump -C < /sys/firmware/acpi/tables/XMAR
>  > 00000000 58 4d 41 52 e8 00 00 00 01 f9 49 4e 54 45 4c 20
> |XMAR......INTEL |
>  > 00000010 53 4e 42 20 00 00 00 00 01 00 00 00 49 4e 54 4c |SNB
> ........INTL|
>  > 00000020 01 00 00 00 23 01 00 00 00 00 00 00 00 00 00 00
> |....#...........|
>  > 00000030 00 00 18 00 00 00 00 00 00 00 d9 fe 00 00 00 00
> |................|
>  > 00000040 01 08 00 00 00 00 02 00 00 00 58 00 01 00 00 00
> |..........X.....|
>  > 00000050 00 10 d9 fe 00 00 00 00 03 08 00 00 02 f0 1f 00
> |................|
>  > 00000060 04 08 00 00 00 f0 0f 00 04 08 00 00 00 f0 0f 01
> |................|
>  > 00000070 04 08 00 00 00 f0 0f 02 04 08 00 00 00 f0 0f 03
> |................|
>  > 00000080 04 08 00 00 00 f0 0f 04 04 08 00 00 00 f0 0f 05
> |................|
>  > 00000090 04 08 00 00 00 f0 0f 06 04 08 00 00 00 f0 0f 07
> |................|
>  > 000000a0 01 00 28 00 00 00 00 00 00 30 d4 da 00 00 00 00
> |..(......0......|
>  > 000000b0 ff 1f d5 da 00 00 00 00 01 08 00 00 00 00 1d 00
> |................|
>  > 000000c0 01 08 00 00 00 00 1a 00 01 00 20 00 00 00 00 00 |..........
> .....|
>  > 000000d0 00 00 80 db 00 00 00 00 ff ff 9f df 00 00 00 00
> |................|
>  > 000000e0 01 08 00 00 00 00 02 00 |........|
>  > 000000e8
>  >
>  > ------------------------------------------------------------------------
>  > *From:* Ross Philipson <ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com>>
>  > *To:* Art Napor <artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>  > *Cc:* "xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>" <xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>
>  > *Sent:* Monday, April 1, 2013 6:04 PM
>  > *Subject:* Re: HVM firmware passthrough - helper library
>  >
>  > On 03/27/2013 12:50 AM, Art Napor wrote:
>  > > Works great with the updated libxl commits - thanks.
>  > >
>  > > > ./biospt 6
>  > > > Make SMBIOS file from FW.
>  > > > Fail(1), errno: 2
>  > >
>  > > Looks like this does require the sysfs-dmi kmod to expose the dmi
>  > > structure for the utility to write out the smbios_fw.bin.
>  > >
>  > > # ./biospt 6
>  > > Make SMBIOS file from FW.
>  > > Make SMBIOS Xen vendor struct.
>  > > Wrote SMBIOS structures file: smbios_fw.bin count: 8
>  > > Make ACPI SLIC file from FW.
>  > > Fail(3), errno: 2
>  > >
>  > > Do the ACPI tables require the same exposure via sysfs? Not sure if
> this
>  > > changes from 2.6 to 3.x kernels. The biospt utility can dump the ACPI
>  > > tables using the MMAP option, but not via sysfs on a 3.4.32 system.
>  >
>  > They are in the same place on my wheezy with 3.2.x kernel. I would be
>  > pretty surprised if they moved. Can you go in to
>  > /sys/firmware/acpi/tables and see what's there? Maybe try a hexdump -C <
>  > SLIC ...
>  >
>  > >
>  > >
>  > > Thanks,
>  > > Art
>  > >
>  > >
>  > >
> ------------------------------------------------------------------------
>  > > *From:* Ross Philipson <ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>
>  > > *To:* Art Napor <artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>;
>  > "xen-devel@lists.xensource.com <mailto:xen-devel@lists.xensource.com>
> <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>"
>  > > <xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
> <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>>
>  > > *Sent:* Sunday, March 24, 2013 5:10 PM
>  > > *Subject:* Re: HVM firmware passthrough - helper library
>  > >
>  > > On 03/21/2013 03:42 PM, Art Napor wrote:
>  > > > Ross,
>  > > >
>  > > > I rebuilt Xen 4.2.1 with the V5 patch series and the updated helper
>  > > > library. The biospt utility built cleanly and runs on Dom0 with the
>  > > > aformentioned libraries in place. However, I'm not seeing the SMBIOS
>  > > > strings passed through to the DomU (A Centos 5 VM). Options 1 and 3
>  > > > using the biostpt utility appear to dump the SMBIOS and ACPI
>  > tables, but
>  > > > I'm not sure how to pass the tables in to the VM?
>  > >
>  > > Look at the related commits to libxl. After the firmware chunks are
>  > > given to libxc to load into the new domain, the addresses are returned
>  > > to libxl which writes them to xenstore.
>  > >
>  > > >
>  > > > [root@localhost <mailto:root@localhost> biospt]# ./biospt
>  > > > Usage:
>  > > > $ biospt <n>
>  > > > 1 - Write some SMBIOS tables using MMAP
>  > > > 2 - Write some SMBIOS tables using SYSFS
>  > > > 3 - Write some ACPI tables using MMAP
>  > > > 4 - Write some ACPI using SYSFS
>  > > > 5 - Read and trace DMI files
>  > > > 6 - Write out some test files
>  > > >
>  > > > ./biospt 6
>  > > > Make SMBIOS file from FW.
>  > > > Fail(1), errno: 2
>  > >
>  > > This is a rather rough test app for using the library. You should look
>  > > closely at the code in it and figure out what it is doing. It does not
>  > > have very robust error handling etc.
>  > >
>  > > Thanks
>  > > Ross
>  > >
>  > > >
>  > > >
>  > > > -
>  > > > Art
>  > > >
>  > > >
>  > ------------------------------------------------------------------------
>  > > > *From:* Ross Philipson <ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>
>  > > <mailto:ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com> <mailto:ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com>>>>
>  > > > *To:* xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>
>  > > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>>
>  > > > *Cc:* Art Napor <artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>  > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>>
>  > > > *Sent:* Wednesday, March 20, 2013 4:08 PM
>  > > > *Subject:* Re: HVM firmware passthrough - helper library
>  > > >
>  > > >
>  > > > > Ross,
>  > > > >
>  > > > > Finally got back to this project to test out the helper lib using
>  > > the v3
>  > > > > hvm-firmware passthrough patches with Xen 4.2.1. When building from
>  > > > > tools/firmware the build failed with the following output:
>  > > > >
>  > > > > make
>  > > > > gcc -Wl,-soname -Wl,libxenhvm.so.1.0 -shared -o libxenhvm.so.1.0.0
>  > > > > xenhvm.opic smbios_module.opic acpi_module.opic xh_internal.opic
>  > > > >
>  > > >
>  > >
>  >
> /home/ajn131/rpmbuild/SOURCES/xen-4.2.1/tools/firmware/libhvm/../../../tools/xenstore/libxenstore.so
>  > > > >
>  > > > > xenhvm.opic: could not read symbols: File in wrong format
>  > > > > collect2: ld returned 1 exit status
>  > > > > make: *** [libxenhvm.so.1.0.0] Error 1
>  > > > >
>  > > > > I was hoping to integrate the build into the RPM. Any thoughts?
>  > > Should I
>  > > > > try it with the latest 4.3?
>  > > > >
>  > > > >
>  > > > > Thanks Again,
>  > > > >
>  > > > > -
>  > > > > Art
>  > > >
>  > > > Art,
>  > > >
>  > > > Can you try the attached tarball. A colleague found and fixed a
> couple
>  > > > of issues in my sample including the face that it was including
> in the
>  > > > wrong Rules.mk.
>  > > >
>  > > > Thanks
>  > > > Ross
>  > > >
>  > > > >
>  > >
> ------------------------------------------------------------------------
>  > > > > *From:* Ross Philipson <Ross.Philipson@citrix.com
> <mailto:Ross.Philipson@citrix.com>
>  > <mailto:Ross.Philipson@citrix.com <mailto:Ross.Philipson@citrix.com>>
>  > > <mailto:Ross.Philipson@citrix.com
> <mailto:Ross.Philipson@citrix.com> <mailto:Ross.Philipson@citrix.com
> <mailto:Ross.Philipson@citrix.com>>>
>  > > > <mailto:Ross.Philipson@citrix.com <mailto:Ross.Philipson@citrix.com>
>  > <mailto:Ross.Philipson@citrix.com <mailto:Ross.Philipson@citrix.com>>
> <mailto:Ross.Philipson@citrix.com <mailto:Ross.Philipson@citrix.com>
>  > <mailto:Ross.Philipson@citrix.com <mailto:Ross.Philipson@citrix.com>>>>>
>  > > > > *To:* "xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>
>  > > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>>
>  > > > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>
>  > > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>>>"
> <xen-devel@lists.xensource.com <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>
>  > > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>>
>  > > > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>
>  > > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>
>  > <mailto:xen-devel@lists.xensource.com
> <mailto:xen-devel@lists.xensource.com>>>>>
>  > > > > *Cc:* "Art Napor (artnapor@yahoo.com
> <mailto:artnapor@yahoo.com> <mailto:artnapor@yahoo.com
> <mailto:artnapor@yahoo.com>>
>  > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>
>  > > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>  > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>>)"
>  > > > <artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>  > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>
>  > > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>  > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>>>
>  > > > > *Sent:* Tuesday, January 8, 2013 5:04 PM
>  > > > > *Subject:* HVM firmware passthrough - helper library
>  > > > >
>  > > > > Attached is a tarball with a helper library for reading host
> ACPI and
>  > > > > SMBIOS firmware and creating firmware files that can be used
> with the
>  > > > > HVM firmware passthrough patches I submitted. I used it in my
>  > > testing of
>  > > > > the patches and planned to use it later when we moved to a new Xen
>  > > > > version. This library was requested by a few people - I hope you
>  > > find it
>  > > > > useful.
>  > > > >
>  > > > > Ross Philipson
>  > > > > Senior Software Engineer
>  > > > > Citrix Systems, Inc
>  > > > > 14 Crosby Drive
>  > > > > Bedford, MA 01730
>  > > > > 781-301-7949
>  > > > > ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>
>  > > <mailto:ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com> <mailto:ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com>>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>>
>  > > > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>
>  > > <mailto:ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com> <mailto:ross.philipson@citrix.com
> <mailto:ross.philipson@citrix.com>>
>  > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>>>
>  > > > >
>  > > >
>  > > >
>  > > >
>  > > >
>  > > >
>  > >
>  > >
>  > >
>  >
>  >
>  >
>
>
>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: HVM firmware passthrough - helper library
  2013-09-13 13:25                   ` Ross Philipson
@ 2013-09-14 13:45                     ` Andrew Bobulsky
  0 siblings, 0 replies; 18+ messages in thread
From: Andrew Bobulsky @ 2013-09-14 13:45 UTC (permalink / raw)
  To: Ross Philipson; +Cc: Art Napor, xen-devel

On Sep 13, 2013, at 9:28 AM, Ross Philipson <ross.philipson@citrix.com> wrote:

> On 09/12/2013 03:29 PM, Art Napor wrote:
>> Ross,
>>
>> Did this make it into 4.3? I was going to try it on the 4.2.3 with the
>> latest patches.
>
> No, I don't believe the patches made it into 4.3.
>
> Ross

Hello Art, Ross,

The patch[es] mentioned here are to facilitate exposing BIOS SLICs to
an HVM, right?  I was curious about doing this some time back but
never got far enough along to try it.

Being able to expose a SLIC through a config file option would be a
very slick way to shim Xen in between Windows and system firmware on a
VT-d capable laptop, among other things.

Just adding in my two cents to show some desire for the feature!

Cheers,
Andrew Bobulsky




>>
>>
>> ------------------------------------------------------------------------
>> *From:* Ross Philipson <ross.philipson@citrix.com>
>> *To:* Art Napor <artnapor@yahoo.com>
>> *Cc:* "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
>> *Sent:* Tuesday, April 2, 2013 5:15 PM
>> *Subject:* Re: HVM firmware passthrough - helper library
>>
>> On 04/01/2013 11:19 PM, Art Napor wrote:
>> > Looks like they're where they're supposed to be, but no SLIC.
>>
>> Right well there is nothing that mandates it be there. It is an OEM
>> platform license.
>>
>> >
>> > ls /sys/firmware/acpi/tables/
>> > APIC ASF! DSDT dynamic FACP FACS HPET MCFG SSDT1 SSDT2 XMAR
>> >
>> > hexdump -C < /sys/firmware/acpi/tables/XMAR
>> > 00000000 58 4d 41 52 e8 00 00 00 01 f9 49 4e 54 45 4c 20
>> |XMAR......INTEL |
>> > 00000010 53 4e 42 20 00 00 00 00 01 00 00 00 49 4e 54 4c |SNB
>> ........INTL|
>> > 00000020 01 00 00 00 23 01 00 00 00 00 00 00 00 00 00 00
>> |....#...........|
>> > 00000030 00 00 18 00 00 00 00 00 00 00 d9 fe 00 00 00 00
>> |................|
>> > 00000040 01 08 00 00 00 00 02 00 00 00 58 00 01 00 00 00
>> |..........X.....|
>> > 00000050 00 10 d9 fe 00 00 00 00 03 08 00 00 02 f0 1f 00
>> |................|
>> > 00000060 04 08 00 00 00 f0 0f 00 04 08 00 00 00 f0 0f 01
>> |................|
>> > 00000070 04 08 00 00 00 f0 0f 02 04 08 00 00 00 f0 0f 03
>> |................|
>> > 00000080 04 08 00 00 00 f0 0f 04 04 08 00 00 00 f0 0f 05
>> |................|
>> > 00000090 04 08 00 00 00 f0 0f 06 04 08 00 00 00 f0 0f 07
>> |................|
>> > 000000a0 01 00 28 00 00 00 00 00 00 30 d4 da 00 00 00 00
>> |..(......0......|
>> > 000000b0 ff 1f d5 da 00 00 00 00 01 08 00 00 00 00 1d 00
>> |................|
>> > 000000c0 01 08 00 00 00 00 1a 00 01 00 20 00 00 00 00 00 |..........
>> .....|
>> > 000000d0 00 00 80 db 00 00 00 00 ff ff 9f df 00 00 00 00
>> |................|
>> > 000000e0 01 08 00 00 00 00 02 00 |........|
>> > 000000e8
>> >
>> > ------------------------------------------------------------------------
>> > *From:* Ross Philipson <ross.philipson@citrix.com
>> <mailto:ross.philipson@citrix.com>>
>> > *To:* Art Napor <artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>> > *Cc:* "xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>" <xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>>
>> > *Sent:* Monday, April 1, 2013 6:04 PM
>> > *Subject:* Re: HVM firmware passthrough - helper library
>> >
>> > On 03/27/2013 12:50 AM, Art Napor wrote:
>> > > Works great with the updated libxl commits - thanks.
>> > >
>> > > > ./biospt 6
>> > > > Make SMBIOS file from FW.
>> > > > Fail(1), errno: 2
>> > >
>> > > Looks like this does require the sysfs-dmi kmod to expose the dmi
>> > > structure for the utility to write out the smbios_fw.bin.
>> > >
>> > > # ./biospt 6
>> > > Make SMBIOS file from FW.
>> > > Make SMBIOS Xen vendor struct.
>> > > Wrote SMBIOS structures file: smbios_fw.bin count: 8
>> > > Make ACPI SLIC file from FW.
>> > > Fail(3), errno: 2
>> > >
>> > > Do the ACPI tables require the same exposure via sysfs? Not sure if
>> this
>> > > changes from 2.6 to 3.x kernels. The biospt utility can dump the ACPI
>> > > tables using the MMAP option, but not via sysfs on a 3.4.32 system.
>> >
>> > They are in the same place on my wheezy with 3.2.x kernel. I would be
>> > pretty surprised if they moved. Can you go in to
>> > /sys/firmware/acpi/tables and see what's there? Maybe try a hexdump -C <
>> > SLIC ...
>> >
>> > >
>> > >
>> > > Thanks,
>> > > Art
>> > >
>> > >
>> > >
>> ------------------------------------------------------------------------
>> > > *From:* Ross Philipson <ross.philipson@citrix.com
>> <mailto:ross.philipson@citrix.com>
>> > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>
>> > > *To:* Art Napor <artnapor@yahoo.com <mailto:artnapor@yahoo.com>
>> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>;
>> > "xen-devel@lists.xensource.com <mailto:xen-devel@lists.xensource.com>
>> <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>>"
>> > > <xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>
>> <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>>>
>> > > *Sent:* Sunday, March 24, 2013 5:10 PM
>> > > *Subject:* Re: HVM firmware passthrough - helper library
>> > >
>> > > On 03/21/2013 03:42 PM, Art Napor wrote:
>> > > > Ross,
>> > > >
>> > > > I rebuilt Xen 4.2.1 with the V5 patch series and the updated helper
>> > > > library. The biospt utility built cleanly and runs on Dom0 with the
>> > > > aformentioned libraries in place. However, I'm not seeing the SMBIOS
>> > > > strings passed through to the DomU (A Centos 5 VM). Options 1 and 3
>> > > > using the biostpt utility appear to dump the SMBIOS and ACPI
>> > tables, but
>> > > > I'm not sure how to pass the tables in to the VM?
>> > >
>> > > Look at the related commits to libxl. After the firmware chunks are
>> > > given to libxc to load into the new domain, the addresses are returned
>> > > to libxl which writes them to xenstore.
>> > >
>> > > >
>> > > > [root@localhost <mailto:root@localhost> biospt]# ./biospt
>> > > > Usage:
>> > > > $ biospt <n>
>> > > > 1 - Write some SMBIOS tables using MMAP
>> > > > 2 - Write some SMBIOS tables using SYSFS
>> > > > 3 - Write some ACPI tables using MMAP
>> > > > 4 - Write some ACPI using SYSFS
>> > > > 5 - Read and trace DMI files
>> > > > 6 - Write out some test files
>> > > >
>> > > > ./biospt 6
>> > > > Make SMBIOS file from FW.
>> > > > Fail(1), errno: 2
>> > >
>> > > This is a rather rough test app for using the library. You should look
>> > > closely at the code in it and figure out what it is doing. It does not
>> > > have very robust error handling etc.
>> > >
>> > > Thanks
>> > > Ross
>> > >
>> > > >
>> > > >
>> > > > -
>> > > > Art
>> > > >
>> > > >
>> > ------------------------------------------------------------------------
>> > > > *From:* Ross Philipson <ross.philipson@citrix.com
>> <mailto:ross.philipson@citrix.com>
>> > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>
>> > > <mailto:ross.philipson@citrix.com
>> <mailto:ross.philipson@citrix.com> <mailto:ross.philipson@citrix.com
>> <mailto:ross.philipson@citrix.com>>>>
>> > > > *To:* xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>
>> > <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>>
>> > > <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>
>> > <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>>>
>> > > > *Cc:* Art Napor <artnapor@yahoo.com <mailto:artnapor@yahoo.com>
>> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>> > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
>> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>>
>> > > > *Sent:* Wednesday, March 20, 2013 4:08 PM
>> > > > *Subject:* Re: HVM firmware passthrough - helper library
>> > > >
>> > > >
>> > > > > Ross,
>> > > > >
>> > > > > Finally got back to this project to test out the helper lib using
>> > > the v3
>> > > > > hvm-firmware passthrough patches with Xen 4.2.1. When building from
>> > > > > tools/firmware the build failed with the following output:
>> > > > >
>> > > > > make
>> > > > > gcc -Wl,-soname -Wl,libxenhvm.so.1.0 -shared -o libxenhvm.so.1.0.0
>> > > > > xenhvm.opic smbios_module.opic acpi_module.opic xh_internal.opic
>> > > > >
>> > > >
>> > >
>> >
>> /home/ajn131/rpmbuild/SOURCES/xen-4.2.1/tools/firmware/libhvm/../../../tools/xenstore/libxenstore.so
>> > > > >
>> > > > > xenhvm.opic: could not read symbols: File in wrong format
>> > > > > collect2: ld returned 1 exit status
>> > > > > make: *** [libxenhvm.so.1.0.0] Error 1
>> > > > >
>> > > > > I was hoping to integrate the build into the RPM. Any thoughts?
>> > > Should I
>> > > > > try it with the latest 4.3?
>> > > > >
>> > > > >
>> > > > > Thanks Again,
>> > > > >
>> > > > > -
>> > > > > Art
>> > > >
>> > > > Art,
>> > > >
>> > > > Can you try the attached tarball. A colleague found and fixed a
>> couple
>> > > > of issues in my sample including the face that it was including
>> in the
>> > > > wrong Rules.mk.
>> > > >
>> > > > Thanks
>> > > > Ross
>> > > >
>> > > > >
>> > >
>> ------------------------------------------------------------------------
>> > > > > *From:* Ross Philipson <Ross.Philipson@citrix.com
>> <mailto:Ross.Philipson@citrix.com>
>> > <mailto:Ross.Philipson@citrix.com <mailto:Ross.Philipson@citrix.com>>
>> > > <mailto:Ross.Philipson@citrix.com
>> <mailto:Ross.Philipson@citrix.com> <mailto:Ross.Philipson@citrix.com
>> <mailto:Ross.Philipson@citrix.com>>>
>> > > > <mailto:Ross.Philipson@citrix.com <mailto:Ross.Philipson@citrix.com>
>> > <mailto:Ross.Philipson@citrix.com <mailto:Ross.Philipson@citrix.com>>
>> <mailto:Ross.Philipson@citrix.com <mailto:Ross.Philipson@citrix.com>
>> > <mailto:Ross.Philipson@citrix.com <mailto:Ross.Philipson@citrix.com>>>>>
>> > > > > *To:* "xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>
>> > <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>>
>> > > <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>
>> > <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>>>
>> > > > <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>
>> > <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>>
>> > > <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>
>> > <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>>>>"
>> <xen-devel@lists.xensource.com <mailto:xen-devel@lists.xensource.com>
>> > <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>>
>> > > <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>
>> > <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>>>
>> > > > <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>
>> > <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>>
>> > > <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>
>> > <mailto:xen-devel@lists.xensource.com
>> <mailto:xen-devel@lists.xensource.com>>>>>
>> > > > > *Cc:* "Art Napor (artnapor@yahoo.com
>> <mailto:artnapor@yahoo.com> <mailto:artnapor@yahoo.com
>> <mailto:artnapor@yahoo.com>>
>> > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
>> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>
>> > > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
>> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>> > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
>> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>>)"
>> > > > <artnapor@yahoo.com <mailto:artnapor@yahoo.com>
>> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>> > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
>> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>
>> > > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
>> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>
>> > <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>
>> <mailto:artnapor@yahoo.com <mailto:artnapor@yahoo.com>>>>>
>> > > > > *Sent:* Tuesday, January 8, 2013 5:04 PM
>> > > > > *Subject:* HVM firmware passthrough - helper library
>> > > > >
>> > > > > Attached is a tarball with a helper library for reading host
>> ACPI and
>> > > > > SMBIOS firmware and creating firmware files that can be used
>> with the
>> > > > > HVM firmware passthrough patches I submitted. I used it in my
>> > > testing of
>> > > > > the patches and planned to use it later when we moved to a new Xen
>> > > > > version. This library was requested by a few people - I hope you
>> > > find it
>> > > > > useful.
>> > > > >
>> > > > > Ross Philipson
>> > > > > Senior Software Engineer
>> > > > > Citrix Systems, Inc
>> > > > > 14 Crosby Drive
>> > > > > Bedford, MA 01730
>> > > > > 781-301-7949
>> > > > > ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
>> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>
>> > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
>> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>
>> > > <mailto:ross.philipson@citrix.com
>> <mailto:ross.philipson@citrix.com> <mailto:ross.philipson@citrix.com
>> <mailto:ross.philipson@citrix.com>>
>> > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
>> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>>
>> > > > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
>> > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>
>> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
>> > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>
>> > > <mailto:ross.philipson@citrix.com
>> <mailto:ross.philipson@citrix.com> <mailto:ross.philipson@citrix.com
>> <mailto:ross.philipson@citrix.com>>
>> > <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>
>> <mailto:ross.philipson@citrix.com <mailto:ross.philipson@citrix.com>>>>>
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > >
>> > >
>> > >
>> >
>> >
>> >
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-09-14 13:45 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-08 22:04 HVM firmware passthrough - helper library Ross Philipson
2013-01-09 10:44 ` Ian Campbell
2013-01-09 17:57   ` Ross Philipson
2013-02-01 20:26   ` Ross Philipson
2013-02-04 10:24     ` Ian Campbell
2013-02-04 18:42       ` Ross Philipson
     [not found] ` <1363806237.80975.YahooMailNeo@web161405.mail.bf1.yahoo.com>
2013-03-20 20:08   ` Ross Philipson
2013-03-21 19:42     ` Art Napor
2013-03-24 21:10       ` Ross Philipson
2013-03-27  4:50         ` Art Napor
2013-04-01 22:04           ` Ross Philipson
2013-04-02  3:19             ` Art Napor
2013-04-02 21:15               ` Ross Philipson
2013-04-23 22:06                 ` Art Napor
2013-04-24 13:09                   ` Ross Philipson
2013-09-12 19:29                 ` Art Napor
2013-09-13 13:25                   ` Ross Philipson
2013-09-14 13:45                     ` Andrew Bobulsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.