Initialize the device's dma_{mask,parms} pointers and the device's
dma_mask value before invoking device_register(). Address the
following trace with 5.17-rc7:
Using DMA_BIT_MASK(64) as an initializer for a global variable
causes problems with Clang 12.0.1. The compiler doesn't understand
that value 64 is excluded from the shift at compile time, resulting
in a build error.
While this is a compiler problem, avoid the issue by setting up
the dma_mask memory as part of struct hv_device, and initialize
it using dma_set_mask().
Reported-by: Nathan Chancellor <email address hidden>
Reported-by: Vitaly Chikunov <email address hidden>
Reported-by: Jakub Kicinski <email address hidden>
Fixes: 743b237c3a7b ("scsi: storvsc: Add Isolation VM support for storvsc driver")
Signed-off-by: Michael Kelley <email address hidden>
Reviewed-by: Nathan Chancellor <email address hidden>
Tested-by: Nathan Chancellor <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Wei Liu <email address hidden>
(cherry picked from commit 6bf625a4140f24b490766043b307f8252519578b)
Signed-off-by: Tim Gardner <email address hidden>
Acked-by: Philip Cox <email address hidden>
Acked-by: Cengiz Can <email address hidden>
Signed-off-by: Tim Gardner <email address hidden>
Adding comment to avoid the misusing of netvsc_xdp_xmit().
Otherwise the value of skb->queue_mapping could be 0 and
then the return value of skb_get_rx_queue() could be MAX_U16
cause by overflow.
Currently there are known potential issues for balloon and hot-add on
ARM64:
* Unballoon requests from Hyper-V should only unballoon ranges
that are guest page size aligned, otherwise guests cannot handle
because it's impossible to partially free a page. This is a
problem when guest page size > 4096 bytes.
* Memory hot-add requests from Hyper-V should provide the NUMA
node id of the added ranges or ARM64 should have a functional
memory_add_physaddr_to_nid(), otherwise the node id is missing
for add_memory().
These issues require discussions on design and implementation. In the
meanwhile, post_status() is working and essential to guest monitoring.
Therefore instead of disabling the entire hv_balloon driver, the
ballooning (when page size > 4096 bytes) and hot-add are disabled
accordingly for now. Once the issues are fixed, they can be re-enable in
these cases.
Signed-off-by: Boqun Feng <email address hidden>
Reviewed-by: Michael Kelley <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Wei Liu <email address hidden>
(cherry picked from commit be5802795cf8d0b881745fa9ba7790293b382280)
Signed-off-by: Tim Gardner <email address hidden>
Acked-by: Philip Cox <email address hidden>
Acked-by: Khaled Elmously <email address hidden>
Signed-off-by: Tim Gardner <email address hidden>