Commit 513072fb authored by John Fraker's avatar John Fraker Committed by Jakub Kicinski

gve: Add page size register to the register_page_list command.

This register is required on platforms with page sizes greater than 4k.
This is because the tx side of the driver vmaps the entire queue page
list of pages into a single flat address space, then uses the entire
space. Without communicating the guest page size to the backend, the
backend will only access the first 4k of each page in the queue page list.
Signed-off-by: default avatarJordan Kimbrough <jrkim@google.com>
Signed-off-by: default avatarJohn Fraker <jfraker@google.com>
Reviewed-by: default avatarWillem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20231128002648.320892-5-jfraker@google.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent ce260cb1
...@@ -917,6 +917,7 @@ int gve_adminq_register_page_list(struct gve_priv *priv, ...@@ -917,6 +917,7 @@ int gve_adminq_register_page_list(struct gve_priv *priv,
.page_list_id = cpu_to_be32(qpl->id), .page_list_id = cpu_to_be32(qpl->id),
.num_pages = cpu_to_be32(num_entries), .num_pages = cpu_to_be32(num_entries),
.page_address_list_addr = cpu_to_be64(page_list_bus), .page_address_list_addr = cpu_to_be64(page_list_bus),
.page_size = cpu_to_be64(PAGE_SIZE),
}; };
err = gve_adminq_execute_cmd(priv, &cmd); err = gve_adminq_execute_cmd(priv, &cmd);
......
...@@ -219,9 +219,10 @@ struct gve_adminq_register_page_list { ...@@ -219,9 +219,10 @@ struct gve_adminq_register_page_list {
__be32 page_list_id; __be32 page_list_id;
__be32 num_pages; __be32 num_pages;
__be64 page_address_list_addr; __be64 page_address_list_addr;
__be64 page_size;
}; };
static_assert(sizeof(struct gve_adminq_register_page_list) == 16); static_assert(sizeof(struct gve_adminq_register_page_list) == 24);
struct gve_adminq_unregister_page_list { struct gve_adminq_unregister_page_list {
__be32 page_list_id; __be32 page_list_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment