[PATCH] i386: Remove unused define's from hax and hvf

Julio Faracco posted 1 patch 4 years ago
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test checkpatch passed
Test FreeBSD passed
Test asan passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200323200538.202164-1-jcfaracco@gmail.com
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, Wenchao Wang <wenchao.wang@intel.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <rth@twiddle.net>, Colin Xu <colin.xu@intel.com>
target/i386/hax-i386.h     | 2 --
target/i386/hvf/hvf-i386.h | 2 --
2 files changed, 4 deletions(-)
[PATCH] i386: Remove unused define's from hax and hvf
Posted by Julio Faracco 4 years ago
Commit acb9f95a removed boundary checks for ID and VCPU ID. After that,
the max definitions of that boundaries are not required anymore. This
commit is only a code cleanup.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
---
 target/i386/hax-i386.h     | 2 --
 target/i386/hvf/hvf-i386.h | 2 --
 2 files changed, 4 deletions(-)

diff --git a/target/i386/hax-i386.h b/target/i386/hax-i386.h
index 54e9d8b057..70fe5cefeb 100644
--- a/target/i386/hax-i386.h
+++ b/target/i386/hax-i386.h
@@ -41,8 +41,6 @@ struct hax_state {
 };
 
 #define HAX_MAX_VCPU 0x10
-#define MAX_VM_ID 0x40
-#define MAX_VCPU_ID 0x40
 
 struct hax_vm {
     hax_fd fd;
diff --git a/target/i386/hvf/hvf-i386.h b/target/i386/hvf/hvf-i386.h
index 15ee4835cf..fbe4a350c5 100644
--- a/target/i386/hvf/hvf-i386.h
+++ b/target/i386/hvf/hvf-i386.h
@@ -21,8 +21,6 @@
 #include "x86.h"
 
 #define HVF_MAX_VCPU 0x10
-#define MAX_VM_ID 0x40
-#define MAX_VCPU_ID 0x40
 
 extern struct hvf_state hvf_global;
 
-- 
2.24.1


Re: [PATCH] i386: Remove unused define's from hax and hvf
Posted by Paolo Bonzini 3 years, 11 months ago
On 23/03/20 21:05, Julio Faracco wrote:
> Commit acb9f95a removed boundary checks for ID and VCPU ID. After that,
> the max definitions of that boundaries are not required anymore. This
> commit is only a code cleanup.
> 
> Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
> ---
>  target/i386/hax-i386.h     | 2 --
>  target/i386/hvf/hvf-i386.h | 2 --
>  2 files changed, 4 deletions(-)
> 
> diff --git a/target/i386/hax-i386.h b/target/i386/hax-i386.h
> index 54e9d8b057..70fe5cefeb 100644
> --- a/target/i386/hax-i386.h
> +++ b/target/i386/hax-i386.h
> @@ -41,8 +41,6 @@ struct hax_state {
>  };
>  
>  #define HAX_MAX_VCPU 0x10
> -#define MAX_VM_ID 0x40
> -#define MAX_VCPU_ID 0x40
>  
>  struct hax_vm {
>      hax_fd fd;
> diff --git a/target/i386/hvf/hvf-i386.h b/target/i386/hvf/hvf-i386.h
> index 15ee4835cf..fbe4a350c5 100644
> --- a/target/i386/hvf/hvf-i386.h
> +++ b/target/i386/hvf/hvf-i386.h
> @@ -21,8 +21,6 @@
>  #include "x86.h"
>  
>  #define HVF_MAX_VCPU 0x10
> -#define MAX_VM_ID 0x40
> -#define MAX_VCPU_ID 0x40
>  
>  extern struct hvf_state hvf_global;
>  
> 

Queued, thanks.

Paolo