@@ -326,19 +326,19 @@ vmexit_inout(struct vmctx *ctx, struct vhm_request *vhm_req, int *pvcpu)
326
326
int error ;
327
327
int bytes , port , in ;
328
328
329
- port = vhm_req -> reqs .pio_request .address ;
330
- bytes = vhm_req -> reqs .pio_request .size ;
331
- in = (vhm_req -> reqs .pio_request .direction == REQUEST_READ );
329
+ port = vhm_req -> reqs .pio .address ;
330
+ bytes = vhm_req -> reqs .pio .size ;
331
+ in = (vhm_req -> reqs .pio .direction == REQUEST_READ );
332
332
333
- error = emulate_inout (ctx , pvcpu , & vhm_req -> reqs .pio_request );
333
+ error = emulate_inout (ctx , pvcpu , & vhm_req -> reqs .pio );
334
334
if (error ) {
335
335
fprintf (stderr , "Unhandled %s%c 0x%04x\n" ,
336
336
in ? "in" : "out" ,
337
337
bytes == 1 ? 'b' : (bytes == 2 ? 'w' : 'l' ),
338
338
port );
339
339
340
340
if (in ) {
341
- vhm_req -> reqs .pio_request .value = VHM_REQ_PIO_INVAL ;
341
+ vhm_req -> reqs .pio .value = VHM_REQ_PIO_INVAL ;
342
342
}
343
343
}
344
344
}
@@ -349,45 +349,45 @@ vmexit_mmio_emul(struct vmctx *ctx, struct vhm_request *vhm_req, int *pvcpu)
349
349
int err ;
350
350
351
351
stats .vmexit_mmio_emul ++ ;
352
- err = emulate_mem (ctx , & vhm_req -> reqs .mmio_request );
352
+ err = emulate_mem (ctx , & vhm_req -> reqs .mmio );
353
353
354
354
if (err ) {
355
355
if (err == - ESRCH )
356
356
fprintf (stderr , "Unhandled memory access to 0x%lx\n" ,
357
- vhm_req -> reqs .mmio_request .address );
357
+ vhm_req -> reqs .mmio .address );
358
358
359
359
fprintf (stderr , "Failed to emulate instruction [" );
360
360
fprintf (stderr , "mmio address 0x%lx, size %ld" ,
361
- vhm_req -> reqs .mmio_request .address ,
362
- vhm_req -> reqs .mmio_request .size );
361
+ vhm_req -> reqs .mmio .address ,
362
+ vhm_req -> reqs .mmio .size );
363
363
364
- if (vhm_req -> reqs .mmio_request .direction == REQUEST_READ ) {
365
- vhm_req -> reqs .mmio_request .value = VHM_REQ_MMIO_INVAL ;
364
+ if (vhm_req -> reqs .mmio .direction == REQUEST_READ ) {
365
+ vhm_req -> reqs .mmio .value = VHM_REQ_MMIO_INVAL ;
366
366
}
367
367
}
368
368
}
369
369
370
370
static void
371
371
vmexit_pci_emul (struct vmctx * ctx , struct vhm_request * vhm_req , int * pvcpu )
372
372
{
373
- int err , in = (vhm_req -> reqs .pci_request .direction == REQUEST_READ );
373
+ int err , in = (vhm_req -> reqs .pci .direction == REQUEST_READ );
374
374
375
375
err = emulate_pci_cfgrw (ctx , * pvcpu , in ,
376
- vhm_req -> reqs .pci_request .bus ,
377
- vhm_req -> reqs .pci_request .dev ,
378
- vhm_req -> reqs .pci_request .func ,
379
- vhm_req -> reqs .pci_request .reg ,
380
- vhm_req -> reqs .pci_request .size ,
381
- & vhm_req -> reqs .pci_request .value );
376
+ vhm_req -> reqs .pci .bus ,
377
+ vhm_req -> reqs .pci .dev ,
378
+ vhm_req -> reqs .pci .func ,
379
+ vhm_req -> reqs .pci .reg ,
380
+ vhm_req -> reqs .pci .size ,
381
+ & vhm_req -> reqs .pci .value );
382
382
if (err ) {
383
383
fprintf (stderr , "Unhandled pci cfg rw at %x:%x.%x reg 0x%x\n" ,
384
- vhm_req -> reqs .pci_request .bus ,
385
- vhm_req -> reqs .pci_request .dev ,
386
- vhm_req -> reqs .pci_request .func ,
387
- vhm_req -> reqs .pci_request .reg );
384
+ vhm_req -> reqs .pci .bus ,
385
+ vhm_req -> reqs .pci .dev ,
386
+ vhm_req -> reqs .pci .func ,
387
+ vhm_req -> reqs .pci .reg );
388
388
389
389
if (in ) {
390
- vhm_req -> reqs .pio_request .value = VHM_REQ_PIO_INVAL ;
390
+ vhm_req -> reqs .pio .value = VHM_REQ_PIO_INVAL ;
391
391
}
392
392
}
393
393
}
0 commit comments