Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow large VHD files #79

Merged
merged 3 commits into from
Sep 19, 2023
Merged

Allow large VHD files #79

merged 3 commits into from
Sep 19, 2023

Conversation

fysnet
Copy link
Collaborator

@fysnet fysnet commented Sep 18, 2023

This PR allows larger VHD image files. The size in question doesn't necessarily mean the size of the VHD file on disk. The size is the total size of the image emulated. This total size is in question.

Without this patch, the total size allowed is 65535 * 16 * 255, or roughly 32gig.
With this patch, the total size is calculated by who the creator of the image is, what the CHS values are, and possibly a total size of up to a limit of 2TB.

Since the original code was ported from QEMU, I ported an updated QEMU code snippet.
https://gitlab.com/qemu-project/qemu/-/blob/master/block/vpc.c?ref_type=heads#L305

This PR now allows VHD image files with a total size emulated less than or equal to 2TB.

@fysnet fysnet mentioned this pull request Sep 18, 2023
@fysnet fysnet marked this pull request as ready for review September 18, 2023 22:41
@stlintel stlintel merged commit 74ed550 into bochs-emu:master Sep 19, 2023
1 check passed
@fysnet fysnet deleted the vpc branch September 19, 2023 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants