Commit 6fcfeff9face289aa69a037e73a76c1a7b8c7411
1 parent
c433bedf
Fix compilation when x86_64 is defined
Showing
2 changed files
with
14 additions
and
8 deletions
hw/xen_blkif.h
@@ -59,8 +59,8 @@ DEFINE_RING_TYPES(blkif_x86_64, struct blkif_x86_64_request, struct blkif_x86_64 | @@ -59,8 +59,8 @@ DEFINE_RING_TYPES(blkif_x86_64, struct blkif_x86_64_request, struct blkif_x86_64 | ||
59 | union blkif_back_rings { | 59 | union blkif_back_rings { |
60 | blkif_back_ring_t native; | 60 | blkif_back_ring_t native; |
61 | blkif_common_back_ring_t common; | 61 | blkif_common_back_ring_t common; |
62 | - blkif_x86_32_back_ring_t x86_32; | ||
63 | - blkif_x86_64_back_ring_t x86_64; | 62 | + blkif_x86_32_back_ring_t x86_32_part; |
63 | + blkif_x86_64_back_ring_t x86_64_part; | ||
64 | }; | 64 | }; |
65 | typedef union blkif_back_rings blkif_back_rings_t; | 65 | typedef union blkif_back_rings blkif_back_rings_t; |
66 | 66 |
hw/xen_disk.c
@@ -440,10 +440,12 @@ static int blk_send_response_one(struct ioreq *ioreq) | @@ -440,10 +440,12 @@ static int blk_send_response_one(struct ioreq *ioreq) | ||
440 | dst = RING_GET_RESPONSE(&blkdev->rings.native, blkdev->rings.native.rsp_prod_pvt); | 440 | dst = RING_GET_RESPONSE(&blkdev->rings.native, blkdev->rings.native.rsp_prod_pvt); |
441 | break; | 441 | break; |
442 | case BLKIF_PROTOCOL_X86_32: | 442 | case BLKIF_PROTOCOL_X86_32: |
443 | - dst = RING_GET_RESPONSE(&blkdev->rings.x86_32, blkdev->rings.x86_32.rsp_prod_pvt); | 443 | + dst = RING_GET_RESPONSE(&blkdev->rings.x86_32_part, |
444 | + blkdev->rings.x86_32_part.rsp_prod_pvt); | ||
444 | break; | 445 | break; |
445 | case BLKIF_PROTOCOL_X86_64: | 446 | case BLKIF_PROTOCOL_X86_64: |
446 | - dst = RING_GET_RESPONSE(&blkdev->rings.x86_64, blkdev->rings.x86_64.rsp_prod_pvt); | 447 | + dst = RING_GET_RESPONSE(&blkdev->rings.x86_64_part, |
448 | + blkdev->rings.x86_64_part.rsp_prod_pvt); | ||
447 | break; | 449 | break; |
448 | default: | 450 | default: |
449 | dst = NULL; | 451 | dst = NULL; |
@@ -491,10 +493,12 @@ static int blk_get_request(struct XenBlkDev *blkdev, struct ioreq *ioreq, RING_I | @@ -491,10 +493,12 @@ static int blk_get_request(struct XenBlkDev *blkdev, struct ioreq *ioreq, RING_I | ||
491 | sizeof(ioreq->req)); | 493 | sizeof(ioreq->req)); |
492 | break; | 494 | break; |
493 | case BLKIF_PROTOCOL_X86_32: | 495 | case BLKIF_PROTOCOL_X86_32: |
494 | - blkif_get_x86_32_req(&ioreq->req, RING_GET_REQUEST(&blkdev->rings.x86_32, rc)); | 496 | + blkif_get_x86_32_req(&ioreq->req, |
497 | + RING_GET_REQUEST(&blkdev->rings.x86_32_part, rc)); | ||
495 | break; | 498 | break; |
496 | case BLKIF_PROTOCOL_X86_64: | 499 | case BLKIF_PROTOCOL_X86_64: |
497 | - blkif_get_x86_64_req(&ioreq->req, RING_GET_REQUEST(&blkdev->rings.x86_64, rc)); | 500 | + blkif_get_x86_64_req(&ioreq->req, |
501 | + RING_GET_REQUEST(&blkdev->rings.x86_64_part, rc)); | ||
498 | break; | 502 | break; |
499 | } | 503 | } |
500 | return 0; | 504 | return 0; |
@@ -698,13 +702,15 @@ static int blk_connect(struct XenDevice *xendev) | @@ -698,13 +702,15 @@ static int blk_connect(struct XenDevice *xendev) | ||
698 | case BLKIF_PROTOCOL_X86_32: | 702 | case BLKIF_PROTOCOL_X86_32: |
699 | { | 703 | { |
700 | blkif_x86_32_sring_t *sring_x86_32 = blkdev->sring; | 704 | blkif_x86_32_sring_t *sring_x86_32 = blkdev->sring; |
701 | - BACK_RING_INIT(&blkdev->rings.x86_32, sring_x86_32, XC_PAGE_SIZE); | 705 | + |
706 | + BACK_RING_INIT(&blkdev->rings.x86_32_part, sring_x86_32, XC_PAGE_SIZE); | ||
702 | break; | 707 | break; |
703 | } | 708 | } |
704 | case BLKIF_PROTOCOL_X86_64: | 709 | case BLKIF_PROTOCOL_X86_64: |
705 | { | 710 | { |
706 | blkif_x86_64_sring_t *sring_x86_64 = blkdev->sring; | 711 | blkif_x86_64_sring_t *sring_x86_64 = blkdev->sring; |
707 | - BACK_RING_INIT(&blkdev->rings.x86_64, sring_x86_64, XC_PAGE_SIZE); | 712 | + |
713 | + BACK_RING_INIT(&blkdev->rings.x86_64_part, sring_x86_64, XC_PAGE_SIZE); | ||
708 | break; | 714 | break; |
709 | } | 715 | } |
710 | } | 716 | } |