we are doing a similar journey in November with the same issue Cunard has told us that we will be tested on board (for a fee) two days before the stop in Southampton.
But why not get off and see the area? Salisbury and Portsmouth are just a short distance away