Messages in this thread | ![/](/images/icornerl.gif) | | From | Ankit Agrawal <> | Subject | Re: [PATCH v6 1/4] kvm: arm64: introduce new flag for non-cacheable IO memory | Date | Fri, 9 Feb 2024 14:10:51 +0000 |
| |
>> + default: >> + WARN_ON_ONCE(1); > > Return -EINVAL?
Sure.
>> > + case KVM_PGTABLE_PROT_NORMAL_NC: >> > + attr = KVM_S2_MEMATTR(pgt, NORMAL_NC); >> > + break; >> >> Does it make sense to allow executable here as well? I don't think it's >> harmful but not sure there's a use-case for it either. > > Ah, we should just return EINVAL for that too. > > I get that the memory attribute itself is not problematic, but since > we're only using this thing for MMIO it'd be a rather massive > bug in KVM... We reject attempts to do this earlier in user_mem_abort().
Ack, will change to test executable and return -EINVAL in that case.
| ![\](/images/icornerr.gif) |