Re: [PATCH v10 16/19] KVM: xen: split up kvm_xen_set_evtchn_fast()

David Woodhouse
2023-12-14T14:20:47Z

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

On Thu, 2023-12-14 at 14:00 +0000, David Woodhouse wrote:
>
> > +       if (IS_ENABLED(CONFIG_64BIT) && kvm->arch.xen.long_mode) {
> > +               struct vcpu_info *vcpu_info = gpc->khva;
> > +               u32 port_word_bit = port / 32;
>
> Shouldn't that one be /64, and the compat one be /32?

I think the reason the test failed to spot this for you is because...

#define EVTCHN_TEST1 15
#define EVTCHN_TEST2 66
#define EVTCHN_TIMER 13

... it doesn't actually use any port numbers where the bit# differs for
32-bit vs. 64-bit.

If you change EVTCHN_TIMER to something like 50, I bet it'll fail (as
it should).

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5965 bytes --]