[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] iscsi_ibft: Fix finding the iBFT under Xen Dom 0



On 01.06.23 18:57, Dave Hansen wrote:
On 5/30/23 08:01, Ross Lagerwall wrote:
Since firmware doesn't indicate the iBFT in the E820, add a reserved
region so that it gets identity mapped when running as Dom 0 so that it
is possible to search for it. Move the call to reserve_ibft_region()
later so that it is called after the Xen identity mapping adjustments
are applied.

Finally, instead of using isa_bus_to_virt() which doesn't do the right
thing under Xen, use early_memremap() like the dmi_scan code does.

This is connecting Xen, iSCSI and x86.  Some background here would be
*really* nice for dummies like me that deal heavily in only one of those
three.

One or two sentences like this:

        Firmware can provide an iSCSI-specific table called the iBFT
        which helps the OS boot from iSCSI devices.

can go a long way for dummies like me.  As could some background about
why this:

        ... add a reserved region so that it gets identity mapped when
        running as Dom 0 so that it is possible to search for it.

These are all English words, but off the top of my head, I have no idea
why reserved regions get identity mapped when running as Dom 0 or why
that makes it possible to search.

The addresses and size here:

+#ifdef CONFIG_ISCSI_IBFT_FIND
+               /* Reserve 0.5 MiB to 1 MiB region so iBFT can be found */
+               xen_e820_table.entries[xen_e820_table.nr_entries].addr = 
0x80000;
+               xen_e820_table.entries[xen_e820_table.nr_entries].size = 
0x80000;
+               xen_e820_table.entries[xen_e820_table.nr_entries].type = 
E820_TYPE_RESERVED;
+               xen_e820_table.nr_entries++;
+#endif

also appear to be conjured out of thin air.

I'd suggest to move the definitions of IBFT_START and IBFT_END from
drivers/firmware/iscsi_ibft_find.c to include/linux/iscsi_ibft.h and use
them here.


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.