Lines Matching defs:bytes

7345 static int kvm_read_guest_virt_helper(gva_t addr, void *val, unsigned int bytes,
7353 while (bytes) {
7356 unsigned toread = min(bytes, (unsigned)PAGE_SIZE - offset);
7368 bytes -= toread;
7378 gva_t addr, void *val, unsigned int bytes,
7394 if (WARN_ON(offset + bytes > PAGE_SIZE))
7395 bytes = (unsigned)PAGE_SIZE - offset;
7397 offset, bytes);
7405 gva_t addr, void *val, unsigned int bytes,
7417 return kvm_read_guest_virt_helper(addr, val, bytes, vcpu, access,
7423 gva_t addr, void *val, unsigned int bytes,
7434 return kvm_read_guest_virt_helper(addr, val, bytes, vcpu, access, exception);
7437 static int kvm_write_guest_virt_helper(gva_t addr, void *val, unsigned int bytes,
7445 while (bytes) {
7448 unsigned towrite = min(bytes, (unsigned)PAGE_SIZE - offset);
7459 bytes -= towrite;
7468 unsigned int bytes, struct x86_exception *exception,
7479 return kvm_write_guest_virt_helper(addr, val, bytes, vcpu,
7484 unsigned int bytes, struct x86_exception *exception)
7489 return kvm_write_guest_virt_helper(addr, val, bytes, vcpu,
7572 const void *val, int bytes)
7576 ret = kvm_vcpu_write_guest(vcpu, gpa, val, bytes);
7579 kvm_page_track_write(vcpu, gpa, val, bytes);
7585 int bytes);
7587 void *val, int bytes);
7589 int bytes, void *val);
7591 void *val, int bytes);
7595 static int read_prepare(struct kvm_vcpu *vcpu, void *val, int bytes)
7598 trace_kvm_mmio(KVM_TRACE_MMIO_READ, bytes,
7608 void *val, int bytes)
7610 return !kvm_vcpu_read_guest(vcpu, gpa, val, bytes);
7614 void *val, int bytes)
7616 return emulator_write_phys(vcpu, gpa, val, bytes);
7619 static int write_mmio(struct kvm_vcpu *vcpu, gpa_t gpa, int bytes, void *val)
7621 trace_kvm_mmio(KVM_TRACE_MMIO_WRITE, bytes, gpa, val);
7622 return vcpu_mmio_write(vcpu, gpa, bytes, val);
7626 void *val, int bytes)
7628 trace_kvm_mmio(KVM_TRACE_MMIO_READ_UNSATISFIED, bytes, gpa, NULL);
7633 void *val, int bytes)
7656 unsigned int bytes,
7684 if (!ret && ops->read_write_emulate(vcpu, gpa, val, bytes))
7690 handled = ops->read_write_mmio(vcpu, gpa, bytes, val);
7691 if (handled == bytes)
7695 bytes -= handled;
7702 frag->len = bytes;
7708 void *val, unsigned int bytes,
7717 ops->read_write_prepare(vcpu, val, bytes))
7723 if (((addr + bytes - 1) ^ addr) & PAGE_MASK) {
7736 bytes -= now;
7739 rc = emulator_read_write_onepage(addr, val, bytes, exception,
7757 return ops->read_write_exit_mmio(vcpu, gpa, val, bytes);
7763 unsigned int bytes,
7766 return emulator_read_write(ctxt, addr, val, bytes,
7773 unsigned int bytes,
7776 return emulator_read_write(ctxt, addr, (void *)val, bytes,
7787 unsigned int bytes,
7797 if (bytes > 8 || (bytes & (bytes - 1)))
7815 if (((gpa + bytes - 1) & page_line_mask) != (gpa & page_line_mask))
7824 switch (bytes) {
7846 kvm_page_track_write(vcpu, gpa, new, bytes);
7853 return emulator_write_emulated(ctxt, addr, new, bytes, exception);
13489 int kvm_sev_es_mmio_write(struct kvm_vcpu *vcpu, gpa_t gpa, unsigned int bytes,
13498 handled = write_emultor.read_write_mmio(vcpu, gpa, bytes, data);
13499 if (handled == bytes)
13502 bytes -= handled;
13509 frag->len = bytes;
13528 int kvm_sev_es_mmio_read(struct kvm_vcpu *vcpu, gpa_t gpa, unsigned int bytes,
13537 handled = read_emultor.read_write_mmio(vcpu, gpa, bytes, data);
13538 if (handled == bytes)
13541 bytes -= handled;
13548 frag->len = bytes;