Page MenuHomeFreeBSD

D37163.diff
No OneTemporary

D37163.diff

diff --git a/sys/amd64/vmm/io/vatpic.h b/sys/amd64/vmm/io/vatpic.h
--- a/sys/amd64/vmm/io/vatpic.h
+++ b/sys/amd64/vmm/io/vatpic.h
@@ -41,11 +41,11 @@
struct vatpic *vatpic_init(struct vm *vm);
void vatpic_cleanup(struct vatpic *vatpic);
-int vatpic_master_handler(struct vm *vm, int vcpuid, bool in, int port,
- int bytes, uint32_t *eax);
-int vatpic_slave_handler(struct vm *vm, int vcpuid, bool in, int port,
- int bytes, uint32_t *eax);
-int vatpic_elc_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
+int vatpic_master_handler(struct vm *vm, bool in, int port, int bytes,
+ uint32_t *eax);
+int vatpic_slave_handler(struct vm *vm, bool in, int port, int bytes,
+ uint32_t *eax);
+int vatpic_elc_handler(struct vm *vm, bool in, int port, int bytes,
uint32_t *eax);
int vatpic_assert_irq(struct vm *vm, int irq);
diff --git a/sys/amd64/vmm/io/vatpic.c b/sys/amd64/vmm/io/vatpic.c
--- a/sys/amd64/vmm/io/vatpic.c
+++ b/sys/amd64/vmm/io/vatpic.c
@@ -712,7 +712,7 @@
}
int
-vatpic_master_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
+vatpic_master_handler(struct vm *vm, bool in, int port, int bytes,
uint32_t *eax)
{
struct vatpic *vatpic;
@@ -732,7 +732,7 @@
}
int
-vatpic_slave_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
+vatpic_slave_handler(struct vm *vm, bool in, int port, int bytes,
uint32_t *eax)
{
struct vatpic *vatpic;
@@ -752,7 +752,7 @@
}
int
-vatpic_elc_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
+vatpic_elc_handler(struct vm *vm, bool in, int port, int bytes,
uint32_t *eax)
{
struct vatpic *vatpic;
diff --git a/sys/amd64/vmm/io/vatpit.h b/sys/amd64/vmm/io/vatpit.h
--- a/sys/amd64/vmm/io/vatpit.h
+++ b/sys/amd64/vmm/io/vatpit.h
@@ -41,10 +41,9 @@
struct vatpit *vatpit_init(struct vm *vm);
void vatpit_cleanup(struct vatpit *vatpit);
-int vatpit_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
+int vatpit_handler(struct vm *vm, bool in, int port, int bytes, uint32_t *eax);
+int vatpit_nmisc_handler(struct vm *vm, bool in, int port, int bytes,
uint32_t *eax);
-int vatpit_nmisc_handler(struct vm *vm, int vcpuid, bool in, int port,
- int bytes, uint32_t *eax);
#ifdef BHYVE_SNAPSHOT
int vatpit_snapshot(struct vatpit *vatpit, struct vm_snapshot_meta *meta);
#endif
diff --git a/sys/amd64/vmm/io/vatpit.c b/sys/amd64/vmm/io/vatpit.c
--- a/sys/amd64/vmm/io/vatpit.c
+++ b/sys/amd64/vmm/io/vatpit.c
@@ -336,8 +336,7 @@
}
int
-vatpit_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
- uint32_t *eax)
+vatpit_handler(struct vm *vm, bool in, int port, int bytes, uint32_t *eax)
{
struct vatpit *vatpit;
struct channel *c;
@@ -419,7 +418,7 @@
}
int
-vatpit_nmisc_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
+vatpit_nmisc_handler(struct vm *vm, bool in, int port, int bytes,
uint32_t *eax)
{
struct vatpit *vatpit;
diff --git a/sys/amd64/vmm/io/vpmtmr.h b/sys/amd64/vmm/io/vpmtmr.h
--- a/sys/amd64/vmm/io/vpmtmr.h
+++ b/sys/amd64/vmm/io/vpmtmr.h
@@ -39,8 +39,7 @@
struct vpmtmr *vpmtmr_init(struct vm *vm);
void vpmtmr_cleanup(struct vpmtmr *pmtmr);
-int vpmtmr_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
- uint32_t *val);
+int vpmtmr_handler(struct vm *vm, bool in, int port, int bytes, uint32_t *val);
#ifdef BHYVE_SNAPSHOT
int vpmtmr_snapshot(struct vpmtmr *vpmtmr, struct vm_snapshot_meta *meta);
diff --git a/sys/amd64/vmm/io/vpmtmr.c b/sys/amd64/vmm/io/vpmtmr.c
--- a/sys/amd64/vmm/io/vpmtmr.c
+++ b/sys/amd64/vmm/io/vpmtmr.c
@@ -83,8 +83,7 @@
}
int
-vpmtmr_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
- uint32_t *val)
+vpmtmr_handler(struct vm *vm, bool in, int port, int bytes, uint32_t *val)
{
struct vpmtmr *vpmtmr;
sbintime_t now, delta;
diff --git a/sys/amd64/vmm/io/vrtc.h b/sys/amd64/vmm/io/vrtc.h
--- a/sys/amd64/vmm/io/vrtc.h
+++ b/sys/amd64/vmm/io/vrtc.h
@@ -45,9 +45,9 @@
int vrtc_nvram_write(struct vm *vm, int offset, uint8_t value);
int vrtc_nvram_read(struct vm *vm, int offset, uint8_t *retval);
-int vrtc_addr_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
+int vrtc_addr_handler(struct vm *vm, bool in, int port, int bytes,
uint32_t *val);
-int vrtc_data_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
+int vrtc_data_handler(struct vm *vm, bool in, int port, int bytes,
uint32_t *val);
#ifdef BHYVE_SNAPSHOT
diff --git a/sys/amd64/vmm/io/vrtc.c b/sys/amd64/vmm/io/vrtc.c
--- a/sys/amd64/vmm/io/vrtc.c
+++ b/sys/amd64/vmm/io/vrtc.c
@@ -844,8 +844,7 @@
}
int
-vrtc_addr_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
- uint32_t *val)
+vrtc_addr_handler(struct vm *vm, bool in, int port, int bytes, uint32_t *val)
{
struct vrtc *vrtc;
@@ -867,8 +866,7 @@
}
int
-vrtc_data_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
- uint32_t *val)
+vrtc_data_handler(struct vm *vm, bool in, int port, int bytes, uint32_t *val)
{
struct vrtc *vrtc;
struct rtcdev *rtc;
@@ -915,24 +913,24 @@
} else {
*val = *((uint8_t *)rtc + offset);
}
- VCPU_CTR2(vm, vcpuid, "Read value %#x from RTC offset %#x",
+ VM_CTR2(vm, "Read value %#x from RTC offset %#x",
*val, offset);
} else {
switch (offset) {
case 10:
- VCPU_CTR1(vm, vcpuid, "RTC reg_a set to %#x", *val);
+ VM_CTR1(vm, "RTC reg_a set to %#x", *val);
vrtc_set_reg_a(vrtc, *val);
break;
case 11:
- VCPU_CTR1(vm, vcpuid, "RTC reg_b set to %#x", *val);
+ VM_CTR1(vm, "RTC reg_b set to %#x", *val);
error = vrtc_set_reg_b(vrtc, *val);
break;
case 12:
- VCPU_CTR1(vm, vcpuid, "RTC reg_c set to %#x (ignored)",
+ VM_CTR1(vm, "RTC reg_c set to %#x (ignored)",
*val);
break;
case 13:
- VCPU_CTR1(vm, vcpuid, "RTC reg_d set to %#x (ignored)",
+ VM_CTR1(vm, "RTC reg_d set to %#x (ignored)",
*val);
break;
case 0:
@@ -942,7 +940,7 @@
*val &= 0x7f;
/* FALLTHRU */
default:
- VCPU_CTR2(vm, vcpuid, "RTC offset %#x set to %#x",
+ VM_CTR2(vm, "RTC offset %#x set to %#x",
offset, *val);
*((uint8_t *)rtc + offset) = *val;
break;
diff --git a/sys/amd64/vmm/vmm_ioport.h b/sys/amd64/vmm/vmm_ioport.h
--- a/sys/amd64/vmm/vmm_ioport.h
+++ b/sys/amd64/vmm/vmm_ioport.h
@@ -31,7 +31,7 @@
#ifndef _VMM_IOPORT_H_
#define _VMM_IOPORT_H_
-typedef int (*ioport_handler_func_t)(struct vm *vm, int vcpuid,
+typedef int (*ioport_handler_func_t)(struct vm *vm,
bool in, int port, int bytes, uint32_t *val);
int vm_handle_inout(struct vm *vm, int vcpuid, struct vm_exit *vme, bool *retu);
diff --git a/sys/amd64/vmm/vmm_ioport.c b/sys/amd64/vmm/vmm_ioport.c
--- a/sys/amd64/vmm/vmm_ioport.c
+++ b/sys/amd64/vmm/vmm_ioport.c
@@ -122,8 +122,8 @@
val = vmexit->u.inout.eax & mask;
}
- error = (*handler)(vm, vcpuid, vmexit->u.inout.in,
- vmexit->u.inout.port, vmexit->u.inout.bytes, &val);
+ error = (*handler)(vm, vmexit->u.inout.in, vmexit->u.inout.port,
+ vmexit->u.inout.bytes, &val);
if (error) {
/*
* The value returned by this function is also the return value

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 8, 3:54 PM (52 m, 33 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15723778
Default Alt Text
D37163.diff (7 KB)

Event Timeline